[Dune] Alberta with Dune
Ganesh Diwan
gcdiwan83 at gmail.com
Mon Feb 9 17:53:24 CET 2015
Hi Ansgar
My Makefile.am in /src is:
SUBDIRS =
noinst_PROGRAMS = dune_foo
dune_foo_SOURCES = dune_foo.cc
dune_foo_CPPFLAGS = $(AM_CPPFLAGS) \
$(DUNEMPICPPFLAGS) \
$(UG_CPPFLAGS) \
$(AMIRAMESH_CPPFLAGS) \
$(ALBERTA_CPPFLAGS) \
$(ALUGRID_CPPFLAGS)
# The libraries have to be given in reverse order (most basic libraries
# last). Also, due to some misunderstanding, a lot of libraries include the
# -L option in LDFLAGS instead of LIBS -- so we have to include the LDFLAGS
# here as well.
dune_foo_LDADD = \
$(DUNE_LDFLAGS) $(DUNE_LIBS) \
$(ALUGRID_LDFLAGS) $(ALUGRID_LIBS) \
$(ALBERTA_LDFLAGS) $(ALBERTA_LIBS) \
$(AMIRAMESH_LDFLAGS) $(AMIRAMESH_LIBS) \
$(UG_LDFLAGS) $(UG_LIBS) \
$(DUNEMPILIBS) \
$(LDADD)
dune_foo_LDFLAGS = $(AM_LDFLAGS) \
$(DUNEMPILDFLAGS) \
$(UG_LDFLAGS) \
$(AMIRAMESH_LDFLAGS) \
$(ALBERTA_LDFLAGS) \
$(ALUGRID_LDFLAGS) \
$(DUNE_LDFLAGS)
# don't follow the full GNU-standard
# we need automake 1.5
AUTOMAKE_OPTIONS = foreign 1.5
# pass most important options when "make distcheck" is used
DISTCHECK_CONFIGURE_FLAGS = --with-dune-common=$(DUNE_COMMON_ROOT)
--with-dune-geometry=$(DUNE_GEOMETRY_ROOT)
--with-dune-grid=$(DUNE_GRID_ROOT) --with-dune-istl=$(DUNE_ISTL_ROOT)
--with-dune-localfunctions=$(DUNE_LOCALFUNCTIONS_ROOT)
--with-dune-fem=$(DUNE_FEM_ROOT)
--with-dune-grid-howto=$(DUNE_GRID_HOWTO_ROOT)
--with-dune-grid-dev-howto=$(DUNE_GRID_DEV_HOWTO_ROOT) CXX="$(CXX)"
CC="$(CC)" ALBERTA_DIM="$(WORLDDIM)"
EXTRA_DIST = CMakeLists.txt
include $(top_srcdir)/am/global-rules
Here I have manually added ALBERTA_DIM="$(WORLDDIM)" in the configure flags
line but the problem remains. Is this the correct way of defining
alberta_dim? A 2013 Grid interface howto document says one needs to give
--with-alberta-dim=2, --with-alberta-world-dim=2
while configuring Dune and only these dimensions can then be used. Do you
suggest I rerun ./configure in my dune-common folder with these values set?
If Alberta is going to have restrictions on the dimensions, is it possible
to consider Gmsh?
Thanks,
Ganesh
On Mon, Feb 9, 2015 at 4:29 PM, Ansgar Burchardt <"Ansgar
Burchardt"@43-1.org> wrote:
> Hi,
>
> On 02/09/2015 05:08 PM, Ganesh Diwan wrote:
> > Is -DENABLE_ALBERTA=1 included in the compiler flags? You have to add
> > $(ALBERTA_CPPFLAGS) in the Makefile.am for this, and I think also
> > ALBERTA_LIBS and ALBERTA_LDFLAGS to the LIBS (LDFLAGS) variables of
> your
> > program.
> >
> > My Makefile has
> >
> > ALBERTA1D_CPPFLAGS = [...]
> > ALBERTA1D_LDFLAGS = [...]
> > ALBERTA1D_LIBS = [...]
> >
> > Should this not suffice?
>
> No, as far as I know that alone is not enough: some optional features
> still have to be explicitly added to the compiler flags[1], just having
> them detected by the configure script is not enough.
>
> Please make sure that in Makefile.am
>
> - yourprogram_CPPFLAGS includes $(ALBERTA_CPPFLAGS)
> - yourprogram_LDADD includes $(ALBERTA_LDFLAGS) $(ALBERTA_LIBS)
> - yourprogram_LDFLAGS includes $(ALBERTA_LDFLAGS)
>
> and that ALBERTA_DIM is set to the world dimension (also in Makefile.am).
>
> Ansgar
>
> [1] Note that DUNE will default to add all flags by default in the
> future, though I guess that might not work with Alberta as the
> flags depend on the dimension.
> cf.
> <https://dune-project.org/flyspray/index.php?do=details&task_id=1557>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20150209/82769aa0/attachment.htm>
More information about the Dune
mailing list