Changeset 457
- Timestamp:
- 04/13/11 10:32:33 (13 years ago)
- Location:
- trunk/libIGCM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_job
r445 r457 451 451 echo >> ${Exe_Output} 452 452 typeset RET 453 ExecutionFail=false 453 454 RUN_DATE_BEGIN=$( date '+%Y-%m-%dT%H:%M:%S' ) 454 455 ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name} >> ${Exe_Output} 2>&1 … … 458 459 echo "Return code of executable :" ${RET} 459 460 IGCM_debug_Exit "EXECUTABLE" 460 IGCM_sys_Cp ${Exe_Output} ${SUBMIT_DIR}/${PREFIX}_${Exe_Output}_error 461 IGCM_sys_Mkdir ${SUBMIT_DIR}/Debug 462 IGCM_sys_Cp ${Exe_Output} ${SUBMIT_DIR}/Debug/${PREFIX}_${Exe_Output}_error 461 463 ExecutionFail=true 462 464 fi … … 468 470 else 469 471 echo "EXECUTION of : ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name} simulated for DRYRUN = " $DRYRUN 472 ExecutionFail=false 470 473 if ( $DEBUG_debug ) ; then 471 474 echo "FOR EXECUTION DRYRUN mode = " $DRYRUN >> stack -
trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
r433 r457 19 19 # Debug Print : 20 20 echo 21 IGCM_debug_Print 1 "IGCM_comp_Initialize :"22 echo 23 24 typeset comp compname comptagname CompatibilityTag auxprint card_UserChoices first_option i j21 IGCM_debug_Print 1 "IGCM_comp_Initialize" 22 echo 23 24 typeset comp compname comptagname CompatibilityTag auxprint card_UserChoices first_option option i j 25 25 for comp in ${config_ListOfComponents[*]} ; do 26 26 # Debug Print … … 34 34 card=${SUBMIT_DIR}/COMP/${compname}.card 35 35 IGCM_card_DefineVariableFromOption ${card} Compatibility libIGCM 36 36 37 eval CompatibilityTag=\${${compname}_Compatibility_libIGCM} > /dev/null 2>&1 37 38 38 if [ ! "${CompatibilityTag}" = "${libIGCM_CurrentTag}" ] ; then 39 39 IGCM_debug_Exit "${compname}.card is not compatible with libIGCM version ${libIGCM_CurrentTag} see libIGCM FAQ http://wiki.ipsl.jussieu.fr/wiki_ipsl/IGCMG/libIGCM/DocUtilisateur/FAQ ." … … 51 51 52 52 # Debug Print : 53 IGCM_debug_Print 1 "Initialize following component library :"54 IGCM_debug_Print 1${SUBMIT_DIR}/COMP/${compname}.driver53 IGCM_debug_Print 2 "Initialize following component library" 54 IGCM_debug_Print 2 ${SUBMIT_DIR}/COMP/${compname}.driver 55 55 IGCM_debug_Print 3 "With tag : ${comptagname}" 56 56 # Source component library … … 79 79 80 80 # Read UserChoices section of component card 81 IGCM_debug_Print 1"DefineArrayFromSection : ${compname}_UserChoices ${card}"81 IGCM_debug_Print 2 "DefineArrayFromSection : ${compname}_UserChoices ${card}" 82 82 IGCM_card_DefineArrayFromSection ${card} UserChoices 83 83 eval first_option=\${${compname}_UserChoices[0]} > /dev/null 2>&1 84 # If section is not empty we define corresponding variables 84 85 if [ X${first_option} != X"Error:" ] ; then 85 eval IGCM_debug_Print 2"${compname}_UserChoices_Options:" \${${compname}_UserChoices[*]}86 eval IGCM_debug_Print 3 "${compname}_UserChoices_Options:" \${${compname}_UserChoices[*]} 86 87 if [ X${card_UserChoices[0]} != X ] ; then 87 88 unset card_UserChoices 88 89 fi 89 90 eval set +A card_UserChoices -- \${${compname}_UserChoices[*]} > /dev/null 2>&1 90 typeset option91 91 for option in ${card_UserChoices[*]} ; do 92 92 IGCM_card_DefineVariableFromOption ${card} UserChoices ${option} … … 96 96 97 97 # Read and Build Output File stuff 98 IGCM_debug_Print 1"DefineArrayFromOption : ${compname}_OutputFiles ${card}"98 IGCM_debug_Print 2 "DefineArrayFromOption : ${compname}_OutputFiles ${card}" 99 99 IGCM_card_DefineArrayFromOption ${card} OutputFiles List 100 100 ListFilesName=${compname}_OutputFiles_List … … 196 196 echo 197 197 done 198 echo "-----"199 echo200 IGCM_debug_Print 1 "DefineArrayFromOption : ListOfComponents"201 IGCM_debug_PrintVariables 3 config_ListOfComponents202 198 203 199 IGCM_debug_PopStack "IGCM_comp_Initialize" … … 225 221 # Debug Print : 226 222 echo 227 IGCM_debug_Print 1 "IGCM_comp_GetInputInitialStateFiles :"223 IGCM_debug_Print 1 "IGCM_comp_GetInputInitialStateFiles" 228 224 echo 229 225 … … 349 345 # Debug Print : 350 346 echo 351 IGCM_debug_Print 1 "IGCM_comp_GetInputSmoothFiles :"347 IGCM_debug_Print 1 "IGCM_comp_GetInputSmoothFiles" 352 348 echo 353 349 … … 356 352 357 353 for comp in ${config_ListOfComponents[*]} ; do 358 echo "-----"359 354 # Define component 360 355 eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 … … 414 409 # Debug Print : 415 410 echo 416 IGCM_debug_Print 1 "IGCM_comp_GetInputBoundaryFiles :"411 IGCM_debug_Print 1 "IGCM_comp_GetInputBoundaryFiles" 417 412 echo 418 413 … … 426 421 for comp in ${config_ListOfComponents[*]} ; do 427 422 428 echo "-----"429 423 # Define component 430 424 eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 … … 500 494 # Debug Print : 501 495 echo 502 IGCM_debug_Print 1 "IGCM_comp_DelFixeBoundaryFiles :"496 IGCM_debug_Print 1 "IGCM_comp_DelFixeBoundaryFiles" 503 497 echo 504 498 … … 516 510 # Debug Print : 517 511 echo 518 IGCM_debug_Print 1 "IGCM_comp_GetInputParametersFiles :"512 IGCM_debug_Print 1 "IGCM_comp_GetInputParametersFiles" 519 513 echo 520 514 … … 563 557 # Debug Print : 564 558 echo 565 IGCM_debug_Print 1 "IGCM_comp_GetInputRestartFiles :"559 IGCM_debug_Print 1 "IGCM_comp_GetInputRestartFiles" 566 560 echo 567 561 … … 731 725 # Debug Print : 732 726 echo 733 IGCM_debug_Print 1 "IGCM_comp_PeriodStart :"727 IGCM_debug_Print 1 "IGCM_comp_PeriodStart" 734 728 echo 735 729 … … 762 756 # Debug Print : 763 757 echo 764 IGCM_debug_Print 1 "IGCM_comp_Update :"758 IGCM_debug_Print 1 "IGCM_comp_Update" 765 759 echo 766 760 … … 794 788 795 789 # Debug Print 796 IGCM_debug_Print 3"Update ${compname} Parameter Files."790 IGCM_debug_Print 1 "Update ${compname} Parameter Files." 797 791 # UPDATE component 798 792 ${comp}_Update … … 810 804 # Debug Print : 811 805 echo 812 IGCM_debug_Print 1 "IGCM_comp_Finalize :"806 IGCM_debug_Print 1 "IGCM_comp_Finalize" 813 807 echo 814 808 … … 1055 1049 1056 1050 unset list_file 1057 set +A list_file -- $( ls ${file_in}* | sort 2>/dev/null ) 1051 #set +A list_file -- $( ls ${file_in}* | sort 2>/dev/null ) 1052 set +A list_file -- $( for i in $(ls ${file_in}* 2>/dev/null | sed "s/${file_in}//" | sort -n) ; do ls ${file_in}$i ; done ) 1058 1053 nlist_file=${#list_file[@]} 1059 1054 if [ ${nlist_file} -gt 1 ] ; then … … 1082 1077 eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${file_out}" > /dev/null 2>&1 1083 1078 1084 if ( $ ExecutionFail && [ X$( echo ${file_out} | grep "_out" ) != X ]) ; then1085 IGCM_sys_Cp ${file_out} ${SUBMIT_DIR} 1079 if ( ${ExecutionFail} ) ; then 1080 IGCM_sys_Cp ${file_out} ${SUBMIT_DIR}/Debug 1086 1081 fi 1087 1082 else … … 1091 1086 eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${file}" > /dev/null 2>&1 1092 1087 done 1093 if ( $ ExecutionFail && [ X$( echo ${file} | grep "_out" ) != X ]) ; then1094 IGCM_sys_Cp ${file} ${SUBMIT_DIR}/ ${PREFIX}_${file}1088 if ( ${ExecutionFail} ) ; then 1089 IGCM_sys_Cp ${file} ${SUBMIT_DIR}/Debug/${PREFIX}_${file} 1095 1090 fi 1096 1091 fi … … 1102 1097 [ $? -eq 0 ] && eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${file_in}" > /dev/null 2>&1 1103 1098 1104 if ( $ ExecutionFail && [ X$( echo ${file_in} | grep "_out" ) != X ]) ; then1105 IGCM_sys_Cp ${file_in} ${SUBMIT_DIR}/ ${PREFIX}_${file_in}1099 if ( ${ExecutionFail} ) ; then 1100 IGCM_sys_Cp ${file_in} ${SUBMIT_DIR}/Debug/${PREFIX}_${file_in} 1106 1101 fi 1107 1102 fi -
trunk/libIGCM/libIGCM_config/libIGCM_config.ksh
r455 r457 19 19 # Debug Print : 20 20 echo 21 IGCM_debug_Print 1 "IGCM_config_Initialize :" 22 echo 21 IGCM_debug_Print 1 "IGCM_config_Initialize" 23 22 24 23 if [ ! -r ${SUBMIT_DIR}/run.card ]; then … … 65 64 IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card UserChoices ${option} 66 65 done 67 66 echo 68 67 IGCM_debug_Print 1 "DefineArrayFromOption : config_UserChoices" 69 68 # Name Space of this experience … … 93 92 IGCM_debug_Print 1 "DefineArrayFromSection : ListOfComponents" 94 93 IGCM_debug_Print 3 ${config_ListOfComponents[*]} 95 echo96 94 97 95 NbComponents=${#config_ListOfComponents[*]} … … 105 103 #================================== 106 104 # Define Outputs Name 107 IGCM_debug_Print 1"Define Script_Output_Prefix and Exe_Output"105 IGCM_debug_Print 2 "Define Script_Output_Prefix and Exe_Output" 108 106 eval Script_Output_Prefix=${config_UserChoices_Script_Output_Prefix:='Script_Output'} 109 107 IGCM_debug_Print 3 "Script_Output_Prefix = ${Script_Output_Prefix}" … … 160 158 # and PeriodNb through config.card 161 159 R_INIT=${config_UserChoices_R_INIT:=${R_IN}/INIT} 162 echo 163 IGCM_debug_Print 1 "(Re)Define R_INIT, R_BC and PeriodNb" 160 IGCM_debug_Print 2 "(Re)Define R_INIT, R_BC and PeriodNb" 164 161 IGCM_debug_Print 3 "R_INIT=${R_INIT}" 165 162 R_BC=${config_UserChoices_R_BC:=${R_IN}/BC} … … 188 185 IGCM_sys_MkdirArchive ${R_SAVE} 189 186 else 187 IGCM_sys_TestDirArchive ${R_SAVE} 188 [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" 190 189 #Test state of run in run.card 191 190 IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/run.card Configuration PeriodState 191 192 192 if ( [ ${run_Configuration_PeriodState} != "Start" ] && [ ${run_Configuration_PeriodState} != "Running" ] && [ ${run_Configuration_PeriodState} != "OnQueue" ] && [ ${run_Configuration_PeriodState} != "Continue" ] ) ; then 193 193 echo 194 IGCM_debug_Print 1 "!! !! IGCM_config_Initialize Error PeriodState : " ${run_Configuration_PeriodState} "!!!!!!!!!!"195 echo196 IGCM_debug_Exit "IGCM_config_Initialize Error PeriodState : " ${run_Configuration_PeriodState}194 IGCM_debug_Print 1 "!! Error in run.card with PeriodState : " ${run_Configuration_PeriodState} "!!" 195 IGCM_debug_Print 1 "Try running ${libIGCM}/clean_month.job to fix this" 196 IGCM_debug_Exit 197 197 IGCM_debug_Verif_Exit 198 198 fi 199 199 fi 200 IGCM_sys_TestDirArchive ${R_SAVE}201 [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive"202 200 203 201 #================================== … … 278 276 *Y|*y) 279 277 PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | sed -e 's/[yY]//' ) 280 IGCM_debug_Print 1"Number of years for PeriodLength : ${PeriodLengthInYears}"278 IGCM_debug_Print 2 "Number of years for PeriodLength : ${PeriodLengthInYears}" 281 279 PeriodLengthInDays=0 282 280 i=0 … … 288 286 *M|*m) 289 287 PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | sed -e 's/[mM]//' ) 290 IGCM_debug_Print 1"Number of months for PeriodLength : ${PeriodLengthInMonths}"288 IGCM_debug_Print 2 "Number of months for PeriodLength : ${PeriodLengthInMonths}" 291 289 PeriodLengthInDays=0 292 290 i=0 … … 321 319 322 320 echo 323 IGCM_debug_Print 1 "IGCM_config_Check :"321 IGCM_debug_Print 1 "IGCM_config_Check" 324 322 echo 325 323 … … 331 329 echo 332 330 # modulo (RebuildFrequency and PeriodLength/TimeSeriesFrequency/SeasonalFrequency) must be zero 333 IGCM_debug_Print 1 "C oherence between RebuildFrequency and PeriodLength:"331 IGCM_debug_Print 1 "Check coherence between RebuildFrequency and PeriodLength" 334 332 IGCM_post_CheckModuloFrequency config_Post_RebuildFrequency config_UserChoices_PeriodLength 335 IGCM_debug_Print 1 "C oherence between TimeSeriesFrequency and RebuildFrequency:"333 IGCM_debug_Print 1 "Check coherence between TimeSeriesFrequency and RebuildFrequency" 336 334 IGCM_post_CheckModuloFrequency config_Post_TimeSeriesFrequency config_Post_RebuildFrequency 337 IGCM_debug_Print 1 "C oherence between SeasonalFrequency and RebuildFrequency:"335 IGCM_debug_Print 1 "Check coherence between SeasonalFrequency and RebuildFrequency" 338 336 IGCM_post_CheckModuloFrequency config_Post_SeasonalFrequency config_Post_RebuildFrequency 339 337 else … … 343 341 echo 344 342 #modulo (TimeSeriesFrequency/SeasonalFrequency and PeriodLenght) must be zero 345 IGCM_debug_Print 1 "C oherence between TimeSeriesFrequency and PeriodLength:"343 IGCM_debug_Print 1 "Check coherence between TimeSeriesFrequency and PeriodLength" 346 344 IGCM_post_CheckModuloFrequency config_Post_TimeSeriesFrequency config_UserChoices_PeriodLength 347 IGCM_debug_Print 1 "C oherence between SeasonalFrequency and PeriodLength:"345 IGCM_debug_Print 1 "Check coherence between SeasonalFrequency and PeriodLength" 348 346 IGCM_post_CheckModuloFrequency config_Post_SeasonalFrequency config_UserChoices_PeriodLength 349 347 fi … … 354 352 until [ $i -ge $NbJob ]; do 355 353 value=${CHUNCK2D_SIZE[${i}]} 356 IGCM_debug_Print 1 "C oherence between All Chunck2D frequency and TimeSeriesFrequency:"354 IGCM_debug_Print 1 "Check coherence between All Chunck2D frequency and TimeSeriesFrequency" 357 355 IGCM_post_CheckModuloFrequency value config_Post_TimeSeriesFrequency 358 356 case ${value} in 359 357 *Y|*y) ;; 360 *) IGCM_debug_Print 3"All ChunckJob2D frequency must be expressed in year *Y|*y in comp.card"358 *) IGCM_debug_Print 1 "All ChunckJob2D frequency must be expressed in year *Y|*y in comp.card" 361 359 IGCM_debug_Exit "This will stop the job" ;; 362 360 esac … … 369 367 until [ $i -ge $NbJob ]; do 370 368 value=${CHUNCK3D_SIZE[${i}]} 371 IGCM_debug_Print 1 "C oherence between All Chunck3D frequency and TimeSeriesFrequency:"369 IGCM_debug_Print 1 "Check coherence between All Chunck3D frequency and TimeSeriesFrequency" 372 370 IGCM_post_CheckModuloFrequency value config_Post_TimeSeriesFrequency 373 371 case ${value} in 374 372 *Y|*y) ;; 375 *) IGCM_debug_Print 3"All ChunckJob3D frequency must be expressed in year *Y|*y in comp.card"373 *) IGCM_debug_Print 1 "All ChunckJob3D frequency must be expressed in year *Y|*y in comp.card" 376 374 IGCM_debug_Exit "This will stop the job" ;; 377 375 esac … … 388 386 389 387 echo 390 IGCM_debug_Print 1 "IGCM_config_PeriodStart :"388 IGCM_debug_Print 1 "IGCM_config_PeriodStart" 391 389 echo 392 390 … … 426 424 if ( [ ${run_Configuration_PeriodState} != "Running" ] && [ ${run_Configuration_PeriodState} != "OnQueue" ] && [ ${run_Configuration_PeriodState} != "Continue" ] ) ; then 427 425 echo 428 IGCM_debug_Print 1 "!!!!!! IGCM_config_PeriodStart Error PeriodState : " ${run_Configuration_PeriodState} "!!!!!!!!!!" 429 echo 430 IGCM_debug_Exit "IGCM_config_PeriodStart Error PeriodState : " ${run_Configuration_PeriodState} 426 IGCM_debug_Print 1 "!! Error in run.card with PeriodState : " ${run_Configuration_PeriodState} "!!" 427 IGCM_debug_Print 1 "Try running ${libIGCM}/clean_month.job to fix this" 428 echo 429 IGCM_debug_Exit 431 430 IGCM_debug_Verif_Exit 432 431 fi … … 454 453 #eval ls -l ${SUBMIT_DIR}/${Last_Script_Output_Name} 455 454 #eval IGCM_sys_Put_Out ${SUBMIT_DIR}/${Last_Script_Output_Name} ${R_OUT_KSH}/${Last_Script_Output_Name} > /dev/null 2>&1 456 IGCM_debug_Print 1"Try to save previous ksh job output"455 IGCM_debug_Print 2 "Try to save previous ksh job output" 457 456 IGCM_sys_Cd ${SUBMIT_DIR}/ 458 457 IGCM_sys_Put_Out ${Last_Script_Output_Name} ${R_OUT_KSH}/${Last_Script_Output_Name}.$$ rw … … 483 482 # Debug Print : 484 483 IGCM_debug_Print 1 "IGCM_config_PeriodStart : Before Execution" 485 IGCM_debug_Print 3"Year of simulation : ${year}"486 IGCM_debug_Print 3"Month of simulation : ${month}"487 IGCM_debug_Print 3"PeriodLengthInDays : ${PeriodLengthInDays}"488 IGCM_debug_Print 3"PeriodDateBegin : ${PeriodDateBegin}"489 IGCM_debug_Print 3"PeriodDateEnd : ${PeriodDateEnd}"490 IGCM_debug_Print 3"SimulationLengthInDays : ${SimulationLengthInDays}"491 IGCM_debug_Print 3"ExperienceLengthInDays : ${ExperienceLengthInDays}"484 IGCM_debug_Print 1 "Year of simulation : ${year}" 485 IGCM_debug_Print 1 "Month of simulation : ${month}" 486 IGCM_debug_Print 1 "PeriodLengthInDays : ${PeriodLengthInDays}" 487 IGCM_debug_Print 1 "PeriodDateBegin : ${PeriodDateBegin}" 488 IGCM_debug_Print 1 "PeriodDateEnd : ${PeriodDateEnd}" 489 IGCM_debug_Print 1 "SimulationLengthInDays : ${SimulationLengthInDays}" 490 IGCM_debug_Print 1 "ExperienceLengthInDays : ${ExperienceLengthInDays}" 492 491 493 492 #================================================================# … … 518 517 else 519 518 if ( IGCM_sys_TestFileArchive ${R_OUT_KSH}/${PREFIX}_${Exe_Output} ) ; then 520 IGCM_debug_Print 1 "IGCM_config_PeriodStart" "RErun an old job. DEBUG ofDEV mode."519 IGCM_debug_Print 1 "IGCM_config_PeriodStart" "RErun an old job. Allowed in DEBUG or DEV mode." 521 520 fi 522 521 fi … … 531 530 532 531 echo 533 IGCM_debug_Print 1 "IGCM_config_PeriodEnd :"532 IGCM_debug_Print 1 "IGCM_config_PeriodEnd" 534 533 echo 535 534 … … 539 538 IGCM_sys_Put_Out ${Exe_Output} ${R_OUT_KSH}/${PREFIX}_${Exe_Output} 540 539 eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${Exe_Output}" 541 542 540 IGCM_sys_Put_Out ${SUBMIT_DIR}/run.card ${R_OUT_KSH}/run.card rw 543 544 typeset LS_comp LS_bin ExeDate ExeCpuLog ExeSize NextExeSize LastCompExeSize 541 542 IGCM_debug_Print 1 "Check components binary : size and creation date" 543 544 typeset LS_comp LS_bin ExeDate ExeCpuLog NextExeSize LastCompExeSize 545 545 typeset comp i 546 546 typeset ExeNameIn ExeNameOut … … 550 550 #==================================# 551 551 552 if [ ${DRYRUN} -le 1 ] ; then 553 (( i=0 )) 554 if ( ${FirstInitialize} ) ; then 555 run_Log_LastExeSize="" 556 for comp in ${config_ListOfComponents[*]} ; do 557 run_Log_LastExeSize[$i]=0 558 (( i=i+1 )) 559 done 560 else 561 IGCM_card_DefineArrayFromOption ${SUBMIT_DIR}/run.card Log LastExeSize 562 fi 552 (( i=0 )) 553 if ( ${FirstInitialize} ) ; then 554 run_Log_LastExeSize="" 555 for comp in ${config_ListOfComponents[*]} ; do 556 run_Log_LastExeSize[$i]=0 557 (( i=i+1 )) 558 done 559 else 560 IGCM_card_DefineArrayFromOption ${SUBMIT_DIR}/run.card Log LastExeSize 563 561 fi 564 562 #==================================# … … 575 573 for comp in ${config_ListOfComponents[*]} ; do 576 574 577 IGCM_debug_Print 1${comp}575 IGCM_debug_Print 3 ${comp} 578 576 579 577 eval ExeNameIn=\${config_Executable_${comp}[0]} … … 606 604 (( i=i+1 )) 607 605 608 if [ ${DRYRUN} -le 1 ] ; then 609 if [ ${ExeSize} -ne ${LastCompExeSize} ] ; then 610 if ( ${FirstInitialize} ) ; then 611 IGCM_debug_Print 1 "Put first ${ExeNameIn} in ${R_OUT_EXE} !" 612 else 613 IGCM_debug_Print 1 "${ExeNameIn} has changed in ${R_EXE} !" 614 eval FileToBeDeleted[${#FileToBeDeleted[@]}]=${ExeNameOut} 615 fi 616 eval IGCM_sys_Put_Out ${ExeNameOut} ${R_OUT_EXE}/${PREFIX}_${ExeNameIn} rw 606 if [ ${ExeSize} -ne ${LastCompExeSize} ] ; then 607 if ( ${FirstInitialize} ) ; then 608 IGCM_debug_Print 1 "Save first ${ExeNameIn} in ${R_OUT_EXE} !" 609 else 610 IGCM_debug_Print 1 "${ExeNameIn} has changed in ${R_EXE} !" 611 IGCM_debug_Print 1 "Save latest ${ExeNameIn} in ${R_OUT_EXE} !" 612 eval FileToBeDeleted[${#FileToBeDeleted[@]}]=${ExeNameOut} 617 613 fi 614 eval IGCM_sys_Put_Out ${ExeNameOut} ${R_OUT_EXE}/${PREFIX}_${ExeNameIn} rw 618 615 fi 619 616 done 617 618 NextExeSize=${NextExeSize}" )" 619 IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Log LastExeSize "${NextExeSize}" 620 620 621 621 if [ ${DRYRUN} -le 1 ] ; then … … 632 632 fi 633 633 634 NextExeSize=${NextExeSize}" )"635 IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Log LastExeSize "${NextExeSize}"636 637 634 # All was right ? no ? then we stop. 638 635 IGCM_debug_Verif_Exit 639 636 640 637 # If all was OK, we can delete all files not necessary for next Job 638 echo 641 639 IGCM_debug_Print 1 "Files that will be deleted before next period-run : " 642 640 … … 652 650 653 651 # To use this function, one must copy libIGCM.card from ${libIGCM} directory 654 # and put it in ${SUBMIT_DIR} directory. A ter modifications of ${SUBMIT_DIR}/libIGCM.card,652 # and put it in ${SUBMIT_DIR} directory. After modifications of ${SUBMIT_DIR}/libIGCM.card, 655 653 # variables define inside [UserChanges] will be modified for next Period of libIGCM main loop. 656 654 if [ -f ${SUBMIT_DIR}/libIGCM.card ] ; then … … 676 674 case ${option} in 677 675 config_UserChoices_DateEnd) 678 IGCM_debug_PrintVariables 3config_UserChoices_DateEnd676 IGCM_debug_PrintVariables 1 config_UserChoices_DateEnd 679 677 DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} ) 680 678 … … 688 686 ;; 689 687 config_UserChoices_PeriodLength) 688 IGCM_debug_Print 1 "Change config_UserChoices_PeriodLength=${config_UserChoices_PeriodLength}" 690 689 ;; 691 690 PeriodNb) 692 IGCM_debug_Print 3"Loop in main Job with ${PeriodNb} period(s)"691 IGCM_debug_Print 1 "Loop in main Job with ${PeriodNb} period(s)" 693 692 ;; 694 693 config_Post_RebuildFrequency) 695 IGCM_debug_Print 3"Change config_Post_RebuildFrequency=${config_Post_RebuildFrequency} : IGCM_post_Configure"694 IGCM_debug_Print 1 "Change config_Post_RebuildFrequency=${config_Post_RebuildFrequency} : IGCM_post_Configure" 696 695 IGCM_post_Configure 697 696 ;; 698 697 config_Post_TimeSeriesFrequency) 699 IGCM_debug_Print 3"Change config_Post_TimeSeriesFrequency = ${config_Post_TimeSeriesFrequency} : IGCM_post_Initialize"698 IGCM_debug_Print 1 "Change config_Post_TimeSeriesFrequency = ${config_Post_TimeSeriesFrequency} : IGCM_post_Initialize" 700 699 IGCM_post_Configure 701 700 ;; 702 701 config_Post_SeasonalFrequency) 703 IGCM_debug_Print 3"Change config_Post_SeasonalFrequency = ${config_Post_SeasonalFrequency} : IGCM_post_Initialize"702 IGCM_debug_Print 1 "Change config_Post_SeasonalFrequency = ${config_Post_SeasonalFrequency} : IGCM_post_Initialize" 704 703 IGCM_post_Configure 705 704 ;; … … 726 725 echo 727 726 IGCM_debug_Print 1 "IGCM_config_PeriodEnd : Preparing Next Execution" 728 IGCM_debug_Print 3"PeriodDateBegin : ${PeriodDateBegin}"729 IGCM_debug_Print 3"PeriodDateEnd : ${PeriodDateEnd}"730 IGCM_debug_Print 3"PeriodLengthInDays : ${PeriodLengthInDays}"727 IGCM_debug_Print 1 "PeriodDateBegin : ${PeriodDateBegin}" 728 IGCM_debug_Print 1 "PeriodDateEnd : ${PeriodDateEnd}" 729 IGCM_debug_Print 1 "PeriodLengthInDays : ${PeriodLengthInDays}" 731 730 732 731 PeriodDateBegin=$( IGCM_date_ConvertFormatToHuman ${PeriodDateBegin} ) … … 764 763 765 764 echo 766 IGCM_debug_Print 1 "IGCM_config_Finalize :"765 IGCM_debug_Print 1 "IGCM_config_Finalize" 767 766 echo 768 767 -
trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh
r448 r457 232 232 fi 233 233 # Mail notification 234 #IGCM_sys_SendMail 234 #IGCM_sys_SendMailPost 235 235 # And Good Bye 236 236 date -
trunk/libIGCM/libIGCM_post/libIGCM_post.ksh
r455 r457 20 20 # Debug Print : 21 21 echo 22 IGCM_debug_Print 1 "IGCM_post_Configure :" 23 echo 22 IGCM_debug_Print 1 "IGCM_post_Configure" 24 23 # 25 24 # Initialize … … 85 84 done 86 85 # 87 echo 88 IGCM_debug_Print 1 "POST-TREATEMENT flag value : ${POST}" 86 IGCM_debug_Print 2 "POST-TREATEMENT flag value : ${POST}" 89 87 # 90 88 IGCM_debug_PopStack "IGCM_post_Configure" … … 101 99 if [ ${POST} = true ]; then 102 100 echo 103 IGCM_debug_Print 1 "IGCM_post_Submit :"101 IGCM_debug_Print 1 "IGCM_post_Submit" 104 102 echo 105 IGCM_debug_Print 1"POST_DIR = ${POST_DIR}"103 IGCM_debug_Print 2 "POST_DIR = ${POST_DIR}" 106 104 fi 107 105 … … 109 107 if [ ${TimeSeriesFrequency} = true ] ; then 110 108 111 IGCM_debug_Print 2 "TIME SERIES POST-PROCESSING ACTIVATED :"109 IGCM_debug_Print 1 "TIME SERIES POST-PROCESSING ACTIVATED" 112 110 echo 113 111 … … 130 128 if [ X$( eval echo \${TimeSeries${Dimension}} ) = Xtrue ] ; then 131 129 # 132 IGCM_debug_Print 2 "TIME SERIES POST-PROCESSING ${Dimension} ACTIVATED :"130 IGCM_debug_Print 1 "TIME SERIES POST-PROCESSING ${Dimension} ACTIVATED" 133 131 echo 134 132 # … … 219 217 if [ X$( eval echo \${TimeSeriesChunck${Dimension}} ) = Xtrue ] ; then 220 218 # 221 IGCM_debug_Print 2 "TIME SERIES POST-PROCESSING ${Dimension} WITH CHUNCK ACTIVATED :"219 IGCM_debug_Print 1 "TIME SERIES POST-PROCESSING ${Dimension} WITH CHUNCK ACTIVATED" 222 220 echo 223 221 # Need to Remember This One … … 340 338 if [ ${SeasonalFrequency} = true ] ; then 341 339 # 342 IGCM_debug_Print 2 "SEASONNAL POST-TREATMENT :"340 IGCM_debug_Print 1 "SEASONNAL POST-TREATMENT" 343 341 echo 344 342 # … … 435 433 if [ ${RebuildFrequency} = true ] ; then 436 434 if ( [ ${config_Post_RebuildFromArchive} = true ] ) ; then 437 IGCM_debug_Print 2 "REBUILD POST-TREATMENT FROM ARCHIVE:"435 IGCM_debug_Print 1 "REBUILD POST-TREATMENT FROM ARCHIVE" 438 436 echo 439 437 # 440 438 script=rebuild_fromArchive 441 439 else 442 IGCM_debug_Print 2 "REBUILD POST-TREATMENT FROM WORKDIR:"440 IGCM_debug_Print 1 "REBUILD POST-TREATMENT FROM WORKDIR" 443 441 echo 444 442 # … … 505 503 SlaveFrequency=$( eval echo \${${2}} ) 506 504 507 IGCM_debug_Print 1"IGCM_post_CheckModuloFrequency : Master=${MasterFrequency} Slave=${SlaveFrequency}"505 IGCM_debug_Print 2 "IGCM_post_CheckModuloFrequency : Master=${MasterFrequency} Slave=${SlaveFrequency}" 508 506 509 507 case ${MasterFrequency} in … … 515 513 if ( [ ${PeriodSlaveYear} -gt ${PeriodMasterYear} ] || \ 516 514 [ $(( ${PeriodMasterYear} % ${PeriodSlaveYear} )) -ne 0 ] ); then 517 IGCM_debug_Print 3"${SlaveName} frequency ${SlaveFrequency} not compatbile with"518 IGCM_debug_Print 3"${MasterName} frequency : ${MasterFrequency}"515 IGCM_debug_Print 1 "${SlaveName} frequency ${SlaveFrequency} not compatbile with" 516 IGCM_debug_Print 1 "${MasterName} frequency : ${MasterFrequency}" 519 517 IGCM_debug_Exit "Check your frequency" 520 518 fi ;; … … 523 521 if ( [ ${PeriodSlaveMonth} -gt $(( ${PeriodMasterYear} * 12 )) ] || \ 524 522 [ $(( ( ${PeriodMasterYear} * 12 ) % ${PeriodSlaveMonth} )) -ne 0 ] ) ; then 525 IGCM_debug_Print 3"${SlaveName} frequency ${SlaveFrequency} not compatbile with"526 IGCM_debug_Print 3"${MasterName} frequency : ${MasterFrequency}"523 IGCM_debug_Print 1 "${SlaveName} frequency ${SlaveFrequency} not compatbile with" 524 IGCM_debug_Print 1 "${MasterName} frequency : ${MasterFrequency}" 527 525 IGCM_debug_Exit "Check your frequency" 528 526 fi ;; … … 533 531 if ( [ ${PeriodSlaveDay} -gt $(( ${PeriodMasterYear} * ${NbDays} )) ] || \ 534 532 [ $(( ( ${PeriodMasterYear} * ${NbDays} ) % ${PeriodSlaveDay} )) -ne 0 ] ; ) then 535 IGCM_debug_Print 3"${SlaveName} frequency ${SlaveFrequency} not compatbile with"536 IGCM_debug_Print 3"${MasterName} frequency : ${MasterFrequency}"533 IGCM_debug_Print 1 "${SlaveName} frequency ${SlaveFrequency} not compatbile with" 534 IGCM_debug_Print 1 "${MasterName} frequency : ${MasterFrequency}" 537 535 IGCM_debug_Exit "Check your frequency" 538 536 fi 539 537 else 540 IGCM_debug_Print 3"For ${MasterName} with leap calendar:"541 IGCM_debug_Print 3"We have a daily ${SlaveName} frequency and ${MasterName}=${MasterFrequency}"542 IGCM_debug_Print 3"No post-treatment. Case not properly handle at this moment by libIGCM. Sorry"538 IGCM_debug_Print 1 "For ${MasterName} with leap calendar:" 539 IGCM_debug_Print 1 "We have a daily ${SlaveName} frequency and ${MasterName}=${MasterFrequency}" 540 IGCM_debug_Print 1 "No post-treatment. Case not properly handle at this moment by libIGCM. Sorry" 543 541 IGCM_debug_Exit "Check your frequency ${MasterName} and choose a daily frequency for this one too." 544 542 fi ;; … … 551 549 if ( [ ${PeriodMasterMonth} -gt $(( ${PeriodSlaveYear} * 12 )) ] || \ 552 550 [ $(( ${PeriodMasterMonth} % ( ${PeriodSlaveYear} * 12 ) )) -ne 0 ] ) ; then 553 IGCM_debug_Print 3"${SlaveName} frequency ${SlaveFrequency} not compatbile with"554 IGCM_debug_Print 3"${MasterName} frequency : ${MasterFrequency}"551 IGCM_debug_Print 1 "${SlaveName} frequency ${SlaveFrequency} not compatbile with" 552 IGCM_debug_Print 1 "${MasterName} frequency : ${MasterFrequency}" 555 553 IGCM_debug_Exit "Check your frequency" 556 554 fi ;; … … 559 557 if ( [ ${PeriodSlaveMonth} -gt ${PeriodMasterMonth} ] || \ 560 558 [ $(( ${PeriodMasterMonth} % ${PeriodSlaveMonth} )) -ne 0 ] ) ; then 561 IGCM_debug_Print 3"${SlaveName} frequency ${SlaveFrequency} not compatbile with"562 IGCM_debug_Print 3"${MasterName} frequency : ${MasterFrequency}"559 IGCM_debug_Print 1 "${SlaveName} frequency ${SlaveFrequency} not compatbile with" 560 IGCM_debug_Print 1 "${MasterName} frequency : ${MasterFrequency}" 563 561 IGCM_debug_Exit "Check your frequency" 564 562 fi ;; 565 563 *D|*d) 566 IGCM_debug_Print 3"${SlaveName} frequency ${SlaveFrequency} not compatbile with"567 IGCM_debug_Print 3"${MasterName} frequency : ${MasterFrequency}"564 IGCM_debug_Print 1 "${SlaveName} frequency ${SlaveFrequency} not compatbile with" 565 IGCM_debug_Print 1 "${MasterName} frequency : ${MasterFrequency}" 568 566 IGCM_debug_Exit "Check your frequency" ;; 569 567 esac ;; … … 572 570 case ${SlaveFrequency} in 573 571 *Y|*y) 574 IGCM_debug_Print 3"${SlaveName} frequency ${SlaveFrequency} not compatbile with"575 IGCM_debug_Print 3"${MasterName} frequency ${MasterFrequency}"572 IGCM_debug_Print 1 "${SlaveName} frequency ${SlaveFrequency} not compatbile with" 573 IGCM_debug_Print 1 "${MasterName} frequency ${MasterFrequency}" 576 574 IGCM_debug_Exit "Check your frequency" ;; 577 575 *M|*m) 578 IGCM_debug_Print 3"${SlaveName} frequency ${SlaveFrequency} not compatbile with"579 IGCM_debug_Print 3"${MasterName} frequency ${MasterFrequency}"576 IGCM_debug_Print 1 "${SlaveName} frequency ${SlaveFrequency} not compatbile with" 577 IGCM_debug_Print 1 "${MasterName} frequency ${MasterFrequency}" 580 578 IGCM_debug_Exit "Check your frequency" ;; 581 579 *D|*d) … … 583 581 if ( [ ${PeriodSlaveDay} -gt ${PeriodMasterDay} ] || \ 584 582 [ $(( ${PeriodMasterDay} % ${PeriodSlaveDay} )) -ne 0 ] ) ; then 585 IGCM_debug_Print 3"${SlaveName} frequency ${SlaveFrequency} not compatbile with"586 IGCM_debug_Print 3"${MasterName} frequency : ${MasterFrequency}"583 IGCM_debug_Print 1 "${SlaveName} frequency ${SlaveFrequency} not compatbile with" 584 IGCM_debug_Print 1 "${MasterName} frequency : ${MasterFrequency}" 587 585 IGCM_debug_Exit "Check your frequency" 588 586 fi ;; … … 591 589 ;; 592 590 *) 593 IGCM_debug_Print 3"KeyWord ${MasterFrequency} not allowed for ${MasterName} in config.card"591 IGCM_debug_Print 1 "KeyWord ${MasterFrequency} not allowed for ${MasterName} in config.card" 594 592 IGCM_debug_Exit "Check your ${MasterName} in config.card" ;; 595 593 esac … … 622 620 623 621 echo 624 IGCM_debug_Print 1 "IGCM_post_ModuloRuntimeFrequency : Master=${MasterFrequency} Slave=${SlaveFrequency} CumulPeriod=${CumulPeriod}" 625 echo 622 IGCM_debug_Print 2 "IGCM_post_ModuloRuntimeFrequency : Master=${MasterFrequency} Slave=${SlaveFrequency} CumulPeriod=${CumulPeriod}" 626 623 627 624 case ${MasterFrequency} in … … 675 672 fi;; 676 673 *D|*d) 677 IGCM_debug_Print 3"PeriodLength frequency ${SlaveFrequency} not compatbile with"678 IGCM_debug_Print 3"${flag_post} frequency : ${MasterFrequency} " ;;674 IGCM_debug_Print 1 "PeriodLength frequency ${SlaveFrequency} not compatbile with" 675 IGCM_debug_Print 1 "${flag_post} frequency : ${MasterFrequency} " ;; 679 676 esac ;; 680 677 *D|*d) … … 682 679 case ${SlaveFrequency} in 683 680 *Y|*y) 684 IGCM_debug_Print 3"PeriodLength frequency ${SlaveFrequency} not compatbile with"685 IGCM_debug_Print 3"${flag_post} frequency : ${MasterFrequency} " ;;681 IGCM_debug_Print 1 "PeriodLength frequency ${SlaveFrequency} not compatbile with" 682 IGCM_debug_Print 1 "${flag_post} frequency : ${MasterFrequency} " ;; 686 683 *M|*m) 687 IGCM_debug_Print 3"PeriodLength frequency ${SlaveFrequency} not compatbile with"688 IGCM_debug_Print 3"${flag_post} frequency : ${MasterFrequency} " ;;684 IGCM_debug_Print 1 "PeriodLength frequency ${SlaveFrequency} not compatbile with" 685 IGCM_debug_Print 1 "${flag_post} frequency : ${MasterFrequency} " ;; 689 686 *D|*d) 690 687 PeriodSlaveDay=$( echo ${SlaveFrequency} | sed -e "s/[dD]//" ) … … 699 696 ;; 700 697 *) 701 IGCM_debug_Print 3"KeyWord not allowed for ${post_freq} in config.card"698 IGCM_debug_Print 1 "KeyWord not allowed for ${post_freq} in config.card" 702 699 ;; 703 700 esac -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh
r455 r457 217 217 fi 218 218 219 set -vx220 221 219 typeset NB_ESSAI DELAI status i 222 220 # keep standard input for the loop onto temporary file 223 221 cat >tmp_IGCM_sys_RshPost_$$ 224 222 225 echo cat tmp_IGCM_sys_RshPost_$$ INITIAL226 cat tmp_IGCM_sys_RshPost_$$223 #echo cat tmp_IGCM_sys_RshPost_$$ INITIAL 224 #cat tmp_IGCM_sys_RshPost_$$ 227 225 228 226 if [ "X$( grep rebuild_from tmp_IGCM_sys_RshPost_$$ )" != "X" ] ; then … … 237 235 #\mv tmp.txt tmp_IGCM_sys_RshPost_$$ 238 236 # 239 echo cat tmp_IGCM_sys_RshPost_$$ AFTER240 cat tmp_IGCM_sys_RshPost_$$237 #echo cat tmp_IGCM_sys_RshPost_$$ AFTER 238 #cat tmp_IGCM_sys_RshPost_$$ 241 239 /bin/ksh <tmp_IGCM_sys_RshPost_$$ 242 240 if [ $? -gt 0 ] ; then … … 283 281 fi 284 282 285 set -vx286 287 283 if ( ${ExitFlag} ) ; then 288 284 status=failed
Note: See TracChangeset
for help on using the changeset viewer.