On 10/10/2018 13:32, Jakob Schiøtz wrote:
On 10 Oct 2018, at 10:38, Kenneth Hoste <kenneth.ho...@ugent.be> wrote:
Dear Jakob,
Resolving the value of an environment variable to define another environment
variable via modextravars currently isn't possible.
We have a mechanism to specify that an environment variable should be resolved at
"module load" time, but it currently only works in a very specific situation
(for $HOME in --subdir-user-modules).
But you can work around this, with either modtclfooter or modluafooter,
depending on which syntax your module files are being generated in.
Something like this should work (totally untested, I'll leave that up to you):
modtclfooter = "setenv GPAW_FFTWSO $::env(EBROOTFFTW)/lib"
or
modluafooter = 'setenv("GPAW_FFTWSO", pathJoin(os.getenv("EBROOTFFTW"), "lib”)'
Dear Kenneth,
Thanks for your reply. I am not sure this is portable, since the EB file
should work regardless of whether the site using it uses one or the other
module syntax.
I think that before trying this I may try to patch the GPAW python code to do
the right thing instead.
You can add both, modtclfooter will only be used if the generated module
files are in Tcl syntax, and ignored otherwise; likewise for modluafooter.
The best option would be to enhance support for runtime resolution of
environment variables in the EasyBuild framework though... :)
regards,
Kenneth
Best regards
Jakob
regards,
Kenneth
Best regards
Jakob
--
Jakob Schiøtz, professor, Ph.D.
Department of Physics
Technical University of Denmark
DK-2800 Kongens Lyngby, Denmark
http://www.fysik.dtu.dk/~schiotz/
--
Jakob Schiøtz, professor, Ph.D.
Department of Physics
Technical University of Denmark
DK-2800 Kongens Lyngby, Denmark
http://www.fysik.dtu.dk/~schiotz/