Ignore:
Timestamp:
11/22/11 19:03:33 (13 years ago)
Author:
sdipsl
Message:

Dont exit during dmget error (can be ignore most of the time in fact). Stop later if the cp commands fails.
Homogenize commands between titane, cesium and mercure scalaire.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/libIGCM_MPI_OpenMP/libIGCM_sys/libIGCM_sys_titane.ksh

    r491 r521  
    928928    fi 
    929929    if [ $DRYRUN = 0 ]; then 
    930         if [ ! -d ${1} ] ; then 
    931             echo "WARNING : IGCM_sys_Get_Dir ${1} DOES NOT EXIST ." 
    932             IGCM_debug_PopStack "IGCM_sys_Get_Dir" 
    933             return 
    934         fi 
     930#       if [ ! -d ${1} ] ; then 
     931#           echo "WARNING : IGCM_sys_Get_Dir ${1} DOES NOT EXIST ." 
     932#           IGCM_debug_PopStack "IGCM_sys_Get_Dir" 
     933#           return 
     934#       fi 
    935935 
    936936        typeset RET 
     
    940940        # 
    941941        #USUAL WAY 
     942        # add dmget (to demigrate all offline files) to reduce time of this command : 
     943        dmget $1/* 
    942944        \cp -r $1 $2 > out_rsync 2>&1 
    943945        RET=$? 
     
    11631165            echo "IGCM_sys_Get, ERROR : regular file ${dm_liste[0]} DOES NOT EXIST ." 
    11641166            IGCM_debug_Exit "IGCM_sys_Get" 
    1165             IGCM_debug_PopStack "IGCM_sys_Get" 
    1166             return 
    1167         fi 
    1168  
    1169 #       dmget ${dm_liste[*]} > out_rsync 2>&1 
    1170 #       RET=$? 
    1171 #       if [ ${RET} -gt 0 ] ; then 
    1172 #           echo "IGCM_sys_Get : demigration error." 
    1173 #           cat out_rsync 
    1174 #           IGCM_debug_Exit "IGCM_sys_Get" 
    1175 #       fi 
     1167        fi 
     1168 
     1169        dmget ${dm_liste[*]} > out_rsync 2>&1 
     1170        RET=$? 
     1171 
     1172        if [ ${RET} -gt 0 ] ; then 
     1173            echo "WARNING IGCM_sys_Get : demigration error." 
     1174            cat out_rsync 
     1175            echo "WARNING IGCM_sys_Get : will stop later if the cp fails." 
     1176        fi 
     1177 
     1178        #if [ ${RET} -gt 0 ] ; then 
     1179        #    if [ ! "X$( grep "Lost dmusrcmd connection" out_rsync )" = "X" ] ; then 
     1180        #       cat out_rsync 
     1181        #       echo "WARNING IGCM_sys_Get : Lost dmusrcmd connection : " 
     1182        #       sleep 30 
     1183        #       echo "We try another time" 
     1184        #       dmget ${dm_liste[*]} > out_rsync 2>&1 
     1185        #       RET=$? 
     1186        #       if [ ${RET} -gt 0 ] ; then 
     1187        #           echo "ERROR IGCM_sys_Get : again demigration error :" 
     1188        #           cat out_rsync 
     1189        #           IGCM_debug_Exit "IGCM_sys_Get" 
     1190        #       fi 
     1191        #    else 
     1192        #       echo "ERROR IGCM_sys_Get : demigration error :" 
     1193        #       cat out_rsync 
     1194        #       IGCM_debug_Exit "IGCM_sys_Get" 
     1195        #    fi 
     1196        #fi 
    11761197 
    11771198        #USUAL WAY 
Note: See TracChangeset for help on using the changeset viewer.