The SSM environment : Différence entre versions

Un article de Informaticiens département des sciences de la Terre et l'atmosphère
Aller à: navigation, charcher
m
m (Setup the SSM environment)
 
(47 révisions intermédiaires par 3 utilisateurs non affichées)
Ligne 3: Ligne 3:
 
The "SSM environment" is build on SSM, <u>S</u>imple <u>S</u>oftware <u>M</u>anagement.  
 
The "SSM environment" is build on SSM, <u>S</u>imple <u>S</u>oftware <u>M</u>anagement.  
  
This means one now subscribes to domaines and packages using '''s.ssmuse.dot''' to aquire access to certain directories, scripts, binaries, etc. In general the s.ssmuse.dot will add directories to your $PATH, $LD_LIBRARY_PATH, etc and set some environment variables.  
+
The same SSM environment is available on guillimin and colosse as well as on the UQAM servers st1/2/3, skynet1/2/3, beluga, robert, zwack and glacier but not on marvin.<br>
  
For interactive sessions I find the following packages very useful:
+
Using the SSM environment means one now subscribes to domaines and packages using '''s.ssmuse.dot''' to aquire access to certain directories, scripts, binaries, etc.. This includes for example all tools to treat RPN files and the CRCM5 model itself. <br>In general the s.ssmuse.dot will add directories to your $PATH, $LD_LIBRARY_PATH, etc. and set some environment variables.
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; diagtools, difftools, runtools, vistools, fulldev
+
To get a list of all the available domaines and packages type:<br>&nbsp;&nbsp;&nbsp; s.list_ssm_shortcuts<br>
  
But first you will have to do the little "setup" below, then you can subscribe to one or more of these packages by typing for example:
+
Your own '''personal aliases, exports''', s.ssmuse.dot etc. for '''interactive''' use will go into the file<br>'''&nbsp;&nbsp;&nbsp; ~/.profile.d/.interactive_profile '''<br>which you will have to create.<br>
  
&nbsp;&nbsp;&nbsp; . s.ssmuse.dot diagtools difftools runtools vistools fulldev
+
There is '''nothing''' you have '''to do on the UQAM servers''' to set up the environment - it has already been set up at the creation of your account. <br>But '''on Compute Canada clusters you will have to do the little "setup" below''' once.
 +
<br>
 +
<br>
  
I added this line to my .interactive_profile (see below).  
+
= <span id="Setup_to_use_new_environment" class="mw-headline">Setup the SSM environment</span>  =
 +
 
 +
To use the SSM environment on Compute Canada clusters you will first (and only once) have to do the following little "setup". <br>
 +
(I strongly suggest to '''use copy->paste'''!!! There are dots and spaces that are easy to miss when typing the commands by hand.)
 +
 
 +
If one or both of the following two files exist remove them or change their name, for example to: <br>
 +
'''&nbsp;&nbsp;&nbsp; mv ~/.bash_profile ~/.bash_profile-'''<br>
 +
'''&nbsp;&nbsp;&nbsp; mv ~/.bashrc ~/.bashrc-'''
  
<br>  
+
On Beluga, to use the old Beluga environment, create the file ~/.modulerc:<br>
 +
'''cat > ~/.modulerc <<+ <br>'''
 +
'''module-version StdEnv/2018.3 default<br>'''
 +
'''+<br>'''
  
= <span id="Setup_to_use_new_environment" class="mw-headline">Setup the SSM environment</span> =
+
Then create the file ~/.profile:<br>
 +
'''cat > ~/.profile <<+ <br>'''
 +
'''umask 022<br>'''
 +
'''type module 2>/dev/null 1>/dev/null || . /etc/profile<br>'''
 +
'''taskset -cp 0-128 \$\$<br>'''
 +
'''module swap intel/2018.3 gcc/7.3.0 2>/dev/null<br>'''
 +
'''. /home/armnssm/ssm-domains-base/ssm_10.151/etc/ssm.d/profile<br>'''
 +
'''. env-setup.dot<br>'''
 +
'''module list 2>&1 | grep '[()]'<br>'''
 +
'''+<br>'''
  
