source: flex_extract.git/templates/job.template @ b02a07e

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

updated temporarily unchanged files (update-index) of everchanging files for a merge

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[d69b677]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
[c5074d2]7#SBATCH --workdir=/scratch/ms/$usergroup/$username
[d69b677]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
[b02a07e]19## -o /scratch/ms/$usergroup/$username/flex_ecmwf.$$$${PBS_JOBID}.out
[d69b677]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
[c5074d2]27export VERSION=$version_number
[b02a07e]28case $$$${HOST} in
[d69b677]29  *ecg*)
30  module load python
31  module unload grib_api
[c97d8ec]32  module unload eccodes
[b02a07e]33  module load eccodes
[d69b677]34  module unload emos
[b02a07e]35  module load emos/455-r64
36  export PATH=$$$${PATH}:$fp_root_path
[d69b677]37  ;;
38  *cca*)
39  module switch PrgEnv-cray PrgEnv-intel
[b02a07e]40  module load eccodes
[d69b677]41  module load emos
42  module load python
[b02a07e]43  export SCRATCH=$$$${TMPDIR}
44  export PATH=$$$${PATH}:$fp_root_path
[d69b677]45  ;;
46esac
47
[b02a07e]48cd $$$${SCRATCH}
49mkdir -p python$$$$$$$$
50cd python$$$$$$$$
[d69b677]51
[25b14be]52export CONTROL=CONTROL
[d69b677]53
[b02a07e]54cat >$$$${CONTROL}<<EOF
55$$control_content
[d69b677]56EOF
57
58
[b02a07e]59submit.py --controlfile=$$$${CONTROL} --inputdir=./work --outputdir=./work 1> prot 2>&1
[d69b677]60
61if [ $? -eq 0 ] ; then
62  l=0
[b02a07e]63  for muser in `grep -i MAILOPS $$$${CONTROL}`; do
64      if [ $$$${l} -gt 0 ] ; then 
65         mail -s flex.$$$${HOST}.$$$$$$$$ $$$${muser} <prot
[d69b677]66      fi
[b02a07e]67      l=$(($$$${l}+1))
[d69b677]68  done
69else
70  l=0
[b02a07e]71  for muser in `grep -i MAILFAIL $$$${CONTROL}`; do
72      if [ $$$${l} -gt 0 ] ; then 
73         mail -s "ERROR! flex.$$$${HOST}.$$$$$$$$" $$$${muser} <prot
[d69b677]74      fi
[b02a07e]75      l=$(($$$${l}+1))
[d69b677]76  done
77fi
78
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG