Ignore:
Timestamp:
02/27/12 15:17:15 (12 years ago)
Author:
mafoipsl
Message:

Add a stop if executables don't exist.

Location:
branches/libIGCM_MPI_OpenMP
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/libIGCM_MPI_OpenMP/libIGCM_comp/libIGCM_comp.ksh

    r480 r561  
    770770        eval ExeNameOut=\${config_Executable_${comp}[1]} 
    771771 
    772         # If missing executable then stop! 
    773         #if [ ! X${ExeNameIn} = X ] && [ ! -f ${R_EXE}/${ExeNameIn} ] ; then 
    774         #    IGCM_debug_Exit "IGCM_comp_Update missing executable ${ExeNameIn}" 
    775         #fi  
     772        # If missing executable and DRYRUN is set to 0 or 1  then stop! 
     773        if [ ${DRYRUN} -le 1 ] && [ X${ExeNameIn} != X\"\" ] && [ ! -f ${R_EXE}/${ExeNameIn} ] ; then 
     774            IGCM_debug_Exit "IGCM_comp_Update missing executable ${ExeNameIn}" 
     775        fi  
    776776 
    777777        if [ ${Period} -eq 1 ] && [ -f ${R_EXE}/${ExeNameIn} ] ; then 
  • branches/libIGCM_MPI_OpenMP/libIGCM_config/libIGCM_config.ksh

    r558 r561  
    727727    IGCM_sys_Put_Out ${SUBMIT_DIR}/run.card ${R_OUT_KSH}/run.card rw 
    728728 
     729if [ ${DRYRUN} -le 1 ] ; then 
    729730    IGCM_debug_Print 1 "Check components binary : size and creation date" 
    730731 
     
    806807    IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Log LastExeSize "${NextExeSize}" 
    807808 
    808     if [ ${DRYRUN} -le 1 ] ; then 
    809         tail -1500 ${Exe_Output} > ${Exe_Output}_tail.txt 
    810         ExeCpuLog=$( gawk -f ${libIGCM}/libIGCM_sys/IGCM_add_out.awk ${Exe_Output}_tail.txt ) 
    811         RET=$? 
    812         if [ $RET -eq 0 ] ; then 
     809    tail -1500 ${Exe_Output} > ${Exe_Output}_tail.txt 
     810    ExeCpuLog=$( gawk -f ${libIGCM}/libIGCM_sys/IGCM_add_out.awk ${Exe_Output}_tail.txt ) 
     811    RET=$? 
     812    if [ $RET -eq 0 ] ; then 
    813813            # ExeCpuLog variable contents 5 fields 
    814814            echo "${CumulPeriod} ${PeriodDateBegin} ${PeriodDateEnd} ${ExeCpuLog} ${ExeDate}" |   \ 
    815              gawk '{printf("# %11d | %15s | %15s | %19s | %19s | %15.5f | %15.5f | %15.5f | %s\n", \ 
     815            gawk '{printf("# %11d | %15s | %15s | %19s | %19s | %15.5f | %15.5f | %15.5f | %s\n", \ 
    816816                              $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/run.card 
    817         fi 
    818         eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${Exe_Output}_tail.txt" 
    819     fi 
     817    fi 
     818    eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${Exe_Output}_tail.txt" 
     819fi 
    820820 
    821821    # All was right ? no ? then we stop. 
Note: See TracChangeset for help on using the changeset viewer.