source: flex_extract.git/run/jobscripts/job.ksh @ 2fb99de

ctbtodev
Last change on this file since 2fb99de was 2fb99de, checked in by Anne Philipp <anne.philipp@…>, 6 years ago

introduced config with path definitions and changed py files accordingly; Installation works; some tests were added for tarball making; Problems in submission to ecgate

  • Property mode set to 100644
File size: 2.6 KB
Line 
1#!/bin/ksh
2
3# ON ECGB:
4# start with ecaccess-job-submit -queueName ecgb NAME_OF_THIS_FILE  on gateway server
5# start with sbatch NAME_OF_THIS_FILE directly on machine
6
7#SBATCH --workdir=/scratch/ms/at/km4a
8#SBATCH --qos=normal
9#SBATCH --job-name=flex_ecmwf
10#SBATCH --output=flex_ecmwf.%j.out
11#SBATCH --error=flex_ecmwf.%j.out
12#SBATCH --mail-type=FAIL
13#SBATCH --time=12:00:00
14
15## CRAY specific batch requests
16##PBS -N flex_ecmwf
17##PBS -q np
18##PBS -S /usr/bin/ksh
19## -o /scratch/ms/spatlh00/lh0/flex_ecmwf.$PBS_JOBID.out
20## job output is in .ecaccess_DO_NOT_REMOVE
21##PBS -j oe
22##PBS -V
23##PBS -l EC_threads_per_task=24
24##PBS -l EC_memory_per_task=32000MB
25
26set -x
27export VERSION=7.1
28case $HOST in
29  *ecg*)
30  module load python
31  module unload grib_api
32  module unload emos
33  module load grib_api/1.14.5
34  module load emos/437-r64
35  export PATH=${PATH}:${HOME}/flex_extract_v7.1/python
36  ;;
37  *cca*)
38  module switch PrgEnv-cray PrgEnv-intel
39  module load grib_api
40  module load emos
41  module load python
42  export SCRATCH=$TMPDIR
43  export PATH=${PATH}:${HOME}/flex_extract_v7.1/python
44  ;;
45esac
46
47cd $SCRATCH
48mkdir -p python$$
49cd python$$
50
51export CONTROL=CONTROL
52
53cat >$CONTROL<<EOF
54accuracy 24
55addpar 186 187 188 235 139 39
56area
57basetime None
58controlfile CONTROL.test
59cwc 0
60date_chunk 3
61debug 1
62destination annep@genericSftp
63dpdeta 1
64dtime 3
65ecfsdir ectmp:/${USER}/econdemand/
66ecgid at
67ecstorage 0
68ectrans 1
69ecuid km4a
70end_date 20160606
71eta 0
72etadiff 0
73etapar 77
74expver 1
75format GRIB1
76gateway srvx8.img.univie.ac.at
77gauss 1
78grib2flexpart 0
79grid 5000
80inputdir ../work
81install_target None
82job_template job.temp
83left -10000
84level 60
85levelist 59/to/60
86logicals gauss omega omegadiff eta etadiff dpdeta cwc wrf grib2flexpart ecstorage ectrans debug request
87lower 30000
88mailfail ${USER}
89mailops ${USER}
90makefile Makefile.gfortran
91marsclass EI
92maxstep 11
93number OFF
94omega 0
95omegadiff 0
96outputdir ../work
97prefix EItest_
98queue ecgate
99request 0
100resol 63
101right 10000
102smooth 0
103start_date 20160606
104step 00 01 02 03 04 05 00 07 08 09 10 11 00 01 02 03 04 05 00 07 08 09 10 11
105stream OPER
106time 00 00 00 00 00 00 06 00 00 00 00 00 12 12 12 12 12 12 18 12 12 12 12 12
107type AN FC FC FC FC FC AN FC FC FC FC FC AN FC FC FC FC FC AN FC FC FC FC FC
108upper 40000
109wrf 0
110EOF
111
112
113submit.py --controlfile=$CONTROL --inputdir=./work --outputdir=./work 1> prot 2>&1
114
115if [ $? -eq 0 ] ; then
116  l=0
117  for muser in `grep -i MAILOPS $CONTROL`; do
118      if [ $l -gt 0 ] ; then 
119         mail -s flex.${HOST}.$$ $muser <prot
120      fi
121      l=$(($l+1))
122  done
123else
124  l=0
125  for muser in `grep -i MAILFAIL $CONTROL`; do
126      if [ $l -gt 0 ] ; then 
127         mail -s "ERROR! flex.${HOST}.$$" $muser <prot
128      fi
129      l=$(($l+1))
130  done
131fi
132
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG