Changeset 373b74e in flex_extract.git


Ignore:
Timestamp:
Jul 28, 2022, 10:48:14 AM (21 months ago)
Author:
Anne Tipka <anne.tipka@…>
Branches:
dev
Children:
01bd8aa
Parents:
b6ea29e
Message:

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

Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • Source/Python/_config.py

    rb6ea29e r373b74e  
    8888TEMPFILE_USER_ENVVARS = 'ECMWF_ENV.template'
    8989FILE_USER_ENVVARS = 'ECMWF_ENV'
    90 TEMPFILE_INSTALL_COMPILEJOB = 'installscript.template.bologna'
     90TEMPFILE_INSTALL_COMPILEJOB = 'installscript.template'
    9191FILE_INSTALL_COMPILEJOB = 'compilejob.ksh'
    92 TEMPFILE_INSTALL_JOB = 'jobscript.template.bologna'
     92TEMPFILE_INSTALL_JOB = 'jobscript.template'
    9393TEMPFILE_JOB = 'submitscript.template'
    9494FILE_JOB_OD = 'job.ksh'
  • Templates/installscript.template

    • Property mode changed from 100644 to 120000
    r98f09d2 r373b74e  
    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/$usergroup/$username
    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 ns
    18 ##PBS -S /usr/bin/ksh
    19 ##PBS -o /scratch/ms/$usergroup/$username/flex_ecmwf.$${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 
    26 set -x
    27 export VERSION=$version_number
    28 case $${HOST} in
    29   *ecg*)
    30   module unload grib_api
    31   module unload emos
    32   module load python3
    33   module load eccodes
    34   module load emos/455-r64
    35   export FLEXPART_ROOT_SCRIPTS=$fp_root_scripts
    36   export MAKEFILE=$makefile
    37   ;;
    38   *cca*)
    39   module switch PrgEnv-cray PrgEnv-intel
    40   module load python3
    41   module load eccodes
    42   module load emos/455-r64
    43   echo $${GROUP}
    44   echo $${HOME}
    45   echo $${HOME} | awk -F / '{print $1, $2, $3, $4}'
    46   export GROUP=`echo $${HOME} | awk -F / '{print $4}'`
    47   export SCRATCH=/scratch/ms/$${GROUP}/$${USER}
    48   export FLEXPART_ROOT_SCRIPTS=$fp_root_scripts
    49   export MAKEFILE=$makefile
    50   ;;
    51 esac
    52 
    53 mkdir -p $${FLEXPART_ROOT_SCRIPTS}/flex_extract_v$${VERSION}
    54 cd $${FLEXPART_ROOT_SCRIPTS}/flex_extract_v$${VERSION}   # if FLEXPART_ROOT is not set this means cd to the home directory
    55 tar -xvf $${HOME}/flex_extract_v$${VERSION}.tar
    56 cd Source/Fortran
    57 \rm *.o *.mod $fortran_program
    58 make -f $${MAKEFILE} >flexcompile 2>flexcompile
    59 
    60 ls -l $fortran_program >>flexcompile
    61 if [ $$? -eq 0 ]; then
    62   echo 'SUCCESS!' >>flexcompile
    63   mail -s flexcompile.$${HOST}.$$$$ $${USER} <flexcompile
    64 else
    65   echo Environment: >>flexcompile
    66   env >> flexcompile
    67   mail -s "ERROR! flexcompile.$${HOST}.$$$$" $${USER} <flexcompile
    68 fi
     1installscript.template.bologna
  • Templates/jobscript.template

    • Property mode changed from 100644 to 120000
    r98f09d2 r373b74e  
    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/$usergroup/$username
    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/$usergroup/$username/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 
    26 set -x
    27 export VERSION=$version_number
    28 case $$$${HOST} in
    29   *ecg*)
    30   module unload grib_api
    31   module unload emos
    32   module load python3
    33   module load eccodes
    34   module load emos/455-r64
    35   export PATH=$$$${PATH}:$fp_root_path
    36   ;;
    37   *cca*)
    38   module switch PrgEnv-cray PrgEnv-intel
    39   module load python3
    40   module load eccodes
    41   module load emos/455-r64
    42   export SCRATCH=$$$${TMPDIR}
    43   export PATH=$$$${PATH}:$fp_root_path
    44   ;;
    45 esac
    46 
    47 cd $$$${SCRATCH}
    48 mkdir -p extract$$$$$$$$
    49 cd extract$$$$$$$$
    50 
    51 export CONTROL=CONTROL
    52 
    53 cat >$$$${CONTROL}<<EOF
    54 $$control_content
    55 EOF
    56 
    57 
    58 submit.py --controlfile=$$$${CONTROL} --inputdir=./work --outputdir=./work 1> prot 2>&1
    59 
    60 if [ $? -eq 0 ] ; then
    61   l=0
    62   for muser in `grep -i MAILOPS $$$${CONTROL}`; do
    63       if [ $$$${l} -gt 0 ] ; then
    64          mail -s flex.$$$${HOST}.$$$$$$$$ $$$${muser} <prot
    65       fi
    66       l=$(($$$${l}+1))
    67   done
    68 else
    69   l=0
    70   for muser in `grep -i MAILFAIL $$$${CONTROL}`; do
    71       if [ $$$${l} -gt 0 ] ; then
    72          mail -s "ERROR! flex.$$$${HOST}.$$$$$$$$" $$$${muser} <prot
    73       fi
    74       l=$(($$$${l}+1))
    75   done
    76 fi
    77 
     1jobscript.template.reading
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG