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.
Changeset 5644 for branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh – NEMO

Ignore:
Timestamp:
2015-07-29T20:33:51+02:00 (9 years ago)
Author:
nicolasmartin
Message:

dev_r5092_CNRS_SETTE Wide modifications on trusting_func.sh for clearness & other significant changes on different names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh

    r5637 r5644  
    22 
    33 
     4cd $( dirname $0 ) 
     5 
    46## Set defaults 
    57##--------------------------------------------------- 
    6 NEMO_TRUS=$( pwd $( dirname $0 ) ) 
     8NEMO_TRUS=$( pwd ) 
    79DEBUG=0; PUBLISH=0 
    810I_MODULE=0      ## No 'module' command by default 
     
    1315while [ $# -ne 0 ]; do 
    1416    case $1 in 
    15    -a|--archive) FORC_TARF=$2         ; shift 2;; -b|--branch ) NEMO_BRAN=$2         ; shift 2;; 
     17   -a|--archive) NEMO_TARF=$2         ; shift 2;; -b|--branch ) NEMO_BRAN=$2         ; shift 2;; 
    1618   -d|--debug  ) set -vx; DEBUG=1     ; shift  ;; -e|--email  ) EMAIL=$2             ; shift 2;; 
    1719   -j|--job    ) NPROC=$2             ; shift 2;; -h|--help   ) cat trusting_help.txt; exit  1;; 
    18    -m|--machine) CFG_ARCH=$2          ; shift 2;; -n|--newconf) TEST_CONF=$2         ; shift 2;; 
     20   -m|--machine) NEMO_HPCC=$2         ; shift 2;; -n|--newconf) TEST_CONF=$2         ; shift 2;; 
    1921   -r|--refconf) REFE_CONF=$2         ; shift 2;; -t|--time   ) TIME_LIMI=$2         ; shift 2;; 
    20    -p|--publish) PUBLISH=1            ; shift  ;; -u|--user   ) CFG_USER=$2          ; shift 2;; 
     22   -p|--publish) PUBLISH=1            ; shift  ;; -u|--user   ) NEMO_USER=$2         ; shift 2;; 
    2123   -v|--version) NEMO_VERS=$2         ; shift 2;;            *) cat trusting_help.txt; exit  1;; 
    2224    esac 
     
    2527## Initialization (super-computer & user environment) 
    2628##--------------------------------------------------- 
    27 if [[ ! -z "${CFG_ARCH}" && ! -z "${CFG_USER}" ]]; then 
     29if [[ ! -z "${NEMO_HPCC}" && ! -z "${NEMO_USER}" ]]; then 
    2830 
    29     if   [ ! $( find ${NEMO_TRUS}/config -name ${CFG_USER}.cfg ) ]; then 
    30    echo 'No configuration file in '${NEMO_TRUS}'/config for '${CFG_USER}; exit 1 
    31     elif [ ! $( find ${NEMO_TRUS}/config -name ${CFG_ARCH}.cfg ) ]; then 
    32    echo 'No configuration file in '${NEMO_TRUS}'/config for '${CFG_ARCH}; exit 1 
     31    if   [ ! $( find ${NEMO_TRUS}/config -name ${NEMO_USER}'.cfg' ) ]; then 
     32   echo 'No configuration file (.cfg) in '${NEMO_TRUS}'/config for '${NEMO_USER}; exit 1 
     33    elif [ ! $( find ${NEMO_TRUS}/config -name ${NEMO_HPCC}'.cfg' ) ]; then 
     34   echo 'No configuration file (.cfg) in '${NEMO_TRUS}'/config for '${NEMO_HPCC}; exit 1 
    3335    else 
    3436   . ${NEMO_TRUS}/trusting.env 
     
    4143. ./trusting_func.sh 
    4244 
    43 ##  
     45## Summary of trusting test context 
    4446##--------------------------------------------------- 
     47printf "\ 
     48NEMO Trusting test:\n\ 
     49-------------------\n\ 
     50Testing ${TEST_CONF} based on ${REFE_CONF} from ${NEMO_BRAN}\n\ 
     51Configuration files: ${NEMO_USER}.cfg & ${NEMO_HPCC}.cfg\n" 
     52 
     53## Making timestamped directory with messenger files 
     54##--------------------------------------------------- 
     55print_step 'Time-stamp generation & testing directory creation' 
    4556mkdir -p ${TEST_DIR} ${REFE_DIR} 
    4657echo ${TEST_DIR} && cd ${TEST_DIR} 
    47 date_str=$( date -ud ${DATESTR} +"%F %R %Z" ) 
    48 printf "Date\n${date_str}\n" > mesg_01_date_${CFG_USER}_${CFG_ARCH}.txt 
     58init_files && get_date 
    4959 
    5060## SVN action on XIOS & NEMO essentials directories 
    5161##--------------------------------------------------- 
    52 print_step 'SVN actions on NEMO directories' 
     62print_step 'SVN command on NEMO directories:' 
    5363get_nemo_rev 
    5464 
    5565## Check softwares versions (source arch environment) 
    5666##--------------------------------------------------- 
    57 print_step 'Get softwares release' 
     67print_step 'Get softwares releases' 
    5868[ -e ${ARCH_ENV} ] && . ${ARCH_ENV} > /dev/null 
    59 [ $? -eq 0 ] && I_MODULE=1 
    60 export I_MODULE 
     69(( $? == 0  )) && export I_MODULE=1 
    6170get_soft_rel 
    6271cat model.log 
     
    6473## XIOS compiling 
    6574##--------------------------------------------------- 
    66 print_step 'Compiling XIOS' 
     75print_step 'Compile XIOS' 
    6776cd ${DIR_XIOS} 
    6877full=''; [ $DEBUG -eq 0 ] && full='--full' 
    69 ./make_xios $full --arch ${CFG_ARCH} --job $NPROC >& /dev/null 
     78./make_xios $full --arch ${NEMO_HPCC} --job $NPROC >& /dev/null 
    7079[ ! -e ${DIR_XIOS}/lib/libxios.a ] && get_out 1 
    7180 
    7281## NEMO config compiled from scratch 
    7382##--------------------------------------------------- 
    74 print_step "Compiling ${REFE_CONF} configuration" 
     83print_step "Compile ${REFE_CONF} configuration" 
    7584cd ${NEMO_CONF} 
    7685[[ -d ${TEST_CONF} && $DEBUG -eq 0 ]] && ./makenemo -n ${TEST_CONF} clean >  /dev/null 
    77 ./makenemo -n ${TEST_CONF} -r ${REFE_CONF} -m ${CFG_ARCH} -j $NPROC       >& /dev/null 
     86./makenemo -n ${TEST_CONF} -r ${REFE_CONF} -m ${NEMO_HPCC} -j $NPROC      >& /dev/null 
    7887[ ! -e ${TEST_CONF}/BLD/bin/nemo.exe ] && get_out 2 
    7988 
    8089## Get namelists, xml & forcing files for running 
    8190##--------------------------------------------------- 
    82 print_step "Preparing job by copying ${REFE_CONF} input files" 
     91print_step 'Set job (copying & extracting input files)' 
    8392cd ${TEST_DIR} 
    8493find ${NEMO_CONF}/${TEST_CONF}/EXP00 -regex '.*\(cfg\|opa\|ref\|xml\)' -exec cp {} . \; 
    8594get_inputs 
    86 [ $? -ne 0 ] && get_out 3 
     95(( $? != 0 )) && get_out 3 
    8796[ $( find . -name '*.gz' -print -quit ) ] && gunzip *.gz 
    8897 
    8998## Check input files in all cases 
    9099##--------------------------------------------------- 
    91 print_step 'Difference with standard input files list' 
     100print_step 'Compare with standard input files list' 
    92101diff_inputs 
    93102 
    94103## Job submission & computing 
    95104##--------------------------------------------------- 
    96 print_step 'Submitting job' 
     105print_step 'Submit job' 
    97106JOB_ID=$( eval ${JOB_SUBM} ) 
    98 [ $? -ne 0 ] && get_out 4 
    99 print_step 'Holding/Running job' 
     107(( $? != 0 )) && get_out 4 
     108print_step 'Pending job' 
    100109job_pending 
    101110print_step 'Job finished' 
Note: See TracChangeset for help on using the changeset viewer.