Bonjour PIerre-Olivier,
Modules does not currently support Lmod Lua modulefiles. What is
supported is Lmod Tcl modulefiles (this is what the documentation
describes).
To translate Lua modulefile into Tcl modulefile, there is no direct
tool provided by Modules, but if you also have Lmod install, you can:
* record in a file the evaluation output generated by Lmod
$LMOD_CMD bash load *modulefile* >file.sh
* then translate this shell script file into a Tcl modulefile
module sh-to-mod bash file.sh
Otherwise conversion has to be done by hand currently.
Would you like Modules to be able to directly evaluate Lua
modulefiles? Or a translation tool should be sufficient?
Bien cordialement,
Xavier
Le jeu. 20 févr. 2025 à 00:27, Pierre-O <pio...@gm...> a écrit :
>
>
>
> Bonjour mailing list reader,
>
> I am running tests with a recent version of module:
>
> $ module --version
> Modules Release 5.5.0+XX-ged17988 (2025-02-16)
>
>
> I am trying to use lmod modules file in my module path, but they are not
> detected.
>
> module use /lmod/modulesfiles
>
> make nothing available
>
>
> I also get complains if I run test on the file themself
>
>
> $ module test ./test_soft/0.0.0.lua
> Module ERROR: Magic cookie '#%Module' missing
> In '/nb/home/poq/tmp/test/test_soft/0.0.0.lua'
> Please contact <root@localhost>
>
> I can set the Magic cookie and it does not help, I then simply get error
> on the lmod options themselves.
>
> However, the module doc states that it is compatible with lmod's lua
> modulefiles:
>
> https://modules.readthedocs.io/en/stable/design/lmod-tcl-modulefile-compat.html
>
> But perhaps I am missing something. Do I need to somehow translate the
> lmod files? Do I need to add some option in the `module use` command? I
> can't find anything in the documentation or in this mailing list
> history. Please help.
>
>
> Salutations,
> Pierre-Olivier
>
>
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modules-interest
|