From 84daf0945a9dab1cc9a113d0a0d062f5ef51f5d5 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Fri, 29 Mar 2024 15:49:51 +0100 Subject: [PATCH 1/3] 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 447cf5c9f6..71c1ff2c3e 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 "NESSI software layer at $EESSI_SOFTWARE_PATH not found!" From 1a0a78dfe8ee1850496d48c54742c9ebac7345e2 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Fri, 29 Mar 2024 15:52:44 +0100 Subject: [PATCH 2/3] 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 = { From 4fcc0c84fc5a294ef47b4c8fa0e57f0bebd0db90 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sun, 7 Apr 2024 15:58:22 +0200 Subject: [PATCH 3/3] remove whitespaces in empty line --- init/eessi_environment_variables | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/eessi_environment_variables b/init/eessi_environment_variables index 71c1ff2c3e..815b46d0e1 100644 --- a/init/eessi_environment_variables +++ b/init/eessi_environment_variables @@ -67,7 +67,7 @@ if [ -d $EESSI_PREFIX ]; then 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