Changeset 815
- Timestamp:
- 03/05/13 17:26:49 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_job
r809 r815 76 76 #-Q- default ## DEFAULT HOST ## 77 77 #-Q- default ################## 78 #-Q- default #For MPI use, uncomment next line : 78 #-Q- default #For MPI use, uncomment next line : 79 79 #-Q- default #BATCH_NUM_PROC_TOT=::JobNumProcTot:: 80 80 … … 101 101 102 102 #D--------------------------------------------------------------------== 103 #D--------------------------------------------------------------------==104 103 #D- 105 104 #D- Job to launch IGCM models 106 105 #D- 107 #D--------------------------------------------------------------------==108 106 #D--------------------------------------------------------------------== 109 107 #D- … … 112 110 libIGCM=${MODIPSL}/libIGCM 113 111 112 #D--------------------------------------------------------------------== 113 #D- -1. PLACE FOR USER MODIFICATION 114 #D- - Job Verbosity 115 #D- - PeriodNb 116 #D- - Experience type : DEB(ug), DEV(elopment), RUN 117 #D--------------------------------------------------------------------== 118 114 119 #D- Task type (computing or post-processing) 115 TaskType=computing 116 117 #D--------------------------------------------------------------------== 118 #D- -1. User modification place 119 #D- - Job Verbosity 120 #D- - PeriodNb 121 #D- - Experience type : DEB(ug), DEV(elopment), RUN 122 #D--------------------------------------------------------------------== 123 120 TaskType=computing 124 121 #D- Increased verbosity (1, 2, 3) 125 122 Verbosity=3 … … 131 128 132 129 #D- 133 # --------------------------------------------------------------------------------------------------#134 #D- ! O ptionnal features /!\ Use with care !#135 # --------------------------------------------------------------------------------------------------#130 #D- --------------------------------------------------------------------------------------------------# 131 #D- ! OPTIONNAL FEATURES /!\ USE WITH CARE ! # 132 #D- --------------------------------------------------------------------------------------------------# 136 133 137 134 138 135 #D- Low level debug : to bypass lib test checks and stack construction 139 136 #D- Default=true 137 #D- 140 138 DEBUG_debug=false 141 139 142 140 #D- Set DEBUG_sys to false to disable output calls of function 143 141 #D- Default=true 142 #D- 144 143 #DEBUG_sys=false 145 144 146 145 #D- Define running directory 147 146 #D- Default=${TMPDIR} ie temporary batch directory 147 #D- 148 148 #RUN_DIR_PATH=/workdir/or/scratchdir/of/this/machine 149 149 150 150 #D- Define submit directory 151 151 #D- Default= where you launch qsub (variable from scheduler) 152 #D- 152 153 #SUBMIT_DIR=$( pwd ) 153 154 154 155 #D- Define input file root directory 155 156 #D- Default=/IGCMG/common/account/of/this/machine 157 #D- 156 158 #R_IN=/u/rech/por/rpor111/DATA 157 159 158 160 #D- Turn in dry run mode ? (0,1,2,3) 159 161 #D- Default=0 162 #D- 160 163 #DRYRUN=3 161 # YOU HAVE TO COMPILE YOUR EXE FILES to USE DRYRUN MODE !162 # -------------------------------------------------------------------------------------163 # | DRYRUN= | Date computations, | sys_Get | Exe | sys_Put_Out; sys_Put_Rest |164 # | | Cp/Exe/param/files | | | |165 # | | Chmod Qsub | | | |166 # -------------------------------------------------------------------------------------167 # | 0 | yes | yes | yes | yes |168 # -------------------------------------------------------------------------------------169 # | 1 | yes | yes | yes | no |170 # -------------------------------------------------------------------------------------171 # | 2 | yes | yes | no | no |172 # -------------------------------------------------------------------------------------173 # | 3 | yes | no | no | no |174 # -------------------------------------------------------------------------------------164 #D-# YOU HAVE TO COMPILE YOUR EXE FILES to USE DRYRUN MODE ! 165 #D-# ------------------------------------------------------------------------------------- 166 #D-# | DRYRUN= | Date computations, | sys_Get | Exe | sys_Put_Out; sys_Put_Rest | 167 #D-# | | Cp/Exe/param/files | | | | 168 #D-# | | Chmod Qsub | | | | 169 #D-# ------------------------------------------------------------------------------------- 170 #D-# | 0 | yes | yes | yes | yes | 171 #D-# ------------------------------------------------------------------------------------- 172 #D-# | 1 | yes | yes | yes | no | 173 #D-# ------------------------------------------------------------------------------------- 174 #D-# | 2 | yes | yes | no | no | 175 #D-# ------------------------------------------------------------------------------------- 176 #D-# | 3 | yes | no | no | no | 177 #D-# ------------------------------------------------------------------------------------- 175 178 176 179 #D- 177 180 # --------------------------------------------------------------------------------------------------# 178 #D- ! E nd of optionnal features /!\ Do not modify anything below unless you know what you are doing#181 #D- ! END OF OPTIONNAL FEATURES /!\ DO NOT MODIFY ANYTHING BELOW UNLESS YOU KNOW WHAT YOU ARE DOING # 179 182 # --------------------------------------------------------------------------------------------------# 180 183 181 184 #D- 182 185 #D--------------------------------------------------------------------== 183 #D- 0. System Environment184 #D- 185 #D- 186 #D- 187 #D- 188 #D- 189 #D--------------------------------------------------------------------== 190 191 # D--------------------------------------------------------------------==186 #D- 0. SYSTEM ENVIRONMENT 187 #D- - Define variables for Number of processors 188 #D- - Define MPI variables 189 #D- - Define batch scheduler variables 190 #D- - Source IGCM Library 191 #D- - Get RESOLution in .resol file (temporary) 192 #D--------------------------------------------------------------------== 193 194 #---------------------------------------------------------------------== 192 195 193 196 . ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh 194 197 ( ${DEBUG_debug} ) && IGCM_debug_Check 195 198 . ${libIGCM}/libIGCM_card/libIGCM_card.ksh 196 199 ( ${DEBUG_debug} ) && IGCM_card_Check 197 200 . ${libIGCM}/libIGCM_date/libIGCM_date.ksh 198 201 ( ${DEBUG_debug} ) && IGCM_date_Check 199 202 #------- 200 203 . ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh … … 203 206 . ${libIGCM}/libIGCM_post/libIGCM_post.ksh 204 207 205 # D--------------------------------------------------------------------==208 #--------------------------------------------------------------------== 206 209 207 210 #-- Resolution FLAG for oasis input … … 210 213 #-- Chemistrie FLAG to ease chemistries configurations management 211 214 #CHEM="AER" 212 [ -f ${SUBMIT_DIR}/../.chimie ] && eval $(grep CHEM ${SUBMIT_DIR}/../.chimie) 213 214 #D- 215 #D--------------------------------------------------------------------== 216 #D- 1. INITIALIZE CONFIGURATION AND THEN COMPONENTS 217 #D--------------------------------------------------------------------== 215 [ -f ${SUBMIT_DIR}/../.chimie ] && eval $(grep CHEM ${SUBMIT_DIR}/../.chimie) 216 217 #D- 218 #D--------------------------------------------------------------------== 219 #D- 1. INITIALIZE CONFIGURATION 220 #D- - Simulation configuration 221 #D- - Simulation parameters 222 #D- - Execution parameter 223 #D- - Define input files directory 224 #D- - Read or initialize CumulPeriod 225 #D- - run.card 226 #D---------------------------------------------------------------------== 227 IGCM_config_Initialize 218 228 219 229 # --------------------------------------------------------------------== 220 #D- Initialize configuration : 221 #D- - Simulation configuration 222 #D- - Simulation parameters 223 #D- - Execution parameter 224 #D- - Define input files directory 225 #D- - Read or initialize CumulPeriod 226 #D- - run.card 227 #D- 228 # --------------------------------------------------------------------== 229 IGCM_config_Initialize 230 231 # --------------------------------------------------------------------== 232 #D- Define, create and cd RUN_DIR 233 #D- 230 # Define, create and cd RUN_DIR 234 231 # --------------------------------------------------------------------== 235 232 RUN_DIR=${RUN_DIR_PATH}/${config_UserChoices_JobName}.${$} … … 242 239 IGCM_debug_Verif_Exit 243 240 244 # --------------------------------------------------------------------== 245 #D- Initialize each components taking part 246 #D- into simulation configuration : 247 #D- - Define component executable 248 #D- - Define Write Frequency by component "1M" "1D" ... 249 #D- - Source ${comp}.driver 250 #D- - Define Storage Places by component 251 #D- - ${comp}_Initialize : 252 #D- - Patterns to sed 253 #D- - Variables from namelist 254 #D- 255 # --------------------------------------------------------------------== 241 #D- 242 #D---------------------------------------------------------------------== 243 #D- 2. INITIALIZE ALL COMPONENT OF THE CONFIGURATION 244 #D- - Define component executable 245 #D- - Define Write Frequency by component "1M" "1D" ... 246 #D- - Source ${comp}.driver 247 #D- - Define Storage Places by component 248 #D- - ${comp}_Initialize : 249 #D- - Patterns to sed 250 #D- - Variables from namelist 251 #D---------------------------------------------------------------------== 256 252 IGCM_comp_Initialize 257 253 258 # --------------------------------------------------------------------== 259 #D- Verify compatibility of period length, write frequencies, ... 260 #D- Verify compatibility of rebuild choices and post-process choices 261 #D- Will stop here if something is wrong 262 # --------------------------------------------------------------------== 254 #D- 255 #D---------------------------------------------------------------------== 256 #D- 3. PERFORM GENERAL VERIFICATION 257 #D- - Verify compatibility of period length, write frequencies, ... 258 #D- - Verify compatibility of rebuild choices and post-process choices 259 #D- - Will stop here if something is wrong 260 #D---------------------------------------------------------------------== 263 261 IGCM_config_Check 264 262 265 263 # ------------------------------------------------------------------ 266 # D-Test if all was right before entering the period loop264 # Test if all was right before entering the period loop 267 265 # ------------------------------------------------------------------ 268 266 IGCM_debug_Verif_Exit 269 267 270 #D- -------------------------------------------------------------------==271 #D- 2. ENTER THE DEEP EXECUTION LOOP272 #D- !!!! FASTEN YOUR SEAT BELTS !!!!273 #D- !!!!! PLEASE. !!!!274 #D- !! WE WILL CROSS TURBULENCES. !!275 #D-------------------------------------------------------------------- ==268 #D- 269 #D---------------------------------------------------------------------== 270 #D- 4. ENTER THE DEEP EXECUTION LOOP 271 #D- ! FASTEN YOUR SEAT BELTS PLEASE. ! 272 #D- ! WE WILL CROSS TURBULENCES. ! 273 #D---------------------------------------------------------------------== 276 274 277 275 Period=1 … … 279 277 PeriodContinue=false 280 278 if [ ${Period} -le ${PeriodNb} ]; then 281 279 PeriodContinue=true 282 280 fi 283 281 while ( ${PeriodContinue} ) ; do … … 288 286 #D- 289 287 # ------------------------------------------------------------------ 290 #D- COMPUTE AND DEFINE DATE STUFF. 288 #D- 4.1 COMPUTE AND DEFINE DATE INFORMATION. 289 #D- - ${PeriodDateBegin} 290 #D- - ${PeriodDateEnd} 291 #D- - ${CumulPeriod} 292 #D- - ${DatesPeriod}=${PeriodDateBegin}_${PeriodDateEnd} 293 #D- - ${PeriodLength} => JOURS=31 , 28, 29, 30 ; MOIS=0 ; ANS=0 294 #D- - update run.card value 291 295 # ------------------------------------------------------------------ 292 296 IGCM_config_PeriodStart 293 #D- => ${PeriodDateBegin} 294 #D- => ${PeriodDateEnd} 295 #D- => ${CumulPeriod} 296 #D- => ${DatesPeriod}=${PeriodDateBegin}_${PeriodDateEnd} 297 #D- => ${PeriodLength} => JOURS=31 , 28, 29, 30 ; MOIS=0 ; ANS=0 298 #D- => update run.card value 299 300 #D- 301 # ------------------------------------------------------------------ 302 #D- BEGIN COMPUTATION ONLY IF NEEDED 297 298 #D- 299 # ------------------------------------------------------------------ 300 #D- 4.2 BEGIN COMPUTATION ONLY IF NEEDED 303 301 # ------------------------------------------------------------------ 304 302 if [ ${SimulationLengthInDays} -gt ${ExperienceLengthInDays} ] ; then … … 309 307 #D- 310 308 # ------------------------------------------------------------------ 311 #D- Optionnal function in driver312 #D- to set special variables used in forwardlists (Param, Init or Bc).309 #D- 4.3 CALL OPTIONNAL FUNCTION WITHIN DRIVER 310 #D- - to set special variables used in lists (Param, Init or Bc). 313 311 # ------------------------------------------------------------------ 314 312 IGCM_comp_PeriodStart … … 316 314 #D- 317 315 # ------------------------------------------------------------------ 318 #D- Get parameters text files updated by job (.def, namelist ...) 319 #D- READ AND USE BY GCM AT EACH EXECUTION. 316 #D- 4.4 GET PARAMETERS TEXT FILES UPDATED BY JOB 317 #D- - (.def, namelist ...) 318 #D- - READ AND USE BY GCM AT EACH EXECUTION. 320 319 # ------------------------------------------------------------------ 321 320 IGCM_comp_GetInputParametersFiles … … 323 322 #D- 324 323 # ------------------------------------------------------------------ 325 #D- Get initial state (Etat0, carteveg,relief...) 326 #D- NECESSARY ONLY IF CumulPeriod= (=> NUMERO) == 1 327 #D- AND ???_Restart=NO 328 #D- READ AND USE BY GCM FOR ONLY ONE EXECUTION. 324 #D- 4.5 GET INITIAL STATE 325 #D- - (Etat0, carteveg,relief...) 326 #D- - NECESSARY ONLY IF CumulPeriod= (=> NUMERO) == 1 327 #D- - AND ???_Restart=NO 328 #D- - READ AND USE BY GCM FOR ONLY ONE EXECUTION. 329 329 # ------------------------------------------------------------------ 330 330 IGCM_comp_GetInputInitialStateFiles … … 332 332 #D- 333 333 # ------------------------------------------------------------------ 334 #D- Get Boundaries Conditions (SST, WIND[X,Y,Z], LAI ...) 335 #D- READ AND USE BY GCM AT EACH EXECUTION. 334 #D- 4.6 GET BOUNDARIES CONDITIONS 335 #D- - (SST, WIND[X,Y,Z], LAI ...) 336 #D- - READ AND USE BY GCM AT EACH EXECUTION. 336 337 # ------------------------------------------------------------------ 337 338 IGCM_comp_GetInputBoundaryFiles … … 339 340 #D- 340 341 # ------------------------------------------------------------------ 341 #D- Get SmoothFiles Conditions (SST, WIND[X,Y,Z], LAI ...) 342 #D- READ AND USE BY GCM AT EACH EXECUTION but varying in time 343 # ------------------------------------------------------------------ 344 IGCM_comp_GetInputSmoothFiles 345 346 #D- 347 # ------------------------------------------------------------------ 348 #D- Get restart files (restartphy.nc, orca_restart.nc ...) 349 #D- READ AND USE BY GCM AT EACH EXECUTION. 350 #D- 351 #D- IF A COMPONENT DO NOT RESTART FROM PREVIOULSY COMPUTED RESTART 352 #D- ONLY IF CumulPeriod= (=> NUMERO) == 1 353 #D- MUST EXECUTE CREATE ETAT0_LIMIT (TYPICALLY LMDZ AND ./create_etat0_limit.e) 354 #D- 355 #D- IF CumulPeriod == 1 356 #D- AND A COMPONENT RESTART FROM PREVIOULSY COMPUTED RESTART 357 #D- MUST BRING THIS RESTART IN ${RUN_DIR_PATH} 358 #D- 359 #D- ELSE BRING RESTART FROM ${JobName} IN ${RUN_DIR_PATH} 342 #D- 4.7 GET SmoothFiles CONDITIONS 343 #D- - (SST, WIND[X,Y,Z], LAI ...) 344 #D- - READ AND USE BY GCM AT EACH EXECUTION 345 #D- - Do not change at each ${Period} 346 # ------------------------------------------------------------------ 347 IGCM_comp_GetInputSmoothFiles 348 349 #D- 350 # ------------------------------------------------------------------ 351 #D- 4.8 GET RESTART FILES 352 #D- - (restartphy.nc, orca_restart.nc ...) 353 #D- - READ AND USE BY GCM AT EACH EXECUTION. 354 #D- 355 #D- - IF A COMPONENT DO NOT RESTART FROM PREVIOULSY COMPUTED RESTART 356 #D- - ONLY IF CumulPeriod= (=> NUMERO) == 1 357 #D- - MUST EXECUTE CREATE ETAT0_LIMIT (TYPICALLY LMDZ AND ./create_etat0_limit.e) 358 #D- 359 #D- - IF CumulPeriod == 1 360 #D- - AND A COMPONENT RESTART FROM PREVIOULSY COMPUTED RESTART 361 #D- - MUST BRING THIS RESTART IN ${RUN_DIR_PATH} 362 #D- 363 #D- - ELSE BRING RESTART FROM ${JobName} IN ${RUN_DIR_PATH} 360 364 # ------------------------------------------------------------------ 361 365 IGCM_comp_GetInputRestartFiles 362 366 363 #D- 364 # ------------------------------------------------------------------ 365 #D- Test if all was right before Update 367 # ------------------------------------------------------------------ 368 # Test if all was right before Update 366 369 # ------------------------------------------------------------------ 367 370 IGCM_debug_Verif_Exit 368 371 369 # ------------------------------------------------------------------ 370 #D- Activate running environnement variables 372 #D- 373 # ------------------------------------------------------------------ 374 #D- 4.9 ACTIVATE RUNNING ENVIRONNEMENT VARIABLES 371 375 # ------------------------------------------------------------------ 372 376 IGCM_sys_activ_variables … … 374 378 #D- 375 379 # ------------------------------------------------------------------ 376 #D- UPDATE ParametersFiles (.def, namelist ...) with 377 #D- current value of (ORCA_NIT00, ORCA_LRSTAR, RAZ_DATE, ...) 380 #D- 4.10 UPDATE ParametersFiles 381 #D- - (.def, namelist ...) 382 #D- - with current value of (ORCA_NIT00, ORCA_LRSTAR, RAZ_DATE, ...) 378 383 # ------------------------------------------------------------------ 379 384 IGCM_comp_Update 380 385 381 #D- 382 # ------------------------------------------------------------------ 383 #D- Test if all was right before execution 386 # ------------------------------------------------------------------ 387 # Test if all was right before execution 384 388 # ------------------------------------------------------------------ 385 389 IGCM_debug_Verif_Exit 386 390 387 391 #D- 388 #D---------------------------------------------------------------- ==389 #D- 3. Execution390 #D---------------------------------------------------------------- ==392 #D---------------------------------------------------------------------== 393 #D- 5. EXECUTION 394 #D---------------------------------------------------------------------== 391 395 392 396 echo … … 439 443 440 444 #D- 441 # ------------------------------------------------------------------ 442 #D- Desactivate running environnement variables 445 #D---------------------------------------------------------------------== 446 #D- 6. POST EXECUTION OPERATIONS 447 #D---------------------------------------------------------------------== 448 449 #D- 450 # ------------------------------------------------------------------ 451 #D- 6.1. DESACTIVATE RUNNING ENVIRONNEMENT VARIABLES 443 452 # ------------------------------------------------------------------ 444 453 IGCM_sys_desactiv_variables 445 454 446 455 #D- 447 #D----------------------------------------------------------------== 448 #D- 4. Post execution operations 449 #D----------------------------------------------------------------== 450 451 #D- 452 # ------------------------------------------------------------------ 453 #D- Save on archive machine netcdf outputs, restarts 454 #D- and text files of models 456 # ------------------------------------------------------------------ 457 #D- 6.2. SAVE OUTPUTS 458 #D- - On archive/storage machine 459 #D- - netcdf outputs, restarts and text files of models 455 460 # ------------------------------------------------------------------ 456 461 IGCM_comp_Finalize 457 462 458 #D- 459 # ------------------------------------------------------------------ 460 #D- Test if all was right after Finalize 463 # ------------------------------------------------------------------ 464 # Test if all was right after Finalize 461 465 # ------------------------------------------------------------------ 462 466 IGCM_debug_Verif_Exit … … 464 468 #D- 465 469 # ------------------------------------------------------------------ 466 #D- Configure asynchronous post-treatment (Level 0) when necessary (rebuild) 467 #D- Configure classic post-treatment (Level 1) when necessary (TimeSeries/Seasonal) 470 #D- 6.3. CONFIGURE POST-PROCESSING 471 #D- - asynchronous post-treatment (Level 0) when necessary (rebuild/pack) 472 #D- - classic post-treatment (Level 1) when necessary (TimeSeries/Seasonal) 468 473 # ------------------------------------------------------------------ 469 474 IGCM_post_Configure … … 471 476 #D- 472 477 # ------------------------------------------------------------------ 473 #D- Launch remote rebuild or/and post-treatment process if necessary 478 #D- 6.4. SUBMIT POST-PROCESSING 479 #D- - remote rebuild or/and post-treatment process if necessary 474 480 # ------------------------------------------------------------------ 475 481 IGCM_post_Submit … … 477 483 #D- 478 484 # ------------------------------------------------------------------ 479 #D- Save job output480 #D- Manage executable size to save only different binary481 #D- Write in run.card user, system and elapse time482 #D- Check that everything went well ! No ? then we stop.483 #D- Determine next computed period485 #D- 6.5. FINALYZE CURRENT LOOP AND PREPARE NEXT ONE 486 #D- - Manage executable size to save only different binary 487 #D- - Write in run.card user, system and elapse time 488 #D- - Check that everything went well ! No ? then we stop. 489 #D- - Determine next computed period 484 490 # ------------------------------------------------------------------ 485 491 IGCM_config_PeriodEnd … … 500 506 501 507 #D- 502 #D-------------------------------------------------------------------- ==503 #D- 5. Submit next job or send mail if simulation over.504 #D-------------------------------------------------------------------- ==508 #D---------------------------------------------------------------------== 509 #D- 7. SUBMIT NEXT JOB OR SEND MAIL IF SIMULATION IS OVER. 510 #D---------------------------------------------------------------------== 505 511 IGCM_config_Finalize 506 512
Note: See TracChangeset
for help on using the changeset viewer.