Changeset 457


Ignore:
Timestamp:
04/13/11 10:32:33 (13 years ago)
Author:
sdipsl
Message:
  • Bugfix on titane. Exe files has never been saved and ExeFileSize? in the run.card has always been false. Due to ExeSize? variable scope, decalare local to a function but assigned in another function. It works by chance on some machine, because ExeSize? is not initialized...
  • Bugfix of the revision [433]. out_orchidee was always save in SUBMIT_DIR.
  • Now if a job fail : all concatenated debug files (OutputTextFiles?) will be place in SUBMIT_DIR/Debug for convenience.
  • Continuation of [431], concatenate text files following numerical instead of alphabetical order. MAF.
  • Cosmetic and verbosty has been revisited.
Location:
trunk/libIGCM
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_job

    r445 r457  
    451451        echo                                                                                  >> ${Exe_Output} 
    452452        typeset RET 
     453        ExecutionFail=false 
    453454        RUN_DATE_BEGIN=$( date '+%Y-%m-%dT%H:%M:%S' ) 
    454455        ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name} >> ${Exe_Output} 2>&1 
     
    458459            echo "Return code of executable :" ${RET} 
    459460            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 
    461463            ExecutionFail=true 
    462464        fi 
     
    468470    else 
    469471        echo "EXECUTION of : ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name} simulated for DRYRUN = " $DRYRUN 
     472        ExecutionFail=false 
    470473        if ( $DEBUG_debug ) ; then 
    471474            echo "FOR EXECUTION DRYRUN mode = " $DRYRUN >> stack 
  • trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh

    r433 r457  
    1919    # Debug Print : 
    2020    echo 
    21     IGCM_debug_Print 1 "IGCM_comp_Initialize :" 
    22     echo 
    23  
    24     typeset comp compname comptagname CompatibilityTag auxprint card_UserChoices first_option i j 
     21    IGCM_debug_Print 1 "IGCM_comp_Initialize" 
     22    echo 
     23 
     24    typeset comp compname comptagname CompatibilityTag auxprint card_UserChoices first_option option i j 
    2525    for comp in ${config_ListOfComponents[*]} ; do 
    2626        # Debug Print 
     
    3434        card=${SUBMIT_DIR}/COMP/${compname}.card 
    3535        IGCM_card_DefineVariableFromOption ${card} Compatibility libIGCM 
     36 
    3637        eval CompatibilityTag=\${${compname}_Compatibility_libIGCM} > /dev/null 2>&1     
    37  
    3838        if [ ! "${CompatibilityTag}" = "${libIGCM_CurrentTag}" ] ; then 
    3939            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 ." 
     
    5151 
    5252        # Debug Print : 
    53         IGCM_debug_Print 1 "Initialize following component library :" 
    54         IGCM_debug_Print 1 ${SUBMIT_DIR}/COMP/${compname}.driver 
     53        IGCM_debug_Print 2 "Initialize following component library" 
     54        IGCM_debug_Print 2 ${SUBMIT_DIR}/COMP/${compname}.driver 
    5555        IGCM_debug_Print 3 "With tag : ${comptagname}" 
    5656        # Source component library 
     
    7979 
    8080        # Read UserChoices section of component card 
    81         IGCM_debug_Print 1 "DefineArrayFromSection : ${compname}_UserChoices ${card}" 
     81        IGCM_debug_Print 2 "DefineArrayFromSection : ${compname}_UserChoices ${card}" 
    8282        IGCM_card_DefineArrayFromSection ${card} UserChoices 
    8383        eval first_option=\${${compname}_UserChoices[0]} > /dev/null 2>&1 
     84        # If section is not empty we define corresponding variables 
    8485        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[*]} 
    8687            if [ X${card_UserChoices[0]} != X ] ; then 
    8788                unset card_UserChoices 
    8889            fi 
    8990            eval set +A card_UserChoices -- \${${compname}_UserChoices[*]} > /dev/null 2>&1 
    90             typeset option 
    9191            for option in ${card_UserChoices[*]} ; do 
    9292                IGCM_card_DefineVariableFromOption ${card} UserChoices ${option} 
     
    9696 
    9797        # Read and Build Output File stuff 
    98         IGCM_debug_Print 1 "DefineArrayFromOption  : ${compname}_OutputFiles ${card}" 
     98        IGCM_debug_Print 2 "DefineArrayFromOption  : ${compname}_OutputFiles ${card}" 
    9999        IGCM_card_DefineArrayFromOption ${card} OutputFiles List 
    100100        ListFilesName=${compname}_OutputFiles_List 
     
    196196        echo 
    197197    done 
    198     echo "-----" 
    199     echo 
    200     IGCM_debug_Print 1 "DefineArrayFromOption  : ListOfComponents" 
    201     IGCM_debug_PrintVariables 3 config_ListOfComponents 
    202198 
    203199    IGCM_debug_PopStack "IGCM_comp_Initialize" 
     
    225221    # Debug Print : 
    226222    echo 
    227     IGCM_debug_Print 1 "IGCM_comp_GetInputInitialStateFiles :" 
     223    IGCM_debug_Print 1 "IGCM_comp_GetInputInitialStateFiles" 
    228224    echo 
    229225 
     
    349345    # Debug Print : 
    350346    echo 
    351     IGCM_debug_Print 1 "IGCM_comp_GetInputSmoothFiles :" 
     347    IGCM_debug_Print 1 "IGCM_comp_GetInputSmoothFiles" 
    352348    echo 
    353349 
     
    356352 
    357353    for comp in ${config_ListOfComponents[*]} ; do 
    358         echo "-----" 
    359354        # Define component 
    360355        eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 
     
    414409    # Debug Print : 
    415410    echo 
    416     IGCM_debug_Print 1 "IGCM_comp_GetInputBoundaryFiles :" 
     411    IGCM_debug_Print 1 "IGCM_comp_GetInputBoundaryFiles" 
    417412    echo 
    418413 
     
    426421    for comp in ${config_ListOfComponents[*]} ; do 
    427422 
    428         echo "-----" 
    429423        # Define component 
    430424        eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 
     
    500494    # Debug Print : 
    501495    echo 
    502     IGCM_debug_Print 1 "IGCM_comp_DelFixeBoundaryFiles :" 
     496    IGCM_debug_Print 1 "IGCM_comp_DelFixeBoundaryFiles" 
    503497    echo 
    504498 
     
    516510    # Debug Print : 
    517511    echo 
    518     IGCM_debug_Print 1 "IGCM_comp_GetInputParametersFiles :" 
     512    IGCM_debug_Print 1 "IGCM_comp_GetInputParametersFiles" 
    519513    echo 
    520514 
     
    563557    # Debug Print : 
    564558    echo 
    565     IGCM_debug_Print 1 "IGCM_comp_GetInputRestartFiles :" 
     559    IGCM_debug_Print 1 "IGCM_comp_GetInputRestartFiles" 
    566560    echo 
    567561 
     
    731725    # Debug Print : 
    732726    echo 
    733     IGCM_debug_Print 1 "IGCM_comp_PeriodStart :" 
     727    IGCM_debug_Print 1 "IGCM_comp_PeriodStart" 
    734728    echo 
    735729 
     
    762756    # Debug Print : 
    763757    echo 
    764     IGCM_debug_Print 1 "IGCM_comp_Update :" 
     758    IGCM_debug_Print 1 "IGCM_comp_Update" 
    765759    echo 
    766760 
     
    794788 
    795789        # Debug Print 
    796         IGCM_debug_Print 3 "Update ${compname} Parameter Files." 
     790        IGCM_debug_Print 1 "Update ${compname} Parameter Files." 
    797791        # UPDATE component 
    798792        ${comp}_Update 
     
    810804    # Debug Print : 
    811805    echo 
    812     IGCM_debug_Print 1 "IGCM_comp_Finalize :" 
     806    IGCM_debug_Print 1 "IGCM_comp_Finalize" 
    813807    echo 
    814808 
     
    10551049 
    10561050                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 ) 
    10581053                nlist_file=${#list_file[@]} 
    10591054                if [ ${nlist_file} -gt 1 ] ; then 
     
    10821077                        eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${file_out}" > /dev/null 2>&1 
    10831078 
    1084                         if ( $ExecutionFail && [ X$( echo ${file_out} | grep "_out" ) != X ] ) ; then 
    1085                             IGCM_sys_Cp ${file_out} ${SUBMIT_DIR} 
     1079                        if ( ${ExecutionFail} ) ; then 
     1080                            IGCM_sys_Cp ${file_out} ${SUBMIT_DIR}/Debug 
    10861081                        fi 
    10871082                    else 
     
    10911086                            eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${file}" > /dev/null 2>&1 
    10921087                        done 
    1093                         if ( $ExecutionFail && [ X$( echo ${file} | grep "_out" ) != X ] ) ; then 
    1094                             IGCM_sys_Cp ${file} ${SUBMIT_DIR}/${PREFIX}_${file} 
     1088                        if ( ${ExecutionFail} ) ; then 
     1089                            IGCM_sys_Cp ${file} ${SUBMIT_DIR}/Debug/${PREFIX}_${file} 
    10951090                        fi 
    10961091                    fi 
     
    11021097                    [ $? -eq 0 ] && eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${file_in}" > /dev/null 2>&1 
    11031098 
    1104                     if ( $ExecutionFail && [ X$( echo ${file_in} | grep "_out" ) != X ] ) ; then 
    1105                         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} 
    11061101                    fi 
    11071102                fi 
  • trunk/libIGCM/libIGCM_config/libIGCM_config.ksh

    r455 r457  
    1919    # Debug Print : 
    2020    echo 
    21     IGCM_debug_Print 1 "IGCM_config_Initialize :" 
    22     echo 
     21    IGCM_debug_Print 1 "IGCM_config_Initialize" 
    2322 
    2423    if [ ! -r ${SUBMIT_DIR}/run.card ]; then  
     
    6564        IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card UserChoices ${option} 
    6665    done 
    67  
     66    echo 
    6867    IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices" 
    6968    # Name Space of this experience  
     
    9392    IGCM_debug_Print 1 "DefineArrayFromSection : ListOfComponents" 
    9493    IGCM_debug_Print 3 ${config_ListOfComponents[*]} 
    95     echo 
    9694 
    9795    NbComponents=${#config_ListOfComponents[*]} 
     
    105103    #================================== 
    106104    # 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" 
    108106    eval Script_Output_Prefix=${config_UserChoices_Script_Output_Prefix:='Script_Output'} 
    109107    IGCM_debug_Print 3 "Script_Output_Prefix = ${Script_Output_Prefix}" 
     
    160158    # and PeriodNb through config.card 
    161159    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" 
    164161    IGCM_debug_Print 3 "R_INIT=${R_INIT}" 
    165162    R_BC=${config_UserChoices_R_BC:=${R_IN}/BC} 
     
    188185        IGCM_sys_MkdirArchive ${R_SAVE} 
    189186    else 
     187        IGCM_sys_TestDirArchive ${R_SAVE} 
     188        [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" 
    190189        #Test state of run in run.card 
    191190        IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/run.card Configuration PeriodState 
     191         
    192192        if ( [ ${run_Configuration_PeriodState} != "Start" ] && [ ${run_Configuration_PeriodState} != "Running" ] && [ ${run_Configuration_PeriodState} != "OnQueue" ] && [ ${run_Configuration_PeriodState} != "Continue" ] ) ; then 
    193193            echo  
    194             IGCM_debug_Print 1 "!!!! IGCM_config_Initialize Error PeriodState : " ${run_Configuration_PeriodState} "!!!!!!!!!!" 
    195             echo  
    196             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 
    197197            IGCM_debug_Verif_Exit 
    198198        fi 
    199199    fi 
    200     IGCM_sys_TestDirArchive ${R_SAVE} 
    201     [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" 
    202200 
    203201    #================================== 
     
    278276        *Y|*y) 
    279277            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}" 
    281279            PeriodLengthInDays=0 
    282280            i=0 
     
    288286        *M|*m) 
    289287            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}" 
    291289            PeriodLengthInDays=0 
    292290            i=0 
     
    321319 
    322320    echo 
    323     IGCM_debug_Print 1 "IGCM_config_Check :" 
     321    IGCM_debug_Print 1 "IGCM_config_Check" 
    324322    echo 
    325323 
     
    331329        echo 
    332330        # modulo (RebuildFrequency and PeriodLength/TimeSeriesFrequency/SeasonalFrequency) must be zero 
    333         IGCM_debug_Print 1 "Coherence between RebuildFrequency and PeriodLength:" 
     331        IGCM_debug_Print 1 "Check coherence between RebuildFrequency and PeriodLength" 
    334332        IGCM_post_CheckModuloFrequency config_Post_RebuildFrequency config_UserChoices_PeriodLength 
    335         IGCM_debug_Print 1 "Coherence between TimeSeriesFrequency and RebuildFrequency:" 
     333        IGCM_debug_Print 1 "Check coherence between TimeSeriesFrequency and RebuildFrequency" 
    336334        IGCM_post_CheckModuloFrequency config_Post_TimeSeriesFrequency config_Post_RebuildFrequency 
    337         IGCM_debug_Print 1 "Coherence between SeasonalFrequency and RebuildFrequency:" 
     335        IGCM_debug_Print 1 "Check coherence between SeasonalFrequency and RebuildFrequency" 
    338336        IGCM_post_CheckModuloFrequency config_Post_SeasonalFrequency config_Post_RebuildFrequency 
    339337    else 
     
    343341        echo 
    344342        #modulo (TimeSeriesFrequency/SeasonalFrequency and PeriodLenght) must be zero 
    345         IGCM_debug_Print 1 "Coherence between TimeSeriesFrequency and PeriodLength:" 
     343        IGCM_debug_Print 1 "Check coherence between TimeSeriesFrequency and PeriodLength" 
    346344        IGCM_post_CheckModuloFrequency config_Post_TimeSeriesFrequency config_UserChoices_PeriodLength 
    347         IGCM_debug_Print 1 "Coherence between SeasonalFrequency and PeriodLength:" 
     345        IGCM_debug_Print 1 "Check coherence between SeasonalFrequency and PeriodLength" 
    348346        IGCM_post_CheckModuloFrequency config_Post_SeasonalFrequency   config_UserChoices_PeriodLength 
    349347    fi 
     
    354352    until [ $i -ge $NbJob ]; do 
    355353        value=${CHUNCK2D_SIZE[${i}]} 
    356         IGCM_debug_Print 1 "Coherence between All Chunck2D frequency and TimeSeriesFrequency:" 
     354        IGCM_debug_Print 1 "Check coherence between All Chunck2D frequency and TimeSeriesFrequency" 
    357355        IGCM_post_CheckModuloFrequency value config_Post_TimeSeriesFrequency 
    358356        case ${value} in   
    359357            *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" 
    361359                IGCM_debug_Exit "This will stop the job" ;; 
    362360        esac 
     
    369367    until [ $i -ge $NbJob ]; do 
    370368        value=${CHUNCK3D_SIZE[${i}]} 
    371         IGCM_debug_Print 1 "Coherence between All Chunck3D frequency and TimeSeriesFrequency:" 
     369        IGCM_debug_Print 1 "Check coherence between All Chunck3D frequency and TimeSeriesFrequency" 
    372370        IGCM_post_CheckModuloFrequency value config_Post_TimeSeriesFrequency 
    373371        case ${value} in   
    374372            *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" 
    376374                IGCM_debug_Exit "This will stop the job" ;; 
    377375        esac 
     
    388386 
    389387    echo 
    390     IGCM_debug_Print 1 "IGCM_config_PeriodStart :" 
     388    IGCM_debug_Print 1 "IGCM_config_PeriodStart" 
    391389    echo 
    392390 
     
    426424        if ( [ ${run_Configuration_PeriodState} != "Running" ] && [ ${run_Configuration_PeriodState} != "OnQueue" ] && [ ${run_Configuration_PeriodState} != "Continue" ] ) ; then 
    427425            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 
    431430            IGCM_debug_Verif_Exit 
    432431        fi 
     
    454453            #eval ls -l ${SUBMIT_DIR}/${Last_Script_Output_Name} 
    455454            #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" 
    457456            IGCM_sys_Cd ${SUBMIT_DIR}/ 
    458457            IGCM_sys_Put_Out ${Last_Script_Output_Name} ${R_OUT_KSH}/${Last_Script_Output_Name}.$$ rw 
     
    483482    # Debug Print : 
    484483    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}" 
    492491 
    493492    #================================================================# 
     
    518517    else 
    519518        if ( IGCM_sys_TestFileArchive ${R_OUT_KSH}/${PREFIX}_${Exe_Output} ) ; then 
    520             IGCM_debug_Print 1 "IGCM_config_PeriodStart" "RErun an old job. DEBUG of DEV mode." 
     519            IGCM_debug_Print 1 "IGCM_config_PeriodStart" "RErun an old job. Allowed in DEBUG or DEV mode." 
    521520        fi 
    522521    fi 
     
    531530 
    532531    echo 
    533     IGCM_debug_Print 1 "IGCM_config_PeriodEnd :" 
     532    IGCM_debug_Print 1 "IGCM_config_PeriodEnd" 
    534533    echo 
    535534 
     
    539538    IGCM_sys_Put_Out ${Exe_Output} ${R_OUT_KSH}/${PREFIX}_${Exe_Output} 
    540539    eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${Exe_Output}" 
    541  
    542540    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 
    545545    typeset comp i     
    546546    typeset ExeNameIn ExeNameOut  
     
    550550    #==================================# 
    551551 
    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 
    563561    fi 
    564562    #==================================# 
     
    575573    for comp in ${config_ListOfComponents[*]} ; do 
    576574 
    577         IGCM_debug_Print 1 ${comp} 
     575        IGCM_debug_Print 3 ${comp} 
    578576 
    579577        eval ExeNameIn=\${config_Executable_${comp}[0]} 
     
    606604        (( i=i+1 )) 
    607605 
    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} 
    617613            fi 
     614            eval IGCM_sys_Put_Out ${ExeNameOut} ${R_OUT_EXE}/${PREFIX}_${ExeNameIn} rw 
    618615        fi 
    619616    done 
     617 
     618    NextExeSize=${NextExeSize}" )" 
     619    IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Log LastExeSize "${NextExeSize}" 
    620620 
    621621    if [ ${DRYRUN} -le 1 ] ; then 
     
    632632    fi 
    633633 
    634     NextExeSize=${NextExeSize}" )" 
    635     IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Log LastExeSize "${NextExeSize}" 
    636  
    637634    # All was right ? no ? then we stop. 
    638635    IGCM_debug_Verif_Exit 
    639636 
    640637    # If all was OK, we can delete all files not necessary for next Job 
     638    echo 
    641639    IGCM_debug_Print 1 "Files that will be deleted before next period-run : " 
    642640 
     
    652650 
    653651    # To use this function, one must copy libIGCM.card from ${libIGCM} directory 
    654     # and put it in ${SUBMIT_DIR} directory. Ater modifications of ${SUBMIT_DIR}/libIGCM.card, 
     652    # and put it in ${SUBMIT_DIR} directory. After modifications of ${SUBMIT_DIR}/libIGCM.card, 
    655653    # variables define inside [UserChanges] will be modified for next Period of libIGCM main loop.  
    656654    if [ -f ${SUBMIT_DIR}/libIGCM.card ] ; then 
     
    676674            case ${option} in 
    677675                config_UserChoices_DateEnd) 
    678                     IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd 
     676                    IGCM_debug_PrintVariables 1 config_UserChoices_DateEnd 
    679677                    DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} ) 
    680678 
     
    688686                    ;; 
    689687                config_UserChoices_PeriodLength) 
     688                    IGCM_debug_Print 1  "Change config_UserChoices_PeriodLength=${config_UserChoices_PeriodLength}" 
    690689                    ;; 
    691690                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)" 
    693692                    ;; 
    694693                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" 
    696695                    IGCM_post_Configure 
    697696                    ;; 
    698697                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" 
    700699                    IGCM_post_Configure 
    701700                    ;; 
    702701                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" 
    704703                    IGCM_post_Configure 
    705704                    ;; 
     
    726725    echo 
    727726    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}" 
    731730 
    732731    PeriodDateBegin=$( IGCM_date_ConvertFormatToHuman ${PeriodDateBegin} ) 
     
    764763 
    765764    echo 
    766     IGCM_debug_Print 1 "IGCM_config_Finalize :" 
     765    IGCM_debug_Print 1 "IGCM_config_Finalize" 
    767766    echo 
    768767 
  • trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh

    r448 r457  
    232232            fi 
    233233            # Mail notification 
    234             #IGCM_sys_SendMail 
     234            #IGCM_sys_SendMailPost 
    235235            # And Good Bye 
    236236            date 
  • trunk/libIGCM/libIGCM_post/libIGCM_post.ksh

    r455 r457  
    2020    # Debug Print : 
    2121    echo 
    22     IGCM_debug_Print 1 "IGCM_post_Configure :" 
    23     echo 
     22    IGCM_debug_Print 1 "IGCM_post_Configure" 
    2423    # 
    2524    # Initialize 
     
    8584    done 
    8685    # 
    87     echo 
    88     IGCM_debug_Print 1 "POST-TREATEMENT flag value : ${POST}" 
     86    IGCM_debug_Print 2 "POST-TREATEMENT flag value : ${POST}" 
    8987    # 
    9088    IGCM_debug_PopStack "IGCM_post_Configure" 
     
    10199    if [ ${POST} = true ]; then 
    102100        echo 
    103         IGCM_debug_Print 1 "IGCM_post_Submit :" 
     101        IGCM_debug_Print 1 "IGCM_post_Submit" 
    104102        echo 
    105         IGCM_debug_Print 1 "POST_DIR = ${POST_DIR}" 
     103        IGCM_debug_Print 2 "POST_DIR = ${POST_DIR}" 
    106104    fi 
    107105 
     
    109107    if [ ${TimeSeriesFrequency} = true ] ; then 
    110108 
    111         IGCM_debug_Print 2 "TIME SERIES POST-PROCESSING ACTIVATED :" 
     109        IGCM_debug_Print 1 "TIME SERIES POST-PROCESSING ACTIVATED" 
    112110        echo 
    113111 
     
    130128            if [ X$( eval echo \${TimeSeries${Dimension}} ) = Xtrue ] ; then 
    131129                # 
    132                 IGCM_debug_Print 2 "TIME SERIES POST-PROCESSING ${Dimension} ACTIVATED :" 
     130                IGCM_debug_Print 1 "TIME SERIES POST-PROCESSING ${Dimension} ACTIVATED" 
    133131                echo 
    134132                # 
     
    219217            if [ X$( eval echo \${TimeSeriesChunck${Dimension}} ) = Xtrue ] ; then 
    220218                # 
    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" 
    222220                echo 
    223221                # Need to Remember This One 
     
    340338    if [ ${SeasonalFrequency} = true ] ; then 
    341339        # 
    342         IGCM_debug_Print 2 "SEASONNAL POST-TREATMENT :" 
     340        IGCM_debug_Print 1 "SEASONNAL POST-TREATMENT" 
    343341        echo 
    344342        # 
     
    435433    if [ ${RebuildFrequency} = true ] ; then 
    436434        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" 
    438436            echo 
    439437            # 
    440438            script=rebuild_fromArchive 
    441439        else 
    442             IGCM_debug_Print 2 "REBUILD POST-TREATMENT FROM WORKDIR:" 
     440            IGCM_debug_Print 1 "REBUILD POST-TREATMENT FROM WORKDIR" 
    443441            echo 
    444442            # 
     
    505503    SlaveFrequency=$( eval echo \${${2}} ) 
    506504 
    507     IGCM_debug_Print 1 "IGCM_post_CheckModuloFrequency : Master=${MasterFrequency} Slave=${SlaveFrequency}" 
     505    IGCM_debug_Print 2 "IGCM_post_CheckModuloFrequency : Master=${MasterFrequency} Slave=${SlaveFrequency}" 
    508506 
    509507    case ${MasterFrequency} in 
     
    515513                    if ( [ ${PeriodSlaveYear} -gt ${PeriodMasterYear} ] || \ 
    516514                        [ $(( ${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}" 
    519517                        IGCM_debug_Exit "Check your frequency" 
    520518                    fi ;; 
     
    523521                    if ( [ ${PeriodSlaveMonth} -gt $(( ${PeriodMasterYear} * 12 )) ] || \ 
    524522                        [ $(( ( ${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}" 
    527525                        IGCM_debug_Exit "Check your frequency" 
    528526                    fi ;; 
     
    533531                        if ( [ ${PeriodSlaveDay} -gt $(( ${PeriodMasterYear} * ${NbDays} )) ] || \ 
    534532                            [ $(( ( ${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}" 
    537535                            IGCM_debug_Exit "Check your frequency" 
    538536                        fi 
    539537                    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" 
    543541                        IGCM_debug_Exit    "Check your frequency ${MasterName} and choose a daily frequency for this one too." 
    544542                    fi ;; 
     
    551549                    if ( [ ${PeriodMasterMonth} -gt $(( ${PeriodSlaveYear} * 12 )) ] || \ 
    552550                        [ $(( ${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}" 
    555553                        IGCM_debug_Exit "Check your frequency" 
    556554                    fi ;; 
     
    559557                    if ( [ ${PeriodSlaveMonth} -gt ${PeriodMasterMonth} ] || \ 
    560558                        [ $(( ${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}" 
    563561                        IGCM_debug_Exit "Check your frequency" 
    564562                    fi ;; 
    565563                *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}" 
    568566                    IGCM_debug_Exit "Check your frequency" ;; 
    569567            esac ;; 
     
    572570            case ${SlaveFrequency} in 
    573571                *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}" 
    576574                    IGCM_debug_Exit "Check your frequency" ;; 
    577575                *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}" 
    580578                    IGCM_debug_Exit "Check your frequency" ;; 
    581579                *D|*d) 
     
    583581                    if ( [ ${PeriodSlaveDay} -gt ${PeriodMasterDay} ] || \ 
    584582                        [ $(( ${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}" 
    587585                        IGCM_debug_Exit "Check your frequency" 
    588586                    fi ;; 
     
    591589            ;; 
    592590        *) 
    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" 
    594592            IGCM_debug_Exit "Check your ${MasterName} in config.card" ;; 
    595593    esac 
     
    622620 
    623621    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}" 
    626623 
    627624    case ${MasterFrequency} in 
     
    675672                    fi;; 
    676673                *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} " ;; 
    679676            esac ;; 
    680677        *D|*d) 
     
    682679            case ${SlaveFrequency} in 
    683680                *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} " ;; 
    686683                *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} " ;; 
    689686                *D|*d) 
    690687                    PeriodSlaveDay=$( echo ${SlaveFrequency} | sed -e "s/[dD]//" ) 
     
    699696            ;; 
    700697        *) 
    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" 
    702699            ;; 
    703700    esac 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh

    r455 r457  
    217217    fi 
    218218 
    219     set -vx 
    220  
    221219    typeset NB_ESSAI DELAI status i 
    222220    # keep standard input for the loop onto temporary file 
    223221    cat >tmp_IGCM_sys_RshPost_$$ 
    224222 
    225     echo cat tmp_IGCM_sys_RshPost_$$ INITIAL 
    226     cat tmp_IGCM_sys_RshPost_$$ 
     223    #echo cat tmp_IGCM_sys_RshPost_$$ INITIAL 
     224    #cat tmp_IGCM_sys_RshPost_$$ 
    227225 
    228226    if [ "X$( grep rebuild_from tmp_IGCM_sys_RshPost_$$ )" != "X" ] ; then 
     
    237235        #\mv tmp.txt tmp_IGCM_sys_RshPost_$$ 
    238236        # 
    239         echo cat tmp_IGCM_sys_RshPost_$$ AFTER 
    240         cat tmp_IGCM_sys_RshPost_$$ 
     237        #echo cat tmp_IGCM_sys_RshPost_$$ AFTER 
     238        #cat tmp_IGCM_sys_RshPost_$$ 
    241239        /bin/ksh <tmp_IGCM_sys_RshPost_$$ 
    242240        if [ $? -gt 0 ] ; then 
     
    283281    fi 
    284282 
    285     set -vx 
    286  
    287283    if ( ${ExitFlag} ) ; then 
    288284        status=failed 
Note: See TracChangeset for help on using the changeset viewer.