source: flex_extract.git/Testing/Regression/Unit/Testfiles/submitscript.template.test @ 8028176

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

updated unit tests

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