From cd9b2061a2d83669bf42a3c8d4f64de97afae3cc Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Fri, 29 Mar 2024 15:49:51 +0100 Subject: [PATCH 1/2] Don't set LMOD_RC any longer, we set LMOD_CONFIG_DIR now, so that sites can add their own properties via LMOD_RC if they want. See https://lmod.readthedocs.io/en/latest/145_properties.html --- init/eessi_environment_variables | 34 +++++++++++++------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/init/eessi_environment_variables b/init/eessi_environment_variables index a3ff265e77..5450b2bfb4 100644 --- a/init/eessi_environment_variables +++ b/init/eessi_environment_variables @@ -51,14 +51,23 @@ if [ -d $EESSI_PREFIX ]; then show_msg "Using ${EESSI_SOFTWARE_SUBDIR} as software subdirectory." export EESSI_SOFTWARE_PATH=$EESSI_PREFIX/software/$EESSI_OS_TYPE/$EESSI_SOFTWARE_SUBDIR - # Configure our LMOD_RC file - export LMOD_RC="$EESSI_SOFTWARE_PATH/.lmod/lmodrc.lua" - if [ -f $LMOD_RC ]; then - show_msg "Found Lmod configuration file at $LMOD_RC" + # Configure our LMOD + export LMOD_CONFIG_DIR="$EESSI_SOFTWARE_PATH/.lmod" + lmod_rc_file="$LMOD_CONFIG_DIR/lmodrc.lua" + if [ -f $lmod_rc_file ]; then + show_msg "Found Lmod configuration file at $lmod_rc_file" else - error "Lmod configuration file not found at $LMOD_RC" + error "Lmod configuration file not found at $lmod_rc_file" fi + export LMOD_PACKAGE_PATH="$EESSI_SOFTWARE_PATH/.lmod" + lmod_sitepackage_file="$LMOD_PACKAGE_PATH/SitePackage.lua" + if [ -f $lmod_sitepackage_file ]; then + show_msg "Found Lmod SitePackage.lua file at $lmod_sitepackage_file" + else + error "Lmod SitePackage.lua file not found at $lmod_sitepackage_file" + fi + if [ ! -z $EESSI_BASIC_ENV ]; then show_msg "Only setting up basic environment, so we're done" elif [ -d $EESSI_SOFTWARE_PATH ]; then @@ -85,21 +94,6 @@ if [ -d $EESSI_PREFIX ]; then false fi - export LMOD_CONFIG_DIR="$EESSI_SOFTWARE_PATH/.lmod" - lmod_rc_file="$LMOD_CONFIG_DIR/lmodrc.lua" - if [ -f $lmod_rc_file ]; then - show_msg "Found Lmod configuration file at $lmod_rc_file" - else - error "Lmod configuration file not found at $lmod_rc_file" - fi - - export LMOD_PACKAGE_PATH="$EESSI_SOFTWARE_PATH/.lmod" - lmod_sitepackage_file="$LMOD_PACKAGE_PATH/SitePackage.lua" - if [ -f $lmod_sitepackage_file ]; then - show_msg "Found Lmod SitePackage.lua file at $lmod_sitepackage_file" - else - error "Lmod SitePackage.lua file not found at $lmod_sitepackage_file" - fi else error "EESSI software layer at $EESSI_SOFTWARE_PATH not found!" From d2c5dabb735709ef4ab50c3643d5620a7ea97f12 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Fri, 29 Mar 2024 15:52:44 +0100 Subject: [PATCH 2/2] Add some comment, the lmodrc file did not get properly deployed in https://github.com/EESSI/software-layer/pull/496 . We need to have a change to redeploy it --- create_lmodrc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/create_lmodrc.py b/create_lmodrc.py index ae65153a20..28ad2a1915 100755 --- a/create_lmodrc.py +++ b/create_lmodrc.py @@ -7,6 +7,7 @@ DOT_LMOD = '.lmod' +# LMOD_RC file is the place to define properties, see https://lmod.readthedocs.io/en/latest/145_properties.html TEMPLATE_LMOD_RC = """propT = { } scDescriptT = {