reframe icon indicating copy to clipboard operation
reframe copied to clipboard

Changing the module path for tests does not work when `--export=ALL` not used with `sbatch`

Open NMannall opened this issue 6 months ago • 3 comments

From my understanding, when adding to the MODULEPATH (using --module-path or reframe.core.modules.ModulesSystem.searchpath_add()), reframe runs the equivalent of module use /path/to/modules/ in the reframe job and then launches the test job (e.g. using sbatch).

When sbatch uses --export=ALL (which is the default behaviour), MODULEPATH will remain changed in the test environment. However, I am running on a system where this behaviour has been changed and changes to the environment need to be present in the job script. Using prerun_cmds to run module use is also not ideal as these commands are injected after the modules are loaded in the job script.

Could the module use commands be added to the job script in the same way that module load commands are? This would also make the tests reproducible from the job scripts alone, and clearer where modules have been loaded from for a specific test.

NMannall avatar Aug 13 '24 14:08 NMannall