[Dune] problem with alberta, cannot find "ldunealbertagrid_0d"
Jö Fahlke
jorrit at jorrit.de
Tue Feb 2 16:06:44 CET 2010
Am Tue, 2. Feb 2010, 10:13:42 +0100 schrieb Martin Nolte:
> (a) don't include ALBERTA_CPPFLAGS in ALL_PKG_CPPFLAGS (solves the problem if
> you're never using ALBERTA.
>
> (b) provide a fix (like 2) default for ALBERTA_DIM (which is currently
> $(WORLDDIM)). This would disable the preprocessor magic for ALBERTA.
Can you elaborate on what exactly it would disable? I don't see what the
preprocessor has to do with it.
If we let configure substitute "ALBERTA_DIM = 2" into the Makfiles per
default, this can still be overridden, both in the Makefile.am and on the Make
command line. I mean, this is essentially what is done currently, only
instead of "ALBERTA_DIM = 2" we substitude "ALBERTA_DIM = $(WORLDDIM)".
> (c) provide a fix default for WORLDDIM (which is currently $(GRIDDIM)). Again,
> this influences the preprocessor magic
Same comment as for (b).
> (d) provide a nonzero default for GRIDDIM (currently 0). This would fix the
> problem, but the user gets no warning if he does not specify GRIDDIM.
What information would that warning convey to the user? "Just set some value
for GRIDDIM"? If that is the case, why didn't we just pick a value? In any
case, even if we just pick a value, it can always be overriden in the
Makefile.am and on the make command line.
> (e) add a libdunealbertagrid_0d and remove -lalberta_nd from the
> ALBERTA_CPPFLAGS. Then, -lalberta_nd should still be included through libtool,
> but I consider this a very dirty hack. I even doubt that it will be reliable.
I doubt that it will work correctly in the shared library case, since
currently there appear to be direct calls from the program code into
-lalberta_nd (see option (f)).
> (f) move all calls to -lalberta_nd into the libalbertagrid_nd (and add
> libalbertagrid_0d). This way, the libtool problem does not occur, but the code
> gets a lot slower (due to the added indirection in the ALBERTA calls).
Not to mention that it probably means a lot of work. And not only right now,
it has to maintained in the future as well.
> (g) leave it as it is and let the user provide a feasable default for
> ALBERTA_DIM (which is the variable you actually meant).
OK, why don't we just provide a default? It can still be overriden in the
Makefile.am and on the make command line.
(h) Make use of computed make variable names, like "ALBERTA_CPPFLAGS =
$(ALBERTA$(ALBERTA_DIM)D_CPPFLAGS)". This would result in empty
$(ALBERTA_CPPFLAGS) in all cases where ALBERTA$(ALBERTA_DIM)D_CPPFLAGS is an
undefined variable. While this is non-POSIX, the automake manual says it is
widely supported.
My favorite would be a --with-default-alberta-dim configure switch. If that
is not given a configure time, ALBERTA_DIM can default to '2' or '3' (I don't
care which one exactly). It can even default to '$(WOLDDIM)' for all I care,
but only if that is fixed to have a sane default first.
Thanks,
Jö.
--
This message is protected by DoubleROT13 encryption
Attempting to decode it violates the DMCA/WIPO acts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20100202/51c9997b/attachment.sig>
More information about the Dune
mailing list