Ignore:
Timestamp:
2015-06-22T21:04:36+02:00 (5 years ago)
Author:
nicolasmartin
Message:

dev_r5092_CNRS_SETTE End of main script trusting.sh size reduction

File:
1 edited

Legend:

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

    r5459 r5464  
    66NEMO_TRUS=$( pwd $( dirname $0 ) ) 
    77DEBUG=0; PUBLISH=0 
    8 STATUS='FAILED'; STEP=''# Only at end status will change to OK 
     8STATUS='FAILED'; STEP='' # Only at end status will change to OK 
    99 
    1010# Get options for replacing some initials settings 
     
    1313    case $1 in 
    1414        -b|--branch ) NEMO_BRAN=$2         ; shift 2;; -d|--debug  ) set -vx; DEBUG=1     ; shift  ;; 
    15    -e|--email  ) MAIL=$2              ; shift 2;; -j|--job    ) NPROC=$2             ; shift 2;; 
     15   -e|--email  ) EMAIL=$2             ; shift 2;; -j|--job    ) NPROC=$2             ; shift 2;; 
    1616   -h|--help   ) cat trusting_help.txt; exit  1;; -m|--machine) CFG_ARCH=$2          ; shift 2;; 
    1717   -n|--newconf) TEST_CONF=$2         ; shift 2;; -r|--refconf) REFE_CONF=$2         ; shift 2;; 
     
    4444mkdir -p ${TEST_DIR} ${REFE_DIR} 
    4545echo ${TEST_DIR} && cd ${TEST_DIR} 
    46 datestr1=$( LC_ALL=C date -d"${DATE_STR}" +%Y-%m-%dT%H:%M ) 
    47 printf "Date\n$datestr1\n" > mesg_01_date_${CFG_USER}_${CFG_ARCH}.txt 
     46date_str=$( date -ud ${DATESTR} +"%F %R %Z" ) 
     47printf "Date\n${date_str}\n" > mesg_01_date_${CFG_USER}_${CFG_ARCH}.txt 
    4848 
    4949# SVN action on XIOS & NEMO essentials directories 
     
    5757. ${ARCH_ENV} > /dev/null 
    5858get_soft_rel 
    59 cat arch_env.log 
     59cat model.log 
    6060 
    6161# XIOS compiling 
     
    7979cd ${TEST_DIR} 
    8080find ${NEMO_CONF}/${TEST_CONF}/EXP00 -regex '.*\(cfg\|opa\|ref\|xml\)' -exec cp {} . \; 
    81  
    82 if [ ! -z "${FORC_TAR}" ]; then 
    83     cmd_iol="tar -tvf ${NEMO_FORC}/${FORC_TAR}"; cmd_iof="tar -vxf ${NEMO_FORC}/${FORC_TAR}" 
    84 else 
    85     cmd_iol="ls ${NEMO_FORC}/*"                ; cmd_iof="\cp ${NEMO_FORC}/* ." 
    86 fi 
    87  
    88 ${cmd_iol} > inputs_list.txt && ${cmd_iof} > /dev/null 
     81get_inputs 
    8982[ $? -ne 0 ] && get_out $STATUS $STEP 
    90  
    9183[ $( find . -name '*.gz' -print -quit ) ] && gunzip *.gz 
    9284 
    9385# Check input files in all cases 
    9486#--------------------------------------------------- 
    95 print_step 'Difference between input files' 
     87print_step 'Difference with standard input files list' 
    9688diff_inputs 
    9789 
     
    10193JOB_ID=$( ${JOB_SUBM} | awk '{print $NF}' ) 
    10294[ $? -ne 0 ] && get_out $STATUS $STEP 
    103  
    104 print_step 'Pending/Running job' 
    105 time_elapsed=0; time_increment=30 
    106 sleep ${time_increment} 
    107 while [[ $( ${JOB_LIST} | grep ${JOB_ID} ) && ${time_elapsed} -lt ${TIME_LIMI} ]]; do 
    108     printf "\n####################################################" >> computation.log 
    109     ${JOB_VIEW} ${JOB_ID}                                           >> computation.log 
    110     sleep ${time_increment} 
    111     let time_elapsed+=${time_increment} 
    112 done 
    113 sleep ${time_increment} 
    114  
    115 if [ ${time_elapsed} -eq ${TIME_LIMI} ]; then 
    116     print_step 'Killing job' 
    117     ${JOB_DELE} ${JOB_ID} &> /dev/null 
    118     get_out $STATUS 'Job timeout' 
    119 fi 
     95print_step 'Holding-Running job' 
     96job_pending 
    12097print_step 'Job finished' 
    12198 
     
    128105fi 
    129106 
    130 STATUS='OK' 
    131107# Inspect output text files 
    132108#--------------------------------------------------- 
    133109print_step 'Test ASCII output files diff' 
    134 for file in ocean.output solver.stat tracer.stat; do 
    135     diff $file ${REFE_DIR}/$file 
    136     [ $? -ne 0 ] && get_out 'FAILED' 'ASCII output file diff' 
    137 done 
     110diff_textfiles 
    138111 
    139112# Inspect output NetCDF files 
     
    141114print_step 'Test last restart NetCDF files diff' 
    142115diff_restart 
    143 [ $? -ne 0 ] && get_out 'FAILED' "$CDO diff failed" 
    144116 
    145117# Get computation duration 
     
    148120get_cpu_time 
    149121 
    150 # Get comments (ocean.output & diff arch_env.log) 
     122# Get comments (ocean.output & diff model.log) 
    151123#--------------------------------------------------- 
    152124comments 'W A R N I N G' 
Note: See TracChangeset for help on using the changeset viewer.