Bash-Initialization scripts / Shell-Environment
On the HPC systems the .bashrc
nor the .profile
initialization script is sourced by default.
We recommend to modify the .bash_profile
(sourced by default) located at $HOME
to contain:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# last line
This way any new bash-shell sources the .bashrc
located at $HOME
by default. Further we recommend to
start this file by:
# .bashrc
if [ -f /etc/bashrc ]
then
. /etc/bashrc
fi
# last line
In case you have any initialisation code which is just used on the HPC systems, you may use the if-clause, shown in the example below, in .bashrc
.
# your custom initialization commands execute on magnitUDE go below
if [ x"${UDE_CLUSTER}" == "xmagnitude" ]; then
echo 'On magnitUDE!'
# put magnitUDE specific initialisation code here
fi
# your custom initialization commands execute on amplitUDE go below
if [ x"${UDE_CLUSTER}" == "xamplitude" ]; then
echo 'On amplitUDE!'
# put amplitUDE specific initialisation code here
fi
On demand, you may use pre-installed compilers and software on the magnitude. These are loaded and configured for your
shell environment using the tool module
as documented here.