[Wien] configuring static linking with siteconfig

Pavel Ondračka pavel.ondracka at email.cz
Mon Oct 30 17:13:43 CET 2017


Ruh Thomas píše v Po 30. 10. 2017 v 15:03 +0000:
> Dear Pavel,
> 
> I looked into static linking with no / minimal changes into the
> default Makefiles of WIEN2k and I am afraid it is not possible - the
> suggested workaround by Gavin should not work. At least it did not
> for me. Mainly because, as Gavin already mentioned, siteconfig_lapw
> sets all the linking up dynamically.
> Our point of view in the WIEN-group is that dynamic linking is
> preferential anyway (especially if you want mpi-parallelism), because
> the binaries would be rather large.
> 
> In case you absolutely need statically linked ScaLAPACK and/or FFTW-
> libraries you will have to manually adapt the necessary Makefiles. 
> 
> Kind regards
> Thomas
> 
Thanks for the response,

I sorted the scalapack problem by leaving the SCALAPACK variables blank
and adding the static scalapack library to the "RP  Parallel-Libs for
gfortran:" field, however this will not work for static FFTW where the
includes and def are needed as well and defining those would already
force the dynamic linking flags.
Editing Makefiles is fine, however the annoying thing is that I can't
do any further changes with siteconfig later, since everything will be
regenerated :-(
I agree with prof. Marks that it would be definitely nice to have, but
I understand that only few people do this. I believe the new siteconfig
is better for new users, however the static linking was definitely
easier before.

BTW if you use link time optimizations for everything, the compiler
should be able to optimize away the unneeded symbols and functions so
that the resulting binaries are quite small (+ there might even be some
extra optimizations possible due to stuff like inter-library inlining,
however this is probably negligible).

Best regards
Pavel


More information about the Wien mailing list