[Lmod-users] Prevent module unload from breaking environment
A Lua based environment module system that reads TCL modulefiles.
Brought to you by:
rtmclay
|
From: Alex D. T. <Ale...@vu...> - 2022-11-04 16:02:43
|
Hi lmod-list, I'm looking into ways to prevent `module unload` from breaking the working environment whenever a dependency of a loaded module is explicitly unloaded. For instance, assume we have a module X that depends on B; and module B depends on A. Using the depends_on() function to setup those dependencies as shown in the documentation: https://lmod.readthedocs.io/en/latest/098_dependent_modules.html Then, the commands: $ module purge; module load X; module unload B Result in: 1. unload B 2. unload A 3. print warning that X has unmet dependencies So the environment is left with a loaded module X that does not work because it is missing A and B. Is there any way to make Lmod avoid ending in such a non-working state? In this case, I would expect Lmod to do one of the following after executing `module unload B` : a -- do not unload any module and print error saying that X needs B b -- unload B and unload X, environment is left with a working module A If this is a use case never considered before, would it be possible to implement? Should I open an issue in github? Thanks and kind regards, Alex Domingo HPC Team VUB - Informatie & Communicatietechnologie Pleinlaan 9 - 1050 Brussel https://hpc.vub.be |