To use the SSM environment you will first (and only once) have to do a little "setup":
+
Log out and back in. <br>
  
#Create two links in your HOME<br>This part depends on the machine on which you are setting up the SSM environment.<br><br>On '''guillimin''':<br>'''&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd '''<br>'''&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ln -fs ~winger/ssm-domains/setup/v_001~winger/ssm-domains/setup/v_001''''''&nbsp; ECssm <br>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ln -fs ECssm/dot-profile-setup_1.0_multi/bin/.profile'''<br>&nbsp;&nbsp;&nbsp; Change the name of two files (or remove them): <br>'''&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mv .bash_profile .bash_profile- <br>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mv .bashrc .bashrc-'''<br>&nbsp;&nbsp;&nbsp; Log out and back in. <br><br>On '''st1/2/3''', '''skynet1/2/3''' and '''beluga''':<br>'''&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd '''<br>'''&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ln -fs /unique/armnssm/ECssm/ssm-domains-base/setup/v_001''''''&nbsp; ECssm <br>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ln -fs ECssm/multi/bin/.profile'''<br>&nbsp;&nbsp;&nbsp; Log out and back in. <br><br>On '''marvin''' the SSM environment does not exist. <br><br>
+
Then I suggest you create a link to our common '.group_profile'.<br>
#The file ''.profile_usr'' is not used anymore. It got replaced by several ''.something_profile'' files which all have to reside in your HOME in a directory called ''''.profile.d''''.<br>Have a look at my .profile.d if you like (The files are hidden, so do not forget the '-a'): <br>'''&nbsp; &nbsp; ls -al ~winger/.profile.d '''<br><br>I suggest you create a link to the '.group_profile' as well. <br>This will give you some basic aliases I find quite useful. Have a look at them if you like. <br>I will keep adding aliases and exports to this file.<br>'''&nbsp; &nbsp; cd ~/.profile.d <br>&nbsp; &nbsp; ln -s ~winger/.published_profile.d/.group_profile '''<br><br>Your own personal aliases, exports, s.ssmuse.dot etc. for '''interactive''' use will go into the file<br>&nbsp;&nbsp;&nbsp; '''.interactive_profile '''<br>which you will have to create.<br><br>Then you either log out and back in again or source the new .profiles. <br><br>
+
This will give you some basic aliases I find quite useful. Have a look at them if you like. <br>
#Allow 'ssh $TRUE_HOST' without typing password: <br> &nbsp; &nbsp; <span style="font-weight: bold;">cd ~/.ssh</span><br>Only if there is '''no(!)''' file 'id_rsa.pub' create it with:<br> <span style="font-weight: bold;">&nbsp;&nbsp; ssh-keygen</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (press just 'Enter' whenever asked a question, 3 times) <br>then<br> &nbsp; &nbsp; <span style="font-weight: bold;">cat id_rsa.pub &gt;&gt; authorized_keys2</span> &lt;span style="font-weight: bold;" /&gt; <br><br>
+
I will keep adding aliases and exports to this file.<br>
#Create directories for running CRCM5.<br>Create directory/link for the execution directory (where the model will be running):<br>'''&nbsp;&nbsp;&nbsp; mkdir ~/MODEL_EXEC_RUN<br>&nbsp;&nbsp;&nbsp; cd ~/MODEL_EXEC_RUN<br>&nbsp;&nbsp;&nbsp; mkdir -p /sb/project/xgk-345-ab/${USER}/EXECDIR<br>&nbsp;&nbsp;&nbsp; ln -s /sb/project/xgk-345-ab/${USER}/EXECDIR localhost<br>&nbsp;&nbsp;&nbsp; ln -s /sb/project/xgk-345-ab/${USER}/EXECDIR guillimin<br>'''Create directory/link for the listings:<br>'''&nbsp;&nbsp;&nbsp; mkdir ~/listings<br>&nbsp;&nbsp;&nbsp; cd ~/listings<br>&nbsp;&nbsp;&nbsp; mkdir -p /sb/project/xgk-345-ab/${USER}/Listings<br>&nbsp;&nbsp;&nbsp; ln -s /sb/project/xgk-345-ab/${USER}/Listings localhost<br>&nbsp;&nbsp;&nbsp; ln -s /sb/project/xgk-345-ab/${USER}/Listings guillimin<br>'''<br>
+
'''&nbsp; &nbsp; ln -s ~winger/.published_profile.d/.group_profile&nbsp;&nbsp; ~/.profile.d/.group_profile'''<br><br>
#Set project name of which to use the core allocation<br>You will have to create a file in your HOME on guillimin which is called: <br>&nbsp; '''${HOME}/.CLUMEQ_accnt '''<br> <br>This file has to contain 1 variable called 'RAPid', set to the RAPid of the project under which you want to submit your job. <br>For people working for or having their account via Pierre Gauthier, Laxmi Sushama, René Laprise or Peter Yau you will have to set in the above file: <br>&nbsp; '''RAPid=xgk-345-ac '''<br> <br>Have a look at my file if you like: <br>&nbsp; ~winger/.CLUMEQ_accnt <br>
 
