Implementing a lua to mod translator would be great. In the meantime, the
two steps solution using lmod looks pretty reasonable for us.
Then, I am not sure about the pitfalls of mixing tcl and lua files but lmod
has been doing it for a long time. They might have warnings about that, or
just state that it is a great idea. We should ask them, but I can state
that it has been pretty useful for us in the past 10 years. We distribute
our bioinfo software stack on a cvmfs setup. It is all tcl and most of the
receiving hpc sites (all national sites in Canada) are running lmod and it
works without flaws.
Salutations,
Pierre-Olivier
Le jeu. 20 févr. 2025, 9 h 10 a.m., InfnPi <rob...@pi...> a
écrit :
> Personally i do not think that having an environment that has both
> modulefiles and lua files is a safe situation.
> If one decides to use modules you should only have modulefiles.
> Therefore i would not suggest to implement some sort of compatibility
> between the two systems as it is complicated and has to be correctly
> maintained when these tools evolve.
>
> Nevertheless i perfectly understand that it can happen that a site decides
> to use modules and has some inherited lua files that one would like to
> translate (once) in modulefiles supported syntax.
> So the best solution i could think of would be to implemente a separate
> program/command to translate lua configuration files into module
> configuration files, exactly as it is currently done by sh-to-mod.
> Therefore it would probably be nice to have also a lua-to-mod command to
> be used just for this use case.
>
> Roberto
> On 20 Feb 2025 at 07:36 +0100, Xavier Delaruelle <
> xav...@gm...>, wrote:
>
> 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
>
>
>
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modules-interest
>
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modules-interest
>
|