In automated module handling mode, useless requirements are unloaded in their reverse loaded order. But if automated module handling mode is disabled, unload order correspond to the order of the 'module load' commands found in modulefiles.
Taking the following modulefiles as example:
$ module show mr
-------------------------------------------------------------------
/path/to/modulefiles/mr:
module load mb
module load mj
-------------------------------------------------------------------
$ module show mj
-------------------------------------------------------------------
/path/to/modulefiles/mj:
-------------------------------------------------------------------
$ module show mb
-------------------------------------------------------------------
/path/to/modulefiles/mb:
module load mc
-------------------------------------------------------------------
$ module load --auto mr
Loading mr
Loading requirement: mc mb mj
Unloading them with automated module handling mode disabled reports the wrong unload order:
$ module unload --no-auto mr
Unloading mr
Unloading useless requirement: mj mb mc
Correct unload order for these useless requirements is mb mc mj.
In automated module handling mode, useless requirements are unloaded in their reverse loaded order. But if automated module handling mode is disabled, unload order correspond to the order of the 'module load' commands found in modulefiles.
Taking the following modulefiles as example:
Unloading them with automated module handling mode disabled reports the wrong unload order:
Correct unload order for these useless requirements is
mb mc mj.