<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 21 Nov 2018, at 14:45, Miguel Zilhão <<a href="mailto:miguel.zilhao.nogueira@tecnico.ulisboa.pt" class="">miguel.zilhao.nogueira@tecnico.ulisboa.pt</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">hi all,<br class=""><br class="">i'm compiling ET on a local cluster that uses the module system. on this system, once one does <br class="">"module load <...>", the respective path is added to an environmental variable. for instance, doing<br class=""><br class=""> $ module load HDF5<br class=""><br class="">sets the environmental variable $EBROOTHDF5:<br class=""><br class=""> $ echo $EBROOTHDF5<br class=""> /home/share/easybuild/software/HDF5/1.8.20-GCC-7.3.0-2.30-generic<br class=""><br class="">so i was trying to use these in my configuration file, by adding the lines<br class=""><br class=""> HDF5_DIR = $EBROOTHDF5<br class=""> HDF5_LIB_DIRS = ${EBROOTHDF5}/lib<br class=""> HDF5_INC_DIRS = ${EBROOTHDF5}/include<br class=""><br class="">etc, to it. however, these environmental variables don't seem to be correctly expanded, as i get <br class="">things like the following:<br class=""><br class=""> Running configuration script for thorn HDF5:<br class=""> Additional requested language support: Fortran<br class=""> WARNING in HDF5 configuration:<br class=""> None of H5pubconf.h H5pubconf-64.h H5pubconf-32.h found in ${EBROOTHDF5}/lib ${EBROOTHDF5}/include<br class=""> Automatic detection of szip/zlib compression not possible<br class=""> Finished running configuration script for thorn HDF5.<br class=""><br class="">but if i look into the folder ${EBROOTHDF5}/include, these files are clearly there. the compilation <br class="">later fails because of this.<br class=""><br class="">when i specify the full path explicitly in the config file:<br class=""><br class=""> HDF5_INC_DIRS = /home/share/easybuild/software/HDF5/1.8.20-GCC-7.3.0-2.30-generic/include<br class=""><br class="">i get no such warnings, and the code proceeds to compile just fine. is this the expected behaviour? <br class="">shouldn't the environmental variables be correctly expanded? if not, what would be the typical <br class="">procedure to compile the code on systems with such module tools?<br class=""></div></div></blockquote><div><br class=""></div><div>Hi Miguel,</div><div><br class=""></div><div>No, environment variables are not expanded in that way, because optionlists are not evaluated by a shell. Yes, it would be nice if they were, however :) You can do it in parameter files, but not in optionlists. Usually, in this case, we either set the paths explicitly, resulting in a multitude of almost-identical optionlists, or let the external library automatically detect the location by finding an executable on the path (MPI does this, but I don't know if any others do). </div><div><br class=""></div><div>I've never used it, but it looks like simfactory provides a solution. In simsubs.py SubAll, it looks like you can use @ENV(EBROOTHDF5)@. Let us know how you get on with that.</div><div><br class=""></div></div><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">-- <br class="">Ian Hinder<br class=""><a href="https://ianhinder.net" class="">https://ianhinder.net</a><br class=""></div></div>
</div>
<br class=""></body></html>