← Back to team overview

dolfin team mailing list archive

Re: Compilation warnings

 

On Monday June 6 2011 14:55:30 Garth N. Wells wrote:
> On 06/06/11 22:42, Johan Hake wrote:
> > Hello!
> > 
> > I have just tried to compile DOFLIN on a CentOS5.5 (RHEL5) server, and it
> > is almost there. However I get these warnings, which becomes errors:
> > 
> > FiniteElement.h
> > ---------------
> > cc1plus: warnings being treated as errors
> > /home/hake/local/src/dolfin/dolfin/fem/FiniteElement.h:35: warning:
> > ‘class dolfin::FiniteElement’ has virtual functions but non-virtual
> > destructor
> > 
> > OpenMpAssemble.cpp
> > ------------------
> > cc1plus: warnings being treated as errors
> > /home/hake/local/src/dolfin/dolfin/fem/OpenMpAssembler.cpp: In static
> > member function ‘static void
> > dolfin::OpenMpAssembler::assemble_cells(dolfin::GenericTensor&, const
> > dolfin::Form&, dolfin::UFC&, const dolfin::MeshFunction<unsigned int>*,
> > std::vector<double, std::allocator<double> >*)’:
> > /home/hake/local/src/dolfin/dolfin/fem/OpenMpAssembler.cpp:177: warning:
> > iteration variable ‘cell_index’ is unsigned
> > /home/hake/local/src/dolfin/dolfin/fem/OpenMpAssembler.cpp: In static
> > member function ‘static void
> > dolfin::OpenMpAssembler::assemble_cells_and_exterior_facets(dolfin::Gener
> > icTensor&, const dolfin::Form&, dolfin::UFC&, const
> > dolfin::MeshFunction<unsigned int>*, std::vector<double,
> > std::allocator<double> >*)’:
> > /home/hake/local/src/dolfin/dolfin/fem/OpenMpAssembler.cpp:295: warning:
> > iteration variable ‘cell_index’ is unsigned
> > /home/hake/local/src/dolfin/dolfin/fem/OpenMpAssembler.cpp: In static
> > member function ‘static void
> > dolfin::OpenMpAssembler::assemble_interior_facets(dolfin::GenericTensor&,
> > const dolfin::Form&, dolfin::UFC&, const dolfin::MeshFunction<unsigned
> > int>*, std::vector<double, std::allocator<double> >*)’:
> > /home/hake/local/src/dolfin/dolfin/fem/OpenMpAssembler.cpp:454: warning:
> > iteration variable ‘facet_index’ is unsigned
> > 
> > The first one is easy to fix, but I wonder why the compiler has start
> > complaining about that now. The other warning is just weird. Since when
> > is it not good practice to iterate over an unsigned variable. And why is
> > it not complaining elsewhere? Something to do with openmp? Not sure
> > which version of openmp it is on the server...
> > 
> > The version of g++ is 4.1.2.
> 
> Older versions of OpenMP do not support loops over unsigned int.
> 
> Is there a reason that you're looking at CentOS - I gave up with 5.5 a
> long time ago. 

Well, I wish other would have too... I am forced to use a cluster which is 
using CentOS in Australia(!?). They tend to use CentOS a lot in San Diego too. 
I have the impression that where ever cloud computing is a focus, CentOS turns 
up...

I think I just disable openmp for the time being.

Johan


> If you want something based of RHEL 6, try Scientific Linux,
> 
>     http://www.scientificlinux.org/
> 
> Garth
> 
> > Johan
> > 
> > 
> > _______________________________________________
> > Mailing list: https://launchpad.net/~dolfin
> > Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~dolfin
> > More help   : https://help.launchpad.net/ListHelp
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help   : https://help.launchpad.net/ListHelp


References