Ignore:
Timestamp:
2015-06-10T18:33:20+02:00 (5 years ago)
Author:
nicolasmartin
Message:

dev_r5092_CNRS_SETTE Nearing initial release by adding namelists & iodef files in comparison

File:
1 edited

Legend:

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

    r5383 r5402  
    6666. ${ARCH_ENV} > /dev/null    # Sourcing architecture environment 
    6767get_rel 
    68 sed -n 2p model.log | sed 'i\Fortran compiler' > mesg_05_compiler_${CFG_USER}_${CFG_ARCH}.txt 
    69 sed -n 3p model.log | sed 'i\MPI libraries   ' > mesg_06_mpi_${CFG_USER}_${CFG_ARCH}.txt 
    70 sed -n 4p model.log | sed 'i\NetCDF libraries' > mesg_07_netcdf_${CFG_USER}_${CFG_ARCH}.txt 
     68sed -n 2p model.log | sed 'i\Fortran compiler' | tee mesg_05_compiler_${CFG_USER}_${CFG_ARCH}.txt 
     69sed -n 3p model.log | sed 'i\MPI libraries   ' | tee mesg_06_mpi_${CFG_USER}_${CFG_ARCH}.txt 
     70sed -n 4p model.log | sed 'i\NetCDF libraries' | tee mesg_07_netcdf_${CFG_USER}_${CFG_ARCH}.txt 
    7171 
    7272 
     
    8989# Get namelists, xml & forced files for running 
    9090#--------------------------------------------------- 
     91cd ${TEST_DIR} 
    9192printf "Step......................\nPreparing job\n"                             | tee mesg_04_step_${CFG_USER}_${CFG_ARCH}.txt 
    92 cd ${TEST_DIR} 
    9393find ${NEMO_CONF}/${TEST_CONF}/EXP00 -regex '.*\(cfg\|opa\|ref\|xml\)' -exec cp {} . \; 
    9494 
    95 if [ ! -z "${NEMO_FORC}" ]; then 
    96     cp ${NEMO_FORC}/${FORC_TAR} . 
    97     tar -tvf ${FORC_TAR} > inputs_list.txt && tar -vxf ${FORC_TAR} > /dev/null 
    98     [ $? -ne 0 ] && get_out 
    99     gunzip *.gz 
     95if [ ! -z "${FORC_TAR}" ]; then 
     96    cmd_iol="tar -tvf ${NEMO_FORC}/${FORC_TAR}"; cmd_iof="tar -vxf ${NEMO_FORC}/${FORC_TAR}" 
    10097else 
    101     touch inputs_list.txt 
     98    cmd_iol="ls ${NEMO_FORC}/*"                ; cmd_iof="\cp ${NEMO_FORC}/* ." 
    10299fi 
     100 
     101${cmd_iol} > inputs_list.txt && ${cmd_iof} > /dev/null 
     102[ $? -ne 0 ] && get_out 
     103[ $( find . -name '*.gz' -print -quit ) ] && gunzip *.gz 
    103104 
    104105 
     
    111112time_elapsed=0; time_increment=30 
    112113sleep ${time_increment} 
    113 while [[ $( ${JOB_LIST} | grep $job_num ) && ${time_elapsed} -lt ${TIME_LIMI} ]]; do 
     114while [[ $( ${JOB_LIST} | grep ${job_num} ) && ${time_elapsed} -lt ${TIME_LIMI} ]]; do 
    114115    printf "\n####################################################" >> computation.log 
    115     ${JOB_VIEW} $job_num                                            >> computation.log 
     116    ${JOB_VIEW} ${job_num}                                          >> computation.log 
    116117    sleep ${time_increment} 
    117118    let time_elapsed+=${time_increment} 
    118119done 
    119  
     120sleep ${time_increment} 
    120121 
    121122# Eventual crash during computing 
     
    124125if   [ ! -f ocean.output                  ]; then 
    125126    printf "Step......................\nOpa crashed at initialization\n"         | tee mesg_04_step_${CFG_USER}_${CFG_ARCH}.txt 
     127    ${JOB_DELE} ${job_num} >/dev/null 2>&1 
    126128    status='FAILED' 
    127129elif [ $( grep 'E R R O R' ocean.output ) ]; then 
    128130    printf "Step......................\nOpa crashed\n"                           | tee mesg_04_step_${CFG_USER}_${CFG_ARCH}.txt 
    129     grep 'E R R O R'       ocean.output >> mesg_12_comments_${CFG_USER}_${CFG_ARCH}.txt 
    130     sed 's/^/Time step :/' time.step    >> mesg_12_comments_${CFG_USER}_${CFG_ARCH}.txt 
     131    grep 'E R R O R'       ocean.output | tee    mesg_10_comments_${CFG_USER}_${CFG_ARCH}.txt 
     132    sed 's/^/Time step :/' time.step    | tee -a mesg_10_comments_${CFG_USER}_${CFG_ARCH}.txt 
     133    ${JOB_DELE} ${job_num} >/dev/null 2>&1 
    131134    status='FAILED' 
    132135fi 
     
    149152 
    150153 
    151 # Comments 
    152 #--------------------------------------------------- 
    153 echo 'Comments'                    >  mesg_12_comments_${CFG_USER}_${CFG_ARCH}.txt 
    154 grep 'W A R N I N G:' ocean.output >> mesg_12_comments_${CFG_USER}_${CFG_ARCH}.txt 
    155  
    156  
    157154# Finals tests 
    158155#--------------------------------------------------- 
    159156if [ $status != 'FAILED' ]; then 
     157 
     158    # Comments 
     159    #--------------------------------------------------- 
     160    echo 'Comments'                    | tee    mesg_10_comments_${CFG_USER}_${CFG_ARCH}.txt 
     161    grep 'W A R N I N G:' ocean.output | tee -a mesg_10_comments_${CFG_USER}_${CFG_ARCH}.txt 
     162 
     163    # Portability ! 
    160164    printf "Step......................\nGet real CPU time\n"                     | tee mesg_04_step_${CFG_USER}_${CFG_ARCH}.txt 
    161     real_cpu_time=$( ${JOB_VIEW} $job_num | awk 'END{print $9}' ) 
    162     printf "Real CPU time\n%s\n" ${real_cpu_time} > mesg_09_realcputime_${CFG_USER}_${CFG_ARCH}.txt 
     165    real_cpu_time=$( ${JOB_VIEW} ${job_num} | awk 'END{print $9}' ) 
     166    printf "Real CPU time\n%s\n" ${real_cpu_time} | tee mesg_08_realcputime_${CFG_USER}_${CFG_ARCH}.txt 
    163167else 
    164168    printf "Step......................\nTest input files difference\n"           | tee mesg_04_step_${CFG_USER}_${CFG_ARCH}.txt 
    165     diff inputs_list.txt ${REFE_DIR}/inputs_list.txt 
    166  
    167     if [ $? -ne 0 ]; then 
    168    printf "Input files\nDifferent" > mesg_10_inputfiles_${CFG_USER}_${CFG_ARCH}.txt 
    169     else 
    170    printf "Input files\nSame"      > mesg_10_inputfiles_${CFG_USER}_${CFG_ARCH}.txt 
    171     fi 
    172  
     169    diff_inputs 
    173170    get_out 
    174171fi 
Note: See TracChangeset for help on using the changeset viewer.