Changeset 433


Ignore:
Timestamp:
04/06/11 16:11:19 (13 years ago)
Author:
mmaipsl
Message:

If EXECUTION fails, we will now copy all output text files from RUN_DIR to SUBMIT_DIR to ease the debug of the problem.

Location:
trunk/libIGCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_job

    r432 r433  
    458458            IGCM_debug_Exit "EXECUTABLE" 
    459459            IGCM_sys_Cp ${Exe_Output} ${SUBMIT_DIR}/${PREFIX}_${Exe_Output}_error 
     460            ExecutionFail=true 
    460461        fi 
    461462        echo                                            >> ${Exe_Output} 
  • trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh

    r431 r433  
    820820    typeset compactoutputs 
    821821 
     822    compactoutputs=false 
     823    if [ X${JobType} != XRUN ] ; then 
     824        compactoutputs=true 
     825    elif [ X${config_UserChoices_CompactText} != Xn ] ; then 
     826        compactoutputs=true 
     827    fi 
     828 
    822829    for comp in ${config_ListOfComponents[*]} ; do 
    823830        # Define component  
     
    10421049            eval NbFiles=\${#${ListTextName}[@]} > /dev/null 2>&1 
    10431050 
    1044             compactoutputs=false 
    1045  
    10461051            (( i=0 )) 
    10471052            until [ $i -eq $NbFiles ]; do 
     
    10531058                nlist_file=${#list_file[@]} 
    10541059                if [ ${nlist_file} -gt 1 ] ; then 
    1055                     if [ X${JobType} != XRUN ] ; then 
    1056                         compactoutputs=true 
    1057                     elif [ X${config_UserChoices_CompactText} != Xn ] ; then 
    1058                         compactoutputs=true 
    1059                     fi 
    1060  
    10611060                    if ( ${compactoutputs} ) ; then 
    10621061                        eval file_out=${PREFIX}_${file_in} 
     
    10821081                        eval IGCM_sys_Put_Out ${file_out} \${R_OUT_${comp}_D}/${file_out} 
    10831082                        eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${file_out}" > /dev/null 2>&1 
     1083 
     1084                        if ( $ExecutionFail && [ X$( echo ${file_out} | grep "_out" ) != X ] ) ; then 
     1085                            IGCM_sys_Cp ${file_out} ${SUBMIT_DIR} 
     1086                        fi 
    10841087                    else 
    10851088                        for file in ${list_file[@]} 
     
    10881091                            eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${file}" > /dev/null 2>&1 
    10891092                        done 
     1093                        if ( $ExecutionFail && [ X$( echo ${file} | grep "_out" ) != X ] ) ; then 
     1094                            IGCM_sys_Cp ${file} ${SUBMIT_DIR}/${PREFIX}_${file} 
     1095                        fi 
    10901096                    fi 
    10911097                else 
     
    10951101                    eval IGCM_sys_Put_Out ${file_in} \${R_OUT_${comp}_D}/${PREFIX}_${file_in} 
    10961102                    [ $? -eq 0 ] && eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${file_in}" > /dev/null 2>&1 
     1103 
     1104                    if ( $ExecutionFail && [ X$( echo ${file_in} | grep "_out" ) != X ] ) ; then 
     1105                        IGCM_sys_Cp ${file_in} ${SUBMIT_DIR}/${PREFIX}_${file_in} 
     1106                    fi 
    10971107                fi 
    10981108            done 
Note: See TracChangeset for help on using the changeset viewer.