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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.