[Dune] small problem in dune-grid-howto, visualization.cc

Christian Engwer christi at uni-hd.de
Tue Mar 10 14:36:53 CET 2009


Dear all,

> the visualization.cc only compiles if the GRIDDIM macro is defined.
> Therefore, I suggest to add the attached patch to the dune-grid-howto. Then
> it should also compile with Benedikt's configuration options.

sorry Martin, but the GRIDDIM macro is an optional feature that should
not be necessary to use the grid howto. It is not convieent if you
have to reconfigure the whole project if you just want to use a
different grid.

I must apologize that I didn't notice this problem in the beginning.

Christian


> 
> Martin D.
> 
> 2009/3/10 Benedikt Oswald <benedikt.oswald at psi.ch>
> 
> > Hi Martin, the configure options are below. thanks for looking! Greetings,
> > Benedikt
> >
> >
> > ========================
> >
> >
> >
> > #AUTOGEN_FLAGS="--ac=2.59 --am=-1.9.2"
> >
> > OFLAGS2="-O3 -DNDEBUG \
> >  -funroll-loops -finline-functions \
> >  --param max-inline-insns-single=3000 \
> >        --param large-function-growth=3500 \
> >  --param inline-unit-growth=3000 \
> >  -ffast-math -fomit-frame-pointer -march=opteron -msse3 -mfpmath=sse \
> >   -Wall"
> > OFLAGS3=""
> >
> > CONFIGURE_FLAGS="CXX='mpicxx' CC='mpicc' LD='mpicxx'
> >                 CXXFLAGS='-DMPICH_IGNORE_CXX_SEEK '
> >
> > CPPFLAGS='-DMPICH_IGNORE_CXX_SEEK '
> >                 LDFLAGS='-lgfortran  /usr/lib64/libblas.so.3.1.1 '
> >
> > LTFLAGS='-all-static '
> >                 --enable-experimental-hades3deld
> >                 --disable-shared
> >                 --disable-documentation
> >                 --enable-static
> >                 --enable-parallel
> >                 --enable-boost
> >
> > --with-boost='/scratch2/amas/oswald/extlib/merlin/boost-1.37.0'
> >                 --enable-debug-high
> >                 --enable-message-high
> >
> > --with-trilinos='/scratch2/amas/oswald/extlib/merlin/trilinos-9.0.1-openmpi-1.2.5'
> >                 --enable-trilinos-solver
> >
> > --with-geoexporter='/scratch2/amas/oswald/ownlib/merlin/faraday/euklid'
> >                 --prefix='/scratch2/amas/oswald/ownlib/merlin/hades'
> >
> > --with-metis='/scratch2/amas/oswald/extlib/merlin/metis-4.0'
> >
> > --with-alugrid='/scratch2/amas/oswald/extlib/merlin/ALUGrid-1.14-openmpi-1.2.5'
> >                 --with-rlog='/scratch2/amas/oswald/extlib/merlin/rlog-1.4'"
> >
> >
> >
> >
> >
> >
> >
> > ========================
> >
> > Martin Nolte wrote:
> > > Hallo Benedikt,
> > >
> > > It sure compiles for me (revison 245; the other core modules are also up
> > > to date).
> > >
> > > So I will have to ask you to provide more data. Can you tell me your
> > > configure options (i.e., the file you passed with --opts to
> > > dunecontrol)? The compiler version might also be of interest (though I
> > > don't think this is the problem).
> > >
> > > Yours,
> > >
> > > Martin
> > >
> > > Benedikt Oswald wrote:
> > >> Dear Dune, thanks for updating the dune-grid-howto, in the release 1.2.
> > >>
> > >> There seems to be another problem, concerning visualization.cc
> > >>
> > >> Thanks and greetings, Benedikt
> > >>
> > >>
> > >> visualization.cc: In function ‘int main(int, char**)’:
> > >> visualization.cc:62: error: ‘dimGrid’ was not declared in this scope
> > >> visualization.cc:62: error: ‘dimGrid’ cannot appear in a
> > >> constant-expression
> > >> visualization.cc:62: error: template argument 1 is invalid
> > >> visualization.cc:62: error: template argument 2 is invalid
> > >> visualization.cc:62: error: template argument 1 is invalid
> > >> visualization.cc:62: error: invalid type in declaration before ‘;’ token
> > >> visualization.cc:63: error: request for member ‘grid’ in ‘uc4’, which
> > >> is of non-class type ‘int’
> > >> visualization.cc:66: error: ‘dimGrid’ cannot appear in a
> > >> constant-expression
> > >> visualization.cc:66: error: ‘dimGrid’ cannot appear in a
> > >> constant-expression
> > >> visualization.cc:66: error: template argument 1 is invalid
> > >> visualization.cc:66: error: template argument 2 is invalid
> > >> visualization.cc:66: error: template argument 1 is invalid
> > >> visualization.cc:66: error: invalid type in declaration before ‘;’ token
> > >> visualization.cc:67: error: request for member ‘grid’ in ‘uc5’, which
> > >> is of non-class type ‘int’
> > >> make[2]: *** [visualization-visualization.o] Error 1
> > >> make[2]: Leaving directory
> > >> `/scratch2/amas/oswald/svnwork/merlin/dune-1.2/dune-grid-howto'
> > >> make[1]: *** [all-recursive] Error 1
> > >> make[1]: Leaving directory
> > >> `/scratch2/amas/oswald/svnwork/merlin/dune-1.2/dune-grid-howto'
> > >> make: *** [all] Error 2
> > >> --- Failed to build dune-grid-howto ---
> > >> Execution of dunecontrol terminated due to errors!
> > >>
> > >>
> > >>
> > >
> >
> >
> > --
> >
> > ------------------------------------------------------------------------------------------------------------------
> > Benedikt Oswald, Dr. sc. techn., dipl. El. Ing. ETH, www.psi.ch,
> > Computational Accelerator Scientist,
> > Paul Scherrer  Institute (PSI), CH-5232 Villigen, Suisse,
> > benedikt.oswald at psi.ch, +41(0)56 310 32 12
> >
> > "The budget should be balanced, the Treasury should be refilled, public
> > debt should be reduced,
> > the arrogance of officialdom should be tempered and controlled, and the
> > assistance to foreign
> > lands should be curtailed lest Rome become bankrupt. People must again
> > learn to work, instead
> > of living on public assistance." (Cicero, ca. 55 BC).
> >
> > http://amas.web.psi.ch/people/boswald/index.html
> >
> > ------------------------------------------------------------------------------------------------------------------
> >
> >
> > _______________________________________________
> > Dune mailing list
> > Dune at dune-project.org
> > http://lists.dune-project.org/mailman/listinfo/dune
> >
> 
> 
> 

> Index: visualization.cc
> ===================================================================
> --- visualization.cc	(Revision 245)
> +++ visualization.cc	(Arbeitskopie)
> @@ -15,6 +15,8 @@
>  
>  #ifdef GRIDDIM
>  const int dimGrid = GRIDDIM;
> +#else
> +const int dimGrid = 2;
>  #endif
>  
>  
> @@ -50,13 +52,11 @@
>      dowork( uc2.grid(), 3 );
>  #endif
>  
> -#ifdef GRIDDIM
>  #if HAVE_ALBERTA
>      UnitCube< Dune::AlbertaGrid< dimGrid, dimGrid >, 1 > uc3;
>      // note: The 3d cube cannot be bisected recursively
>      dowork( uc3.grid(), (dimGrid < 3 ? 6 : 0 ) );
>  #endif
> -#endif
>      */
>  
>      UnitCube< Dune::SGrid< dimGrid, dimGrid >, 1 > uc4;

> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune





More information about the Dune mailing list