[Lmod-announce] Update PATHs after a module load
A Lua based environment module system that reads TCL modulefiles.
Brought to you by:
rtmclay
From: Announcing n. v. of L. <lmo...@li...> - 2022-04-14 21:12:55
|
Is it possible to update PATHs immediately after a load call inside a Lua modulefile? For the example shown below, a module named mymodule, the first call of module load mymodule will load miniconda3 but the following conda activate call will not work because path to conda exe is not found. The second call does the activate just fine, so what I am trying to achieve is to get the conda activate to work with one module load call. I've learned that environment-modules version 4.1 supports this kind of feature, but Lmod 8.5.2 (the version I have) doesn't seem to support it. Is there a way I can achieve this with Lmod? Otherwise, I will have to put them in two separate modulefiles ... Thanks in advance prepend_path("MODULEPATH","/contrib/miniconda3/modulefiles")load("miniconda3") if (mode() == "load") then subprocess("conda activate mymodule")end if (mode() == "remove") then subprocess("conda deactivate")end |