Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set $LMOD_SHORT_TIME to prevent Lmod from creating a user cache #792

Draft
wants to merge 1 commit into
base: 2023.06-software.eessi.io
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion init/eessi_environment_variables
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ if [ -d $EESSI_PREFIX ]; then
else
error "Lmod SitePackage.lua file not found at $lmod_sitepackage_file"
fi


# set time until user cache is created to 1 day (86400 seconds),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One day is a long time, what if they have their own modules? Can we set this as part of our own cache configuration instead so it is only relevant for us?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems not to be possible...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole point of setting it to 24h is to basically prevent that a user cache can ever be written.

Copy link
Member

@ocaisa ocaisa Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that's a global setting, so it will also never build a cache for modules outside of EESSI

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true, but i) only when the EESSI environment is set up, ii) that will "only" lead to longer waiting times when running module commands, there's no other negative side effects.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there's another way to prevent that specific paths (like /cvmfs/software.eessi.io/...) are included in the user cache, not sure.

@rtmclay would know... :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the EESSI/2023.06 module that we ship, this path is protected:

if ( mode() ~= "spider" ) then
prepend_path("MODULEPATH", eessi_module_path)
eessiDebug("Adding " .. eessi_module_path .. " to MODULEPATH")
end

so this wouldn't happen with that approach.

# to prevent that Lmod ever creates one (since it will quickly go stale)
export LMOD_SHORT_TIME=86400

if [ ! -z $EESSI_BASIC_ENV ]; then
show_msg "Only setting up basic environment, so we're done"
elif [ -d $EESSI_SOFTWARE_PATH ]; then
Expand Down