easybuilders / easybuild-framework

EasyBuild is a software installation framework in Python that allows you to install software in a structured and robust way.
https://easybuild.io
GNU General Public License v2.0
146 stars 199 forks source link

--update-modules-tool-cache broken for Lmod #4262

Open klust opened 1 year ago

klust commented 1 year ago

The Lmod user cache update support in easybuild/tools/modules.py is broken in two ways:

boegel commented 1 year ago

Thanks for the bug report @klust!

It's pretty clear that this option isn't commonly used...

klust commented 1 year ago

Any fix is not urgent for me. We use user caches and often Lmod fails to find a package after an install so I was checking if that option could solve our problems. But I already have a workaround in a hook: simply deleting the user cache files and the cache will be recreated when needed as the user uses Lmod commands.

I've tried to install some older versions of Lmod and it looks like the cache file has been named spiderT.x86_64_Linux.lua since version 7.0 and possibly earlier. I've so far failed to install even older versions and get them to work properly though.

boegel commented 6 months ago

Partial fix in #4402

Flamefire commented 6 months ago

4403 introduced --module-cache-suffix. You can set that to $(uname -m)_$(uname -s) and it should work.

If you use LMOD_SYSTEM_NAME it needs to be: .${LMOD_SYSTEM_NAME}_.$(uname -m)_$(uname -s)

Not sure if we also need the compiled version or if LMod compiles it automatically. We can also think about using the above values as defaults when ´--module-cache_suffixis unset, i.e.None` iff we can distinguish that from setting it to empty.