Changeset 667 for trunk


Ignore:
Timestamp:
05/11/12 18:16:10 (12 years ago)
Author:
sdipsl
Message:
  • Curie : to overcome I/O issue during copy we loop over cp command. Only IGCM_sys_Put_Out and IGCM_sys_Get for now.

:Interrupted system call
:Cannot send after transport endpoint shutdown

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh

    r664 r667  
    11801180    echo "IGCM_sys_Put_Out :" $@ 
    11811181  fi 
     1182 
     1183  typeset NB_ESSAI DELAI RET i 
     1184 
     1185  # number of tentative 
     1186  NB_ESSAI=10 
     1187  # time delay between tentative 
     1188  DELAI=10 
     1189 
    11821190  if [ $DRYRUN = 0 ]; then 
    11831191    if [ ! -f ${1} ] ; then 
     
    11891197    IGCM_sys_MkdirArchive $( dirname $2 ) 
    11901198    # 
    1191     typeset RET 
    11921199 
    11931200    #===================================================== 
     
    12111218    fi 
    12121219    # 
     1220 
     1221    (( i = 0 )) 
     1222    while [ $i -lt $NB_ESSAI ] ; do 
    12131223    # USUAL WAY 
    1214     \cp $1 $2 > out_rsync 2>&1 
    1215     RET=$? 
     1224      \cp $1 $2 > out_rsync 2>&1 
     1225      RET=$? 
     1226      if [ ${RET} -gt 0 ]; then 
     1227        IGCM_debug_Print 2 "IGCM_sys_Put_Out : cp failed ${i}/${NB_ESSAI}" 
     1228        IGCM_debug_Print 2 "IGCM_sys_Put_Out : sleep ${DELAI} seconds and try again." 
     1229        sleep $DELAI 
     1230      else 
     1231        break 
     1232      fi 
     1233      (( i = i + 1 )) 
     1234    done 
    12161235 
    12171236#       #RSYNC WITH NETWORK SSH CALL 
     
    12971316 
    12981317  typeset DEST RET dm_liste ifile target file_work 
     1318  typeset NB_ESSAI DELAI status i 
    12991319 
    13001320  if ( $DEBUG_sys ) ; then 
    13011321    echo "IGCM_sys_Get :" $@ 
    13021322  fi 
     1323 
     1324  # number of tentative 
     1325  NB_ESSAI=10 
     1326  # time delay between tentative 
     1327  DELAI=10 
     1328 
    13031329  if [ $DRYRUN -le 2 ]; then 
    13041330    if [ X${1} = X'/l' ] ; then 
     
    13681394      for target in ${dm_liste[*]} ; do 
    13691395        local_file=$( basename ${target} ) 
    1370         \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1 
    1371         (( RET = RET + $? )) 
     1396        (( i = 0 )) 
     1397        while [ $i -lt $NB_ESSAI ] ; do 
     1398          \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1 
     1399          status=$? 
     1400          if [ ${status} -gt 0 ]; then 
     1401            IGCM_debug_Print 2 "IGCM_sys_Get : cp failed ${i}/${NB_ESSAI}" 
     1402            IGCM_debug_Print 2 "IGCM_sys_Get : sleep ${DELAI} seconds and try again." 
     1403            sleep $DELAI 
     1404          else 
     1405            break 
     1406          fi 
     1407          (( i = i + 1 )) 
     1408        done 
     1409        (( RET = RET + status )) 
    13721410      done 
    13731411    else 
Note: See TracChangeset for help on using the changeset viewer.