software-layer icon indicating copy to clipboard operation
software-layer copied to clipboard

set `$LMOD_SHORT_TIME` to prevent Lmod from creating a user cache

Open boegel opened this issue 1 year ago • 3 comments

On some systems, Lmod may configured to create a user cache (in ~/.cache/lmod) after a very short amount of time, for example on Vega:

$ ml --config 2>&1 | grep -i LMOD_.*_TIME
User cache valid time(sec) (LMOD_ANCIENT_TIME)                86400
Write cache after (sec) (LMOD_SHORT_TIME)                     2

So if a module command takes longer than 2 seconds, which can happen if CernVM-FS has to pull in an updated Lmod cache first from the EESSI repository, then a user cache will be auto-generated, which (by default) will be considered valid for 24h.

We should prevent that this happens, since it can easily lead to confusion when a module file is available under /cvmfs/software.eessi.io, but it's not visible via module avail (and if Lmod is configured with LMOD_CACHED_LOADS enabled, you won't be able to load it either, despite it being there).

Draft PR, since this script is not the only place we should set $LMOD_SHORT_TIME if we want to take control of this...

boegel avatar Oct 16 '24 17:10 boegel

Instance eessi-bot-mc-aws is configured to build for:

  • architectures: x86_64/generic, x86_64/intel/haswell, x86_64/intel/skylake_avx512, x86_64/amd/zen2, x86_64/amd/zen3, aarch64/generic, aarch64/neoverse_n1, aarch64/neoverse_v1
  • repositories: eessi.io-2023.06-compat, eessi-hpc.org-2023.06-software, eessi-hpc.org-2023.06-compat, eessi.io-2023.06-software

eessi-bot[bot] avatar Oct 16 '24 17:10 eessi-bot[bot]

Instance boegel-bot-deucalion is configured to build for:

  • architectures: aarch64/a64fx
  • repositories: eessi.io-2023.06-software

Instance eessi-bot-mc-azure is configured to build for:

  • architectures: x86_64/amd/zen4
  • repositories: eessi-hpc.org-2023.06-software, eessi-hpc.org-2023.06-compat, eessi.io-2023.06-software, eessi.io-2023.06-compat

eessi-bot[bot] avatar Oct 16 '24 17:10 eessi-bot[bot]

@boegel Pr should be moved to https://github.com/EESSI/software-layer-scripts

laraPPr avatar Jun 27 '25 14:06 laraPPr