Changes between Initial Version and Version 1 of hexagon


Ignore:
Timestamp:
03/17/16 09:08:49 (9 years ago)
Author:
Mathieu Morlighem
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • hexagon

    v1 v1  
     1== Getting an account ==
     2
     3First, you need to send an email to XXX (email: xxx [at] iomail.org) and request an account.
     4
     5== ssh configuration ==
     6
     7You can add the following lines to `~/.ssh/config` on your local machine:
     8{{{
     9#!sh
     10Host hexagon hexagon.uib.xxxx
     11  HostName gplogin1.ps.uci.edu
     12  User YOURHEXAGONUSERNAME
     13  HostKeyAlias gplogin1.ps.uci.edu
     14  HostbasedAuthentication no
     15}}}
     16and replace `YOURHEXAGONUSERNAME` by your hexagon username.
     17
     18Once this is done, you can ssh green planet by simply doing:
     19
     20{{{
     21#!sh
     22ssh hexagon
     23}}}
     24
     25== Password-less ssh ==
     26
     27Once you have the account, you can setup a public key authentification in order to avoid having to input your password for each run.
     28You need to have a SSH public/private key pair. 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):
     29{{{
     30#!sh
     31$your_localhost% ssh-keygen -t rsa
     32Generating public/private rsa key pair.
     33Enter file in which to save the key (/Users/username/.ssh/id_rsa):RETURN
     34Enter passphrase (empty for no passphrase):RETURN
     35Enter same passphrase again:RETURN
     36Your identification has been saved in /Users/username/.ssh/id_rsa.
     37Your public key has been saved in /Users/username/.ssh/id_rsa.pub.
     38}}}
     39
     40Two 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 hexagon account:
     41
     42{{{
     43#!sh
     44$your_localhost%scp ~/.ssh/id_rsa.pub username@your_remosthost:~
     45}}}
     46
     47Now on '''Hexagon''', copy the content of id_rsa.pub:
     48
     49{{{
     50#!sh
     51$your_remosthost%cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
     52$your_remosthost%rm ~/id_rsa.pub
     53}}}
     54
     55== Environment ==
     56
     57On Hexagon, add the following lines to `~/.bashrc`:
     58{{{
     59#!sh
     60export ISSM_DIR=PATHTOTRUNK
     61source $ISSM_DIR/etc/environment.sh
     62module load compiler/intel/15.0.0 #load before openmpi
     63module load mpi/openmpi/1.8.3/intel_15.0.0
     64}}}
     65
     66''Log out and log back in'' to apply this change.
     67
     68== Installing ISSM on Hexagon ==
     69
     70Hexagon will ''only'' be used to run the code, you will use your local machine for pre and post processing, you will never use Hexagon's matlab. You can check out ISSM and install the following packages:
     71 - autotools
     72 - PETSc (use the hexagon script and ``follow`` the instructions, you will need to submit a job and compile PETSc manually, do not make test, it will not work on the cluster)
     73 - m1qn3
     74
     75Use the following configuration script (adapt to your needs):
     76
     77{{{
     78#!sh
     79./configure \
     80 --prefix=$ISSM_DIR \
     81 --with-wrappers=no \
     82 --with-kml=no \
     83 --with-bamg=no \
     84 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
     85 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
     86 --with-m1qn3-dir=$ISSM_DIR/externalpackages/m1qn3/install \
     87 --with-mpi-include="/sopt/mpi/openmpi-1.8.3/intel_15.0.0/include" \
     88 --with-mpi-libflags="-L/sopt/mpi/openmpi-1.8.3/intel_15.0.0/lib -lmpi" \
     89 --with-mkl-dir="/sopt/Intel/composer_xe_2015.0.090/mkl/lib/intel64" \
     90 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
     91 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
     92 --with-cxxoptflags="-O3" \
     93 --with-vendor=intel-gp
     94}}}
     95== hexagon_settings.m ==
     96
     97You have to add a file in `$ISSM_DIR/src/m` entitled `hexagon_settings.m` with your personal settings:
     98
     99{{{
     100#!m
     101cluster.login='mmorligh';
     102cluster.queue='c6145';
     103cluster.codepath='/home/mmorligh/trunk-jpl/bin/';
     104cluster.executionpath='/home/mmorligh/trunk-jpl/execution/';
     105}}}
     106
     107use your username for the `login` and enter your code path and execution path. These settings will be picked up automatically by matlab when you do `md.cluster=hexagon()`
     108
     109== Running jobs on Hexagon ==
     110
     111On Hexagon, you can use up to 30 cores per node. The more nodes and the longer the requested time, the more you will have to wait in the queue. So choose your settings wisely:
     112
     113 {{{
     114#!m
     115md.cluster=hexagon('numnodes',1,'cpuspernode',8);
     116md.cluster.time=10;
     117}}}
     118
     119to 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.
     120
     121Now if you want to check the status of your job and the queue you are using, type in the bash with the Greeplanet session:
     122
     123 {{{
     124#!sh
     125squeue -u username
     126}}}
     127
     128You can delete your job manually by typing:
     129
     130{{{
     131#!sh
     132scancel JOBID
     133}}}
     134
     135where 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 informations 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.
     136
     137If 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 informations Matlab gave you `/home/srebuffi/trunk-jpl/execution//SOMETHING/JOBNAME.lock `, you copy the SOMETHING and you type in Matlab:
     138
     139{{{
     140#!m
     141md=loadresultsfromcluster(md,'SOMETHING');
     142}}}
     143
     144A comparision of PBS to slurm commands can be found here: http://slurm.schedmd.com/rosetta.pdf