source: flex_extract.git/Templates/installscript.template.bologna @ 373b74e

dev
Last change on this file since 373b74e was 373b74e, checked in by Anne Tipka <anne.tipka@…>, 21 months ago

created server specific templates for slurm job scripts (Reading vs Bologna)! Use static link file name in Python.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1#!/bin/ksh
2
3# ON ECS or HPC servers:
4# start with ecaccess-job-submit -queueName <QUEUENAME> <NAME_OF_THIS_FILE>  on gateway server
5# start with srun <NAME_OF_THIS_FILE> directly on machine
6
7#SBATCH --chdir=$$SCRATCH
8#SBATCH --qos=el
9#SBATCH --job-name=flex_extract
10#SBATCH --output=flex_extract.%j.out
11#SBATCH --error=flex_error.%j.out
12#SBATCH --mail-type=FAIL
13#SBATCH --mail-user=$username
14
15## CRAY specific batch requests
16##PBS -N flex_ecmwf
17##PBS -q ns
18##PBS -S /usr/bin/ksh
19##PBS -o $$SCRATCH/flex_extract.$${Jobname}.$${Job_ID}.out
20# job output is in .ecaccess_DO_NOT_REMOVE
21##PBS -j oe
22##PBS -V
23##PBS -l EC_threads_per_task=1
24##PBS -l EC_memory_per_task=3200MB
25
26set -x
27export VERSION=$version_number
28case $${EC_CLUSTER} in
29  *ecs*)
30#  module switch prgenv/gnu
31  module load ecmwf-toolbox
32  module load python3
33  module load ecaccess
34  export FLEXPART_ROOT_SCRIPTS=$fp_root_scripts
35  export MAKEFILE=$makefile
36  ;;
37  *hpc*)
38#  module switch PrgEnv-cray PrgEnv-intel
39  module load python3
40  module load ecmwf-toolbox
41  module load ecaccess
42  echo $${GROUP}
43  echo $${HOME}
44  echo $${HOME} | awk -F / '{print $1, $2, $3, $4}'
45  export GROUP=`echo $${HOME} | awk -F / '{print $4}'`
46  export SCRATCH=$${SCRATCH}
47  export FLEXPART_ROOT_SCRIPTS=$fp_root_scripts
48  export MAKEFILE=$makefile
49  ;;
50esac
51
52mkdir -p $${FLEXPART_ROOT_SCRIPTS}/flex_extract_v$${VERSION}
53cd $${FLEXPART_ROOT_SCRIPTS}/flex_extract_v$${VERSION}   # if FLEXPART_ROOT is not set this means cd to the home directory
54tar -xvf $${HOME}/flex_extract_v$${VERSION}.tar
55cd Source/Fortran
56\rm *.o *.mod $fortran_program 
57make -f $${MAKEFILE} >flexcompile 2>flexcompile
58
59ls -l $fortran_program >>flexcompile
60if [ $$? -eq 0 ]; then
61  echo 'SUCCESS!' >>flexcompile
62  mail -s flexcompile.$${HOST}.$$$$ $${USER} <flexcompile
63else
64  echo Environment: >>flexcompile
65  env >> flexcompile
66  mail -s "ERROR! flexcompile.$${HOST}.$$$$" $${USER} <flexcompile
67fi
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG