Changeset 5799 for branches/2015/dev_r5092_CNRS18_TRUST
- Timestamp:
- 2015-10-16T16:38:37+02:00 (9 years ago)
- Location:
- branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST
- Files:
-
- 1 added
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/banner.txt
r5788 r5799 1 <pre style="font: 2px/1px monospace;">2 1 @@@@@@O$$$$$$@@@@@@#$$$$$$&@#$$$$$$$$$$$$$$$&@O$$$$$$&@@@@@@@@@$$$$$$O@@@@@@@@@@@O$$%$O@@@@@@@@@@@@@ 3 2 @@@@@@?!!!!!!#@@@@@O!!!!!!#@$!!!!!!!!!!!!!!!#@%!!!!!!?&@@@@@@@$!!!!!!?@@@@@@@@&O#&&&&%??$#@@@@@@@@@@ … … 31 30 @#O&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 32 31 &&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 33 </pre> -
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/config/X64_ADA.cfg
r5788 r5799 2 2 ##--------------------------------------------------- 3 3 4 ARCH_ENV=${DIR_XIOS}/arch/arch-${TRUS_HPCC}.env5 4 6 CMPF='ifort' 7 STR_CDOD='cdo/' 8 STR_LMPI='intel/impi/' 9 STR_NCDF='netcdf/' 5 ## Default settings 6 ##--------------------------------------------------- 7 TRUS_ENVI=${TRUS_XIOS}/arch/arch-${TRUS_HPCC} 10 8 11 JOB_SUBM="llsubmit ${TRUS_DIR}/batch/${TRUS_HPCC}.sh | grep -oe '\<[0-9]*\>'" 12 JOB_STAT="llq | grep \${JOB_ID}" 13 JOB_INFO="llq -x \${JOB_ID}" 14 JOB_KILL="llcancel \${JOB_ID}" 9 TRUS_CDOD='cdo diffn' 15 10 16 [ -z "${TRUS_NPRO}" ] && TRUS_NPRO='16'17 [ -z "$TIMEOUT" ] && TIMEOUT='10800'18 11 19 JOB_TIME="grep IdrisMemMPI NEMO_CI_\${JOB_ID} | cut -d, -f1 | awk '{print \$(NF-1),\$NF}'" 20 JOB_PMEM="grep IdrisMemMPI NEMO_CI_\${JOB_ID} | cut -d, -f3 | awk '{print \$3,\$4}'" 21 JOB_VMEM="grep IdrisMemMPI NEMO_CI_\${JOB_ID} | cut -d, -f2 | awk '{print \$3,\$4}'" 12 ## Job commands 13 ##--------------------------------------------------- 14 TRUS_JSUB="llsubmit ${TRUS_DIRE}/batch/${TRUS_HPCC}.sh | grep -oe '\<[0-9]*\>'" 15 TRUS_JSTA="llq | grep \${JOB_ID}" 16 TRUS_JKIL="llcancel \${JOB_ID}" 22 17 23 CDOD='cdo diffn' 18 TRUS_JTIM="grep IdrisMemMPI NEMO_CI_\${JOB_ID} | cut -d, -f1 | awk '{print \$(NF-1),\$NF}'" 19 TRUS_JPME="grep IdrisMemMPI NEMO_CI_\${JOB_ID} | cut -d, -f3 | awk '{print \$3 ,\$4 }'" 20 TRUS_JVME="grep IdrisMemMPI NEMO_CI_\${JOB_ID} | cut -d, -f2 | awk '{print \$3 ,\$4 }'" 21 22 TRUS_JINF="llq -x \${JOB_ID}" 23 24 25 ## Available softwares/librairies 26 ##--------------------------------------------------- 27 TRUS_CMPF='ifort' 28 TRUS_CDOR='cdo/' 29 TRUS_MPIR='intel/impi/' 30 TRUS_CDFR='netcdf/' 31 32 33 ## Personal settings 34 ##--------------------------------------------------- 35 [ -z "${TRUS_NPRO}" ] && TRUS_NPRO='16' 36 [ -z "${TRUS_TOUT}" ] && TRUS_TOUT='10800' 37 38 PATH='/smplocal/pub/cdo/1.5.9/bin':$PATH 39 #WRAPPER_LDFLAGS='-L/smplocal/pub/IdrMemMPI/1.4/lib -lidrmem' -
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/config/X64_CURIE.cfg
r5788 r5799 2 2 ##--------------------------------------------------- 3 3 4 ARCH_ENV=${DIR_XIOS}/arch/arch-${TRUS_HPCC}.env5 4 6 CMPF='ifort' 7 STR_CDOD='netcdf-utils-' 8 STR_LMPI='bullxmpi/' 9 STR_NCDF='netcdf-' 5 ## Default settings 6 ##--------------------------------------------------- 7 TRUS_ENVI=${TRUS_XIOS}/arch/arch-${TRUS_HPCC} 10 8 11 JOB_SUBM="ccc_msub ${TRUS_DIR}/batch/${TRUS_HPCC}.sh | grep -oe '\<[0-9]*\>'" 12 JOB_STAT="ccc_mpp | grep \${JOB_ID}" 13 JOB_INFO="ccc_macct \${JOB_ID}" 14 JOB_KILL="ccc_mdel \${JOB_ID}" 9 TRUS_CDOD='cdo diffn' 15 10 16 [ -z "${TRUS_NPRO}" ] && TRUS_NPRO='16'17 [ -z "$TIMEOUT" ] && TIMEOUT='10800'18 11 19 JOB_TIME="ccc_macct \${JOB_ID} | awk '/opa/ {print \$9}'" 20 JOB_PMEM="ccc_macct \${JOB_ID} | awk " 21 JOB_VMEM="ccc_macct \${JOB_ID} | awk " 12 ## Job commands 13 ##--------------------------------------------------- 14 TRUS_JSUB="ccc_msub ${TRUS_DIRE}/batch/${TRUS_HPCC}.sh | grep -oe '\<[0-9]*\>'" 15 TRUS_JSTA="ccc_mpp | grep \${JOB_ID}" 16 TRUS_JKIL="ccc_mdel \${JOB_ID}" 22 17 23 CDOD='cdo diffn' 18 TRUS_JTIM="ccc_macct \${JOB_ID} | awk '/opa/ {print \$9}'" 19 TRUS_JPME="ccc_macct \${JOB_ID} | awk " 20 TRUS_JVME="ccc_macct \${JOB_ID} | awk " 21 22 TRUS_JINF="ccc_macct \${JOB_ID}" 23 24 25 ## Available softwares/librairies 26 ##--------------------------------------------------- 27 TRUS_CMPF='ifort' 28 TRUS_CDOR='netcdf-utils-' 29 TRUS_MPIR='bullxmpi/' 30 TRUS_CDFR='netcdf-' 31 32 33 ## Personal settings 34 ##--------------------------------------------------- 35 [ -z "${TRUS_NPRO}" ] && TRUS_NPRO='16' 36 [ -z "${TRUS_TOUT}" ] && TRUS_TOUT='10800' 37 38 PATH='/usr/local/netcdf-utils-4.3.3.1_hdf5/bin':$PATH -
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/config/arch_template.cfg
r5788 r5799 1 ## HPCconfiguration template1 ## (Super)Computer configuration template 2 2 ##--------------------------------------------------- 3 3 4 4 ## Copy to root (./config) and rename it by keeping '.cfg' extension, then fill in according to your (super)computer 5 ## Will be called by its name without the extension 5 ## Rules for completion: 6 ## Undefined variables (=) are mandatory 7 ## Void " " (='') " " optional 8 ## Look into other configuration file for examples 9 ## It will be called by its name without the extension 6 10 7 11 8 ## Mandatory12 ## Default settings 9 13 ##--------------------------------------------------- 10 14 11 ## (Super)Computer environment 12 ARCH_ENV='' ## *.env, *.path or modulesfile to source (let void if $PATH has already been setted) 13 ## ex: "${DIR_XIOS}/arch/arch-${TRUS_HPCC}.env" 15 ## (Super)Computer environment (can be void if $PATH is already setted) 16 ## If `module` command is available, arch-${TRUS_HPCC}.env will be sourced. 17 ## If not (scheduled jobs by `cron`/`at` commands), it will be arch-${TRUS_HPCC}.path or any file given 18 TRUS_ENVI=${TRUS_XIOS}/arch/arch-${TRUS_HPCC} # ${TRUS_XIOS} is defined from user configuration file 14 19 15 ## Job commands (use with `eval ${JOB_....}`), may need to use "\${JOB_ID}" variable as the job ID returned from submission: 16 JOB_SUBM='' ## Submit a job and get his ID in return (will became ${JOB_ID}) 17 ## ex: `llsubmit ${TRUS_DIR}/batch/${TRUS_HPCC}.sh | grep -oe '\<[0-9]*\>'`, use absolute path 18 JOB_STAT='' ## Test state of the submitted job (true -> pending/running or false -> completed/crashed) 19 ## ex: "llq | grep \${JOB_ID}" 20 JOB_KILL='' ## Kill the submitted job 21 ## ex: "llcancel \${JOB_ID}" 20 ## Number of compiling processes 21 [ -z "${TRUS_NPRO}" ] && TRUS_NPRO=1 22 22 23 ## Compiling (number of tasks) and computation (timeout in s) 24 [ -z "${TRUS_NPRO}" ] && TRUS_NPRO='1' 25 [ -z "${TIMEOUT}" ] && TIMEOUT='10800' 26 27 ## $CDO command to compare 2 datasets in argument 28 CDOD='' ## Essential to check a difference between NetCDF restart files 23 ## Command to compare 2 netCDF restart files in argument (think to load software in $PATH by any way) 24 TRUS_CDOD='cdo diffn' 29 25 30 26 31 ## Interest when monitoring HPC center27 ## Job commands 32 28 ##--------------------------------------------------- 33 29 34 ## Software releases (string pattern to match just before the number in $LOADEDMODULES or $PATH): 35 STR_CDOD='' ## CDO (Climate Data Operators) 36 ## ex: 'cdo'||'nco'||... 37 STR_LMPI='' ## MPI libraries 38 ## ex: 'openmpi'||'mpich'||... 39 STR_NCDF='' ## NetCDF " " 40 ## ex: 'netcdf'||'netcdf-parallel'||... 30 ## Use with `eval ${JOB_....}` because they will certainly need to have job ID as argument ("\${JOB_ID}") 31 ## It will be taken on the fly from standard output returned at the submission of the job 41 32 42 ## Fortran compiler version (use with `$COMPILER --version`) 43 CMPF='' ## ex: 'ifort'||'gfortran'||'pgfortran'||... 33 TRUS_JSUB= ## Submit a job and get his ID in return (assigned to ${JOB_ID}). Use absolute path, 34 ## ./batch folder has been created to contain your submission script but it won't be copied into ${TRUS_TEST} 35 ## ex: `llsubmit ${TRUS_DIRE}/batch/${TRUS_HPCC}.sh | grep -oe '\<[0-9]*\>'` 36 TRUS_JSTA= ## Test state of the submitted job (true -> pending/running or false -> completed/crashed) 37 ## ex: "llq | grep \${JOB_ID}" 38 TRUS_JKIL= ## Kill the submitted job 39 ## ex: "llcancel \${JOB_ID}" 40 41 ## Computational performances of finished job 42 TRUS_JTIM='' ## Get CPU elapsed time 43 ## ex: `grep IdrisMemMPI NEMO_CI_\${JOB_ID} | cut -d, -f1 | awk '{print \$(NF-1),\$NF}'` 44 TRUS_JPME='' ## Get max physical memory 45 ## ex: `grep IdrisMemMPI NEMO_CI_\${JOB_ID} | cut -d, -f3 | awk '{print \$3 ,\$4 }'` 46 TRUS_JVME='' ## Get " " virtual "" 47 48 ## Get job informations to fill in a logfile during computation 49 TRUS_JINF='' ## ex: "llq -x \${JOB_ID}" 44 50 45 51 46 ## Optional (can be void if no alternative or need)52 ## Available softwares/librairies 47 53 ##--------------------------------------------------- 48 54 49 ## Computational performances of finished job (use with `eval ${JOB_....}`) 50 JOB_INFO='' ## Get job informations to fill in a logfile during computation 51 ## ex: "llq -x \${JOB_ID}" 52 JOB_TIME='' ## Get CPU elapsed time 53 ## ex: `grep IdrisMemMPI NEMO_CI_\${JOB_ID} | cut -d, -f1 | awk '{print \$(NF-1),\$NF}'` 54 JOB_PMEM='' ## Get max physical memory 55 ## ex: `grep IdrisMemMPI NEMO_CI_\${JOB_ID} | cut -d, -f3 | awk '{print \$3,\$4}'` 56 JOB_VMEM='' ## Get " " virtual "" 55 ## Fortran compiler version (use with `${TRUS_CMPF} --version`) 56 TRUS_CMPF='' ## ex: 'ifort'|'gfortran'|'pgfortran'|... 57 58 ## Software releases (string pattern to match just before the number in $PATH): 59 TRUS_CDOR='' ## CDO (Climate Data Operators) 60 ## ex: 'cdo'|'nco'|... 61 TRUS_MPIR='' ## MPI libraries 62 ## ex: 'openmpi'|'mpich'|... 63 TRUS_CDFR='' ## NetCDF " " 64 ## ex: 'netcdf'|'netcdf-parallel'|... 65 66 67 ## Personal settings 68 ##--------------------------------------------------- 69 70 ## Timeout for computation (s) 71 [ -z "${TRUS_TOUT}" ] && TRUS_TOUT= -
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/config/martin.cfg
r5788 r5799 1 ## User configuration2 ##------------------- 1 ## Installation for overall trusting tests on Curie Supercomputer 2 ##--------------------------------------------------- 3 3 4 DIR_WORK=$CCCWORKDIR5 DIR_SCRA=$SCRATCHDIR/trusting6 DIR_STOR=$CCCSTOREDIR/trusting_sav7 4 8 if [ -z "${TRUS_WKCY}" ]; then branch='trunk'; else branch=${TRUS_WKCY}; fi 9 TRUS_WKCY=${DIR_WORK}/NEMO/$branch/NEMOGCM 5 ## Global Directories 6 ##--------------------------------------------------- 7 TRUS_SCRA=$SCRATCHDIR/NEMO/trusting 8 TRUS_STOR=$CCCSTOREDIR/NEMO/trusting_sav 9 TRUS_FORC=$CCCWORKDIR/NEMO/FORC 10 TRUS_XIOS=$CCCWORKDIR/XIOS/xios-1.0 11 12 13 ## Default settings 14 ##--------------------------------------------------- 15 [ -z "${TRUS_BRAN}" ] && TRUS_BRAN='trunk' 16 TRUS_CKOT=( 'ARCH CONFIG NEMO EXTERNAL/AGRIF EXTERNAL/fcm EXTERNAL/IOIPSL TOOLS/COMPILE TOOLS/maketools TOOLS/REBUILD_NEMO' ) 17 10 18 [ -z "${TRUS_REFE}" ] && TRUS_REFE='ORCA2_LIM_PISCES' 11 TRUS_BHMK=${DIR_STOR}/${TRUS_REFE}/${TRUS_WKCY} 12 TEST_DIR=${DIR_SCRA}/${TRUS_REFE}/${TRUS_WKCY}/trusting_${DATE} 19 TRUS_CONF=${TRUS_REFE}'_trust' 13 20 14 DIR_XIOS=${DIR_WORK}/XIOS/xios-1.015 16 TRUS_TEST=${TRUS_REFE}'_trust'17 [ ${TRUS_REFE} == 'ORCA2_LIM_PISCES' ] && TRUS_TEST='O2LP_trust'18 [ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_TEST='O1L3P_trust'19 20 KEYS_ADD=''; KEYS_DEL=''21 22 if [ ${TRUS_REFE} == 'ORCA2_LIM' ]; then23 TRUS_TEST='O2LA_trust'24 KEYS_ADD='key_add key_agrif' && KEYS_DEL='key_del key_zdftmx'25 fi26 27 TRUS_FORC=${DIR_WORK}/NEMO/FORC28 21 [ -z "${TRUS_TARF}" ] && TRUS_TARF='ORCA2_LIM_nemo_v3.6.tar' 29 22 [ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_TARF='INPUTS_ORCA1_LIM3_PISCES_V6.tar' 30 23 [ ${TRUS_REFE} == 'AMM12' ] && TRUS_TARF='AMM12_v3.6.tar' 31 24 32 [ -z "$TRUS_MAIL" ] && TRUS_MAIL='ntmlod@locean-ipsl.upmc.fr' 25 TRUS_KEYA=''; TRUS_KEYD='' 26 [ ${TRUS_REFE} == 'ORCA2_LIM' ] && TRUS_KEYA='key_add key_agrif' && TRUS_KEYD='key_del key_zdftmx' 27 28 29 ## Personal settings 30 ##--------------------------------------------------- 31 [ -z "${TRUS_WORK}" ] && TRUS_WORK=$CCCWORKDIR/NEMO 32 33 TRUS_TEST=${TRUS_SCRA}/${TRUS_REFE}/${TRUS_BRAN}/trusting_${DATE} 34 TRUS_BHMK=${TRUS_STOR}/${TRUS_REFE}/${TRUS_BRAN} 35 36 [ ${TRUS_REFE} == 'ORCA2_LIM_PISCES' ] && TRUS_CONF='O2LP_trust' 37 [ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_CONF='O1L3P_trust' 38 [ ${TRUS_REFE} == 'ORCA2_LIM' ] && TRUS_CONF='O2LA_trust' 39 40 [ -z "${TRUS_MAIL}" ] && TRUS_MAIL='ntmlod@locean-ipsl.upmc.fr' -
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/config/romr005.cfg
r5788 r5799 1 ## User configuration2 ##------------------- 1 ## Installation for overall trusting tests on Ada Supercomputer 2 ##--------------------------------------------------- 3 3 4 DIR_WORK=$WORKDIR5 DIR_SCRA=$WORKDIR/NEMO/trusting6 DIR_STOR=$WORKDIR/NEMO/trusting_sav7 4 8 if [ -z "${TRUS_WKCY}" ]; then branch='trunk'; else branch=${TRUS_WKCY}; fi 9 TRUS_WKCY=${DIR_WORK}/NEMO/$branch/NEMOGCM 5 ## Global Directories 6 ##--------------------------------------------------- 7 TRUS_SCRA=$WORKDIR/NEMO/trusting 8 TRUS_STOR=$WORKDIR/NEMO/trusting_sav 9 TRUS_FORC=$WORKDIR/NEMO/FORC 10 TRUS_XIOS=$WORKDIR/XIOS/xios-1.0 11 12 13 ## Default settings 14 ##--------------------------------------------------- 15 [ -z "${TRUS_BRAN}" ] && TRUS_BRAN='trunk' 16 TRUS_CKOT=( 'ARCH CONFIG NEMO EXTERNAL/AGRIF EXTERNAL/fcm EXTERNAL/IOIPSL TOOLS/COMPILE TOOLS/maketools TOOLS/REBUILD_NEMO' ) 17 10 18 [ -z "${TRUS_REFE}" ] && TRUS_REFE='ORCA2_LIM_PISCES' 11 TRUS_BHMK=${DIR_STOR}/${TRUS_REFE}/$branch 12 TEST_DIR=${DIR_SCRA}/${TRUS_REFE}/$branch/trusting_${DATE} 19 TRUS_CONF=${TRUS_REFE}'_trust' 13 20 14 DIR_XIOS=${DIR_WORK}/XIOS/xios-1.015 16 TRUS_TEST=${TRUS_REFE}'_trust'17 [ ${TRUS_REFE} == 'ORCA2_LIM_PISCES' ] && TRUS_TEST='O2LP_trust'18 [ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_TEST='O1L3P_trust'19 20 KEYS_ADD=''; KEYS_DEL=''21 22 if [ ${TRUS_REFE} == 'ORCA2_LIM' ]; then23 TRUS_TEST='O2LA_trust'24 KEYS_ADD='key_add key_agrif' && KEYS_DEL='key_del key_zdftmx'25 fi26 27 TRUS_FORC=${DIR_WORK}/NEMO/FORC28 21 [ -z "${TRUS_TARF}" ] && TRUS_TARF='ORCA2_LIM_nemo_v3.6.tar' 29 22 [ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_TARF='INPUTS_ORCA1_LIM3_PISCES_V6.tar' 30 23 [ ${TRUS_REFE} == 'AMM12' ] && TRUS_TARF='AMM12_v3.6.tar' 31 24 32 [ -z "$TRUS_MAIL" ] && TRUS_MAIL='ntmlod@locean-ipsl.upmc.fr' 25 TRUS_KEYA=''; TRUS_KEYD='' 26 [ ${TRUS_REFE} == 'ORCA2_LIM' ] && TRUS_KEYA='key_add key_agrif' && TRUS_KEYD='key_del key_zdftmx' 27 28 29 ## Personal settings 30 ##--------------------------------------------------- 31 [ -z "${TRUS_WORK}" ] && TRUS_WORK=$WORKDIR/NEMO 32 33 TRUS_TEST=${TRUS_SCRA}/${TRUS_REFE}/${TRUS_BRAN}/trusting_${DATE} 34 TRUS_BHMK=${TRUS_STOR}/${TRUS_REFE}/${TRUS_BRAN} 35 36 [ ${TRUS_REFE} == 'ORCA2_LIM_PISCES' ] && TRUS_CONF='O2LP_trust' 37 [ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_CONF='O1L3P_trust' 38 [ ${TRUS_REFE} == 'ORCA2_LIM' ] && TRUS_CONF='O2LA_trust' 39 40 [ -z "${TRUS_MAIL}" ] && TRUS_MAIL='ntmlod@locean-ipsl.upmc.fr' -
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/config/user_template.cfg
r5788 r5799 1 ## User configuration 1 ## User configuration template 2 2 ##--------------------------------------------------- 3 3 4 4 ## Copy to root (./config) and rename it by keeping '.cfg' extension, then fill in according to your installation 5 ## Will be called by its name without extension 5 ## Rules for completion: 6 ## Undefined variables (=) are mandatory 7 ## Void " " (='') " " optional 8 ## Look into other configuration file for examples 9 ## It will be called by its name without extension 6 10 7 11 8 ## Mandatory 12 ## Global directories 13 ##--------------------------------------------------- 14 TRUS_SCRA= ## Computation 15 TRUS_STOR= ## Backup 16 TRUS_FORC= ## Location of forcing archive to extract (combined use with ${TRUS_TARF}) or 17 ## "" "" all inputs files to copy into ${TRUS_TEST} 18 TRUS_XIOS= ## XIOS installation 19 20 21 ## Default settings 9 22 ##--------------------------------------------------- 10 23 11 ## Few settings can be changed from directly from command line to reduce the creationof user configuration file24 ## These settings can be changed directly from command line to reduce number of user configuration file 12 25 ## See `./trusting.sh [-h|--help]` 13 26 14 ## Directories path 15 TRUS_BHMK='' ## Benchmark folder where target files for comparison have been stored 16 ## Inputs (all) : CPP_*, namelist_*, *.xml et inputs_file.txt (formed by first test) 17 ## Outputs (any) : *.stat, ocean.output, restarts 18 TEST_DIR='' ## Testing folder for computation 19 ## ex: ".../trusting_${DATE}" 20 TRUS_WKCY='' ## Working copy of branch test 21 ## ex: ".../NEMOGCM" 22 DIR_XIOS='' ## XIOS installation 27 ## SVN branch name 28 [ -z "${TRUS_BRAN}" ] && TRUS_BRAN='trunk' 23 29 24 ## NEMO configurations 25 TRUS_REFE='' ## Reference configuration to test 26 TRUS_TEST='' ## Testing configuration name 30 ## Minimal content for code checkout/update 31 TRUS_CKOT=( 'ARCH CONFIG NEMO EXTERNAL/AGRIF EXTERNAL/fcm EXTERNAL/IOIPSL TOOLS/COMPILE TOOLS/maketools TOOLS/REBUILD_NEMO' ) 27 32 28 ## Forcing files 29 TRUS_FORC='' ## Directory with forcing archive to extract (combined use with ${TRUS_TARF}) or 30 ## " " "" all inputs files to copy into ${TEST_DIR} 33 ## Reference configuration to test 34 [ -z "${TRUS_REFE}" ] && TRUS_REFE='ORCA2_LIM_PISCES' 35 36 ## Forcing archive, let void if not need to untar inside ${TRUS_FORC} 37 [ -z "${TRUS_TARF}" ] && TRUS_TARF='ORCA2_LIM_nemo_v3.6.tar' 38 [ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_TARF='INPUTS_ORCA1_LIM3_PISCES_V6.tar' 39 [ ${TRUS_REFE} == 'AMM12' ] && TRUS_TARF='AMM12_v3.6.tar' 40 41 ## Testing configuration name 42 TRUS_CONF=${TRUS_REFE}'_trust' 43 44 ## CPP keys to add or remove from reference configuration 45 TRUS_KEYA=''; TRUS_KEYD='' 46 [ ${TRUS_REFE} == 'ORCA2_LIM' ] && TRUS_KEYA='key_add key_agrif' && TRUS_KEYD='key_del key_zdftmx' 31 47 32 48 33 ## P ossible use49 ## Personal settings 34 50 ##--------------------------------------------------- 35 51 36 ## Archive inputs name, let void if not requested37 TRUS_TARF='' 52 ## Folder for testing branch (intallation & compilation of testing configuration) 53 [ -z "${TRUS_WORK}" ] && TRUS_WORK= 38 54 39 ## CPP keys to add or remove from reference configuration 40 KEYS_ADD='' 41 KEYS_DEL='' 55 ## Testing folder for computation 56 TRUS_TEST= ## ${TRUS_SCRA}/${TRUS_REFE}/${TRUS_BRAN}/${DATE} recommended 42 57 58 ## Benchmark folder where target files for comparison have been stored, ie: 59 ## Inputs (all) : CPP_*, namelist_*, *.xml et inputs_list.txt (created by first test) 60 ## Outputs (any) : *.stat, ocean.output, restarts 61 TRUS_BHMK= ## ${TRUS_STOR}/${TRUS_REFE}/${TRUS_BRAN} recommended 43 62 44 ## Optional (can be void if no alternative or need) 45 ##--------------------------------------------------- 46 47 ## Mailing list to notify of a failure (-p|--prod required) 48 TRUS_MAIL='' 63 ## Mailing list to notify on failure (-p|--prod option required) 64 [ -z "${TRUS_MAIL}" ] && TRUS_MAIL='' -
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/install_new_branch.sh
r5788 r5799 2 2 3 3 4 HELP=0; NEMO_BRAN='trunk'; NPROC=1 5 SVN_URL='https://forge.ipsl.jussieu.fr/nemo/svn' 4 cd $( dirname $0 ) 6 5 6 ## Set defaults 7 ##--------------------------------------------------- 8 TRUS_DIRE=$PWD 9 TRUS_DBUG=0; TRUS_PROD=0; TRUS_HELP=0 10 11 12 ## Get options (for replacing initials settings) 13 ##--------------------------------------------------- 7 14 while [ $# -ne 0 ]; do 8 15 case $1 in 9 '- b'|'--branch') NEMO_BRAN=$2; shift 2;; '-d'|'--directory') INSTALL_DIR=$2; shift 2;;10 '- j'|'--job' ) NPROC=$2 ; shift 2;; '-m'|'--machine' ) NEMO_HPCC=$2 ; shift 2;;11 '- h'|'--help' ) HELP=1 ; shift ;; '-u'|'--username' ) SVN_USER=$2; shift 2;;12 "*" ) HELP=1; shift ;;16 '-d'|'--debug' ) TRUS_DBUG=1 ; shift ;; '-j'|'--job' ) TRUS_NPRO=$2; shift 2;; 17 '-m'|'--machine') TRUS_HPCC=$2; shift 2;; '-h'|'--help' ) TRUS_HELP=1 ; shift ;; 18 '-u'|'--user' ) TRUS_USER=$2; shift 2;; '-w'|'--workdir') TRUS_WORK=$2; shift 2;; 19 "*" ) TRUS_HELP=1 ; shift ;; 13 20 esac 14 21 done 15 22 16 if [[ -z "${INSTALL_DIR}" || -z "${NEMO_HPCC}" || $HELP == 1 ]]; then 17 echo 'Error' 23 24 ## Initialization (HPC & user environment) 25 ##--------------------------------------------------- 26 if [[ ! -e config/${TRUS_USER}.cfg || ! -e config/${TRUS_HPCC}.cfg || ${TRUS_HELP} -eq 1 ]]; then 27 cat trusting_help.txt 28 29 if [ ${TRUS_HELP} -eq 0 ]; then 30 printf "\n\n\033[0;33m" 31 printf "At least one configuration (arch or user) file is missing or misspelled:" 32 printf "\t'%s'.cfg\t'%s'.cfg" ${TRUS_USER} ${TRUS_HPCC} 33 printf "\033[0m" 34 fi 35 36 printf "\n\nContent of 'config' folder:\n" 37 find config -name *.cfg | cut -d/ -f2 \ 38 | xargs -n 4 printf "\t- %-25s\t- %-25s\t- %-25s\t- %-25s\n" 18 39 exit 1 40 else 41 . trusting.env 42 [ ${TRUS_DBUG} -eq 1 ] && set -vx 19 43 fi 20 44 21 if [ ${NEMO_BRAN} == 'trunk' ]; then22 svn_bran=${NEMO_BRAN}23 elif [ $( svn ls ${SVN_URL}/branches/2015 | grep -oe "\<${NEMO_BRAN}\>") ]; then24 svn_bran=branches/2015/${NEMO_BRAN}25 else26 printf "\nNEMO branch name \033[0;31m%s\033[0m given is not recognized\n\n" ${NEMO_BRAN}27 echo 'List of existing branches on repository in branches/2015:'28 svn ls ${SVN_URL}/branches/2015 | tr -d / | xargs -n 3 printf "%-35s\t%-35s\t%-35s\n"29 echo30 exit 131 fi32 45 33 printf "\nInstallation of NEMO trusting monitoring in %s on %s branch for %s\n\n" \ 34 ${INSTALL_DIR} ${NEMO_BRAN} ${NEMO_HPCC} 46 ## List last branches from NEMO Forge 47 ##--------------------------------------------------- 48 printf "\nWhat branch do you want to install in "${TRUS_WORK}" for trusting test ? " 49 echo 'Enter 0 to abort' 50 select branch in 'trunk' $( svn ls ${TRUS_SVNH}/branches/2015 | tr -d / | sort -r ); do 35 51 36 echo 'Initial checkout of '${NEMO_BRAN}' branch' 37 mkdir -p ${INSTALL_DIR}/${NEMO_BRAN}/NEMOGCM && cd ${INSTALL_DIR}/${NEMO_BRAN}/NEMOGCM 52 if [ $REPLY -eq 0 ]; then exit 1; else export TRUS_BRAN=$branch; fi 38 53 39 for elmt in 'ARCH' 'CONFIG' 'NEMO' 'EXTERNAL' 'TOOLS' 'TRUST'; do 40 rev=''41 printf "%s " $elmt42 [ $elmt == 'TRUST' ] && svn_bran='branches/2015/dev_r5092_CNRS18_TRUST' && rev='-r 5697'43 svn co -q $rev ${SVN_URL}/${svn_bran}/NEMOGCM/$elmt 54 printf "\nInstallation of a working copy of '%s' branch in '%s'? " ${TRUS_BRAN} ${TRUS_WORK} 55 echo 'Type [Y|y|yes] to confirm, if not back to branches list number' 56 read answer 57 [[ $answer == 'Y' || $answer == 'y' || $answer == 'yes' ]] && break 58 44 59 done 45 60 46 printf "\n\nCleaning EXTERNAL directory\n" 47 cd EXTERNAL 48 printf 'Remove ' 49 50 for elmt in $( find -maxdepth 1 -type d -name '[^.]*' ); do 51 if [ ! $( echo $elmt | grep "AGRIF\|IOIPSL\|fcm" ) ]; then 52 printf "%s " $elmt && rm -rf $elmt > /dev/null 53 fi 54 done 55 printf "\n" 61 echo 56 62 57 63 58 printf "\nCleaning TOOLS directory\n" 59 cd ../TOOLS 60 printf 'Remove ' 64 ## First checkout of selected branch 65 ##--------------------------------------------------- 66 echo 'Initial checkout of '${TRUS_BRAN}' branch' 67 mkdir -p ${TRUS_WORK}/${TRUS_BRAN}/NEMOGCM 68 cd ${TRUS_WORK}/${TRUS_BRAN}/NEMOGCM 61 69 62 for elmt in $( find -maxdepth 1 -type d -name '[^.]*' ); do 63 if [ ! $( echo $elmt | grep "COMPILE\|maketools\|REBUILD_NEMO" ) ]; then 64 printf "%s " $elmt && rm -rf $elmt > /dev/null 70 svn_bran=branches/2015/${TRUS_BRAN} 71 [ ${TRUS_BRAN} == 'trunk' ] && svn_bran=${TRUS_BRAN} 72 73 for elmt in ${TRUS_CKOT}; do 74 printf "%s " $elmt 75 76 if [ $elmt == 'TOOLS/maketools' ]; then 77 svn co -q ${TRUS_SVNH}/${svn_bran}/NEMOGCM/TOOLS --depth empty 78 svn up -q $elmt 79 else 80 svn co -q ${TRUS_SVNH}/${svn_bran}/NEMOGCM/$elmt $elmt 65 81 fi 82 66 83 done 84 67 85 printf "\n\n" 68 86 69 if [ $( find ../ARCH -name arch-${NEMO_HPCC}.fcm ) ]; then 87 88 ## Compile rebuild_nemo.exe in anticipation 89 ##--------------------------------------------------- 90 if [ $( find ARCH -name arch-${TRUS_HPCC}.fcm ) ]; then 70 91 echo 'Compile NEMO rebuild tool' 71 ./maketools -n REBUILD_NEMO -m ${NEMO_HPCC} -j $NPROC >&/dev/null92 cd TOOLS && ./maketools -n REBUILD_NEMO -m ${TRUS_HPCC} -j ${TRUS_NPRO} > /dev/null 72 93 [ $? -eq 0 ] && printf "\033[0;32mOK\033[0m" || printf "\033[0;31mKO\033[0m" 73 94 printf "\n\n" … … 75 96 printf "\033[0;31mNo arch file found to compile NEMO rebuild tool\033[0m\n\n" 76 97 fi 98 99 exit 0 100 -
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/trusting.env
r5788 r5799 2 2 3 3 4 ## Patterns (UTC time-stamp & filename)4 ## Patterns (UTC time-stamp & messengers filename) 5 5 ##-------------------------------------- 6 6 dat=$( date ) 7 7 export DATE=$( date -ud "$dat" +"%Y%m%d%Z%H%M" ) 8 8 export PATTERNAME=${TRUS_USER}'_'${TRUS_HPCC} 9 export TRUS_SVNH='https://forge.ipsl.jussieu.fr/nemo/svn' 10 11 12 ## Source user configuration 13 ##--------------------------------------------------- 14 . ${TRUS_DIRE}/config/${TRUS_USER}.cfg 15 export TRUS_SCRA TRUS_STOR TRUS_XIOS TRUS_FORC 16 export TRUS_WORK TRUS_BRAN TRUS_BHMK TRUS_TEST 17 export TRUS_REFE TRUS_CONF TRUS_TARF TRUS_KEYA TRUS_KEYD 18 export TRUS_MAIL 19 20 export TRUS_NGCM=${TRUS_WORK}/${TRUS_BRAN}/NEMOGCM 21 9 22 10 23 ## Source (super)computer configuration 11 24 ##--------------------------------------------------- 12 . ${TRUS_DIR}/config/${TRUS_HPCC}.cfg 13 export ARCH_ENV 14 export JOB_INFO JOB_KILL JOB_PMEM JOB_STAT JOB_SUBM JOB_TIME JOB_VMEM 15 export TRUS_NPRO TIMEOUT 16 export CDOD 17 export STR_CDOD STR_LMPI STR_NCDF 18 export CMPF 25 . ${TRUS_DIRE}/config/${TRUS_HPCC}.cfg 26 export TRUS_ENVI 27 export TRUS_CDOD 28 export TRUS_JSUB TRUS_JSTA TRUS_JKIL TRUS_JPME TRUS_JTIM TRUS_JVME TRUS_JINF 29 export TRUS_CMPF TRUS_CDOR TRUS_MPIR TRUS_CDFR 30 export TRUS_NPRO TRUS_TOUT 19 31 20 ## Source user configuration21 ##---------------------------------------------------22 . ${TRUS_DIR}/config/${TRUS_USER}.cfg23 export TRUS_BHMK TEST_DIR TRUS_REFE TRUS_TEST24 export TRUS_WKCY DIR_XIOS25 export TRUS_FORC TRUS_TARF26 export KEYS_ADD KEYS_DEL27 export TRUS_MAIL -
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/trusting.sh
r5788 r5799 6 6 ## Set defaults 7 7 ##--------------------------------------------------- 8 DBG=0; PROD=0; HELP=0 9 TRUS_DIR=$PWD; TRUS_RSLT='FAILED'; SVN_CMD='svn status' # ('FAILED' result & no update on directories) 8 TRUS_DIRE=$PWD 9 TRUS_DBUG=0; TRUS_PROD=0; TRUS_HELP=0 10 ## No update on SVN directories & 'FAILED' result for 'Unknown error' ) 11 TRUS_SVNA='svn status'; TRUS_RSLT='FAILED'; TRUS_RORR=0 10 12 xios_mode='--full'; stdout_redir='>&' 11 rev i=$( svn info | awk '(NR == 9) {print $NF}' )13 rev=$( svn info | awk '(NR == 9) {print $NF}' ) 12 14 13 15 14 ## Get options for replacing initials settings16 ## Get options (replacing initials settings) 15 17 ##--------------------------------------------------- 16 18 while [ $# -ne 0 ]; do 17 19 case $1 in 18 '-a'|'--archive') TRUS_TARF=$2 ; shift 2;; '-b'|'--branch' ) TRUS_WKCY=$2; shift 2;; 19 '-d'|'--debug' ) set -vx; DBG=1; shift ;; '-e'|'--email' ) TRUS_MAIL=$2; shift 2;; 20 '-j'|'--job' ) TRUS_NPRO=$2 ; shift 2;; '-h'|'--help' ) HELP=1 ; shift ;; 21 '-m'|'--machine') TRUS_HPCC=$2 ; shift 2;; '-n'|'--newconf') TRUS_TEST=$2; shift 2;; 22 '-r'|'--refconf') TRUS_REFE=$2 ; shift 2;; '-t'|'--time' ) TIMEOUT=$2 ; shift 2;; 23 '-p'|'--prod' ) PROD=1 ; shift ;; '-u'|'--user' ) TRUS_USER=$2; shift 2;; 24 '-v'|'--version') TRUS_VERS=$2 ; shift 2;; "*" ) HELP=1 ; shift ;; 20 '-a'|'--archive') TRUS_TARF=$2; shift 2;; '-b'|'--branch' ) TRUS_BRAN=$2; shift 2;; 21 '-d'|'--debug' ) TRUS_DBUG=1 ; shift ;; '-e'|'--email' ) TRUS_MAIL=$2; shift 2;; 22 '-f'|'--forcdir') TRUS_FORC=$2; shift 2;; '-j'|'--job' ) TRUS_NPRO=$2; shift 2;; 23 '-h'|'--help' ) TRUS_HELP=1 ; shift ;; '-m'|'--machine') TRUS_HPCC=$2; shift 2;; 24 '-n'|'--newconf') TRUS_CONF=$2; shift 2;; '-r'|'--refconf') TRUS_REFE=$2; shift 2;; 25 '-t'|'--time' ) TRUS_TOUT=$2; shift 2;; '-p'|'--prod' ) TRUS_PROD=1 ; shift ;; 26 '-u'|'--user' ) TRUS_USER=$2; shift 2;; '-v'|'--version') TRUS_SVNV=$2; shift 2;; 27 '-w'|'--workdir') TRUS_WORK=$2; shift 2;; "*" ) TRUS_HELP=1 ; shift ;; 25 28 esac 26 29 done … … 29 32 ## Initialization (HPC & user environment) 30 33 ##--------------------------------------------------- 31 if [[ ! $( find config -name ${TRUS_USER}'.cfg' && find config -name ${TRUS_HPCC}'.cfg' ) || $HELP-eq 1 ]]; then34 if [[ ! -e config/${TRUS_USER}.cfg || ! -e config/${TRUS_HPCC}.cfg || ${TRUS_HELP} -eq 1 ]]; then 32 35 cat trusting_help.txt 33 36 34 if [ $HELP -eq 0 ]; then 35 printf "\n\nAt least one configuration file is missing or misspelled: %s.cfg %s.cfg" \ 36 ${TRUS_USER} ${TRUS_HPCC} 37 if [ ${TRUS_HELP} -eq 0 ]; then 38 printf "\n\n\033[0;33m" 39 printf "At least one configuration (arch or user) file is missing or misspelled:" 40 printf "\t'%s'.cfg\t'%s'.cfg" ${TRUS_USER} ${TRUS_HPCC} 41 printf "\033[0m" 37 42 fi 38 43 39 printf "\n\nContent of config folder:" 40 find config -name *.cfg | cut -d/ -f2 | xargs -n 3 printf "%-30s\t%-30s\t%-30s\n" 44 printf "\n\nContent of 'config' folder:" 45 find config -name *.cfg | cut -d/ -f2 \ 46 | xargs -n 4 printf "%-25s\t%-25s\t%-25s\n" 41 47 exit 1 42 48 else 43 49 . trusting.env && . trusting_func.sh 44 45 ## DEBUG option sto speed up & expand verbosity of compilation46 [ $ DBG -eq 1 ] && {xios_mode=''; stdout_redir='>'; }50 #echo $WRAPPER_LDFLAGS 51 ## DEBUG option to speed up & expand verbosity of compilation 52 [ ${TRUS_DBUG} -eq 1 ] && { set -vx; xios_mode=''; stdout_redir='>'; } 47 53 48 54 ## If -v|--version option has been set, modify default SVN action on directories 49 if [ $( echo ${TRUS_VERS} | grep "HEAD\|up\|update" ) ]; then 50 SVN_CMD='svn update -r HEAD' 51 elif [ $( echo ${TRUS_VERS} | grep -o '{[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}}' ) ]; then 52 SVN_CMD='svn update -r '$( echo ${TRUS_VERS} | grep -o '{[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}}' ) 53 elif [ $( echo ${TRUS_VERS} | grep -o '[0-9]*' ) ]; then 54 SVN_CMD='svn update -r '$( echo ${TRUS_VERS} | grep -o '[0-9]*' ) 55 if [ $( echo ${TRUS_SVNV} | grep "HEAD\|up\|update" ) ]; then 56 TRUS_SVNA='svn update -r HEAD' 57 elif [ $( echo ${TRUS_SVNV} | grep -o '{[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}}' ) ]; then 58 TRUS_SVNA='svn update -r ' \ 59 $( echo ${TRUS_SVNV} | grep -o '{[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}}' ) 60 elif [ $( echo ${TRUS_SVNV} | grep -o '[0-9]*' ) ]; then 61 TRUS_SVNA='svn update -r ' \ 62 $( echo ${TRUS_SVNV} | grep -o '[0-9]*' ) 55 63 fi 56 64 … … 61 69 ##--------------------------------------------------- 62 70 echo 63 cat banner.txt 71 if [ -t 0 ]; then cat banner.txt; else cat banner.html; fi 64 72 echo 65 73 echo '****************************************************************************************************' 66 74 echo '* *' 67 75 echo '* NEMO Trusting (Continuous Integration Tool) *' 68 echo "* ver.$rev i*"76 echo "* ver.$rev *" 69 77 echo '* *' 70 78 echo '****************************************************************************************************' 71 79 echo 72 echo ' - Testing configuration '${TRUS_ TEST}' based on '${TRUS_REFE}73 echo ' - Working copy '${TRUS_WKCY}80 echo ' - Testing configuration '${TRUS_CONF}' based on '${TRUS_REFE} 81 echo ' - SVN working copy '${TRUS_WORK}/${TRUS_BRAN} 74 82 echo ' - Benchmark folder '${TRUS_BHMK} 75 83 echo ' - (Super)Computer '${TRUS_HPCC} … … 81 89 ##--------------------------------------------------- 82 90 print_step 'Timestamped testing directory' 83 mkdir -p ${TEST_DIR} ${TRUS_BHMK} 84 cd ${TEST_DIR} && echo ${TEST_DIR} 91 mkdir -p ${TRUS_TEST} ${TRUS_BHMK} 92 cd ${TRUS_TEST} 93 echo ${TRUS_TEST} 85 94 init_files 86 95 get_date … … 89 98 ## Get SVN revision on XIOS & NEMO essentials directories 90 99 ##--------------------------------------------------- 91 print_step "SVN action on NEMO directories: ${ SVN_CMD}"100 print_step "SVN action on NEMO directories: ${TRUS_SVNA}" 92 101 get_nemo_rev 93 102 … … 99 108 cat model.log 100 109 env | sort > env.log 101 110 #echo $WRAPPER_LDFLAGS 102 111 103 112 ## XIOS compilation from scratch 104 113 ##--------------------------------------------------- 105 114 print_step 'Compile XIOS' 106 cd ${ DIR_XIOS}115 cd ${TRUS_XIOS} 107 116 eval ./make_xios ${xios_mode} --arch ${TRUS_HPCC} --job ${TRUS_NPRO} \ 108 117 ${stdout_redir} /dev/null … … 113 122 ##--------------------------------------------------- 114 123 print_step "Compile ${TRUS_REFE} configuration" 115 cd ${TRUS_ WKCY}/CONFIG116 [[ -d ${TRUS_ TEST} && $DBG -eq 0 ]] && ./makenemo -n ${TRUS_TEST} clean_config \124 cd ${TRUS_NGCM}/CONFIG 125 [[ -d ${TRUS_CONF} && ${TRUS_DBUG} -eq 0 ]] && ./makenemo -n ${TRUS_CONF} clean_config \ 117 126 > /dev/null <<EOF 118 127 y 119 128 EOF 120 129 121 eval ./makenemo -n ${TRUS_ TEST} -r ${TRUS_REFE} -m ${TRUS_HPCC} -j ${TRUS_NPRO} \122 ${KEYS_ADD} ${KEYS_DEL}\130 eval ./makenemo -n ${TRUS_CONF} -r ${TRUS_REFE} -m ${TRUS_HPCC} -j ${TRUS_NPRO} \ 131 ${TRUS_KEYA} ${TRUS_KEYD} \ 123 132 ${stdout_redir} /dev/null 124 [ ! -e ${TRUS_ TEST}/BLD/bin/nemo.exe ] && get_out 2 || echo 'Success'133 [ ! -e ${TRUS_CONF}/BLD/bin/nemo.exe ] && get_out 2 || echo 'Success' 125 134 126 135 … … 128 137 ##--------------------------------------------------- 129 138 print_step 'Set job (copying or extracting inputs)' 130 cd ${T EST_DIR}131 cp ${TRUS_ WKCY}/CONFIG/${TRUS_TEST}/cpp_* .132 find ${TRUS_ WKCY}/CONFIG/${TRUS_TEST}/EXP00 -regex '.*\(_cfg\|.in\|opa\|_ref\|.xml\)' \139 cd ${TRUS_TEST} 140 cp ${TRUS_NGCM}/CONFIG/${TRUS_CONF}/cpp_* . 141 find ${TRUS_NGCM}/CONFIG/${TRUS_CONF}/EXP00 -regex '.*\(_cfg\|.in\|opa\|_ref\|.xml\)' \ 133 142 -exec cp {} . \; 134 143 get_inputs … … 146 155 ##--------------------------------------------------- 147 156 print_step 'Submit job' 148 JOB_ID=$( eval ${ JOB_SUBM} )157 JOB_ID=$( eval ${TRUS_JSUB} ) 149 158 [ $? -ne 0 ] && get_out 4 || echo 'Success (job ID '${JOB_ID}')' 150 159 print_step 'Pending job' -
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/trusting_func.sh
r5788 r5799 3 3 4 4 ## Messenger filenames 5 FILE_DATE=mesg_01_date_$PATTERNAME.txt ; FILE_ TRUS_RSLT=mesg_02_result_$PATTERNAME.txt5 FILE_DATE=mesg_01_date_$PATTERNAME.txt ; FILE_RSLT=mesg_02_result_$PATTERNAME.txt 6 6 FILE_STAT=mesg_03_state_$PATTERNAME.txt ; FILE_NEMO=mesg_04_nemo_$PATTERNAME.txt 7 7 FILE_XIOS=mesg_05_xios_$PATTERNAME.txt ; FILE_CMPF=mesg_06_compiler_$PATTERNAME.txt … … 10 10 FILE_MEMY=mesg_11_memory_$PATTERNAME.txt; FILE_NOTE=mesg_12_comments_$PATTERNAME.txt 11 11 12 ## T imestamped logfile & archive filenames13 FILE_TRUS=trusting_${DATE}_$PATTERNAME.txt; FILE_ARCH=trusting_${DATE}_$PATTERNAME.tgz12 ## Trusting timestamped logfile & archive 13 TRUS_FILE=trusting_${DATE}_$PATTERNAME.txt; TRUS_ARCH=trusting_${DATE}_$PATTERNAME.tgz 14 14 15 15 … … 23 23 24 24 init_files() { 25 echo 'Date' > ${FILE_DATE}; echo 'Result' > ${FILE_ TRUS_RSLT}25 echo 'Date' > ${FILE_DATE}; echo 'Result' > ${FILE_RSLT} 26 26 echo 'State' > ${FILE_STAT}; echo 'NEMOGCM rev.' > ${FILE_NEMO} 27 27 echo 'XIOS rev.' > ${FILE_XIOS}; echo 'Fortran compiler' > ${FILE_CMPF} … … 31 31 32 32 ## 'Failed' status with 'Unknown error' by default 33 echo $ TRUS_RSLT\34 >> ${FILE_ TRUS_RSLT}33 echo ${TRUS_RSLT} \ 34 >> ${FILE_RSLT} 35 35 echo 'Unknown error' \ 36 36 >> ${FILE_STAT} … … 47 47 get_nemo_rev() { 48 48 local dir rev_loc 49 local rev=0 list=( 'ARCH CONFIG NEMO EXTERNAL/AGRIF EXTERNAL/IOIPSL EXTERNAL/fcm TOOLS/COMPILE TOOLS/REBUILD_NEMO' )49 local rev=0 50 50 51 51 ## Loop on essential NEMO directories 52 for dir in $ list ${DIR_XIOS}; do52 for dir in ${TRUS_CKOT} ${TRUS_XIOS}; do 53 53 54 54 ## For time being, just get revision from XIOS with no action on directory 55 if [ $dir == ${ DIR_XIOS} ]; then56 rev_loc=$( svn info $dir | awk ' (NR == 9){print $NF}' )55 if [ $dir == ${TRUS_XIOS} ]; then 56 rev_loc=$( svn info $dir | awk '/Last Changed Rev/ {print $NF}' ) 57 57 echo 'XIOS '${rev_loc} \ 58 58 >> model.log … … 62 62 fi 63 63 64 echo $dir && ${ SVN_CMD} ${TRUS_WKCY}/$dir65 rev_loc=$( svn info ${TRUS_ WKCY}/$dir | awk '(NR == 9){print $NF}' )64 echo $dir && ${TRUS_SVNA} ${TRUS_NGCM}/$dir 65 rev_loc=$( svn info ${TRUS_NGCM}/$dir | awk '/Last Changed Rev/ {print $NF}' ) 66 66 67 67 ## Keep last rev. nb … … 76 76 77 77 get_soft_rel() { 78 local soft soft_rel 79 80 ## Sourcing environment modulefile only if module function is set 81 [[ -e ${ARCH_ENV} && $( declare -F | grep ' module' ) ]] && . ${ARCH_ENV} 82 83 for soft in $CMPF ${STR_CDOD} ${STR_LMPI} ${STR_NCDF}; do 78 local soft_rel str 79 80 if [ -n "${TRUS_ENVI}" ]; then 81 ## Sourcing environment modulefile (.env) only if module function is set 82 if [[ -e ${TRUS_ENVI}.env && $( declare -F | grep ' module' ) ]]; then 83 . ${TRUS_ENVI}.env 84 else 85 [ -e ${TRUS_ENVI}.path ] && . ${TRUS_ENVI}.path || . ${TRUS_ENVI} 86 fi 87 fi 88 89 ## Problem with `prepend-path` of modulefile that use ':' instead of ' ' as delimiter on LDFLAGS variables 90 [ $TRUS_HPCC == 'X64_ADA' ] && WRAPPER_LDFLAGS='-L/smplocal/pub/IdrMemMPI/1.4/lib -lidrmem '${WRAPPER_LDFLAGS} 91 92 for str in ${TRUS_CMPF} ${TRUS_MPIR} ${TRUS_CDFR} ${TRUS_CDOR}; do 93 [ -z "$str" ] && continue 84 94 soft_rel='' 85 95 86 96 ## Software release: next word after "$soft" in $PATH (case-insensitive) 87 soft_rel=$( echo $PATH | sed "s#.*$s oft\([0-9.a-z_]*\).*#\1#i" )97 soft_rel=$( echo $PATH | sed "s#.*$str\([0-9.a-z_]*\).*#\1#i" ) 88 98 89 99 ## option --version would work for main compilers (gfortran, intel, pgfortran, ...) 90 [ $s oft == $COMPILER ] && soft_rel=$( $soft--version | grep -m1 -oe '\<[0-9. ]*\>' )100 [ $str == ${TRUS_CMPF} ] && soft_rel=$( $str --version | grep -m1 -oe '\<[0-9. ]*\>' ) 91 101 92 102 ## Cleaning characters string to display proper soft name 93 s oft=$( echo $soft| sed 's#\\##g; s#[/-]$##' )94 95 echo $s oft${soft_rel} \103 str=$( echo $str | sed 's#\\##g; s#[/-]$##' ) 104 105 echo $str ${soft_rel} \ 96 106 >> model.log 97 107 done 98 108 109 sed -n 3p model.log \ 110 >> ${FILE_CMPF} 99 111 sed -n 4p model.log \ 100 >> ${FILE_ CMPF}112 >> ${FILE_LMPI} 101 113 sed -n 5p model.log \ 102 >> ${FILE_LMPI}103 sed -n 6p model.log \104 114 >> ${FILE_NCDF} 105 115 } … … 110 120 111 121 ## List & copy files in case of personal inputs 112 [ -z "${TRUS_TARF}" ] && { cmd_iol="ls ${TRUS_FORC}/*"; cmd_iof="\cp ${TRUS_FORC}/* ."; } 122 if [ -z "${TRUS_TARF}" ]; then 123 cmd_iol="ls ${TRUS_FORC}/*" ; cmd_iof="\cp ${TRUS_FORC}/* ." 124 fi 113 125 114 126 ${cmd_iol} > inputs_list.txt … … 128 140 129 141 ## Pass over useless file omission in benckmark directory 130 [[ -n "$dif" && "$dif" != '0' ]] && ( mesg='Different'; echo $dif; files_list+=$file' ' )142 [[ -n "$dif" && "$dif" != '0' ]] && { mesg='Different'; echo $dif; files_list+=$file' '; } 131 143 done 132 144 … … 146 158 147 159 ## Append a log file while pending 148 while [[ $( eval ${ JOB_STAT} ) && ${time_elapsed} -lt $TIMEOUT]]; do149 printf "\n%s\n" ${outline// /#} \160 while [[ $( eval ${TRUS_JSTA} ) && ${time_elapsed} -lt ${TRUS_TOUT} ]]; do 161 printf "\n%s\n" ${outline// /#} \ 150 162 >> computation.log 151 eval ${JOB_INFO}\163 [ -n "${TRUS_JINF}" ] && eval ${JOB_INFO} \ 152 164 >> computation.log 153 165 sleep ${time_increment} … … 158 170 159 171 ## Kill remaining job & stop the test if it's too long 160 [ ${time_elapsed} -eq $ TIMEOUT] && { eval ${JOB_DELE} &> /dev/null; get_out 6; }172 [ ${time_elapsed} -eq ${TRUS_TOUT} ] && { eval ${JOB_DELE} &> /dev/null; get_out 6; } 161 173 } 162 174 … … 168 180 for file in 'ocean.output' *.stat; do 169 181 ## Stop if no benchmark files (ocean.output, eventual stat files) 170 [ ! -e ${TRUS_BHMK}/$file ] && { exportTRUS_RSLT='FAILED'; get_out 7; }182 [ ! -e ${TRUS_BHMK}/$file ] && { TRUS_RSLT='FAILED'; get_out 7; } 171 183 172 184 diff -q $file ${TRUS_BHMK}/$file 173 185 174 186 ## Continue even if it differs 175 [ $? -ne 0 ] && { exportTRUS_RSLT='FAILED'; mesg='Different'; files_list+=$file' '; }187 [ $? -ne 0 ] && { TRUS_RSLT='FAILED'; mesg='Different'; files_list+=$file' '; } 176 188 done 177 189 … … 188 200 189 201 ## Stop if no benchmark files (ie time.step) 190 [ ! -e ${TRUS_BHMK}/time.step ] && { exportTRUS_RSLT='FAILED'; get_out 7; }202 [ ! -e ${TRUS_BHMK}/time.step ] && { TRUS_RSLT='FAILED'; get_out 7; } 191 203 time_step=$( cat ${TRUS_BHMK}/time.step | tr -d [:space:] ) 192 204 … … 208 220 209 221 if [ ${nb_dom} -gt 1 ]; then 210 ${TRUS_WKCY}/TOOLS/REBUILD_NEMO/rebuild_nemo -t ${TRUS_NPRO} $file ${nb_dom} > /dev/null 211 [ $? -eq 0 ] && rm -f ${file}_[0-9]*.nc > /dev/null 222 ${TRUS_NGCM}/TOOLS/REBUILD_NEMO/rebuild_nemo -t ${TRUS_NPRO} $file ${nb_dom} \ 223 > /dev/null 224 [ $? -eq 0 ] && rm -f ${file}_[0-9]*.nc \ 225 > /dev/null 212 226 elif [ ${nb_dom} -eq 0 ]; then 213 exportTRUS_RSLT='FAILED' && get_out 8227 TRUS_RSLT='FAILED' && get_out 8 214 228 fi 215 229 … … 221 235 222 236 ## UNIX `cmp` not suitable (timestamp in .nc file) 223 dif=$( $ CDOD $file.nc ${TRUS_BHMK}/$file.nc 2> /dev/null \237 dif=$( $TRUS_CDOD $file.nc ${TRUS_BHMK}/$file.nc 2> /dev/null \ 224 238 | awk '/records/ {print $0}' | sed '2 s/^/,/' | tr -d '\n' ) 225 239 226 240 ## CDO can return void stdout with no difference 227 241 if [[ -n "$dif" && $( echo $dif | awk '{print $1}' ) -ne 0 ]]; then 228 exportTRUS_RSLT='FAILED'242 TRUS_RSLT='FAILED' 229 243 files_list+=$comp' ' && let dif_sum+=$( echo $dif | awk '{print $1}' ) 230 244 echo $file.nc': '$dif … … 232 246 233 247 else 234 exportTRUS_RSLT='FAILED' && get_out 7248 TRUS_RSLT='FAILED' && get_out 7 235 249 fi 236 250 … … 252 266 253 267 else 254 exportTRUS_RSLT='FAILED'268 TRUS_RSLT='FAILED' 255 269 fi 256 270 … … 258 272 259 273 get_time() { 274 [ -z "${TRUS_JTIM}" ] && return 275 260 276 ## Interest for checking unusual time computation 261 local time_cpu=$( eval ${ JOB_TIME} )277 local time_cpu=$( eval ${TRUS_JTIM} ) 262 278 263 279 printf "Elapsed time: " … … 266 282 267 283 get_memy() { 284 [[ -z "${TRUS_JPME}" && -z "${TRUS_JVME}" ]] && return 285 268 286 ## Interest for checking unusual memory usage 269 local memory_pmax=$( eval ${ JOB_PMEM} ) memory_vmax=$( eval ${JOB_VMEM} )287 local memory_pmax=$( eval ${TRUS_JPME} ) memory_vmax=$( eval ${TRUS_JVME} ) 270 288 271 289 printf "Memory max usage (physical/virtual): " … … 296 314 297 315 ## Construct txt file with all messenger files 298 paste -d ';' mesg_*.txt | tee ${ FILE_TRUS}316 paste -d ';' mesg_*.txt | tee ${TRUS_FILE} 299 317 } 300 318 … … 304 322 305 323 ## Production mode (-p|--prod) 306 if [ $ PROD-eq 1 ]; then324 if [ ${TRUS_PROD} -eq 1 ]; then 307 325 308 326 ## Create or append trusting logfile 309 327 if [ -f ${TRUS_BHMK}/trusting_$PATTERNAME.txt ]; then cmd='tail -1'; else cmd='cat'; fi 310 328 311 $cmd ${ FILE_TRUS} \329 $cmd ${TRUS_FILE} \ 312 330 >> ${TRUS_BHMK}/trusting_$PATTERNAME.txt 313 331 314 332 ## Send mail only when FAILED 315 if [[ ! -z "$ TRUS_MAIL" && $TRUS_RSLT== 'FAILED' ]]; then333 if [[ ! -z "${TRUS_MAIL}" && ${TRUS_RSLT} == 'FAILED' ]]; then 316 334 317 335 ## Content … … 321 339 322 340 323 The trusting sequence has not completed successfully on new configuration ${TRUS_ TEST} based on ${TRUS_REFE}.341 The trusting sequence has not completed successfully on new configuration ${TRUS_CONF} based on ${TRUS_REFE}. 324 342 325 343 Here is the model summary: … … 330 348 331 349 For more details, look into the testing directory at: 332 ${T EST_DIR}350 ${TRUS_TEST} 333 351 334 352 An archive has been created to share the questionable configuration for further studies: 335 ${TRUS_BHMK}/${ FILE_ARCH}353 ${TRUS_BHMK}/${TRUS_ARCH} 336 354 337 355 END_MAIL 338 356 339 357 ## Send with detailed subject 340 mail -s "[NEMO Trusting][$rev][${TRUS_ WKCY}][${TRUS_REFE}] $TRUS_RSLT $ERR" $TRUS_MAIL\358 mail -s "[NEMO Trusting][$rev][${TRUS_BRAN}][${TRUS_REFE}] ${TRUS_RSLT} ${TRUS_RORR}" ${TRUS_MAIL} \ 341 359 < trusting.mail 342 360 fi … … 348 366 local time_step=0 349 367 350 ERR=$1368 TRUS_RORR=$1 351 369 352 370 printf "\n\nEnd of test\n" 353 371 354 372 ## In case of compilation error 355 cd ${T EST_DIR}356 357 if [ $ TRUS_RSLT== 'FAILED' ]; then373 cd ${TRUS_TEST} 374 375 if [ ${TRUS_RSLT} == 'FAILED' ]; then 358 376 echo 'Failure' 359 377 360 378 ## Error identification 361 case $ ERRin379 case ${TRUS_RORR} in 362 380 ## Compilation 363 '1') ERR='XIOS compilation failed' ;; '2') ERR='NEMO compilation failed';;381 '1') TRUS_RORR='XIOS compilation failed' ;; '2') TRUS_RORR='NEMO compilation failed';; 364 382 ## Submission 365 '3') ERR='Missing input files' ;; '4') ERR='Job submission error' ;;383 '3') TRUS_RORR='Missing input files' ;; '4') TRUS_RORR='Job submission error' ;; 366 384 ## Computation 367 '5') ERR='Crashed at time step' ;; '6') ERR='Exceeded time limit' ;;385 '5') TRUS_RORR='Crashed at time step' ;; '6') TRUS_RORR='Exceeded time limit' ;; 368 386 ## Results 369 '7') ERR='Missing previous outputs';; '8') ERR='New outputs differ' ;; 387 '7') TRUS_RORR='Missing previous outputs';; '8') TRUS_RORR='New outputs differ' ;; 388 ## Other 389 '*') TRUS_RORR='Unknown error' ;; 370 390 esac 371 391 372 392 else 373 echo 'Success' && ERR='Code is reliable'393 echo 'Success' && TRUS_RORR='Code is reliable' 374 394 fi 375 395 376 396 ## Eventual comments from ocean.output 377 if [ "$ ERR" == 'Crashed at time step' ]; then397 if [ "${TRUS_RORR}" == 'Crashed at time step' ]; then 378 398 comments 'E R R O R' 379 399 [ -e time.step ] && time_step=$( grep -o [0-9]* time.step ) 380 ERR+=' '$time_step400 TRUS_RORR+=' '$time_step 381 401 else 382 402 comments 'W A R N I N G' 383 [ "$ ERR" == 'Exceeded time limit' ] && ERR+=' '$(( ${TIMEOUTT}/3600 ))'h'403 [ "${TRUS_RORR}" == 'Exceeded time limit' ] && TRUS_RORR+=' '$(( ${TRUS_TOUT}/3600 ))'h' 384 404 fi 385 405 386 406 ## Last messenger files 387 export ERR388 sed -i "2 s/.*/$TRUS_RSLT/" ${FILE_ TRUS_RSLT}; sed -i "2 s/.*/$ERR/" ${FILE_STAT}407 #export TRUS_RORR 408 sed -i "2 s/.*/$TRUS_RSLT/" ${FILE_RSLT}; sed -i "2 s/.*/$TRUS_RORR/" ${FILE_STAT} 389 409 390 410 ## Save tested configuration if trusting failed in production mode (-p|--prod) 391 if [[ $ TRUS_RSLT == 'FAILED' && $PROD-eq 1 ]]; then392 echo 'Creating archive '${ FILE_ARCH}' under '${TRUS_BHMK}393 tar -czf ${TRUS_BHMK}/${ FILE_ARCH}* \394 -C ${TRUS_WKCY}/CONFIG/${TRUS_TEST}/MY_SRC . \395 -C ${TRUS_WKCY}/CONFIG/${TRUS_TEST} cpp_${TRUS_TEST}.fcm411 if [[ ${TRUS_RSLT} == 'FAILED' && ${TRUS_PROD} -eq 1 ]]; then 412 echo 'Creating archive '${TRUS_ARCH}' under '${TRUS_BHMK} 413 tar -czf ${TRUS_BHMK}/${TRUS_ARCH} * \ 414 -C ${TRUS_NGCM}/CONFIG/${TRUS_CONF}/MY_SRC . \ 415 -C ${TRUS_NGCM}/CONFIG/${TRUS_CONF} cpp_${TRUS_CONF}.fcm 396 416 fi 397 417 -
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/trusting_help.txt
r5788 r5799 1 Usage: ./trusting.sh -m $ARCH -u $USER [OPTIONS] 2 Launch trusting test on $ARCH machine from $USER installation 3 Example: './trusting.sh -m X64_CURIE -u romr005 -p -b nemo_v3_6_STABLE' 1 Usage: ./trusting.sh -u $USER -m $ARCH [OPTIONS] 2 ./install_new_branch -u $USER -m $ARCH [OPTIONS] 4 3 5 Mandatory (default settings): 6 Files to source in ./config ($ARCH.cfg & $USER.cfg) 7 -m,--machine Architecture environment (compilation & computation settings) 8 -u,--user User "" (NEMO & XIOS installation) 4 ./trusting.sh Launch trusting test on $ARCH machine from $USER installation 5 ./install_new_branch Install new branch in $USER installation for trusting test on $ARCH machine 9 6 10 Other options (modify default settings) 11 SVN working copy: 12 -b,--branch SVN branch name to test (trunk|nemo_v3_6_STABLE|...) 13 -v,--version Action on working copy ('status' by default) 14 '{'YYYY-MM-DD'}' Update to revision available at this date 15 [0-9]* "" "" revision number 16 HEAD|up|update "" "" last revision 17 st|status Show differences with repository 7 Examples: `./trusting.sh -u romr005 -m X64_CURIE -p -b nemo_v3_6_STABLE` 8 `./install_new_branch -u romr005 -m X64_ADA -w $HOME/NEMO ` 18 9 19 NEMO configuration: 20 -a,--archive Forcing input files archive to extract downloaded from ESGF/DODS server21 - n,--new_conf Testing configuration created in ./CONFIG22 - r,--ref_conf Reference " "10 Mandatory 11 Default settings to source in ./config, templates (arch_template.cfg & user_template.cfg) 12 -m,--machine Architecture environment (compilation & computation settings) 13 -u,--user User "" (NEMO & XIOS installation) 23 14 24 Compiling & computation:25 -j,--job Number of processes for compiling26 -t,--time Timeout for computation (s)27 15 28 Output control: 29 -d,--debug Verbose output for debugging purpose (`set -vx`) 30 -e,--email Email trusting digest report to following addresses only on failure 31 -h,--help Print this help & exit 32 -p,--prod Production mode (append trusting logfile) 16 Options (modify default settings) 17 SVN 18 -b,--branch Branch name in working directory ('trunk'|'nemo_v3_6_stable'|...) 19 -v,--version Action on working copy ('status' by default) 20 '{'YYYY-MM-DD'}' Update to revision available at this date 21 [0-9]* "" "" "" number 22 HEAD|up|update "" "" last revision 23 st|status Show differences with repository 24 -w,--workdir Installation directory for testing branches 25 26 Inputs 27 -a,--archive Forcing input files archive to extract, if void it will copy all files from given folder (see next line) 28 -f,--forcdir Path to your personal folder of forcing inputs 29 30 Testing configuration 31 -n,--new_conf Testing configuration folder created in ./CONFIG 32 -r,--ref_conf Reference " " for trusting test 33 34 Compiling & computation 35 -j,--job Number of processes for compiling 36 -t,--time Timeout for computation (s) 37 38 Trusting output 39 -d,--debug Verbose output for debugging purpose (`set -vx`) 40 -e,--email Email trusting digest report to following addresses only on failure 41 -h,--help Print this help & exit 42 -p,--prod Production mode (append trusting logfile)
Note: See TracChangeset
for help on using the changeset viewer.