Changes between Initial Version and Version 1 of gscc


Ignore:
Timestamp:
12/09/20 13:54:46 (4 years ago)
Author:
downs
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • gscc

    v1 v1  
     1== Getting an account ==
     2
     3First, you need to send an email to the system administrators of Greenplanet (email: hpcops [at] ps.uci.edu) and request an account (desired username or ucinetid, and email address). More info here: https://ps.uci.edu/greenplanet/
     4
     5== ssh configuration ==
     6
     7You can add the following lines to `~/.ssh/config` on your local machine:
     8{{{
     9#!sh
     10Host gp greenplanet gplogin1.ps.uci.edu gplogin2.ps.uci.edu
     11  HostName gplogin1.ps.uci.edu
     12  User YOURGREENPLANETUSERNAME
     13  HostKeyAlias gplogin1.ps.uci.edu
     14  HostbasedAuthentication no
     15}}}
     16and replace `YOURGREENPLANETUSERNAME` by your greenplanet username.
     17
     18Once this is done, you can ssh green planet by simply doing:
     19
     20{{{
     21#!sh
     22ssh gp
     23}}}
     24
     25Obs.: `gplogin2.ps.uci.edu` is preferred over `gplogin1.ps.uci.edu` (gplogin2 is faster, has 48 cores and new nodes, and allows to access the DFS-B disk which has a faster i/o). See the partitions here (ideally submit jobs on 'ilg2.3'): https://ps.uci.edu/greenplanet/Partitions-new-names.
     26
     27== Password-less ssh ==
     28
     29Once you have the account, you can setup a public key authentification in order to avoid having to input your password for each run.
     30You need to have a SSH public/private key pair. If you already have one, you can skip their creation described below. If you do not, you can create a SSH public/private key pair by typing the following command and following the prompts (no passphrase necessary):
     31{{{
     32#!sh
     33$your_localhost% ssh-keygen -t rsa
     34Generating public/private rsa key pair.
     35Enter file in which to save the key (/Users/username/.ssh/id_rsa):RETURN
     36Enter passphrase (empty for no passphrase):RETURN
     37Enter same passphrase again:RETURN
     38Your identification has been saved in /Users/username/.ssh/id_rsa.
     39Your public key has been saved in /Users/username/.ssh/id_rsa.pub.
     40}}}
     41
     42Two files were created: your private key `/Users/username/.ssh/id_rsa`, and the public key `/Users/username/.ssh/id_rsa.pub`. The private key is read-only and only for you, it is used to decrypt all correspondence encrypted with the public key. The contents of the public key need to be copied to `~/.ssh/authorized_keys` on your greenplanet account:
     43
     44{{{
     45#!sh
     46$your_localhost%scp ~/.ssh/id_rsa.pub username@your_remotehost:~
     47}}}
     48
     49Now on '''Greenplanet''', copy the content of id_rsa.pub:
     50
     51{{{
     52#!sh
     53$your_remotehost%cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
     54$your_remotehost%rm ~/id_rsa.pub
     55}}}
     56
     57== Environment ==
     58
     59On '''Greenplanet''', add the following lines to `~/.bashrc`:
     60{{{
     61#!sh
     62export ISSM_DIR=PATHTOTRUNK
     63source $ISSM_DIR/etc/environment.sh
     64ml intel/2018.3 openmpi/3.1.2-slim
     65}}}
     66
     67''Log out and log back in'' to apply this change.
     68
     69== Installing ISSM on Greenplanet ==
     70
     71Greenplanet will ''only'' be used to run the code, you will use your local machine for pre and post processing, you will never use Greenplanet's Matlab. You can check out ISSM and install the following packages:
     72 - autotools (the one provided by default is too old)
     73 - PETSc 3.14
     74 - m1qn3
     75
     76Use the following configuration script (adapt to your needs):
     77
     78{{{
     79#!sh
     80./configure \
     81 --prefix=$ISSM_DIR \
     82 --with-wrappers=no \
     83 --with-kriging=no \
     84 --with-kml=no \
     85 --with-bamg=no \
     86 --without-Love \
     87 --with-metis-dir="$ISSM_DIR/externalpackages/petsc/install" \
     88 --with-petsc-dir="$ISSM_DIR/externalpackages/petsc/install" \
     89 --with-m1qn3-dir="$ISSM_DIR/externalpackages/m1qn3/install" \
     90 --with-mpi-include="/sopt/OpenMPI/3.1.2/intel-2018.3-slim/include" \
     91 --with-mpi-libflags="-L/sopt/OpenMPI/3.1.2/intel-2018.3-slim/lib -lmpi -lm -lmpi_mpifh" \
     92 --with-mkl-libflags="-L/sopt/MKL/2018.3/lib -mkl=cluster" \
     93 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
     94 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
     95 --with-cxxoptflags="-O3 -fPIC -std=c++11" \
     96 --with-vendor=intel-gp
     97}}}
     98== greenplanet_settings.m ==
     99
     100You have to add a file in `$ISSM_DIR/src/m` entitled `greenplanet_settings.m` with your personal settings:
     101
     102{{{
     103#!m
     104cluster.login='morlighem';
     105cluster.queue='ilg2.3';
     106cluster.port='';
     107cluster.codepath='/DFS-B/DATA/morlighem/trunk-jpl/bin/';
     108cluster.executionpath='/DFS-B/DATA/morlighem/trunk-jpl/execution/';
     109}}}
     110
     111Use your username for the `login` and enter your `codepath` and `executionpath`. These settings will be picked up automatically by Matlab when you do `md.cluster=greenplanet()`
     112
     113== Running jobs on Greenplanet ==
     114
     115On Greenplanet, you can use up to 30 cores per node (partition `ilg2.3`). The more nodes and the longer the requested time, the more you will have to wait in the queue. Per job you can only request up to 125GB of RAM. So choose your settings wisely:
     116
     117 {{{
     118#!m
     119md.cluster=greenplanet('numnodes',1,'cpuspernode',8);
     120md.cluster.time=10;
     121}}}
     122
     123to have a maximum job time of 10 minutes and 8 cores on one node. If the run lasts longer than 10 minutes, it will be killed and you will not be able to retrieve your results.
     124
     125Now if you want to check the status of your job and the queue you are using, type in the bash on '''Greenplanet''' session:
     126
     127 {{{
     128#!sh
     129squeue -u username
     130}}}
     131
     132You can delete your job manually by typing:
     133
     134{{{
     135#!sh
     136scancel JOBID
     137}}}
     138
     139where `JOBID` is the ID of your job (indicated in the Matlab session). Matlab indicates too the directory of your job where you can find the files `JOBNAME.outlog` and `JOBNAME.errlog`. The outlog file contains the information that would appear if you were running your job on your local machine and the errlog file contains the error information in case the job encounters an error.
     140
     141If you want to load results from the cluster manually (for example if you have an error due to an internet interruption), you find in the information Matlab gave you `$ISSM_DIR/execution/LAUNCHSTRING/JOBNAME.lock`, you copy the LAUNCHSTRING and you type in Matlab:
     142
     143{{{
     144#!m
     145md=loadresultsfromcluster(md,'LAUNCHSTRING','JOBNAME');
     146}}}
     147
     148Obs.: in the case where `md.settings.waitonlock`>0 and you need to load manually (e.g., internet interruption), it is necessary to set `md.private.runtimename=LAUNCHSTRING;` before calling `loadresultsfromcluster`.
     149
     150== slurm ==
     151
     152A comparison of PBS to slurm commands can be found here: http://slurm.schedmd.com/rosetta.pdf
     153
     154Useful commands:
     155
     156Graphical overview over greenplanet usage:
     157{{{
     158sview
     159}}}
     160
     161Get number of idle nodes:
     162{{{
     163sinfo --states=idle
     164}}}
     165
     166See jobs of <username>:
     167{{{
     168squeue -u <username>
     169}}}
     170
     171Get more information on jobs of user:
     172{{{
     173sacct -u <username> --format=User,JobID,account,Timelimit,elapsed,ReqMem,MaxRss,ExitCode
     174}}}
     175
     176Get information on partition (here ilg2.3):
     177{{{
     178scontrol show partition=ilg2.3
     179}}}
     180
     181Get sorted list of users on partition:
     182{{{
     183squeue  | grep -i ilg2.3 | awk '{print $4}' | sort | uniq -c | sort -rn
     184}}}