Set up model environment : Différence entre versions
m (→Set up the model environment:) |
m (→Set up the model environment) |
||
Ligne 7: | Ligne 7: | ||
#Allow 'ssh $TRUE_HOST' without typing password: <br> <span style="font-weight: bold;">cd ~/.ssh</span><br> '''If''' the directory ~/.ssh does not exist execute the command:<br> <span style="font-weight: bold;">ssh localhost</span><br> type in your password and once you are connected ''''exit'''' again. You should now have the directory ~/.ssh.<br>Only if there is '''no(!)''' file 'id_rsa.pub' create it with:<br> <span style="font-weight: bold;"> ssh-keygen</span> (press just 'Enter' whenever asked a question, 3 times) <br>then<br> <span style="font-weight: bold;">cat id_rsa.pub >> authorized_keys</span><br><br>'''chmod 644 ~/.ssh/authorized_keys<br><br>''' | #Allow 'ssh $TRUE_HOST' without typing password: <br> <span style="font-weight: bold;">cd ~/.ssh</span><br> '''If''' the directory ~/.ssh does not exist execute the command:<br> <span style="font-weight: bold;">ssh localhost</span><br> type in your password and once you are connected ''''exit'''' again. You should now have the directory ~/.ssh.<br>Only if there is '''no(!)''' file 'id_rsa.pub' create it with:<br> <span style="font-weight: bold;"> ssh-keygen</span> (press just 'Enter' whenever asked a question, 3 times) <br>then<br> <span style="font-weight: bold;">cat id_rsa.pub >> authorized_keys</span><br><br>'''chmod 644 ~/.ssh/authorized_keys<br><br>''' | ||
#Add keys to your ~/.ssh/config to not get kicked out from a session:<br><br>'''cat >> ~/.ssh/config << EOF<br>ForwardX11 no<br>stricthostkeychecking=no<br>ServerAliveInterval=15<br>ServerAliveCountMax=3<br>TCPKeepAlive=yes<br>UserKnownHostsFile=/dev/null<br>EOF<br><br>chmod 644 ~/.ssh/config<br><br>''' | #Add keys to your ~/.ssh/config to not get kicked out from a session:<br><br>'''cat >> ~/.ssh/config << EOF<br>ForwardX11 no<br>stricthostkeychecking=no<br>ServerAliveInterval=15<br>ServerAliveCountMax=3<br>TCPKeepAlive=yes<br>UserKnownHostsFile=/dev/null<br>EOF<br><br>chmod 644 ~/.ssh/config<br><br>''' | ||
− | #Create a "host" with the name of the Compute Canada machine you are working on, pointing to 'localhost'<br>For example for '''Beluga''' create the following entry in your ~/.ssh/config:<br><br>'''cat >> ~/.ssh/config << EOF<br>#<br>Host beluga<br>Hostname localhost<br>EOF<br><br>''' | + | #Create a "host" with the name of the Compute Canada machine you are working on, pointing to 'localhost'<br>For example for '''Beluga''' create the following entry in your ~/.ssh/config (put lower case names):<br><br>'''cat >> ~/.ssh/config << EOF<br>#<br>Host beluga<br>Hostname localhost<br>EOF<br><br>''' |
+ | #Set ‘umask 022’<br>On newer Compute Canada clusters, like Cedar and Beluga, by default, everybody within the same group can modify and remove your data under the project space. To prevent this from happening set:<br> '''umask 022'''<br>If you did step 1) above, this command will already be in your ~/.profile.d/.group_profile but you should add it to your file:<br> '''~/.profile.d/.batch_profile'''<br>Create the file if you do not have it.<br> | ||
#Create directories for running CRCM5:<br>This is different depending on the machine on which you are.<br><br>3.1 Create directory/link for the execution directory (where the model will be running):<br> '''mkdir ~/MODEL_EXEC_RUN'''<br><br> On '''guillimin''':<br> For people working for or having their account via '''Pierre Gauthier''' your project space is:<br> '''PROJECT_SPACE=/sf1/escer/gauthier'''<br> If you are with '''Laxmi Sushama'''your project space is:<br> '''PROJECT_SPACE=/gs/project/ugh-612-aa'''<br> If you are with '''René Laprise''' or '''Julie Theriault''' your project space is:<br> '''PROJECT_SPACE=/gs/project/bgx-133-aa'''<br> If you are with another PI, ask your PI for your project space.<br><br> On the '''UQAM servers''' set "PROJECT_SPACE" to the directory assigned to you by Katja or Nadjet.<br><br> Then create the following directory and symbolic link:<br>''' mkdir -p ${PROJECT_SPACE}/${USER}/EXECDIR<br> ln -s ${PROJECT_SPACE}/${USER}/EXECDIR ~/MODEL_EXEC_RUN/${TRUE_HOST}'''<br><br>3.2 Create directory/link for the listings:<br>While the model is running, all listing go into ~/listings/${TRUE_HOST}.<br> But at the end of each job all listings get zipped and transfered to [[Arch mach|arch mach]] in your [[Archdir|archdir]] as specified in your 'configexp.dot.cfg'. Unless, of course, something went wrong...<br> '''<br> mkdir -p ${PROJECT_SPACE}/${USER}/Listings ~/listings<br> ln -s ${PROJECT_SPACE}/${USER}/Listings ~/listings/${TRUE_HOST}'''<br><br><br>The following you only have to do on '''guillimin''': | #Create directories for running CRCM5:<br>This is different depending on the machine on which you are.<br><br>3.1 Create directory/link for the execution directory (where the model will be running):<br> '''mkdir ~/MODEL_EXEC_RUN'''<br><br> On '''guillimin''':<br> For people working for or having their account via '''Pierre Gauthier''' your project space is:<br> '''PROJECT_SPACE=/sf1/escer/gauthier'''<br> If you are with '''Laxmi Sushama'''your project space is:<br> '''PROJECT_SPACE=/gs/project/ugh-612-aa'''<br> If you are with '''René Laprise''' or '''Julie Theriault''' your project space is:<br> '''PROJECT_SPACE=/gs/project/bgx-133-aa'''<br> If you are with another PI, ask your PI for your project space.<br><br> On the '''UQAM servers''' set "PROJECT_SPACE" to the directory assigned to you by Katja or Nadjet.<br><br> Then create the following directory and symbolic link:<br>''' mkdir -p ${PROJECT_SPACE}/${USER}/EXECDIR<br> ln -s ${PROJECT_SPACE}/${USER}/EXECDIR ~/MODEL_EXEC_RUN/${TRUE_HOST}'''<br><br>3.2 Create directory/link for the listings:<br>While the model is running, all listing go into ~/listings/${TRUE_HOST}.<br> But at the end of each job all listings get zipped and transfered to [[Arch mach|arch mach]] in your [[Archdir|archdir]] as specified in your 'configexp.dot.cfg'. Unless, of course, something went wrong...<br> '''<br> mkdir -p ${PROJECT_SPACE}/${USER}/Listings ~/listings<br> ln -s ${PROJECT_SPACE}/${USER}/Listings ~/listings/${TRUE_HOST}'''<br><br><br>The following you only have to do on '''guillimin''': | ||
#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> '''${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><br>For people working for or having their account via '''Pierre Gauthier''' you will have to set in the above file: <br> '''''RAPid=xgk-345-aa'''''<br> If you are with '''Laxmi Sushama''' set: <br> '''''RAPid=ugh-612-ac'''''<br>or if you are with '''René Laprise''' or '''Julie Theriault''' you will have to set:<br> '''''RAPid=bgx-133-ab'''''<br>If you are with another PI, ask your PI for the "job accounting number".<br><br>Have a look at my file if you like: <br> ~winger/.CLUMEQ_accnt <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> '''${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><br>For people working for or having their account via '''Pierre Gauthier''' you will have to set in the above file: <br> '''''RAPid=xgk-345-aa'''''<br> If you are with '''Laxmi Sushama''' set: <br> '''''RAPid=ugh-612-ac'''''<br>or if you are with '''René Laprise''' or '''Julie Theriault''' you will have to set:<br> '''''RAPid=bgx-133-ab'''''<br>If you are with another PI, ask your PI for the "job accounting number".<br><br>Have a look at my file if you like: <br> ~winger/.CLUMEQ_accnt <br> | ||
<br> | <br> |
Version depuis le 18 de juin 2020 à 18:25
Set up the model environment
You have to do this only once.
But before you set up the model environment on Compute Canada clusters, make sure you have set up the SSM environment. If you have not done this already, click here for instructions.
On the UQAM servers this has already been done during the creation of your account.
Set up the model environment:
- Allow 'ssh $TRUE_HOST' without typing password:
cd ~/.ssh
If the directory ~/.ssh does not exist execute the command:
ssh localhost
type in your password and once you are connected 'exit' again. You should now have the directory ~/.ssh.
Only if there is no(!) file 'id_rsa.pub' create it with:
ssh-keygen (press just 'Enter' whenever asked a question, 3 times)
then
cat id_rsa.pub >> authorized_keys
chmod 644 ~/.ssh/authorized_keys - Add keys to your ~/.ssh/config to not get kicked out from a session:
cat >> ~/.ssh/config << EOF
ForwardX11 no
stricthostkeychecking=no
ServerAliveInterval=15
ServerAliveCountMax=3
TCPKeepAlive=yes
UserKnownHostsFile=/dev/null
EOF
chmod 644 ~/.ssh/config - Create a "host" with the name of the Compute Canada machine you are working on, pointing to 'localhost'
For example for Beluga create the following entry in your ~/.ssh/config (put lower case names):
cat >> ~/.ssh/config << EOF
#
Host beluga
Hostname localhost
EOF - Set ‘umask 022’
On newer Compute Canada clusters, like Cedar and Beluga, by default, everybody within the same group can modify and remove your data under the project space. To prevent this from happening set:
umask 022
If you did step 1) above, this command will already be in your ~/.profile.d/.group_profile but you should add it to your file:
~/.profile.d/.batch_profile
Create the file if you do not have it. - Create directories for running CRCM5:
This is different depending on the machine on which you are.
3.1 Create directory/link for the execution directory (where the model will be running):
mkdir ~/MODEL_EXEC_RUN
On guillimin:
For people working for or having their account via Pierre Gauthier your project space is:
PROJECT_SPACE=/sf1/escer/gauthier
If you are with Laxmi Sushamayour project space is:
PROJECT_SPACE=/gs/project/ugh-612-aa
If you are with René Laprise or Julie Theriault your project space is:
PROJECT_SPACE=/gs/project/bgx-133-aa
If you are with another PI, ask your PI for your project space.
On the UQAM servers set "PROJECT_SPACE" to the directory assigned to you by Katja or Nadjet.
Then create the following directory and symbolic link:
mkdir -p ${PROJECT_SPACE}/${USER}/EXECDIR
ln -s ${PROJECT_SPACE}/${USER}/EXECDIR ~/MODEL_EXEC_RUN/${TRUE_HOST}
3.2 Create directory/link for the listings:
While the model is running, all listing go into ~/listings/${TRUE_HOST}.
But at the end of each job all listings get zipped and transfered to arch mach in your archdir as specified in your 'configexp.dot.cfg'. Unless, of course, something went wrong...
mkdir -p ${PROJECT_SPACE}/${USER}/Listings ~/listings
ln -s ${PROJECT_SPACE}/${USER}/Listings ~/listings/${TRUE_HOST}
The following you only have to do on guillimin: - Set project name of which to use the core allocation:
You will have to create a file in your HOME on guillimin which is called:
${HOME}/.CLUMEQ_accnt
This file has to contain 1 variable called 'RAPid', set to the RAPid of the project under which you want to submit your job.
For people working for or having their account via Pierre Gauthier you will have to set in the above file:
RAPid=xgk-345-aa
If you are with Laxmi Sushama set:
RAPid=ugh-612-ac
or if you are with René Laprise or Julie Theriault you will have to set:
RAPid=bgx-133-ab
If you are with another PI, ask your PI for the "job accounting number".
Have a look at my file if you like:
~winger/.CLUMEQ_accnt