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

add --module-cache-suffix configuration setting to allow multiple (Lmod) caches #4403

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions easybuild/tools/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def mk_full_default_path(name, prefix=DEFAULT_PREFIX):
'job_polling_interval',
'job_target_resource',
'locks_dir',
'module_cache_suffix',
'modules_footer',
'modules_header',
'mpi_cmd_template',
Expand Down
3 changes: 2 additions & 1 deletion easybuild/tools/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,8 @@ def update(self):
# don't actually update local cache when testing, just return the cache contents
return stdout
else:
cache_fp = os.path.join(self.USER_CACHE_DIR, 'moduleT.lua')
suffix = build_option('module_cache_suffix') or ''
cache_fp = os.path.join(self.USER_CACHE_DIR, 'moduleT%s.lua' % suffix)
self.log.debug("Updating Lmod spider cache %s with output from '%s'" % (cache_fp, ' '.join(cmd)))
cache_dir = os.path.dirname(cache_fp)
if not os.path.exists(cache_dir):
Expand Down
3 changes: 3 additions & 0 deletions easybuild/tools/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ def override_options(self):
"environment variable and its value separated by a colon (':')",
None, 'store', DEFAULT_MINIMAL_BUILD_ENV),
'minimal-toolchains': ("Use minimal toolchain when resolving dependencies", None, 'store_true', False),
'module-cache-suffix': ("Suffix to add to the cache file name (before the extension) "
"when updating the modules tool cache",
None, 'store', None),
'module-only': ("Only generate module file(s); skip all steps except for %s" % ', '.join(MODULE_ONLY_STEPS),
None, 'store_true', False),
'modules-tool-version-check': ("Check version of modules tool being used", None, 'store_true', True),
Expand Down
Loading