1 # This is a Posix SH include file that should be sourced at the top of
2 # every job. It initializes the environment for various clusters so
3 # that the rest of the HWRF or Rocoto can run properly.
5 if [[
"Q${HWRF_FORCE_TMPDIR:-}" !=
"Q" ]] ; then
6 if [[ ! -d
"$HWRF_FORCE_TMPDIR" ]] ; then
7 if ( mkdir -p
"$HWRF_FORCE_TMPDIR" ) ; then
8 : # trick to avoid triggering a set -e during a race condition
11 export TMPDIR=
"$HWRF_FORCE_TMPDIR"
14 if [[
"QQ$WHERE_AM_I" == QQ ]] ; then
15 if [[ -d /lfs3 ]] ; then
17 elif [[ -d /scratch3 ]] ; then
18 if ( grep E5-2690 /proc/cpuinfo > /dev/null 2>&1 ) ; then
19 export WHERE_AM_I=theia
21 export WHERE_AM_I=zeus
23 elif [[ -d /gpfs/hps && -e /etc/SuSE-release ]] ; then
24 export WHERE_AM_I=wcosscray
25 elif [[ -d /dcom && -d /
hwrf ]] ; then
26 export WHERE_AM_I=wcoss
27 elif [[ -d /glade ]] ; then
28 export WHERE_AM_I=yellowstone
29 elif [[ -d /data && -d /home && -d /scratch ]] ; then
34 moduleuse=$HOMEhwrf/modulefiles/$WHERE_AM_I
35 case "${WHERE_AM_I:-unknown}" in
36 jet) . /apps/lmod/lmod/init/sh ;;
37 zeus) . /usr/share/Modules/init/sh ;;
38 ttfri) . /opt/modules/Modules/3.2.9/init/sh ;;
41 . /usr/share/Modules/init/sh
42 export PATH=/glade/p/work/strahan/rocoto/
hwrf-rocoto/bin:$PATH
46 moduleuse=$HOMEhwrf/modulefiles/wcoss
47 . /usrx/local/Modules/
default/init/sh
51 if [[ -e /gpfs/td2 ]] ; then
52 moduleuse=$HOMEhwrf/modulefiles/wcossluna
54 moduleuse=$HOMEhwrf/modulefiles/wcosssurge
56 . /opt/modules/
default/init/sh
61 echo
"WARNING: UNSUPPORTED SYSTEM $WHERE_AM_I" 1>&2
64 if [[
"$moduleuse" != no ]] ; then
67 if [[
"${GSI_DOMAIN:-}QQ" == QQ ]] ; then
68 echo NOT A GSI JOB - LOADING HWRF/
run
71 echo GSI JOB - LOAD HWRF/rungsi
72 module
load HWRF/rungsi
76 if [[
"${QUIET_PRE_JOB:-NO}" != YES ]] ; then
77 if [[
"$WHERE_AM_I" == zeus ||
"$WHERE_AM_I" == jet ||
"$WHERE_AM_I" == ttfri ]] ; then
78 echo ====================PBS_NODEFILE CONTENTS===================
79 ( set +eu ; cat
"$PBS_NODEFILE" ; /bin/true )
81 echo =======================/proc/meminfo========================
83 echo ========================ps auxwww===========================
85 echo ===========================env==============================
87 echo ======================df -h /dev/shm========================
89 echo ========================ulimit -a===========================
91 echo ============================================================
def load(filename)
Loads the HWRFLauncher created by the launch() function.
def run(arg, logger=None, sleeptime=None, kwargs)
Executes the specified program and attempts to return its exit status.
Defines classes that know how to run all parts of the HWRF system.