User Tools

Site Tools


using_old_and_new_clusters

Using Old and New Clusters

While we are moving from the old to the new cluster you may need to work on both clusters at different times (or even at the same time). Since the two clusters use the same location for your home directory, you may need to change the environment created by your .bashrc, .bash_profile, .bash_login, or .profile files so that they are different on the different clusters.

To do that you can test whether you are running on the old or new cluster in these files. Something like this would do the trick:

osvers=$(lsb_release -d)
if [[ $osvers =~ Ubuntu[[:space:]]20\.04 ]]; then

# Running on the new cluster
# Put new cluster specific code here

else

# Running on the old cluster
# Put old cluster specific code here

fi
using_old_and_new_clusters.txt · Last modified: 2021/06/29 17:05 by root