- Timestamp:
- 2017-11-27T14:10:49+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/trusting.sh
r8808 r8818 4 4 cd $( dirname $0 ) 5 5 6 ## Set defaults 7 ##--------------------------------------------------- 6 ## Set flags & defaults 7 ##-------------------------------------------------------------------------------- 8 8 9 TRUST_MAIN_DIR=$PWD 10 9 11 TRUST_FLAG_DEBUG=0; TRUST_FLAG_PROD=0; TRUST_FLAG_HELP=0 12 TRUST_FLAG_RESULT='FAILED'; TRUST_FLAG_ERROR=0 13 10 14 ## No update on SVN directories & 'FAILED' result for 'Unknown error' ) 11 15 TRUST_SVN_ACTION='svn status' 12 TRUST_FLAG_RESULT='FAILED'; TRUST_FLAG_ERROR=013 16 14 17 xios_mode='--full'; stdout_redir='>&' … … 17 20 18 21 ## Get options (replacing initials settings) 19 ##--------------------------------------------------- 22 ##-------------------------------------------------------------------------------- 23 20 24 while [ $# -ne 0 ]; do 21 25 22 26 case $1 in 23 '-a'|'--archive') TRUST_ CFG_FORC=$2; shift 2;; '-b'|'--branch' ) TRUST_SVN_BRANCH=$2; shift 2;;27 '-a'|'--archive') TRUST_IO_FORC_TAR=$2; shift 2;; '-b'|'--branch' ) TRUST_SVN_BRANCH=$2; shift 2;; 24 28 '-d'|'--debug' ) TRUST_FLAG_DEBUG=1 ; shift ;; '-e'|'--email' ) TRUST_TEST_MAILING=$2; shift 2;; 25 '-f'|'--forcdir') TRUST_ DIR_FORC=$2; shift 2;; '-j'|'--job' ) TRUST_COMPILE_NPROC=$2; shift 2;;29 '-f'|'--forcdir') TRUST_IO_FORC_PATH=$2; shift 2;; '-j'|'--job' ) TRUST_COMPILE_NPROC=$2; shift 2;; 26 30 '-h'|'--help' ) TRUST_FLAG_HELP=1 ; shift ;; '-m'|'--machine') TRUST_MAIN_HPCC=$2; shift 2;; 27 31 '-n'|'--newconf') TRUST_CFG_NEW=$2; shift 2;; '-r'|'--refconf') TRUST_CFG_REF=$2; shift 2;; … … 35 39 36 40 ## Initialization (HPC & user environment) 37 ##--------------------------------------------------- 41 ##-------------------------------------------------------------------------------- 42 38 43 if [[ ! -e cfg/${TRUST_MAIN_USER}.cfg || ! -e cfg/${TRUST_MAIN_HPCC}.cfg || ${TRUST_FLAG_HELP} -eq 1 ]]; then 39 44 cat ./inc/trusting_help.txt … … 69 74 70 75 ## Display contextual summary of trusting test 71 ##--------------------------------------------------- 76 ##-------------------------------------------------------------------------------- 77 72 78 echo 73 79 … … 82 88 echo '****************************************************************************************************' 83 89 echo 90 printf "\t§ (Super)Computer\t\t%s\n" ${TRUST_MAIN_HPCC} 91 printf "\t§ User installation\t\t%s\n\n" ${TRUST_MAIN_USER} 92 echo 84 93 printf "\t§ Testing configuration\t\t%s based on %s\n" ${TRUST_CFG_NEW} ${TRUST_CFG_REF} 85 94 printf "\t§ SVN working copy\t\t%s/%s\n" ${TRUST_DIR_WORK} ${TRUST_SVN_BRANCH} 86 printf "\t§ Benchmark folder\t\t%s\n" ${TRUST_DIR_STORE} 87 printf "\t§ (Super)Computer\t\t%s\n" ${TRUST_MAIN_HPCC}88 printf "\t§ User installation\t\t%s\n\n" ${TRUST_MAIN_USER} 95 if [ ${TRUST_TEST_BENCHMARK} ]; then 96 printf "\t§ Benchmark folder\t\t%s\n" ${TRUST_TEST_BENCHMARK} 97 fi 89 98 90 99 91 100 ## Make timestamped directory with messenger files 92 ##--------------------------------------------------- 101 ##-------------------------------------------------------------------------------- 102 93 103 print_step 'Timestamped testing directory' 94 104 95 mkdir -p ${TRUST_ DIR_SCRATCH} ${TRUST_DIR_STORE}96 cd ${TRUST_ DIR_SCRATCH}97 echo ${TRUST_ DIR_SCRATCH}105 mkdir -p ${TRUST_TEST_DIR} ${TRUST_TEST_BENCHMARK} 106 cd ${TRUST_TEST_DIR} 107 echo ${TRUST_TEST_DIR} 98 108 99 109 init_files … … 103 113 104 114 ## Get SVN revision on XIOS & NEMO essentials directories 105 ##--------------------------------------------------- 115 ##-------------------------------------------------------------------------------- 116 106 117 print_step "SVN action on NEMO directories: ${TRUST_SVN_ACTION}" 107 118 … … 110 121 111 122 ## Check softwares versions (after sourced arch environment) 112 ##--------------------------------------------------- 123 ##-------------------------------------------------------------------------------- 124 113 125 print_step 'Get testing environement' 114 126 … … 120 132 121 133 ## XIOS compilation from scratch 122 ##--------------------------------------------------- 134 ##-------------------------------------------------------------------------------- 135 123 136 print_step 'Compile XIOS' 124 137 125 cd ${TRUST_ DIR_XIOS}138 cd ${TRUST_IO_XIOS} 126 139 127 140 eval ./make_xios ${xios_mode} --arch ${TRUST_MAIN_HPCC} --job ${TRUST_COMPILE_NPROC} \ … … 132 145 133 146 ## NEMO compilation from scratch 134 ##--------------------------------------------------- 147 ##-------------------------------------------------------------------------------- 148 135 149 print_step "Compile ${TRUST_CFG_REF} configuration" 136 150 137 cd ${TRUST_ DIR_NEMOGCM}/CONFIG151 cd ${TRUST_SVN_NEMOGCM}/CONFIG 138 152 139 153 if [[ -d ${TRUST_CFG_NEW} && ${TRUST_FLAG_DEBUG} -eq 0 ]]; then … … 153 167 154 168 ## Get all inputs for running 155 ##--------------------------------------------------- 169 ##-------------------------------------------------------------------------------- 170 156 171 print_step 'Set job (copying or extracting inputs)' 157 172 158 cd ${TRUST_ DIR_SCRATCH}173 cd ${TRUST_TEST_DIR} 159 174 160 175 get_inputs 161 176 162 cp ${TRUST_ DIR_NEMOGCM}/CONFIG/${TRUST_CFG_NEW}/cpp_* .163 find ${TRUST_ DIR_NEMOGCM}/CONFIG/${TRUST_CFG_NEW}/EXP00 \177 cp ${TRUST_SVN_NEMOGCM}/CONFIG/${TRUST_CFG_NEW}/cpp_* . 178 find ${TRUST_SVN_NEMOGCM}/CONFIG/${TRUST_CFG_NEW}/EXP00 \ 164 179 -regex '.*\(_cfg\|.in\|opa\|_ref\|.xml\)' \ 165 180 -exec cp {} . \; … … 167 182 168 183 ## Check inputs 169 ##--------------------------------------------------- 184 ##-------------------------------------------------------------------------------- 185 170 186 print_step 'Compare inputs' 171 187 … … 174 190 175 191 ## Job submission & computation 176 ##--------------------------------------------------- 192 ##-------------------------------------------------------------------------------- 193 177 194 print_step 'Submit job' 178 195 179 196 ## Copy the submitting script to testing folder 180 cp ${TRUST_JOB_SCRIPT} ${TRUST_ DIR_SCRATCH}197 cp ${TRUST_JOB_SCRIPT} ${TRUST_TEST_DIR} 181 198 TRUST_JOB_ID=$( eval ${TRUST_JOB_SUBMIT} ) 182 199 … … 191 208 192 209 ## Check job state & get computation performances if succeeded 193 ##--------------------------------------------------- 210 ##-------------------------------------------------------------------------------- 211 194 212 print_step 'Test job state' 195 213 … … 208 226 209 227 ## Check outputs 210 ##--------------------------------------------------- 228 ##-------------------------------------------------------------------------------- 229 211 230 TRUST_FLAG_RESULT='OK' ## 'OK' by default 212 231 … … 223 242 224 243 ## End, at least nothing major has changed ;-) 225 ##--------------------------------------------------- 244 ##-------------------------------------------------------------------------------- 245 226 246 get_out 0
Note: See TracChangeset
for help on using the changeset viewer.