- Timestamp:
- 2015-06-10T18:33:20+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh
r5383 r5402 66 66 . ${ARCH_ENV} > /dev/null # Sourcing architecture environment 67 67 get_rel 68 sed -n 2p model.log | sed 'i\Fortran compiler' >mesg_05_compiler_${CFG_USER}_${CFG_ARCH}.txt69 sed -n 3p model.log | sed 'i\MPI libraries ' >mesg_06_mpi_${CFG_USER}_${CFG_ARCH}.txt70 sed -n 4p model.log | sed 'i\NetCDF libraries' >mesg_07_netcdf_${CFG_USER}_${CFG_ARCH}.txt68 sed -n 2p model.log | sed 'i\Fortran compiler' | tee mesg_05_compiler_${CFG_USER}_${CFG_ARCH}.txt 69 sed -n 3p model.log | sed 'i\MPI libraries ' | tee mesg_06_mpi_${CFG_USER}_${CFG_ARCH}.txt 70 sed -n 4p model.log | sed 'i\NetCDF libraries' | tee mesg_07_netcdf_${CFG_USER}_${CFG_ARCH}.txt 71 71 72 72 … … 89 89 # Get namelists, xml & forced files for running 90 90 #--------------------------------------------------- 91 cd ${TEST_DIR} 91 92 printf "Step......................\nPreparing job\n" | tee mesg_04_step_${CFG_USER}_${CFG_ARCH}.txt 92 cd ${TEST_DIR}93 93 find ${NEMO_CONF}/${TEST_CONF}/EXP00 -regex '.*\(cfg\|opa\|ref\|xml\)' -exec cp {} . \; 94 94 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 95 if [ ! -z "${FORC_TAR}" ]; then 96 cmd_iol="tar -tvf ${NEMO_FORC}/${FORC_TAR}"; cmd_iof="tar -vxf ${NEMO_FORC}/${FORC_TAR}" 100 97 else 101 touch inputs_list.txt98 cmd_iol="ls ${NEMO_FORC}/*" ; cmd_iof="\cp ${NEMO_FORC}/* ." 102 99 fi 100 101 ${cmd_iol} > inputs_list.txt && ${cmd_iof} > /dev/null 102 [ $? -ne 0 ] && get_out 103 [ $( find . -name '*.gz' -print -quit ) ] && gunzip *.gz 103 104 104 105 … … 111 112 time_elapsed=0; time_increment=30 112 113 sleep ${time_increment} 113 while [[ $( ${JOB_LIST} | grep $ job_num) && ${time_elapsed} -lt ${TIME_LIMI} ]]; do114 while [[ $( ${JOB_LIST} | grep ${job_num} ) && ${time_elapsed} -lt ${TIME_LIMI} ]]; do 114 115 printf "\n####################################################" >> computation.log 115 ${JOB_VIEW} $ job_num>> computation.log116 ${JOB_VIEW} ${job_num} >> computation.log 116 117 sleep ${time_increment} 117 118 let time_elapsed+=${time_increment} 118 119 done 119 120 sleep ${time_increment} 120 121 121 122 # Eventual crash during computing … … 124 125 if [ ! -f ocean.output ]; then 125 126 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 126 128 status='FAILED' 127 129 elif [ $( grep 'E R R O R' ocean.output ) ]; then 128 130 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 131 134 status='FAILED' 132 135 fi … … 149 152 150 153 151 # Comments152 #---------------------------------------------------153 echo 'Comments' > mesg_12_comments_${CFG_USER}_${CFG_ARCH}.txt154 grep 'W A R N I N G:' ocean.output >> mesg_12_comments_${CFG_USER}_${CFG_ARCH}.txt155 156 157 154 # Finals tests 158 155 #--------------------------------------------------- 159 156 if [ $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 ! 160 164 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}.txt165 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 163 167 else 164 168 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 173 170 get_out 174 171 fi
Note: See TracChangeset
for help on using the changeset viewer.