Difference between revisions of "Setting permanent default for software stack upon login"
|Line 108:||Line 108:|
Latest revision as of 13:35, 20 September 2021
- 1 Introduction
- 2 Issues with the old setup
- 3 Setting a permanent default for the software stack to be initialized upon login to Euler
- 4 Troubleshooting
Some time ago we introduced a new software stack on Euler that uses LMOD modules instead of environment modules. LMOD has useful additional features compared environment modules. So far upon login to the Euler cluster, the old software stack is initialized as the default and we provide the scripts env2lmod and lmod2env to switch between the old and the new software stack. Having the old software stack initialized by default upon login causes some issues for users of the new software stack. Therefore we now provide the possibility for users to set a permanent default for the software stack that is initialized upon login.
Issues with the old setup
Users of the new software stack could add the command source /cluster/apps/local/env2lmod.sh to their .bashrc to automatically switch to the new software stack directly after login, but this setup would still first initialize environment modules and then switch to LMOD modules.
Interactive jobs are not correctly picking up the environment for the new software stack. Therefore users could only use the new software stack on Euler, when starting the interactive job with the old modules system being initialized and then users could switch inside the interactive job to the new software stack.
The script to run jupyter notebooks on Euler or Leonahrd Open is using the old software stack. It could only be adapted to use the new LMOD modules, when users change the modules that are loaded by the script and in addition added the command source /cluster/apps/local/env2lmod.sh to their .bashrc or .bash_profile.
Setting a permanent default for the software stack to be initialized upon login to Euler
We introduce now a new script set_software_stack.sh that allows the users to permanently set the default for the software stack to be initialized upon login to Euler. Please note that after setting a default with the new script, you would need to logout and login again to make the change becoming active.
/cluster/apps/local/set_software_stack.sh: Command to set the old (environment modules) or new (LMOD modules) software stack as default upon login on the Euler cluster Usage: set_software_stack.sh [-h] [-s] [-i] [old | new] Options: -h | --help Display this help message and exit -s | --silent Do not print anything to stdout except errors when changing the default for the software stack -i | --info Show which software stack is set as default and exit old | new Choices for the default software stack Examples: Set the new software stack as default: set_software_stack.sh new Set the old software stack as default: set_software_stack.sh old Show which software stack is set as default set_software_stack.sh -i Documentation of module commands: We provide a general overview on module commands on our wiki. https://scicomp.ethz.ch/wiki/Setting_up_your_environment Old software stack (environment modules): The old software stack (2014-2021+) on Euler uses environment modules. An overview on available modules can be found on our wiki: https://scicomp.ethz.ch/wiki/Category:Application https://scicomp.ethz.ch/wiki/Euler_applications New software stack (LMOD modules): The new software stack (2018-2021+) on Euler uses LMOD modules. LMOD modules provide additional features like a hierarchy of modules that prevents users from mixing different toolchains: https://scicomp.ethz.ch/wiki/New_SPACK_software_stack_on_Euler An overview on the available modules can be found on our wiki: https://scicomp.ethz.ch/wiki/Euler_applications_and_libraries List of all software not currently available in the new software stack https://scicomp.ethz.ch/wiki/Difference_between_old_and_new_software_stacks_on_Euler See also: env2lmod; switch from old to new software stack in the shell (change not permanent) lmod2env; switch from the new to the old software stack in the shell (change not permanent)
I am sourcing the env2lmod.sh script in my .bashrc/.bash_profile, will this break once the new scripts are in place?
The env2lmod.sh and lmod2env.sh script are idempotent. If you run the env2lmod.sh script or use the alias env2lmod while the new software stack is already set as default, then nothing will break and the script will just print a line telling you that no action is taken:
[sfux@eu-login-36 ~]$ module list Currently Loaded Modules: 1) StdEnv 2) gcc/4.8.5 [sfux@eu-login-36 ~]$ env2lmod Current modulesystem is already LMOD modules, nothing to change for env2lmod [sfux@eu-login-36 ~]$
[sfux@eu-login-07 ~]$ module list Currently Loaded Modulefiles: 1) modules [sfux@eu-login-07 ~]$ lmod2env Current modulesystem is already environment modules, nothing to change for lmod2env [sfux@eu-login-07 ~]$
Using the .csh scripts to initialize the module system
The module profile scripts to initialize the module system come in two flavors. Next to the .sh scripts that are used by default, there are also .csh versions of those scripts. If you were using those scripts to manually initialize the old software stack with the command
Then you would need to change this command to
Or if you would like to initialize the new software stack using the .csh scripts:
source /cluster/apps/.moduleprofiles/z00_lmod.csh source /cluster/apps/.moduleprofiles/z01_StdEnv.csh
Why is set_softare_stack.sh -i always showing "old" as global default
The global default shows what software stack is initialized by default if you don't set a personal default. The personal default always takes precedence over the global default.