#Open your HOME to the world<br>If you do want my or other help I suggest you open your HOME to the world:<br>&nbsp;&nbsp;&nbsp; '''chmod 755 /home/$USER'''<br>
 
  
<br>  
+
Your own personal aliases, exports, s.ssmuse.dot etc. for '''interactive''' use will go into the file<br>
 +
'''&nbsp;&nbsp;&nbsp; ~/.profile.d/.interactive_profile '''<br>
 +
which you will have to create.<br>
  
#<br>
+
Then you either log out and back in again or source the new .profiles. <br>

Version actuelle datée du 16 de juin 2021 à 22:16

The "SSM environment"

The "SSM environment" is build on SSM, Simple Software Management.

The same SSM environment is available on guillimin and colosse as well as on the UQAM servers st1/2/3, skynet1/2/3, beluga, robert, zwack and glacier but not on marvin.

Using the SSM environment means one now subscribes to domaines and packages using s.ssmuse.dot to aquire access to certain directories, scripts, binaries, etc.. This includes for example all tools to treat RPN files and the CRCM5 model itself.
In general the s.ssmuse.dot will add directories to your $PATH, $LD_LIBRARY_PATH, etc. and set some environment variables.

To get a list of all the available domaines and packages type:
    s.list_ssm_shortcuts

Your own personal aliases, exports, s.ssmuse.dot etc. for interactive use will go into the file
    ~/.profile.d/.interactive_profile
which you will have to create.

There is nothing you have to do on the UQAM servers to set up the environment - it has already been set up at the creation of your account.
But on Compute Canada clusters you will have to do the little "setup" below once.

Setup the SSM environment

To use the SSM environment on Compute Canada clusters you will first (and only once) have to do the following little "setup".
(I strongly suggest to use copy->paste!!! There are dots and spaces that are easy to miss when typing the commands by hand.)

If one or both of the following two files exist remove them or change their name, for example to:
    mv ~/.bash_profile ~/.bash_profile-
    mv ~/.bashrc ~/.bashrc-

On Beluga, to use the old Beluga environment, create the file ~/.modulerc:
cat > ~/.modulerc <<+
module-version StdEnv/2018.3 default
+

Then create the file ~/.profile:
cat > ~/.profile <<+
umask 022
type module 2>/dev/null 1>/dev/null || . /etc/profile
taskset -cp 0-128 \$\$
module swap intel/2018.3 gcc/7.3.0 2>/dev/null
. /home/armnssm/ssm-domains-base/ssm_10.151/etc/ssm.d/profile
. env-setup.dot
module list 2>&1 | grep '[()]'
+

Log out and back in.

Then I suggest you create a link to our common '.group_profile'.
This will give you some basic aliases I find quite useful. Have a look at them if you like.
I will keep adding aliases and exports to this file.
    ln -s ~winger/.published_profile.d/.group_profile   ~/.profile.d/.group_profile

Your own personal aliases, exports, s.ssmuse.dot etc. for interactive use will go into the file
    ~/.profile.d/.interactive_profile
which you will have to create.

Then you either log out and back in again or source the new .profiles.