Changeset 5629 for branches/2015
- Timestamp:
- 2015-07-23T16:47:33+02:00 (9 years ago)
- Location:
- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.env
r5472 r5629 2 2 3 3 4 # Time-stamp4 ## Time-stamp 5 5 date_test=$( date ) 6 6 export DATESTR=$( date -ud "${date_test}" +%Y%m%d%Z%H%M ) 7 7 8 # Sourcing user configuration9 # --------------------------------------8 ## Sourcing user configuration 9 ##-------------------------------------- 10 10 . ${NEMO_TRUS}/config/${CFG_USER}.cfg 11 11 export NEMO_HOME NEMO_BRAN … … 15 15 export EMAIL 16 16 17 # Only interest for essential NEMO directories17 ## Only interest for essential NEMO directories 18 18 NEMO_ARCH=${NEMO_HOME}/ARCH ; NEMO_CONF=${NEMO_HOME}/CONFIG ; NEMO_ENGI=${NEMO_HOME}/NEMO 19 19 NEMO_EIOI=${NEMO_HOME}/EXTERNAL/IOIPSL ; NEMO_EFCM=${NEMO_HOME}/EXTERNAL/fcm … … 23 23 export NEMO_TRBD NEMO_TCMP 24 24 25 # Sourcing super-computer configuration26 # --------------------------------------25 ## Sourcing super-computer configuration 26 ##-------------------------------------- 27 27 . ${NEMO_TRUS}/config/${CFG_ARCH}.cfg 28 28 export CDO COMPILER MPI NETCDF -
branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh
r5627 r5629 2 2 3 3 4 # Set defaults5 # ---------------------------------------------------4 ## Set defaults 5 ##--------------------------------------------------- 6 6 NEMO_TRUS=$( pwd $( dirname $0 ) ) 7 7 DEBUG=0; PUBLISH=0 8 ST='FAILED' # 'FAILED' by default8 ST='FAILED' ## 'FAILED' by default 9 9 10 # Get options for replacing some initials settings11 # ---------------------------------------------------10 ## Get options for replacing some initials settings 11 ##--------------------------------------------------- 12 12 while [ $# -ne 0 ]; do 13 13 case $1 in … … 22 22 done 23 23 24 # Initialization (super-computer & user environment)25 # ---------------------------------------------------24 ## Initialization (super-computer & user environment) 25 ##--------------------------------------------------- 26 26 if [[ ! -z "${CFG_ARCH}" && ! -z "${CFG_USER}" ]]; then 27 27 … … 40 40 . ./trusting_func.sh 41 41 42 # 43 # ---------------------------------------------------42 ## 43 ##--------------------------------------------------- 44 44 mkdir -p ${TEST_DIR} ${REFE_DIR} 45 45 echo ${TEST_DIR} && cd ${TEST_DIR} … … 47 47 printf "Date\n${date_str}\n" > mesg_01_date_${CFG_USER}_${CFG_ARCH}.txt 48 48 49 # SVN action on XIOS & NEMO essentials directories50 # ---------------------------------------------------49 ## SVN action on XIOS & NEMO essentials directories 50 ##--------------------------------------------------- 51 51 print_step 'SVN actions on NEMO directories' 52 52 get_nemo_rev 53 53 54 # Check softwares versions (source arch environment)55 # ---------------------------------------------------54 ## Check softwares versions (source arch environment) 55 ##--------------------------------------------------- 56 56 print_step 'Get softwares release' 57 57 [ -e ${ARCH_ENV} ] && . ${ARCH_ENV} > /dev/null … … 59 59 cat model.log 60 60 61 # XIOS compiling62 # ---------------------------------------------------61 ## XIOS compiling 62 ##--------------------------------------------------- 63 63 print_step 'Compiling XIOS' 64 64 cd ${DIR_XIOS} … … 67 67 [ ! -e ${DIR_XIOS}/lib/libxios.a ] && get_out 1 68 68 69 # NEMO config compiled from scratch70 # ---------------------------------------------------69 ## NEMO config compiled from scratch 70 ##--------------------------------------------------- 71 71 print_step "Compiling ${REFE_CONF} configuration" 72 72 cd ${NEMO_CONF} … … 75 75 [ ! -e ${TEST_CONF}/BLD/bin/nemo.exe ] && get_out 2 76 76 77 # Get namelists, xml & forcing files for running78 # ---------------------------------------------------77 ## Get namelists, xml & forcing files for running 78 ##--------------------------------------------------- 79 79 print_step "Preparing job by copying ${REFE_CONF} input files" 80 80 cd ${TEST_DIR} … … 84 84 [ $( find . -name '*.gz' -print -quit ) ] && gunzip *.gz 85 85 86 # Check input files in all cases87 # ---------------------------------------------------86 ## Check input files in all cases 87 ##--------------------------------------------------- 88 88 print_step 'Difference with standard input files list' 89 89 diff_inputs 90 90 91 # Job submission & computing92 # ---------------------------------------------------91 ## Job submission & computing 92 ##--------------------------------------------------- 93 93 print_step 'Submitting job' 94 94 JOB_ID=$( eval ${JOB_SUBM} ) … … 98 98 print_step 'Job finished' 99 99 100 # Job state101 # ---------------------------------------------------100 ## Job state 101 ##--------------------------------------------------- 102 102 print_step 'Test job state' 103 103 if [[ ! -e time.step || $( grep -q 'E R R O R' ocean.output ) ]]; then … … 105 105 get_out 5 106 106 else 107 # Get time computation108 # ---------------------------------------------------107 ## Get time computation 108 ##--------------------------------------------------- 109 109 print_step 'Get real CPU time' 110 110 get_cpu_time 111 111 fi 112 112 113 ST='OK' # 'OK' by default113 ST='OK' ## 'OK' by default 114 114 115 # Inspect output text files116 # ---------------------------------------------------115 ## Inspect output text files 116 ##--------------------------------------------------- 117 117 print_step 'Test ASCII output files diff' 118 118 diff_results 119 119 [ "$ST" == 'FAILED' ] && get_out 8 120 120 121 # Inspect output NetCDF files122 # ---------------------------------------------------121 ## Inspect output NetCDF files 122 ##--------------------------------------------------- 123 123 print_step 'Test last restart NetCDF files diff' 124 124 diff_restart 125 125 [ "$ST" == 'FAILED' ] && get_out 10 126 126 127 # Get comments (ocean.output & diff model.log)128 # ---------------------------------------------------127 ## Get comments (ocean.output & diff model.log) 128 ##--------------------------------------------------- 129 129 comments 'W A R N I N G' 130 130 131 # End132 # ---------------------------------------------------131 ## End 132 ##--------------------------------------------------- 133 133 get_out 'Code is reliable' -
branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh
r5627 r5629 61 61 62 62 if [ -e ${REFE_DIR}/$file.nc ]; then 63 # UNIX `cmp` not suitable (filename & timestamp in .nc file)63 ## UNIX `cmp` not suitable (filename & timestamp in .nc file) 64 64 nc_diff=$( $CDO diffn $file.nc ${REFE_DIR}/$file.nc 2> /dev/null \ 65 65 | awk '/records/ {print $1}' ) … … 100 100 101 101 get_soft_rel() { 102 for rel in $CDO $COMPILER $MPI $NETCDF; do 103 arch_rel=$( echo $LOADEDMODULES | sed "s#.*$rel/\([^:]*\).*#\1#" ) 104 [ -z "${arch_rel}" ] && arch_rel=$( echo $PATH | sed "s#.*$rel/\([^/]*\).*#\1#" ) 105 [ "$rel" == "$COMPILER" ] && arch_rel=$( $rel --version | grep -m1 -o ' [0-9.]* ' ) 106 echo $rel ${arch_rel} >> model.log 102 for soft in $CDO $COMPILER $MPI $NETCDF; do 103 soft_rel=$( echo $LOADEDMODULES | grep -o "$soft[^:]*" ) 104 [ -z "${soft_rel}" ] && soft_rel=$( echo $PATH | grep -o "$soft/[^/]*" ) 105 ## Not working inside CURIE cron (no modules command && cdo embedded in netcdf-*) 106 #[ "$soft" == "$COMPILER" ] && soft_rel=$( $soft --version | grep -m1 -o ' [0-9.]* ' ) 107 [[ "$soft" == "$CDO" && -z "${soft_rel}" ]] && soft_rel=$( echo $PATH | grep -o "netcdf-utils[^/]*" ) 108 [[ "$soft" == "$NETCDF" && -z "${soft_rel}" ]] && soft_rel=$( echo $PATH | grep -o "netcdf[^/]*" | sort | head -1 ) 109 echo $soft ${soft_rel} >> model.log 107 110 done 108 111 … … 115 118 svn_opt='status' 116 119 117 # If -v|--version option has been set, modify svn command120 ## If -v|--version option has been set, modify svn command 118 121 if [ $( echo ${NEMO_VERS} | grep "HEAD\|up\|update" ) ]; then 119 122 svn_cmd='svn update -r HEAD' … … 132 135 ${DIR_XIOS} ; do 133 136 134 # For time being, just get revision number from XIOS137 ## For time being, just get revision number from XIOS 135 138 if [ "$dir" == "${DIR_XIOS}" ]; then 136 139 rev_loc=$( svn info $dir | awk '(NR == 9) {print $NF}' ) … … 166 169 $cmd trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.txt >> ${REFE_DIR}/trusting_${CFG_USER}_${CFG_ARCH}.txt 167 170 168 # Send mail only when FAILED171 ## Send mail only when FAILED 169 172 if [[ ! -z $EMAIL && "$ST" == 'FAILED' ]]; then 170 173 cat << END_MAIL > trusting.mail … … 206 209 [ ! -e $file ] && printf "Comments\n\n" > $file 207 210 208 # Error identification211 ## Error identification 209 212 case $ERR in 210 # Compilation213 ## Compilation 211 214 1) ERR='XIOS compilation failed' ;; 2) ERR='NEMO compilation failed' ;; 212 # Submission215 ## Submission 213 216 3) ERR='Missing input files' ;; 4) ERR='Job submission error' ;; 214 # Running217 ## Running 215 218 5) ERR='nemo.exe crashed at '${LAST_TIME_STEP};; 6) ERR='Exceeded time limit '${TIME_LIMI}'h';; 216 # Results219 ## Results 217 220 7) ERR='Missing previous outputs ' ;; 8) ERR='New outputs differ/missing' ;; 218 221 9) ERR='Missing previous restarts' ;; 10) ERR='New restarts differ/missing' ;; 219 # Undefined222 ## Undefined 220 223 *) ERR='Unknown error' ;; 221 224 esac … … 226 229 printf "Result\n$ERR\n" > mesg_03_result_${CFG_USER}_${CFG_ARCH}.txt 227 230 228 # Save tested configuration if trusting failed231 ## Save tested configuration if trusting failed 229 232 [[ "$ST" == 'FAILED' && $DEBUG -eq 0 ]] && tar -czf ${REFE_DIR}/trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.tar.gz * 230 233
Note: See TracChangeset
for help on using the changeset viewer.