Changeset 380 for trunk/libIGCM/libIGCM_config
- Timestamp:
- 11/09/10 16:02:49 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_config/libIGCM_config.ksh
r373 r380 269 269 IGCM_debug_Print 1 "Number of years for PeriodLength : ${PeriodLengthInYears}" 270 270 PeriodLengthInDays=0 271 typeset i272 271 i=0 273 272 until [ $i -ge $PeriodLengthInYears ] ; do … … 280 279 IGCM_debug_Print 1 "Number of months for PeriodLength : ${PeriodLengthInMonths}" 281 280 PeriodLengthInDays=0 282 typeset i283 281 i=0 284 282 until [ $i -ge $PeriodLengthInMonths ] ; do … … 300 298 301 299 IGCM_debug_PopStack "IGCM_config_Analyse_PeriodLength" 302 300 } 301 302 #=================================== 303 function IGCM_config_Check 304 { 305 IGCM_debug_PushStack "IGCM_config_Check" 306 307 # If one of the following modulo is not zero : 308 # we will issue an error then explain and exit in 309 # AA_job IGCM_debug_Verif_Exit call before binary submission 310 311 echo 312 IGCM_debug_Print 1 "IGCM_config_Check :" 313 echo 314 315 if ( [ ! X${config_Post_RebuildFrequency} = X${NULL_STR} ] || [ ! X${config_Post_RebuildFrequency} = XNONE ] ) ; then 316 AsynchronousRebuild=true 317 IGCM_debug_Print 1 "Asynchronous rebuild has been activated." 318 echo 319 # modulo (RebuildFrequency and PeriodLength/TimeSeriesFrequency/SeasonalFrequency) must be zero 320 IGCM_post_CheckModuloFrequency config_Post_RebuildFrequency config_UserChoices_PeriodLength 321 IGCM_post_CheckModuloFrequency config_Post_TimeSeriesFrequency config_Post_RebuildFrequency 322 IGCM_post_CheckModuloFrequency config_Post_SeasonalFrequency config_Post_RebuildFrequency 323 else 324 AsynchronousRebuild=false 325 IGCM_debug_Print 1 "Asynchronous rebuild has not been activated" 326 IGCM_debug_Print 1 "Proceed with standard post-treatment pathway" 327 echo 328 #modulo (TimeSeriesFrequency/SeasonalFrequency and PeriodLenght) must be zero 329 IGCM_post_CheckModuloFrequency config_Post_TimeSeriesFrequency config_UserChoices_PeriodLength 330 IGCM_post_CheckModuloFrequency config_Post_SeasonalFrequency config_UserChoices_PeriodLength 331 fi 332 333 IGCM_debug_PopStack "IGCM_config_Check" 303 334 } 304 335 … … 435 466 if [ ${DRYRUN} -le 0 ] ; then 436 467 if ( IGCM_sys_TestFileArchive ${R_OUT_KSH}/${PREFIX}_${Exe_Output} ) ; then 437 IGCM_debug_Exit "IGCM_config_PeriodStart" " RErunan old job."468 IGCM_debug_Exit "IGCM_config_PeriodStart" "You are currently RErunning an old job." 438 469 IGCM_debug_Print 1 "Because of readonly permissions, you can't RErun a job when saved files" 439 470 IGCM_debug_Print 1 " are still in the ARCHIVE directory. You must deleted those files, or " 440 IGCM_debug_Print 1 " the whole ${R_SAVE} tree." 471 IGCM_debug_Print 1 " the whole ${R_SAVE} tree. See clean_month.job in ${libIGCM} directory." 472 IGCM_debug_Print 1 " This exit has been initiated because at least ${R_OUT_KSH}/${PREFIX}_${Exe_Output} exists." 441 473 IGCM_debug_Verif_Exit 442 474 fi … … 476 508 #==================================# 477 509 478 typeset i479 480 481 run_Log_LastExeSize=""482 for comp in ${config_ListOfComponents[*]} ; do483 484 485 done486 487 IGCM_card_DefineArrayFromOption ${SUBMIT_DIR}/run.card Log LastExeSize488 489 510 if [ ${DRYRUN} -le 1 ] ; then 511 (( i=0 )) 512 if ( ${FirstInitialize} ) ; then 513 run_Log_LastExeSize="" 514 for comp in ${config_ListOfComponents[*]} ; do 515 run_Log_LastExeSize[$i]=0 516 (( i=i+1 )) 517 done 518 else 519 IGCM_card_DefineArrayFromOption ${SUBMIT_DIR}/run.card Log LastExeSize 520 fi 521 fi 490 522 #==================================# 491 523 # And Build ExeDate # … … 532 564 (( i=i+1 )) 533 565 534 if [ ${ExeSize} -ne ${LastCompExeSize} ] ; then 535 if ( ${FirstInitialize} ) ; then 536 IGCM_debug_Print 1 "Put first ${ExeNameIn} in ${R_OUT_EXE} !" 537 else 538 IGCM_debug_Print 1 "${ExeNameIn} has changed in ${R_EXE} !" 539 eval FileToBeDeleted[${#FileToBeDeleted[@]}]=${ExeNameOut} 566 if [ ${DRYRUN} -le 1 ] ; then 567 if [ ${ExeSize} -ne ${LastCompExeSize} ] ; then 568 if ( ${FirstInitialize} ) ; then 569 IGCM_debug_Print 1 "Put first ${ExeNameIn} in ${R_OUT_EXE} !" 570 else 571 IGCM_debug_Print 1 "${ExeNameIn} has changed in ${R_EXE} !" 572 eval FileToBeDeleted[${#FileToBeDeleted[@]}]=${ExeNameOut} 573 fi 574 eval IGCM_sys_Put_Out ${ExeNameOut} ${R_OUT_EXE}/${PREFIX}_${ExeNameIn} rw 540 575 fi 541 eval IGCM_sys_Put_Out ${ExeNameOut} ${R_OUT_EXE}/${PREFIX}_${ExeNameIn} rw542 576 fi 543 577 done 544 578 545 579 if [ ${DRYRUN} -le 1 ] ; then 546 typeset ExeCpuLog547 580 tail -1500 ${Exe_Output} > ${Exe_Output}_tail.txt 548 581 ExeCpuLog=$( gawk -f ${libIGCM}/libIGCM_sys/IGCM_add_out.awk ${Exe_Output}_tail.txt ) … … 688 721 689 722 if [ ${SimulationLengthInDays} -ge ${ExperienceLengthInDays} ] ; then 690 691 723 #==========================# 692 724 # End of entire simulation # … … 704 736 IGCM_sys_Tree ${R_SAVE} 705 737 fi 706 707 738 else 708 709 739 #=================# 710 740 # Submit next job # … … 719 749 # SUBMIT NEXT JOB from SUBMIT_DIR and come back in RUN_DIR 720 750 IGCM_sys_Cd ${SUBMIT_DIR} 751 # Keep only the 5 latest ${Script_Output_Prefix}_${config_UserChoices_JobName} 752 ScriptTot=$( ls ${Script_Output_Prefix}_${config_UserChoices_JobName}.?????? > /dev/null 2>&1 | wc -l ) 753 [ ${ScriptTot} -gt 5 ] && rm -f $( ls ${Script_Output_Prefix}_${config_UserChoices_JobName}.?????? | head -$(( ${ScriptTot} - 5 )) ) 754 # Submit next job and come back 721 755 IGCM_sys_Qsub ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} 722 756 IGCM_sys_Cd -
Note: See TracChangeset
for help on using the changeset viewer.