Changeset 5452
- Timestamp:
- 2015-06-19T18:39:39+02:00 (9 years ago)
- Location:
- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh
r5444 r5452 56 56 # SVN action on XIOS & NEMO essentials directories 57 57 #--------------------------------------------------- 58 p step "Get NEMO SVN state with: ${SVN_OPT}"58 print_step "Get NEMO SVN state with: ${SVN_OPT}" 59 59 get_nemo_rev 60 60 61 61 # Check softwares versions (source arch environment) 62 62 #--------------------------------------------------- 63 p step 'Get softwares release'63 print_step 'Get softwares release' 64 64 . ${ARCH_ENV} > /dev/null 65 65 get_soft_rel … … 68 68 # XIOS compiling 69 69 #--------------------------------------------------- 70 p step 'Compiling XIOS'70 print_step 'Compiling XIOS' 71 71 cd ${DIR_XIOS} 72 72 #./make_xios --arch $ARCH -job $NPROC >& /dev/null … … 74 74 # NEMO config compiled from scratch 75 75 #--------------------------------------------------- 76 p step "Compiling ${CONF_REF} configuration"76 print_step "Compiling ${CONF_REF} configuration" 77 77 cd ${NEMO_CONF} 78 78 #[ -d ${TEST_CONF} ] && ./makenemo -n ${TEST_CONF} clean … … 82 82 # Get namelists, xml & forced files for running 83 83 #--------------------------------------------------- 84 p step 'Preparing job'84 print_step 'Preparing job' 85 85 cd ${TEST_DIR} 86 86 find ${NEMO_CONF}/${TEST_CONF}/EXP00 -regex '.*\(cfg\|opa\|ref\|xml\)' -exec cp {} . \; … … 98 98 # Check input files in all cases 99 99 #--------------------------------------------------- 100 p step 'Test input files difference'100 print_step 'Test input files difference' 101 101 diff_inputs 102 get_out $STEP $STATUS 102 103 103 # Job submission & computing 104 104 #--------------------------------------------------- 105 p step 'Running'106 job_num=$( ${JOB_SUBM} | awk '{print $NF}' )105 print_step 'Running' 106 export JOB_ID=$( ${JOB_SUBM} | awk '{print $NF}' ) 107 107 [ $? -ne 0 ] && get_out $STEP $STATUS 108 108 109 109 time_elapsed=0; time_increment=30 110 110 sleep ${time_increment} 111 while [[ $( ${JOB_LIST} | grep ${ job_num} ) && ${time_elapsed} -lt ${TIME_LIMI} ]]; do111 while [[ $( ${JOB_LIST} | grep ${JOB_ID} ) && ${time_elapsed} -lt ${TIME_LIMI} ]]; do 112 112 printf "\n####################################################" >> computation.log 113 ${JOB_VIEW} ${ job_num} >> computation.log113 ${JOB_VIEW} ${JOB_ID} >> computation.log 114 114 sleep ${time_increment} 115 115 let time_elapsed+=${time_increment} … … 119 119 # Eventual crash during computing 120 120 #--------------------------------------------------- 121 p step 'Test if ASCII output files exist'122 if [[ ! - focean.output || $( grep 'E R R O R' ocean.output ) ]]; then123 ${JOB_DELE} ${ job_num} &> /dev/null124 [ ! - f ocean.output ] && STEP='nemo.exe crashed at initialization'125 [ $( grep 'E R R O R' ocean.output ) ] && ST EP='nemo.exe crashed'121 print_step 'Test if ASCII output files exist' 122 if [[ ! -e ocean.output || $( grep 'E R R O R' ocean.output ) ]]; then 123 ${JOB_DELE} ${JOB_ID} &> /dev/null 124 [ ! -e ocean.output ] && STATUS='nemo.exe crashed at initialization' 125 [ $( grep 'E R R O R' ocean.output ) ] && STATUS='nemo.exe crashed' 126 126 comments('E R R O R') 127 ${JOB_DELE} ${job_num} >/dev/null 2>&1 128 STATUS='FAILED' 127 ${JOB_DELE} ${JOB_ID} >/dev/null 2>&1 129 128 get_out $STEP $STATUS 130 129 else … … 133 132 # Inspect output text files 134 133 #--------------------------------------------------- 135 p step 'Test ASCII output files diff'134 print_step 'Test ASCII output files diff' 136 135 for file in ocean.output solver.stat tracer.stat; do 137 136 diff $file ${REFE_DIR}/$file 138 [ $? -ne 0 ] && STATUS=' FAILED'137 [ $? -ne 0 ] && STATUS='At least 1 ASCII output file differ' 139 138 done 140 139 141 140 # Inspect output NetCDF files 142 141 #--------------------------------------------------- 143 p step 'Test last restart NetCDF files diff'142 print_step 'Test last restart NetCDF files diff' 144 143 diff_restart #2> /dev/null 145 [ $? -ne 0 ] && STATUS='FAILED' 144 [ $? -ne 0 ] && STATUS='At least 1 restart .nc file differ' 145 146 # Check super-computing architecture modification 147 #--------------------------------------------------- 148 print_step 'Test super-computing architecture change' 149 diff_arch 150 [ $? -ne 0 ] && STATUS='At least 1 restart .nc file differ' 146 151 147 152 # Get computation duration 148 153 #--------------------------------------------------- 149 p step 'Get real CPU time'154 print_step 'Get real CPU time' 150 155 get_cpu_time 151 156 … … 155 160 # End 156 161 #--------------------------------------------------- 157 if [ $STATUS == 'FAILED' ]; then STEP='Test outputs difference'; else STEP='Code is reliable'; fi 162 [ $STATUS == 'OK' ] && STEP='Code is reliable' 158 163 get_out $STEP $STATUS -
branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh
r5444 r5452 3 3 4 4 comments() { 5 echo 'Comments' | tee mesg_10_comments_${CFG_USER}_${CFG_ARCH}.txt6 grep $1 ocean.output | tee -amesg_10_comments_${CFG_USER}_${CFG_ARCH}.txt5 [ -e ocean.output ] && grep $1 ocean.output 6 printf "Comments\n$line\n" | tee mesg_10_comments_${CFG_USER}_${CFG_ARCH}.txt 7 7 } 8 8 9 9 get_cpu_time() { 10 10 # Portability ! 11 real_cpu_time=$( ${JOB_VIEW} ${job_num} | awk 'END{print $9}' ) 12 printf "Real CPU time\n%s\n" ${real_cpu_time} | tee mesg_09_realcputime_${CFG_USER}_${CFG_ARCH}.txt 11 real_cpu_time=$( ${JOB_VIEW} ${JOB_ID} | awk 'END{print $9}' ) 12 printf "Real CPU time\n${real_cpu_time}\n" | tee mesg_09_realcputime_${CFG_USER}_${CFG_ARCH}.txt 13 } 14 15 diff_arch() { 16 diff env.log ${REFE_DIR}/env.log 13 17 } 14 18 … … 21 25 done 22 26 23 printf "Input files\n$mesg " | tee mesg_08_inputfiles_${CFG_USER}_${CFG_ARCH}.txt27 printf "Input files\n$mesg\n" | tee mesg_08_inputfiles_${CFG_USER}_${CFG_ARCH}.txt 24 28 } 25 29 … … 62 66 [ -z "${arch_rel}" ] && arch_rel=$( echo $PATH | sed "s#.*$rel/\([^/]*\).*#\1#" ) 63 67 [ $rel == $COMPILER ] && arch_rel=$( $rel --version | grep -m1 -o ' [0-9.]* ' ) 64 echo $rel ${arch_rel} >> model.log68 echo $rel ${arch_rel} >> env.log 65 69 done 66 70 67 sed -n 4p model.log | sed 'i\Compiler' > mesg_05_compiler_${CFG_USER}_${CFG_ARCH}.txt68 sed -n 5p model.log | sed 'i\MPI libs' > mesg_06_mpi_${CFG_USER}_${CFG_ARCH}.txt69 sed -n 6p model.log | sed 'i\NetCDF libs' > mesg_07_netcdf_${CFG_USER}_${CFG_ARCH}.txt71 sed -n 4p env.log | sed 'i\Compiler' > mesg_05_compiler_${CFG_USER}_${CFG_ARCH}.txt 72 sed -n 5p env.log | sed 'i\MPI libs' > mesg_06_mpi_${CFG_USER}_${CFG_ARCH}.txt 73 sed -n 6p env.log | sed 'i\NetCDF libs' > mesg_07_netcdf_${CFG_USER}_${CFG_ARCH}.txt 70 74 } 71 75 … … 88 92 # For time being, just get revision number from XIOS 89 93 if [ $dir == ${DIR_XIOS} ]; then 90 echo 'XIOS '$( svn info $dir | awk '(NR == 9) {print $NF}' ) >> model.log94 echo 'XIOS '$( svn info $dir | awk '(NR == 9) {print $NF}' ) >> env.log 91 95 continue 92 96 fi … … 97 101 done 98 102 99 echo 'NEMOGCM '$rev >> model.log 100 sed -n 2p model.log | sed 'i\NEMO rev.' > mesg_02_nemogcm_${CFG_USER}_${CFG_ARCH}.txt 103 printf "NEMOGCM rev.\n$rev\n" > mesg_02_nemogcm_${CFG_USER}_${CFG_ARCH}.txt 101 104 } 102 105 … … 134 137 } 135 138 136 p step() {139 print_step() { 137 140 STEP=$1 138 141 export STEP
Note: See TracChangeset
for help on using the changeset viewer.