Hi Laurent,
Le mer. 27 sept. 2023 à 13:11, LAURENT FIGADERE via Modules-interest <
mod...@li...> a écrit :
> Hi all,
>
>
>
> We are using for the moment module version 4.7.0.
>
> With this version, I have sometimes this error:
>
> Module ERROR: Magic cookie '#%Module' missing
>
>
>
> Even the modulefiles exist and contains the header:
>
> #%Module2.0
>
>
>
> First question: do you know this issue root cause?
>
Modulefiles should start with the #%Module magic cookie string. This error
is obtained when this magic cookie is not found at the start of the file.
You should be seing this error consistently for the same files. Running
command in --debug mode would help to see the file with issues.
> To give more info, we are loading the modulefiles in several jobs in
> parallel at the same time.
>
>
>
> I saw in recent release, since *5.1,* this documentation:
>
> https://modules.readthedocs.io/en/latest/module.html#mconfig-mcookie_check
>
>
>
> Can MODULES_MCOOKIE_CHECK or MODULES_MCOOKIE_VERSION_CHECK help to
> resolve these errors?
>
MODULES_MCOOKIE_CHECK would help to disable the magic cookie check. But to
use it you must ensure that only modulefiles are inside the modulepath
directories.
>
>
> And now, I have another question.
>
> To try if it could help us to remove these errors, I tried to use module
> version 5.3.1.
>
>
>
> But now, I am faced to another issue: even I source the bash init, I have
> this eror here after:
>
> Like the init was not done properly.
>
> Did somebody see this kind of issue?
>
Your test.sh script runs inside a sub-shell. It does not inherit the module
shell function unless module was initialized in the upper shell session
with the set_shell_startup option enabled (
https://modules.readthedocs.io/en/latest/module.html#mconfig-set_shell_startup
).
Regards,
Xavier
|