- Timestamp:
- 2015-08-14T18:05:48+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh
r5685 r5689 8 8 NEMO_TRUS=$PWD 9 9 DEBUG=0; PUBLISH=0; TIME_STEP=0 10 I _MODULE=0; ST='FAILED' ## No 'module' command & 'FAILED' status10 IMOD=0; ST='FAILED' ## No 'module' command & 'FAILED' status 11 11 xios_full='--full'; stderr_redir='>&' ## DEBUG options 12 12 … … 50 50 ## Summary of trusting test context 51 51 ##--------------------------------------------------- 52 printf "\n\ 53 NEMO Trusting test:\n\ 54 -------------------\n\ 55 Testing ${TEST_CONF} based on ${REFE_CONF} from ${NEMO_BRAN}\n\ 56 NEMO installation: ${NEMO_USER}\n\ 57 Computing architecture: ${NEMO_HPCC}\n\ 58 Trusting SVN version: $( svn info | awk '(NR == 9) {print $NF}' )\n" 52 echo 'NEMO Trusting test:' 53 echo '-------------------' 54 echo 'Testing '${TEST_CONF}' based on '${REFE_CONF}' from '${NEMO_BRAN} 55 echo 'NEMO installation: '${NEMO_USER} 56 echo 'Computing architecture: '${NEMO_HPCC} 57 echo 'Trusting SVN version: '$( svn info | awk '(NR == 9) {print $NF}' ) 59 58 60 59 61 60 ## Making timestamped directory with messenger files 62 61 ##--------------------------------------------------- 63 print_step 'Time-stamp generation & testing directory creation' 64 mkdir -p ${TEST_DIR} ${REFE_DIR} 65 echo ${TEST_DIR} && cd ${TEST_DIR} 66 init_files && get_date62 cd ${TEST_DIR} 63 64 print_step 'Create timestamped testing directory' 65 echo ${TEST_DIR} && init_files && get_date 67 66 68 67 69 68 ## SVN action on XIOS & NEMO essentials directories 70 69 ##--------------------------------------------------- 71 print_step 'SVN command on NEMO directories:' 72 get_nemo_rev 70 print_step 'SVN command on NEMO directories:'; get_nemo_rev 73 71 74 72 … … 76 74 ##--------------------------------------------------- 77 75 print_step 'Get softwares releases' 76 78 77 [ -e ${ARCH_ENV} ] && . ${ARCH_ENV} > /dev/null 79 (( $? == 0 )) && export I_MODULE=180 get_soft_rel 81 cat model.log78 [ $? -eq 0 ] && export IMOD=1 79 80 get_soft_rel; cat model.log 82 81 83 82 84 83 ## XIOS compiling 85 84 ##--------------------------------------------------- 85 cd ${DIR_XIOS} 86 86 87 print_step 'Compile XIOS' 87 cd ${DIR_XIOS}88 88 [ $DEBUG -eq 1 ] && xios_full='' && stderr_redir='>' 89 89 eval ./make_xios ${xios_full} --arch ${NEMO_HPCC} --job $NPROC \ … … 93 93 ## NEMO config compiled from scratch 94 94 ##--------------------------------------------------- 95 print_step "Compile ${REFE_CONF} configuration"96 95 cd ${NEMO_CONF} 97 96 97 print_step "Compile ${REFE_CONF} configuration" 98 98 99 if [[ -d ${TEST_CONF} && $DEBUG -eq 0 ]]; then 99 eval./makenemo -n ${TEST_CONF} clean_config > /dev/null <<EOF100 ./makenemo -n ${TEST_CONF} clean_config > /dev/null <<EOF 100 101 y 101 102 EOF … … 103 104 104 105 eval ./makenemo -n ${TEST_CONF} -r ${REFE_CONF} -m ${NEMO_HPCC} -j $NPROC \ 105 ${KEYS_ADD} ${KEYS_DEL}\106 ${KEYS_ADD} ${KEYS_DEL} \ 106 107 ${stderr_redir} /dev/null 107 108 [ ! -e ${TEST_CONF}/BLD/bin/nemo.exe ] && get_out 2 … … 110 111 ## Get namelists, xml & forcing files for running 111 112 ##--------------------------------------------------- 113 cd ${TEST_DIR} 114 112 115 print_step 'Set job (copying & extracting input files)' 113 cd ${TEST_DIR}114 116 cp ${NEMO_CONF}/${TEST_CONF}/cpp_* . 115 117 find ${NEMO_CONF}/${TEST_CONF}/EXP00 -regex '.*\(_cfg\|.in\|opa\|_ref\|.xml\)' -exec cp {} . \; 118 116 119 get_inputs 117 (( $? != 0 ))&& get_out 3120 [ $? -ne 0 ] && get_out 3 118 121 [ $( find . -name '*.gz' -print -quit ) ] && find . -name '*.gz' -exec gunzip {} \; 119 122 … … 121 124 ## Check input files in all cases 122 125 ##--------------------------------------------------- 123 print_step 'Compare with standard input files list' 124 diff_inputs 126 print_step 'Compare with benchmark input files list'; diff_inputs 125 127 126 128 127 129 ## Job submission & computing 128 130 ##--------------------------------------------------- 129 print_step 'Submit job' 130 JOB_ID=$( eval ${JOB_SUBM} ) 131 (( $? != 0 )) && get_out 4 132 print_step 'Pending job' 133 job_pending 131 print_step 'Submit job'; JOB_ID=$( eval ${JOB_SUBM} ) 132 [ $? -ne 0 ] && get_out 4 133 134 print_step 'Pending job'; job_pending 135 134 136 print_step 'Job finished' 135 137 136 138 137 ## Job state 139 ## Job state & get time computation if succeeded 138 140 ##--------------------------------------------------- 139 141 print_step 'Test job state' 140 142 141 if [[ ! -e time.step || $( grep -q 'E R R O R' ocean.output ) ]]; then 142 echo 'Error' 143 comments 'E R R O R' 143 if [[ ! -e time.step || $( grep 'E R R O R' ocean.output ) ]]; then 144 echo 'Failure' 144 145 get_out 5 145 146 else 146 echo 'Good' 147 ## Get time computation 148 ##--------------------------------------------------- 149 print_step 'Get real CPU time' 150 get_cpu_time 147 echo 'Success' 151 148 fi 152 149 150 print_step 'Get real CPU time'; get_cpu_time 151 152 153 ## Inspect outputs 154 ##--------------------------------------------------- 153 155 ST='OK' ## 'OK' by default 154 156 155 156 ## Inspect output text files 157 ##--------------------------------------------------- 158 print_step 'Test output files diff' 159 diff_results 160 161 162 ## Inspect output NetCDF files 163 ##--------------------------------------------------- 164 print_step 'Test last restart files diff' 165 diff_restart 157 print_step 'Compare new outputs to benchmark files'; diff_results; diff_restart 166 158 [ $ST == 'FAILED' ] && get_out 8 167 168 169 ## Get comments (ocean.output & diff model.log)170 ##---------------------------------------------------171 comments 'W A R N I N G'172 159 173 160
Note: See TracChangeset
for help on using the changeset viewer.