Xavier,
Do you think it might be helpful to add an option to module load to support reloading the module even if it is loaded (which would be implimented as a switch)?
Or to module switch so you not only don't have to specify the module twice - but can list several modules to be reloaded (unloaded, then loaded - AKA switched with themselves). Having to specify the module twice increases the chance of typos and makes debugging harder.
Or perhaps an additional command (maybe a change to the module reload command so you can specify a sub-set of modules to reload, you might want to allow -f if a subset of modules is listed).
On 4/21/2023 9:14 AM, Paul Markfort wrote:
> I suggest (if you can) that you update to: Modules Release 5.2.0 (2022-11-08)
> (has the same issue, but has many improvements and corrections).
>
> Try using "module switch" instead of module load.
> Note, you can only load one module with module switch.
>
> There are some issues with this.
> If the module you are loading is not loaded, and is the same base path as another loaded module, module switch will unload that other module.
>
> A way around this is to specify the same module for modulefile1 and modulefile2 (rather than leave modulefile1 unspecified).
>
> As in:
> module switch base/dot base/dot
>
> However, you should see the previous post about "module load" behavior.
>
>
> Notes:
>
> This behavior change from the old 3.2.10 binary version to the TCL source version caused me some headaches when I first switched (some years ago).
>
> I changed some of my shell initialization module loads to module source (supported with-out full module paths in 5.2.0), as I needed them to be processed every time the shell initialization script ran (advantage: sourced modules can't be unloaded). For instance, when I want to load a module to define shell aliases (which aren't inherited by the shell).
>
>
>
> On 4/21/2023 3:54 AM, Jens-Olaf Beismann wrote:
>> Dear all,
>>
>> it appears that with module 3.2.10 a load of an already loaded module is executed again while it is not with version 4.5.2. https://modules.readthedocs.io/en/latest/changes.html says
>>
>> When an already loaded modulefiles is asked for load again, compatibility version will refresh the shell alias definition this modulefile hold if any, whereas Modules 4 will ignore the new load order.
>>
>> Is there a way to achieve the old behavior with version 4.5.2? Our tests with the -f option have not been successful in this respect, and as per the documentation we don't want to manipulate _LMFILES_ and LOADEDMODULES explicitly.
>>
>> Thank you and best regards,
>>
>> Jens-Olaf
>> ---
>> Dr. Jens-Olaf Beismann Benchmarking Expert
>> High Performance Computing NEC Deutschland GmbH https://www.nec.com/en/global/solutions/hpc/
>> Tel: +49 431 2372063 (office) +49 152 22851521 (mobile)
>> ---
>> NEC Deutschland GmbH, Fritz-Vomfelde-Straße 14, D-40547 Düsseldorf
>> Geschäftsführer: Yuichi Kojima
>> Handelsregister Düsseldorf, HRB 57941, VAT ID DE129424743
>>
>>
>> _______________________________________________
>> Modules-interest mailing list
>> Mod...@li...
>> https://lists.sourceforge.net/lists/listinfo/modules-interest
>>
>
--
--------------------------------------------------------
The views and opinions expressed above are strictly
those of the author(s). The content of this message has
not been reviewed nor approved by any entity whatsoever.
--------------------------------------------------------
Paul FM Info: http://paulfm.com/~paulfm/
--------------------------------------------------------
|