Hi Åke, I want to add the environment variables to a MATLAB easyconfig which are needed to run compiled MATLAB programms
I tried modextravars = {'LM_LICENSE_FILE': '%s@%s' % (license_server_port, license_server), 'MATLABROOT': '.', 'MCR_HOME': 'MATLABROOT', 'MCR_CACHE_ROOT': '/scratch/$USER/mcr_cache', } But when I load the module as a normal user, the variable is not expanded: $ echo $MCR_CACHE_ROOT /scratch/$USER/mcr_cache Ultimately, I may well just define a general temporary directory such as TMPDIR=/scratch/tmp/$USER somewhere in /etc/profile.d, but even then I'd need to have the module expand $TMPDIR properly. Cheers, Loris I want to add an Åke Sandgren <ake.sandg...@hpc2n.umu.se> writes: > That sounds very wrong. > > Installing user should not be exposed to the software that is being > installed. > > What's your use-case? > > On 3/12/19 9:52 AM, Loris Bennett wrote: >> Hi, >> >> I need to get $USER within an easyconfig. I found the documentation for >> the Python module easybuild.tools.environment, but this doesn't seem to >> be what I need. >> >> Can any one point me to the documentation about how to access >> environment variables in an easyconfig? >> >> Cheers, >> >> Loris >> -- Dr. Loris Bennett (Mr.) ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de