[622] | 1 | #-Q- curie ###################### |
---|
| 2 | #-Q- curie ## CURIE TGCC/CEA ## |
---|
| 3 | #-Q- curie ###################### |
---|
[837] | 4 | #-Q- curie #MSUB -r MONITORING # Nom du job |
---|
[1468] | 5 | #-Q- curie #MSUB -o MONITORING.out_%I |
---|
| 6 | #-Q- curie #MSUB -e MONITORING.out_%I |
---|
[622] | 7 | #-Q- curie #MSUB -n 1 # Reservation du processus |
---|
[1468] | 8 | #-Q- curie #MSUB -T 80000 # Limite de temps elapsed du job |
---|
[1154] | 9 | #-Q- curie #MSUB -q ::default_node:: |
---|
[1274] | 10 | #-Q- curie #MSUB -c ::default_core:: |
---|
[704] | 11 | #-Q- curie #MSUB -Q normal |
---|
[837] | 12 | #-Q- curie #MSUB -A ::default_project:: |
---|
[681] | 13 | #-Q- curie set +x |
---|
[1437] | 14 | #-Q- irene ###################### |
---|
| 15 | #-Q- irene ## IRENE TGCC/CEA ## |
---|
| 16 | #-Q- irene ###################### |
---|
| 17 | #-Q- irene #MSUB -r MONITORING # Job name |
---|
[1468] | 18 | #-Q- irene #MSUB -o MONITORING.out_%I |
---|
| 19 | #-Q- irene #MSUB -e MONITORING.out_%I |
---|
[1437] | 20 | #-Q- irene #MSUB -n 1 # Number of cores |
---|
| 21 | #-Q- irene #MSUB -T 80000 # Maximum elapsed time |
---|
[1468] | 22 | #-Q- irene #MSUB -q ::default_node:: |
---|
| 23 | #-Q- irene #MSUB -c ::default_core:: |
---|
[1437] | 24 | #-Q- irene #MSUB -Q normal |
---|
[1468] | 25 | #-Q- irene #MSUB -A ::default_post_project:: |
---|
[1460] | 26 | #-Q- irene #MSUB -m store,work,scratch |
---|
[1437] | 27 | #-Q- irene set +x |
---|
[1525] | 28 | #-Q- irene-amd ###################### |
---|
| 29 | #-Q- irene-amd ## IRENE TGCC/CEA ## |
---|
| 30 | #-Q- irene-amd ###################### |
---|
| 31 | #-Q- irene-amd #MSUB -r MONITORING # Job name |
---|
| 32 | #-Q- irene-amd #MSUB -o MONITORING.out_%I |
---|
| 33 | #-Q- irene-amd #MSUB -e MONITORING.out_%I |
---|
| 34 | #-Q- irene-amd #MSUB -n 1 # Number of cores |
---|
| 35 | #-Q- irene-amd #MSUB -T 80000 # Maximum elapsed time |
---|
| 36 | #-Q- irene-amd #MSUB -q ::default_node:: |
---|
| 37 | #-Q- irene-amd #MSUB -c ::default_core:: |
---|
| 38 | #-Q- irene-amd #MSUB -Q normal |
---|
| 39 | #-Q- irene-amd #MSUB -A ::default_post_project:: |
---|
| 40 | #-Q- irene-amd #MSUB -m store,work,scratch |
---|
| 41 | #-Q- irene-amd set +x |
---|
[1498] | 42 | #-Q- jeanzay #!/bin/ksh |
---|
| 43 | #-Q- jeanzay ###################### |
---|
| 44 | #-Q- jeanzay ## JEANZAY IDRIS ## |
---|
| 45 | #-Q- jeanzay ###################### |
---|
| 46 | #-Q- jeanzay #SBATCH --job-name=MONITORING # Job Name |
---|
[1501] | 47 | #-Q- jeanzay #SBATCH --output=MONITORING.out_%J # standard output |
---|
| 48 | #-Q- jeanzay #SBATCH --error=MONITORING.out_%J # error output |
---|
[1498] | 49 | #-Q- jeanzay #SBATCH --ntasks=1 # Number of core |
---|
| 50 | #-Q- jeanzay #SBATCH --hint=nomultithread # 1 processus MPI par coeur physique (pas d'hyperthreading) |
---|
| 51 | #-Q- jeanzay #SBATCH --time=10:00:00 # Wall clock limit (seconds) |
---|
| 52 | #-Q- jeanzay #SBATCH --account ::default_project::@cpu |
---|
[1499] | 53 | #-Q- jeanzay #SBATCH --partition=prepost |
---|
[1498] | 54 | #-Q- jeanzay set +x |
---|
[770] | 55 | #-Q- ada #!/bin/ksh |
---|
| 56 | #-Q- ada ####################### |
---|
[929] | 57 | #-Q- ada ## ADA IDRIS ## |
---|
[770] | 58 | #-Q- ada ####################### |
---|
[1409] | 59 | #-Q- ada # @ job_type = mpich |
---|
[848] | 60 | #-Q- ada # @ requirements = (Feature == "prepost") |
---|
[770] | 61 | #-Q- ada # Temps Elapsed max. d'une requete hh:mm:ss |
---|
[982] | 62 | #-Q- ada # @ wall_clock_limit = 4:00:00 |
---|
[1414] | 63 | #-Q- ada # Memory required for ferret (_SEP _MAR variables) |
---|
| 64 | #-Q- ada # @ as_limit = 30Gb |
---|
[770] | 65 | #-Q- ada # Nom du travail LoadLeveler |
---|
| 66 | #-Q- ada # @ job_name = MONITORING |
---|
[837] | 67 | #-Q- ada # Fichier de sortie standard du travail |
---|
[770] | 68 | #-Q- ada # @ output = $(job_name).$(jobid) |
---|
| 69 | #-Q- ada # Fichier de sortie d'erreur du travail |
---|
| 70 | #-Q- ada # @ error = $(job_name).$(jobid) |
---|
| 71 | #-Q- ada # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) |
---|
| 72 | #-Q- ada # @ notification = error |
---|
[1290] | 73 | #-Q- ada # @ environment = $DEBUG_debug ; $BigBrother ; $postProcessingStopLevel ; $POST_DIR ; $Script_Post_Output ; $SUBMIT_DIR ; $libIGCM ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; wall_clock_limit=$(wall_clock_limit) |
---|
[770] | 74 | #-Q- ada # @ queue |
---|
[281] | 75 | #-Q- lxiv8 ###################### |
---|
| 76 | #-Q- lxiv8 ## OBELIX LSCE ## |
---|
| 77 | #-Q- lxiv8 ###################### |
---|
| 78 | #-Q- lxiv8 #PBS -N MONITORING |
---|
| 79 | #-Q- lxiv8 #PBS -m a |
---|
| 80 | #-Q- lxiv8 #PBS -j oe |
---|
| 81 | #-Q- lxiv8 #PBS -q medium |
---|
| 82 | #-Q- lxiv8 #PBS -o MONITORING.$$ |
---|
| 83 | #-Q- lxiv8 #PBS -S /bin/ksh |
---|
[1184] | 84 | #-Q- ifort_CICLAD ###################### |
---|
| 85 | #-Q- ifort_CICLAD ## CICLAD IPSL ## |
---|
| 86 | #-Q- ifort_CICLAD ###################### |
---|
| 87 | #-Q- ifort_CICLAD #PBS -N MONITORING |
---|
| 88 | #-Q- ifort_CICLAD #PBS -m a |
---|
| 89 | #-Q- ifort_CICLAD #PBS -j oe |
---|
| 90 | #-Q- ifort_CICLAD #PBS -q std |
---|
| 91 | #-Q- ifort_CICLAD #PBS -S /bin/ksh |
---|
[2] | 92 | #-Q- default #!/bin/ksh |
---|
| 93 | #-Q- default ################## |
---|
| 94 | #-Q- default ## DEFAULT HOST ## |
---|
| 95 | #-Q- default ################## |
---|
| 96 | |
---|
[373] | 97 | #************************************************************** |
---|
| 98 | # Author: Sebastien Denvil |
---|
| 99 | # Contact: Sebastien.Denvil__at__ipsl.jussieu.fr |
---|
| 100 | # $Revision:: $ Revision of last commit |
---|
| 101 | # $Author:: $ Author of last commit |
---|
| 102 | # $Date:: $ Date of last commit |
---|
[2] | 103 | # IPSL (2006) |
---|
| 104 | # This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC |
---|
[373] | 105 | # |
---|
| 106 | #************************************************************** |
---|
[2] | 107 | |
---|
[108] | 108 | #set -eu |
---|
| 109 | #set -vx |
---|
| 110 | |
---|
[2] | 111 | date |
---|
| 112 | |
---|
[770] | 113 | #-Q- ada export OMP_NUM_THREADS=1 |
---|
[2] | 114 | |
---|
[1356] | 115 | #D- Task type DO NOT CHANGE (computing, post-processing or checking) |
---|
[712] | 116 | TaskType=post-processing |
---|
| 117 | |
---|
[280] | 118 | ######################################################################## |
---|
| 119 | |
---|
| 120 | #D- Flag to determine if this job in a standalone mode |
---|
| 121 | #D- Default : value from AA_job if any |
---|
| 122 | StandAlone=${StandAlone:=true} |
---|
| 123 | |
---|
[554] | 124 | #D- Path to libIGCM |
---|
[280] | 125 | #D- Default : value from AA_job if any |
---|
[770] | 126 | # WARNING For StandAlone use : To run this script on some machine (ada and cesium) |
---|
[554] | 127 | # WARNING you must check MirrorlibIGCM variable in sys library. |
---|
| 128 | # WARNING If this variable is true, you must use libIGCM_POST path instead |
---|
| 129 | # WARNING of your running libIGCM directory. |
---|
[280] | 130 | libIGCM=${libIGCM:=::modipsl::/libIGCM} |
---|
| 131 | |
---|
[334] | 132 | #D- Increased verbosity (1, 2, 3) |
---|
| 133 | #D- Default : value from AA_job if any |
---|
| 134 | Verbosity=${Verbosity:=3} |
---|
| 135 | |
---|
| 136 | #D- Low level debug : to bypass lib test checks and stack construction |
---|
| 137 | #D- Default : value from AA_job if any |
---|
| 138 | DEBUG_debug=${DEBUG_debug:=false} |
---|
| 139 | |
---|
| 140 | #D- TEMPORARY Flag to determine atmospheric resolution |
---|
| 141 | #D- Default : value from atmospheric driver if any |
---|
| 142 | RESOL_ATM=${RESOL_ATM:=ALL} |
---|
| 143 | |
---|
| 144 | #D- Flag to determine surface resolution |
---|
| 145 | #D- Default : value from surface driver if any |
---|
| 146 | RESOL_SRF=${RESOL_SRF:=ALL} |
---|
| 147 | |
---|
| 148 | #D- Flag to determine surface resolution |
---|
| 149 | #D- Default : value from surface driver if any |
---|
| 150 | RESOL_SBG=${RESOL_SBG:=ALL} |
---|
| 151 | |
---|
| 152 | #D- TEMPORARY Flag to determine ocean resolution |
---|
| 153 | #D- Default : value from ocean driver if any |
---|
| 154 | RESOL_OCE=${RESOL_OCE:=ORCA2} |
---|
| 155 | |
---|
| 156 | #D- TEMPORARY Flag to determine ice resolution |
---|
| 157 | #D- Default : value from ice driver if any |
---|
[1326] | 158 | RESOL_ICE=${RESOL_OCE:=ORCA2} |
---|
[334] | 159 | |
---|
| 160 | #D- TEMPORARY Flag to determine marine biogeochemistry resolution |
---|
| 161 | #D- Default : value from ice driver if any |
---|
[1326] | 162 | RESOL_MBG=${RESOL_OCE:=ORCA2} |
---|
[334] | 163 | |
---|
[2] | 164 | ###################################################################### |
---|
| 165 | |
---|
[108] | 166 | . ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh |
---|
| 167 | . ${libIGCM}/libIGCM_card/libIGCM_card.ksh |
---|
| 168 | . ${libIGCM}/libIGCM_date/libIGCM_date.ksh |
---|
| 169 | #------- |
---|
| 170 | . ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh |
---|
[731] | 171 | . ${libIGCM}/libIGCM_config/libIGCM_config.ksh |
---|
[832] | 172 | #------- |
---|
[1192] | 173 | RUN_DIR=${RUN_DIR_PATH} |
---|
| 174 | IGCM_sys_MkdirWork ${RUN_DIR} |
---|
| 175 | IGCM_sys_Cd ${RUN_DIR} |
---|
| 176 | #------- |
---|
[832] | 177 | ( ${DEBUG_debug} ) && IGCM_debug_Check |
---|
| 178 | ( ${DEBUG_debug} ) && IGCM_card_Check |
---|
| 179 | ( ${DEBUG_debug} ) && IGCM_date_Check |
---|
[2] | 180 | |
---|
| 181 | ###################################################################### |
---|
| 182 | |
---|
[901] | 183 | #set -vx |
---|
[2] | 184 | |
---|
[436] | 185 | # ------------------------------------------------------------------ |
---|
| 186 | # Test if all was right before proceeding further |
---|
| 187 | # ------------------------------------------------------------------ |
---|
[1206] | 188 | IGCM_debug_Verif_Exit |
---|
[436] | 189 | |
---|
[2] | 190 | if [ ${StandAlone} = true ] ; then |
---|
[785] | 191 | CARD_DIR=${SUBMIT_DIR} |
---|
[2] | 192 | else |
---|
[785] | 193 | CARD_DIR=${RUN_DIR} |
---|
| 194 | IGCM_sys_Get_Master ${SUBMIT_DIR}/config.card ${RUN_DIR_PATH} |
---|
| 195 | IGCM_sys_Get_Master ${SUBMIT_DIR}/run.card ${RUN_DIR_PATH} |
---|
| 196 | IGCM_sys_Get_Master ${SUBMIT_DIR}/COMP ${RUN_DIR_PATH} |
---|
| 197 | IGCM_sys_Get_Master ${SUBMIT_DIR}/POST ${RUN_DIR_PATH} |
---|
[2] | 198 | fi |
---|
| 199 | |
---|
[727] | 200 | #================================== |
---|
[2] | 201 | # First of all |
---|
| 202 | # |
---|
[727] | 203 | # Read libIGCM compatibility version in config.card |
---|
| 204 | # Read UserChoices section |
---|
| 205 | # Read Ensemble section |
---|
| 206 | # Read Post section |
---|
| 207 | # Define all netcdf output directories |
---|
| 208 | #================================== |
---|
| 209 | IGCM_config_CommonConfiguration ${CARD_DIR}/config.card |
---|
[658] | 210 | |
---|
[1198] | 211 | # ------------------------------------------------------------------ |
---|
| 212 | # Activate BigBrother so as to supervise this job |
---|
| 213 | # ------------------------------------------------------------------ |
---|
| 214 | IGCM_debug_BigBro_Initialize |
---|
| 215 | |
---|
[263] | 216 | #================================== |
---|
[727] | 217 | # Read ListOfComponents section: |
---|
| 218 | IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents |
---|
[591] | 219 | |
---|
[727] | 220 | # Create R_FIGR that has been defined by IGCM_config_CommonConfiguration |
---|
[591] | 221 | IGCM_sys_MkdirArchive ${R_FIGR} |
---|
[102] | 222 | # |
---|
[591] | 223 | IGCM_sys_TestDirArchive ${R_FIGR}/MONITORING |
---|
[102] | 224 | if [ $? = 0 ] ; then |
---|
[785] | 225 | IGCM_debug_Print 1 "Get MONITORING directory from archive" |
---|
| 226 | IGCM_sys_Get_Dir ${R_FIGR}/MONITORING ${RUN_DIR} |
---|
[102] | 227 | else |
---|
[785] | 228 | IGCM_debug_Print 1 "MONITORING first pass. Nothing has been done before" |
---|
[102] | 229 | fi |
---|
[2] | 230 | # -------------------------------------------- |
---|
[901] | 231 | # Insert your commands between III...III lines |
---|
[2] | 232 | # and precise produced directories to save |
---|
| 233 | # IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII |
---|
| 234 | |
---|
| 235 | for comp in ${config_ListOfComponents[*]} ; do |
---|
[785] | 236 | IGCM_debug_Print 1 "################## Component: ${comp} ######################" |
---|
| 237 | liste_file_monitoring="" |
---|
| 238 | IGCM_card_DefineArrayFromOption ${CARD_DIR}/config.card ListOfComponents ${comp} |
---|
| 239 | eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 |
---|
[181] | 240 | |
---|
[785] | 241 | PATH_monitoring_file="" |
---|
| 242 | eval monitoring_file=monitoring01_${compname}_\${RESOL_${comp}}.cfg > /dev/null 2>&1 |
---|
[1326] | 243 | if [[ -d ${CARD_DIR}/POST && -f ${CARD_DIR}/POST/${monitoring_file} ]] ; then |
---|
| 244 | PATH_monitoring_file=${CARD_DIR}/POST/${monitoring_file} |
---|
[1329] | 245 | elif [[ -d ${CARD_DIR}/POST && -f ${CARD_DIR}/POST/monitoring01_${compname}.cfg ]] ; then |
---|
[785] | 246 | PATH_monitoring_file=${CARD_DIR}/POST/monitoring01_${compname}.cfg |
---|
| 247 | elif [ -f ${FER_ATLAS}/${monitoring_file} ] ; then |
---|
| 248 | PATH_monitoring_file=${FER_ATLAS}/${monitoring_file} |
---|
| 249 | else |
---|
| 250 | IGCM_debug_Print 1 "No monitoring file found for this component. Was expecting ${monitoring_file}" |
---|
| 251 | IGCM_debug_Print 1 "Step to next component" |
---|
| 252 | continue |
---|
| 253 | fi |
---|
| 254 | # |
---|
| 255 | if [ X${PATH_monitoring_file} != X"" ] ; then |
---|
| 256 | IGCM_debug_Print 1 "Monitoring file used : ${PATH_monitoring_file}" |
---|
[901] | 257 | IGCM_debug_Print 1 "Determine which frequency of time series to be used." |
---|
| 258 | |
---|
| 259 | FreqTS=$( grep FreqTS ${PATH_monitoring_file} | grep -v \# | awk -F "=" '{print $2}' ) |
---|
| 260 | if [ X${FreqTS} = X ] ; then |
---|
| 261 | # Default frequency is MO |
---|
| 262 | FreqTS=MO |
---|
| 263 | fi |
---|
| 264 | |
---|
| 265 | IGCM_debug_Print 1 "Times series frequency to be used is ${FreqTS}" |
---|
[785] | 266 | IGCM_debug_Print 1 "Determine which files we need." |
---|
[901] | 267 | . monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive_NoError ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_${FreqTS} |
---|
| 268 | liste_file_monitoring=$( . monitoring01 -q -l2 --listcommand 'IGCM_sys_RshArchive_NoError ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_${FreqTS} ) |
---|
[785] | 269 | fi |
---|
| 270 | # |
---|
| 271 | if [ ! "X${liste_file_monitoring}" = X ] ; then |
---|
| 272 | IGCM_sys_Get /l liste_file_monitoring ${RUN_DIR} |
---|
| 273 | IGCM_debug_Print 1 "monitoring01 -c ${CARD_DIR} -p ${comp} --time -t \"${config_UserChoices_JobName} monitoring\" -o ${RUN_DIR}/MONITORING ${PATH_monitoring_file} ." |
---|
| 274 | IGCM_debug_Print 1 "monitoring01 starts ................................................." |
---|
| 275 | monitoring01 -c ${CARD_DIR} -p ${comp} --time -t "${config_UserChoices_JobName} monitoring" -o ${RUN_DIR}/MONITORING ${PATH_monitoring_file} . |
---|
| 276 | else |
---|
| 277 | IGCM_debug_Print 1 "No time series detected by this command :" |
---|
[901] | 278 | IGCM_debug_Print 1 "monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive_NoError ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_${FreqTS}" |
---|
| 279 | . monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive_NoError ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_${FreqTS} |
---|
[785] | 280 | fi |
---|
[1333] | 281 | |
---|
| 282 | # Now do cleaning before starting with next component |
---|
| 283 | rm -f ${RUN_DIR}/*nc |
---|
| 284 | |
---|
[2] | 285 | done |
---|
| 286 | |
---|
| 287 | # IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII |
---|
| 288 | |
---|
| 289 | # Save files |
---|
[587] | 290 | IGCM_sys_Put_Dir MONITORING ${R_FIGR} |
---|
[2] | 291 | |
---|
| 292 | # Dods copy |
---|
[903] | 293 | if [ X${config_Post_DodsCopy} = XTRUE ] ; then |
---|
| 294 | IGCM_sys_Put_Dods MONITORING |
---|
| 295 | fi |
---|
[203] | 296 | |
---|
[590] | 297 | # Clean RUN_DIR_PATH (necessary for cesium and titane only) |
---|
[203] | 298 | IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} |
---|
[1198] | 299 | |
---|
| 300 | # ------------------------------------------------------------------ |
---|
| 301 | # Finalize BigBrother to inform that the jobs end |
---|
| 302 | # ------------------------------------------------------------------ |
---|
| 303 | IGCM_debug_BigBro_Finalize |
---|