Skip to content

add note on lmod cache when loading an EESSI module#731

Open
smoors wants to merge 1 commit intoEESSI:mainfrom
smoors:lmod-cache
Open

add note on lmod cache when loading an EESSI module#731
smoors wants to merge 1 commit intoEESSI:mainfrom
smoors:lmod-cache

Conversation

@smoors
Copy link
Copy Markdown
Contributor

@smoors smoors commented Apr 4, 2026

$ module unuse $MODULEPATH
$ module use /cvmfs/software.eessi.io/init/modules
$ module load EESSI/2025.06                                                                                                                                       
Lmod has detected the following error:  Unable to load module because of error when evaluating modulefile:
     /cvmfs/software.eessi.io/init/modules/EESSI/2025.06.lua: /usr/share/lmod/lmod/libexec/ModuleA.lua:676: Did not find mpath in mA

     Please check the modulefile and especially if there is a line number specified in the above message
If you don't understand the warning or error, contact the helpdesk at hpc@vub.be 
While processing the following module(s):
    Module fullname  Module Filename
    ---------------  ---------------
    EESSI/2025.06    /cvmfs/software.eessi.io/init/modules/EESSI/2025.06.lua
$ LMOD_IGNORE_CACHE=1 module load EESSI/2025.06
Module for EESSI/2025.06 loaded successfully
$ module --version                                                                                                                                                                                 

Modules based on Lua: Version 8.7.65 2025-08-05 10:24 -06:00
    by Robert McLay mclay@tacc.utexas.edu

@smoors smoors changed the title add note on lmod cache when loading a module add note on lmod cache when loading an EESSI module Apr 4, 2026
@boegel
Copy link
Copy Markdown
Contributor

boegel commented Apr 7, 2026

@ocaisa Is that the best we can do here?

@casparvl
Copy link
Copy Markdown
Collaborator

casparvl commented Apr 7, 2026

Ha, I just pinged Alan as well. His words: disabling the cache will be very expensive.

@smoors I'm wondering why you are running into this usse. I have the feeling that rather then just disabling the cache, there is an actual issue that should be fixed instead.

@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Apr 7, 2026

I think we need to understand what is going wrong here first, ignoring the cache is very expensive for things like module avail.

My suspicion would be that there is a user spider cache there for /cvmfs/software.eessi.io/init/modules that was generated with the Lmod from EESSI, that Lmod version is too new to be compatible with the system Lmod. If you delete the local cache, the old Lmod will create a new one and things should work again.

@smoors
Copy link
Copy Markdown
Contributor Author

smoors commented Apr 7, 2026

My suspicion would be that there is a user spider cache there for /cvmfs/software.eessi.io/init/modules that was generated with the Lmod from EESSI, that Lmod version is too new to be compatible with the system Lmod. If you delete the local cache, the old Lmod will create a new one and things should work again.

there is no local cache in my account, which is only generated if there is no system cache, and we do have a system cache. our Lmod is more recent than the one from EESSI.

@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Apr 7, 2026

Oh, that's worse, now I would really like to know what it is going on.

@smoors
Copy link
Copy Markdown
Contributor Author

smoors commented Apr 7, 2026

note that i only have to disable the cache when loading an EESSI module, not when subsequently loading any modules in the EESSI stack. this works perfectly:

$ LMOD_IGNORE_CACHE=1 ml EESSI/2025.06                                                                                                                                                                 
Module for EESSI/2025.06 loaded successfully
$ ml GROMACS/2025.2-foss-2025a

@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Apr 7, 2026

This looks relevant: TACC/Lmod#780 , and specifically TACC/Lmod#780 (comment)

@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Apr 7, 2026

I think the less impactful suggestion here is export LMOD_CACHED_LOADS=no, does that work for you?

@smoors
Copy link
Copy Markdown
Contributor Author

smoors commented Apr 7, 2026

I think the less impactful suggestion here is export LMOD_CACHED_LOADS=no, does that work for you?

that doesn't work for me.

i really don't think setting LMOD_IGNORE_CACHE=1 only for loading an EESSI module is "impactful", as there are only 2 modules available at that point.

@casparvl
Copy link
Copy Markdown
Collaborator

casparvl commented Apr 7, 2026

That may be true, the risk is that people misinterpret and think "you know what, I'll just export LMOD_IGNORE_CACHE=1 in my .bashrc so I don't need to remember every time". Plus, if there's a fundamental bug, we should fix the bug rather than tell people to work around it :)

Also, understanding the issue better will also help us to give more targetted advice. I.e. if it was the issue that Alan linked to, we could give much more concrete advice "if you see XXX and are running with LMOD version YYY or older, either update to version ZZZ or load the EESSI module with ... WARNING: do NOT export LMOD_IGNORE_CACHE=1 as a global setting, as this would make interaction with the modules provided by EESSI extremely slow."

@smoors
Copy link
Copy Markdown
Contributor Author

smoors commented Apr 7, 2026

That may be true, the risk is that people misinterpret and think "you know what, I'll just export LMOD_IGNORE_CACHE=1 in my .bashrc so I don't need to remember every time". Plus, if there's a fundamental bug, we should fix the bug rather than tell people to work around it :)

Also, understanding the issue better will also help us to give more targetted advice. I.e. if it was the issue that Alan linked to, we could give much more concrete advice "if you see XXX and are running with LMOD version YYY or older, either update to version ZZZ or load the EESSI module with ... WARNING: do NOT export LMOD_IGNORE_CACHE=1 as a global setting, as this would make interaction with the modules provided by EESSI extremely slow."

of course, i fully agree! i wasn't suggesting we shouldn't try to fix/understand it better, i was merely responding to Alan's "less impactful" suggestion.

@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Apr 7, 2026

I do think it is pretty likely that someone would export LMOD_IGNORE_CACHE=1 and then things will slow down for them. If it had worked, export LMOD_CACHED_LOADS=no would just affect loads and would be harder to notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants