[Dune] Grid compile error

Agnese, Marco m.agnese13 at imperial.ac.uk
Wed Jan 29 12:14:55 CET 2014


Hello Markus,

1) the output of the grep is:

#define DUNE_ALBERTA_VERSION 0x300
   application uses the ALBERTA_CPPFLAGS */
#define HAVE_ALBERTA ENABLE_ALBERTA
    defining ALBERTAGRID during compilation typedefs this grid implementation as GridType
 #if HAVE_DUNE_GRID && defined ALBERTAGRID && ! defined USED_ALBERTAGRID_GRIDTYPE
  #if ! (WORLDDIM == ALBERTA_DIM)
    #error "Preprocessor assertion WORLDDIM == ALBERTA_DIM failed."
  #define USED_ALBERTAGRID_GRIDTYPE 1
#endif // #if HAVE_DUNE_GRID && defined ALBERTAGRID && ..

 therefore it seems that ALBERTA is enable.

2) the first line of dune_test.cc is

 #include "/home/ma2413/dune/dune-test/config.h"

3) my dune-test/src/Makefile.am is:

SUBDIRS =

noinst_PROGRAMS = dune_test

dune_test_SOURCES = dune_test.cc

dune_test_CPPFLAGS = $(AM_CPPFLAGS) \
	$(DUNEMPICPPFLAGS) \
	$(UG_CPPFLAGS) \
	$(AMIRAMESH_CPPFLAGS) \
	$(ALBERTA_CPPFLAGS) \
	$(ALUGRID_CPPFLAGS)

dune_test_LDADD = \
	$(DUNE_LDFLAGS) $(DUNE_LIBS) \
	$(ALUGRID_LDFLAGS) $(ALUGRID_LIBS) \
	$(ALBERTA_LDFLAGS) $(ALBERTA_LIBS) \
	$(AMIRAMESH_LDFLAGS) $(AMIRAMESH_LIBS) \
	$(UG_LDFLAGS) $(UG_LIBS) \
	$(DUNEMPILIBS)	\
	$(LDADD)

dune_test_LDFLAGS = $(AM_LDFLAGS) \
	$(DUNEMPILDFLAGS) \
	$(UG_LDFLAGS) \
	$(AMIRAMESH_LDFLAGS) \
	$(ALBERTA_LDFLAGS) \
	$(ALUGRID_LDFLAGS) \
	$(DUNE_LDFLAGS)

AUTOMAKE_OPTIONS = foreign 1.5

DISTCHECK_CONFIGURE_FLAGS = --with-dune-grid=$(DUNE_GRID_ROOT)  CXX="$(CXX)" CC="$(CC)"

include $(top_srcdir)/am/global-rules

therefore it seems that all the flags are declared. Like I told to Christian the preprocessor variable HAVE_ALBERTA is false. Is it correct?
thank you very much for your help,
Marco.

________________________________________
From: Markus Blatt [markus at dr-blatt.de]
Sent: Tuesday, January 28, 2014 7:42 PM
To: dune at dune-project.org
Subject: Re: [Dune] Grid compile error

On Tue, Jan 28, 2014 at 05:51:53PM +0000, Agnese, Marco wrote:
> Hello,
> when I compile my module I use the following option file:
>
> PATH_MPI="$HOME/openmpi/openmpi-1.6.5-install"
> PATH_ALBERTA="$HOME/alberta/alberta-3.0.0-rc7-install"
> PATH_ALUGRID="$HOME/alugrid/ALUGrid-1.52-install-openmpi"
> PATH_PARMETIS="$HOME/parmetis/parmetis-4.0.3-install-openmpi"
> CONFIGURE_FLAGS="CXX=g++ --with-alberta=$PATH_ALBERTA --with-alugrid=$PATH_ALUGRID --with-metis=$PATH_PARMETIS --with-parmetis=$PATH_PARMETIS --enable-fieldvector-size-is-method --enable-parallel --enable-experimental-grid-extensions --disable-documentation"
> OFLAGS0="-g -Wall -Wfatal-errors"
> OPTIFLAGS="-O3 -funroll-loops -finline-functions -ffast-math -fomit-frame-pointer -msse3 -mfpmath=sse -Wall"
>
> #MPICC=$PATH_MPI/bin/mpicc
>
> The full output of the compilation is :
>
> make[1]: ingresso nella directory "/home/ma2413/dune/dune-test/src"
> g++ -std=c++0x -DHAVE_CONFIG_H -I. -I..  -I/home/ma2413/dune/dune-common-2.2.1 -I/home/ma2413/dune/dune-geometry-2.2.1 -I/home/ma2413/dune/dune-grid-2.2.1 -I/home/ma2413/openmpi/openmpi-1.6.5-install/include -pthread -DMPIPP_H -DENABLE_MPI=1    -I/home/ma2413/openmpi/openmpi-1.6.5-install/include -pthread -DMPIPP_H -DENABLE_MPI=1 -I/home/ma2413/alugrid/ALUGrid-1.52-install-openmpi/include -I/home/ma2413/alugrid/ALUGrid-1.52-install-openmpi/include/serial -I/home/ma2413/alugrid/ALUGrid-1.52-install-openmpi/include/duneinterface -DENABLE_ALUGRID -I/home/ma2413/alugrid/ALUGrid-1.52-install-openmpi/include/parallel   -g -O2 -Wall -MT dune_test-dune_test.o -MD -MP -MF .deps/dune_test-dune_test.Tpo -c -o dune_test-dune_test.o `test -f 'dune_test.cc' || echo './'`dune_test.cc

I do not see any alberta flags here. Please check
1. whether alberta was found at all:
   grep ALBERTA /home/ma2413/dune/dune-test/config.h
   if there is no "#define HAVE_ALBERTA ENABLE_ALBERTA", please send config.log
2. You did include config.h at the top of your *.cc file
3. You have added the ALBERTA flags in dune-test/src/Makefile.am:
   dune_test_CPPFLAGS = $(AM_CPPFLAGS) \
        $(DUNEMPICPPFLAGS) \
        $(ALBERTA_CPPFLAGS)
   dune_test_LDADD = \
        $(DUNE_LDFLAGS) $(DUNE_LIBS) \
        $(ALUGRID_LDFLAGS) $(ALUGRID_LIBS) \
        $(ALBERTA_LDFLAGS) $(ALBERTA_LIBS)

Markus
--
Do you need more support with DUNE or HPC in general?

Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858  Fax: +49 (0)322 1108991658



More information about the Dune mailing list