Changes between Initial Version and Version 1 of lonestar


Ignore:
Timestamp:
09/17/15 13:47:18 (9 years ago)
Author:
seroussi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • lonestar

    v1 v1  
     1== Getting an account ==
     2
     3more to come...
     4== ssh configuration ==
     5
     6You can add the following lines to `~/.ssh/config` on your local machine:
     7{{{
     8#!sh
     9Host lonestar lonestar.tacc.utexas.edu
     10   HostName lonestar.tacc.utexas.edu
     11  User YOURHPCUSERNAME
     12  HostKeyAlias lonestar.tacc.utexas.edu
     13  HostbasedAuthentication no
     14}}}
     15and replace `YOURHPCUSERNAME` by your lonestar username.
     16
     17Once this is done, you can ssh lonestar by simply doing:
     18
     19{{{
     20#!sh
     21ssh lonestar
     22}}}
     23
     24== Password-less ssh ==
     25
     26Once you have the account, you can setup a public key authentification in order to avoid having to input your password for each run.
     27You 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):
     28{{{
     29#!sh
     30$your_localhost% ssh-keygen -t rsa
     31Generating public/private rsa key pair.
     32Enter file in which to save the key (/Users/username/.ssh/id_rsa):RETURN
     33Enter passphrase (empty for no passphrase):RETURN
     34Enter same passphrase again:RETURN
     35Your identification has been saved in /Users/username/.ssh/id_rsa.
     36Your public key has been saved in /Users/username/.ssh/id_rsa.pub.
     37}}}
     38
     39Two 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 lonestar account:
     40
     41{{{
     42#!sh
     43$your_localhost%scp ~/.ssh/id_rsa.pub username@your_remosthost:~
     44}}}
     45
     46Now on '''lonestar''', copy the content of id_rsa.pub:
     47
     48{{{
     49#!sh
     50$your_remosthost%cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
     51$your_remosthost%rm ~/id_rsa.pub
     52}}}
     53
     54== Environment ==
     55
     56On lonestar, add the following lines to `~/.bash_login`:
     57{{{
     58#!sh
     59export ISSM_DIR=PATHTOTRUNK
     60source $ISSM_DIR/etc/environment.sh
     61module load cmake/2.8.7
     62module load mkl/10.3
     63}}}
     64
     65''Log out and log back in'' to apply this change.
     66
     67== STOP HERE ==
     68
     69== Installing ISSM on lonestar ==
     70
     71lonestar will ''only'' be used to run the code, you will use your local machine for pre and post processing, you will never use lonestar's matlab. You can check out ISSM and install the following packages:
     72 - autotools
     73 - PETSc (use the hpc 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)
     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-kml=no \
     84 --with-bamg=no \
     85 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
     86 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
     87 --with-m1qn3-dir=$ISSM_DIR/externalpackages/m1qn3/install \
     88 --with-mpi-include="/data/apps/mpi/openmpi-1.8.3/gcc/4.8.3/include" \
     89 --with-mpi-libflags="-L/data/apps/mpi/openmpi-1.8.3/gcc/4.8.3/lib -lmpi_cxx -lmpi" \
     90 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
     91 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
     92 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
     93 --with-numthreads=16 \
     94 --with-fortran-lib="-L/data/apps/gcc/4.7.3/lib64 -lgfortran" \
     95 --enable-debugging \
     96 --enable-development
     97}}}
     98== lonestar_settings.m ==
     99
     100You have to add a file in `$ISSM_DIR/src/m` entitled `lonestar_settings.m` with your personal settings on your local ism install:
     101
     102{{{
     103#!m
     104cluster.login='seroussi';
     105cluster.port=8000;
     106cluster.queue='pub64';
     107cluster.codepath='/data/users/mmorligh/trunk-jpl/bin/';
     108cluster.executionpath='/data/users/mmorligh/trunk-jpl/execution/';
     109}}}
     110
     111use 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=hpc()`
     112
     113== Running jobs on hpc  ==
     114
     115On hpc, you can use up to 64 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:
     116
     117 {{{
     118#!m
     119md.cluster=hpc('numnodes',1,'cpuspernode',8);
     120}}}
     121
     122The list of available queues is `'pub64','free64','free48','free*,pub64'` and `'free*'`.
     123
     124to have a job of 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.
     125
     126Now if you want to check the status of your job and the queue you are using, type in the bash with the hpc session:
     127
     128 {{{
     129#!sh
     130qstat -u USERNAME
     131}}}
     132
     133You can delete your job manually by typing:
     134
     135{{{
     136#!sh
     137qdel JOBID
     138}}}
     139
     140where 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.