[Dune] problem with alberta, cannot find "ldunealbertagrid_0d"

Christian Engwer christi at uni-hd.de
Tue Feb 2 18:23:47 CET 2010


Hi Martin,

> providing a default for ALBERTA_DIM is bad because it disables the magic of
> gridtype.hh. If you write
> 
> make GRIDDIM=2 GRIDTYPE=ALBERTAGRID

currently it is broken for every normal user. I would favour a
solution which untangles the GRIDDIM hack and the dimension of Alberta.

> you want your program to correctly compile and link with AlbertaGrid< 2 > and
> ALBERTA_DIM=WORLDDIM=GRIDDIM=2. This is currently supported. Any default other
> than ALBERTA_DIM=$(WORLDDIM) would break this. Now, we did not want to give a
> default for GRIDDIM, so it defaults to the invalid value 0.
> 
> The discussed problem only occurs, if don't use this magic, or if WORLDDIM >
> 3. Then, the ALL_PKG_LIBS contain this troublesome -lalberta_$(ALBERTA_DIM)d,
> which does not exist.
> 
> One real solution would be your suggestion (h). Another feasible suggestion
> was made Andreas and Robert:
> 
> (i) add both, libalberta_0d and libalbertagrid_0d, to the dune-grid libraries.
> This would only lack the WORLDDIM > 3 problem.
> 
> For me, solutions (h) and (a) are becoming the most promising. But as
> Christian indicated that he might have antother solution, I would wait with
> the decision.

The nested variable expansion seems to be a viable solution and should
work on most platforms. An other option is to add shell-substitutions
to the linker command line. Now we can use shell-ifs to react on the
specific dimension.

Two patches attached... and you can discuss these...

The shell substitution is for more powerful, while the
nested-make-substitution is slightly more readable.

> Maybe I should also mention that ALBERTA can support WORLDDIM > 3, if the user
> configures ALBERTA for it. This does not change the grid dimensions, however,
> i.e., ALBERTA supports only 1d, 2d and 3d grids. The DUNE bindings should not
> have any trouble with this, except for two things:
> - the m4 file has to detect the available libraries (libalberta_nd)
> - the according DUNE library libalbertagrid_nd has to be compiled
> Just in case this is of interest...

Which libs do I have to use if want to have a 2D Grid in 4D? Just out
of curiosity.

Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alberta.m4-nested-subst.diff
Type: text/x-diff
Size: 4781 bytes
Desc: not available
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20100202/edc615bc/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alberta.m4-shell-subst.diff
Type: text/x-diff
Size: 3996 bytes
Desc: not available
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20100202/edc615bc/attachment-0001.diff>


More information about the Dune mailing list