How can I check OS version when loading modules?

If you need to check what OS version the node you are on is using before loading modules, you can add a test in your .bashrc for the value of the environment variableFASRCSW_OS .

So, for instance, you could source a different file for CentOS 7 by adding something like the following to your .bashrc :

if [ "$FASRCSW_OS" = "centos7" ]; then
source ~/.mycentos7.rc
source ~/.mynormal.rc


Posted in: c. Jobs and SLURM

CC BY-NC-SA 4.0 This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Permissions beyond the scope of this license may be available at Attribution.