[Dune] How to force -std=c++0x in a dune project?
Arya Fallahi
arya.fallahi at gmail.com
Fri Feb 15 22:16:55 CET 2013
Dear Dune support team,
I am still elaborating to install my dune project on a linux server and I
have still problems. The problem is however this time very strange for me.
On machine 1 with operating system ubuntu the following packages are
installed:
automake 1.11.2
autoconf 2.68
libtool 2.4.2
openmpi 1.6.1
ALUGrid 1.52
dune-common rev. 7127
dune-geometry rev. 375
dune-grid rev. 8798
dune-istl rev. 1789
gcc 4.7.1
On this machine my dune code runs perfectly.
On machine 2 with operating system scientific linux the following packages
are installed:
automake 1.13
autoconf 2.69
libtool 2.4.2
openmpi 1.6.3
ALUGrid 1.52
dune-common rev. 7127
dune-geometry rev. 375
dune-grid rev. 8798
dune-istl rev. 1789
gcc 4.7.2
However, the same dune code returns an error for this system (the dune
modules compile perfectly), which is partly as follows:
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/afs/
desy.de/user/a/afallahi/workspace/dune-common -I/afs/
desy.de/user/a/afallahi/workspace/dune-geometry -I/afs/
desy.de/user/a/afallahi/workspace/dune-grid -I/afs/
desy.de/user/a/afallahi/workspace/dune-localfunctions -I/afs/
desy.de/user/a/afallahi/workspace/dune-istl -O3 -g0 --no-strict-aliasing
-I/tools/openmpi-1.6.3/include -pthread -DMPIPP_H -DENABLE_MPI=1
-I/tools/ALUGrid-1.52/include -I/tools/ALUGrid-1.52/include/serial
-I/tools/ALUGrid-1.52/include/duneinterface -DENABLE_ALUGRID
-I/tools/ALUGrid-1.52/include/parallel -I/tools/openmpi-1.6.3/include
-pthread -DMPIPP_H -DENABLE_MPI=1 -DWITH_INDEX_SETS -O3 -g0
--no-strict-aliasing -MT dgtd-dgtd.o -MD -MP -MF ".deps/dgtd-dgtd.Tpo" -c
-o dgtd-dgtd.o `test -f 'dgtd.cc' || echo './'`dgtd.cc; \
then mv -f ".deps/dgtd-dgtd.Tpo" ".deps/dgtd-dgtd.Po"; else rm -f
".deps/dgtd-dgtd.Tpo"; exit 1; fi
In file included from /afs/
desy.de/user/a/afallahi/workspace/dune-grid/dune/grid/common/grid.hh:12,
from /afs/
desy.de/user/a/afallahi/workspace/dune-grid/dune/grid/alugrid/3d/indexsets.hh:11
,
from /afs/
desy.de/user/a/afallahi/workspace/dune-grid/dune/grid/alugrid/3d/alugrid.hh:10
,
from /afs/
desy.de/user/a/afallahi/workspace/dune-grid/dune/grid/alugrid.hh:9,
from ../config.h:578,
from ../main/dgtd.hh:24,
from dgtd.cc:6:
/afs/
desy.de/user/a/afallahi/workspace/dune-common/dune/common/fvector.hh:20:2:
warning: #warning The FieldVector class exports its size by the enum member
'size'. This behavior is deprecated. In the future, 'size' will be a
method, which puts it in compliance with the stl conventions. To enable the
new behavior (and get rid of this warning), build your Dune with
--enable-fieldvector-size-is-method. If you do need the vector size as an
enum, use 'dimension'.
../cyrus/signal.hh: In member function 'void
Cyrus3d::SignalDataBase::showAll()':
../cyrus/signal.hh:640: error: using 'typename' outside of template
../cyrus/signal.hh:644: error: using 'typename' outside of template
../cyrus/signal.hh:648: error: using 'typename' outside of template
../cyrus/signal.hh:652: error: using 'typename' outside of template
../cyrus/signal.hh:656: error: using 'typename' outside of template
../cyrus/excitation.hh: In member function
'Cyrus3d::Excitation<FieldValueType, CoordinateType, dim>*
Cyrus3d::ExcitationDataBase<FieldValueType, CoordinateType,
dim>::excitation(std::string)':
../cyrus/excitation.hh:841: warning: statement is a reference, not call, to
function 'exit'
../cyrus/datainput.hh: In function 'std::string
Cyrus3d::stringValue(std::string)':
../cyrus/datainput.hh:87: error: expected primary-expression before '{'
token
../cyrus/datainput.hh:87: error: expected ';' before '{' token
../cyrus/datainput.hh:87: error: expected `;' before '}' token
This seems to be due to the incorrect standard chosen for this machine. In
the first line "g++" should be "g++ -std=c++0x" as in machine 1. I googled
and searched throughout the Dune Build howto to find the way to set this in
the opts file. However, I could not find any thing. My opt file is pretty
simple:
CONFIGURE_FLAGS=" MPICC='/tools/openmpi-1.6.3/bin/mpicc'
CXXFLAGS='-O3 -g0
--no-strict-aliasing'
CPPFLAGS='-O3 -g0
--no-strict-aliasing'
--enable-parallel
--prefix='/tools/cyrus'
--with-metis='/tools/metis-5.0.2'
--with-alugrid='/tools/ALUGrid-1.52' "
I tried adding "-std=c++0x" to the CXXFLAGS but it prevents the other
dune-modules to compile. My question is do you know the correct way to
force the c++0x standard for compiling the code?
Thank you in advance for your assistance and best regards,
Arya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20130215/4dbf4584/attachment.htm>
More information about the Dune
mailing list