New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
sette_test-cases_indev.sh in utils/CI/sette_ticket2417 – NEMO

source: utils/CI/sette_ticket2417/sette_test-cases_indev.sh @ 12875

Last change on this file since 12875 was 12875, checked in by mathiot, 4 years ago

ticket #2417: add extra comments

  • Property svn:executable set to *
File size: 3.0 KB
Line 
1#!/bin/bash
2set -o posix
3#########################################################################################
4#
5# LOAD param value
6. ./param.cfg
7
8# define DEL_KEY here as done in current sette_test_cases.sh script (ADD_KEY is useless as it concern only key_signedzero which should be define in the arch file)
9
10# LOAD function
11. ./all_functions.sh
12
13# CREATE job submission template
14cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit
15
16# RUN all CONFIGuration in TEST_CONFIG list
17for CONFIG in ${SETTE_TEST_CONFIGS}  # SETTE_TEST_CONFIG defined in cfgs/test (not in param.cfg)
18do
19    cd $SETTE_DIR
20
21    # CREATE scripts (step needed if we want a batch script run_sette.sh to run compilation on compute node)
22    #./prepare_run_sette.sh
23
24    # RUN main script
25    ./sette_run.sh $CONFIG # could be run by using BATCH submission (with/without --wait option or similar) if needed
26                           # could easily be switch to parrallel run as soon as makenemo allow multiple CONFIG to be compile at the same time
27
28         cd $SETTE_DIR # need to be exported as env var before starting this script
29
30         # LOAD input data
31         . $PATH_TO_INPUT/input_${CONFIG} # in cfgs/.sette_cfgs or in cfgs/config (but not all of them exist) ?
32                 
33         # LOAD param value
34         . ./param.cfg
35            # To add in param:
36            NJ=8 # => use to define number of tread used for compilation
37
38         # LOAD function
39         . ./all_functions.sh
40
41         # CREATE validation directory
42         set_valid_dir
43
44         # COMPILE NEMO
45         cd $NEMO_DIR
46         . ./makenemo -m ${CMP_NAM} -n ${CONFIG}_ST -a ${CFG_REF} -j ${NJ} add_key ${ADD_KEYS} del_key ${DEL_KEYS}
47
48         # SETUP REF/MPP/RST run directory (copy EXP00 + REF/RST/MPP + mv old files)
49         for TEST_NAME in 'REF MPP RST'; do
50            cd $SETTE_DIR
51
52            # set EXE_DIR and move old files
53            . ./prepare_exe_dir.sh       # set $EXE_DIR
54 
55            # set XIOS
56            set_xios                     # set_xio_using_server iodef.xml ${USING_MPMD}
57
58            # set namelist
59            set_namelist_common          # set common namelist
60            set_namelist_${TEST_NAME}    # set specific namelist
61           
62            NPROC=$((NPROC$TEST_NAME))
63
64            # create run_job.sh file for REF/MPP/RST
65            . ./prepare_run_job.sh input_${CONFIG}.cfg ${NPROC} ${TEST_NAME} ${MPIRUN_FLAG} run_job.sh ${NUM_XIOSERVERS} ${NEMO_VALID}
66         done
67
68         # link restart for RST simulation
69         link_restart
70
71         # RUN Simulation REF/MPP/RST (report script will need to be updated)
72         # option to wait REF is done defined in param ('-W depend=afterany:' for SGE)
73         . ./fcm_job.sh $NPROCREF ${MAIN_DIR}/cfgs/${CONFIG}_ST/REF           ; REFid=${JOBID} # JOBID comes from fcm_job.sh
74         . ./fcm_job.sh $NPROCMPP ${MAIN_DIR}/cfgs/${CONFIG}_ST/MPP           ; MPPid=${JOBID} #
75         . ./fcm_job.sh $NPROCRST ${MAIN_DIR}/cfgs/${CONFIG}_ST/RST -w $REFid ; RSTid=${JOBID} # wait REFid to finish to start
76
77done
Note: See TracBrowser for help on using the repository browser.