Index: trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh
===================================================================
--- trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh	(revision 717)
+++ trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh	(revision 719)
@@ -712,11 +712,11 @@
 #D-  Error values and explanations can depend on your system version.
 function IGCM_sys_Rsync_out {
-  RET=$1
-  if [ ! $RET ] ; then
+  status=$1
+  if [ ! $status ] ; then
     echo "rsync error !"
   fi
 
   if [ $MYLANG = "fr" ]; then
-    case $RET in
+    case $status in
     0)  return ;;
     1)  echo "Erreur de rsync ; RERR_SYNTAX : "
@@ -766,9 +766,9 @@
       echo "Temps d'attente écoulé dans l'envoi/réception de données"
       return;;
-    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $RET
+    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $status
       return;;
     esac
   elif [ $MYLANG = "en" ] ; then
-    case $RET in
+    case $status in
     0)  return;;
     1)  echo "rsync error : Syntax or usage error "
@@ -807,5 +807,5 @@
     30) echo "rsync error : Timeout in data send/receive "
       return;;
-    *)  echo "rsync error : return code of rsync unknown :" $RET
+    *)  echo "rsync error : return code of rsync unknown :" $status
       return;;
     esac
@@ -1275,5 +1275,5 @@
 
     if [ X${skip} = Xfalse ] ; then
-      (( i = 0 ))
+      i=0
       while [ $i -lt $NB_ESSAI ] ; do
         # USUAL WAY
@@ -1410,5 +1410,5 @@
   IGCM_debug_PushStack "IGCM_sys_Get" $@
 
-  typeset DEST RET dm_liste ifile target file_work
+  typeset DEST dm_liste ifile target file_work
   typeset NB_ESSAI DELAI status i
 
@@ -1476,10 +1476,22 @@
     #fi
 
+    #   #RSYNC WITH NETWORK SSH CALL
+    #   echo ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
+    #   ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} >> out_rsync 2>&1
+
+    #   #RSYNC WITH NFS USE
+    #   echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync 2>&1
+    #   ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1
+
+    #   status=$?
+    #   IGCM_sys_Rsync_out $status
+
+    #   ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
+    #   (( status=status+$? ))
+
     #USUAL WAY
     if [ X${1} = X'/l' ] ; then
-      (( RET=0 ))
       for target in ${dm_liste[*]} ; do
         local_file=$( basename ${target} )
-        (( i = 0 ))
         # test if the target file is present before the loop
         IGCM_sys_TestFileArchive ${target}
@@ -1489,4 +1501,5 @@
           IGCM_debug_Exit "IGCM_sys_Get"
         else
+          i=0
           while [ $i -lt $NB_ESSAI ] ; do
             \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
@@ -1501,33 +1514,36 @@
             (( i = i + 1 ))
           done
-          (( RET = RET + status ))
+          if [ ${status} -gt 0 ] ; then
+            echo "IGCM_sys_Get : error"
+            cat out_rsync
+            \rm out_rsync
+            IGCM_debug_Exit "IGCM_sys_Get"
+          else
+            \rm out_rsync
+          fi
         fi
       done
     else
-      \cp ${dm_liste} ${DEST} >> out_rsync 2>&1
-      status=$?
-    fi
-
-#       #RSYNC WITH NETWORK SSH CALL
-#       echo ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
-#       ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} >> out_rsync 2>&1
-
-#       #RSYNC WITH NFS USE
-#       echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync 2>&1
-#       ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1
-
-#       status=$?
-#       IGCM_sys_Rsync_out $status
-
-#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
-#       (( RET=RET+$? ))
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_Get : error"
-      cat out_rsync
-      \rm out_rsync
-      IGCM_debug_Exit "IGCM_sys_Get"
-    else
-      \rm out_rsync
+      i=0
+      while [ $i -lt $NB_ESSAI ] ; do
+        \cp ${dm_liste} ${DEST} >> out_rsync 2>&1
+        status=$?
+        if [ ${status} -gt 0 ]; then
+          IGCM_debug_Print 2 "IGCM_sys_Get : cp failed error code ${status} ${i}/${NB_ESSAI}"
+          IGCM_debug_Print 2 "IGCM_sys_Get : sleep ${DELAI} seconds and try again."
+          sleep $DELAI
+        else
+          break
+        fi
+        (( i = i + 1 ))
+      done
+      if [ ${status} -gt 0 ] ; then
+        echo "IGCM_sys_Get : error"
+        cat out_rsync
+        \rm out_rsync
+        IGCM_debug_Exit "IGCM_sys_Get"
+      else
+        \rm out_rsync
+      fi
     fi
   else
@@ -1545,9 +1561,16 @@
   IGCM_debug_PushStack "IGCM_sys_GetBuffer" $@
 
-  typeset DEST RET status buf_liste ifile target file_work
+  typeset DEST buf_liste ifile target file_work
+  typeset NB_ESSAI DELAI status i
 
   if ( $DEBUG_sys ) ; then
     echo "IGCM_sys_GetBuffer :" $@
   fi
+
+  # number of tentative
+  NB_ESSAI=3
+  # time delay between tentative
+  DELAI=2
+
   if [ $DRYRUN -le 2 ]; then
     if [ X${1} = X'/l' ] ; then
@@ -1561,22 +1584,50 @@
     #USUAL WAY
     if [ X${1} = X'/l' ] ; then
-      (( RET=0 ))
       for target in ${buf_liste[*]} ; do
         local_file=$( basename ${target} )
-        \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
-        (( RET = RET + $? ))
+        i=0
+        while [ $i -lt $NB_ESSAI ] ; do
+          \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
+          status=$?
+          if [ ${status} -gt 0 ]; then
+            IGCM_debug_Print 2 "IGCM_sys_GetBuffer : cp failed error code ${status} ${i}/${NB_ESSAI}"
+            IGCM_debug_Print 2 "IGCM_sys_GetBuffer : sleep ${DELAI} seconds and try again."
+            sleep $DELAI
+          else
+            break
+          fi
+          (( i = i + 1 ))
+        done
+        if [ ${status} -gt 0 ] ; then
+          echo "IGCM_sys_Get : error"
+          cat out_rsync
+          \rm out_rsync
+          IGCM_debug_Exit "IGCM_sys_GetBuffer"
+        else
+          \rm out_rsync
+        fi
       done
     else
-      \cp ${buf_liste} ${DEST} >> out_rsync 2>&1
-      status=$?
-    fi
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_GetBuffer : error"
-      cat out_rsync
-      \rm out_rsync
-      IGCM_debug_Exit "IGCM_sys_GetBuffer"
-    else
-      \rm out_rsync
+      i=0
+      while [ $i -lt $NB_ESSAI ] ; do
+        \cp ${buf_liste} ${DEST} >> out_rsync 2>&1
+        status=$?
+        if [ ${status} -gt 0 ]; then
+          IGCM_debug_Print 2 "IGCM_sys_GetBuffer : cp failed error code ${status} ${i}/${NB_ESSAI}"
+          IGCM_debug_Print 2 "IGCM_sys_GetBuffer : sleep ${DELAI} seconds and try again."
+          sleep $DELAI
+        else
+          break
+        fi
+        (( i = i + 1 ))
+      done
+      if [ ${status} -gt 0 ] ; then
+        echo "IGCM_sys_Get : error"
+        cat out_rsync
+        \rm out_rsync
+        IGCM_debug_Exit "IGCM_sys_GetBuffer"
+      else
+        \rm out_rsync
+      fi
     fi
   else
Index: trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercure.ksh
===================================================================
--- trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercure.ksh	(revision 717)
+++ trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercure.ksh	(revision 719)
@@ -559,11 +559,11 @@
 #D-  Error values and explanations can depend on your system version.
 function IGCM_sys_Rsync_out {
-  RET=$1
-  if [ ! $RET ] ; then
+  status=$1
+  if [ ! $status ] ; then
     echo "rsync error !"
   fi
 
   if [ $MYLANG = "fr" ]; then
-    case $RET in
+    case $status in
     0)  return ;;
     1)  echo "Erreur de rsync ; RERR_SYNTAX : "
@@ -613,9 +613,9 @@
       echo "Temps d'attente écoulé dans l'envoi/réception de données"
       return;;
-    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $RET
+    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $status
       return;;
     esac
   elif [ $MYLANG = "en" ] ; then
-    case $RET in
+    case $status in
     0)  return;;
     1)  echo "rsync error : Syntax or usage error "
@@ -654,5 +654,5 @@
     30) echo "rsync error : Timeout in data send/receive "
       return;;
-    *)  echo "rsync error : return code of rsync unknown :" $RET
+    *)  echo "rsync error : return code of rsync unknown :" $status
       return;;
     esac
@@ -1078,5 +1078,5 @@
 
     if [ X${skip} = Xfalse ] ; then
-      (( i = 0 ))
+      i=0
       while [ $i -lt $NB_ESSAI ] ; do
         # USUAL WAY
@@ -1214,5 +1214,5 @@
   IGCM_debug_PushStack "IGCM_sys_Get" $@
 
-  typeset DEST RET dm_liste ifile target file_work
+  typeset DEST dm_liste ifile target file_work
   typeset NB_ESSAI DELAI status i
 
@@ -1280,10 +1280,22 @@
     #fi
 
+    #   #RSYNC WITH NETWORK SSH CALL
+    #   echo ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
+    #   ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} >> out_rsync 2>&1
+
+    #   #RSYNC WITH NFS USE
+    #   echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync 2>&1
+    #   ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1
+
+    #   status=$?
+    #   IGCM_sys_Rsync_out $status
+
+    #   ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
+    #   (( status=status+$? ))
+
     #USUAL WAY
     if [ X${1} = X'/l' ] ; then
-      (( RET=0 ))
       for target in ${dm_liste[*]} ; do
         local_file=$( basename ${target} )
-        (( i = 0 ))
         # test if the target file is present before the loop
         IGCM_sys_TestFileArchive ${target}
@@ -1293,4 +1305,5 @@
           IGCM_debug_Exit "IGCM_sys_Get"
         else
+          i=0
           while [ $i -lt $NB_ESSAI ] ; do
             \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
@@ -1305,32 +1318,36 @@
             (( i = i + 1 ))
           done
-          (( RET = RET + status ))
+          if [ ${status} -gt 0 ] ; then
+            echo "IGCM_sys_Get : error"
+            cat out_rsync
+            \rm out_rsync
+            IGCM_debug_Exit "IGCM_sys_Get"
+          else
+            \rm out_rsync
+          fi
         fi
       done
     else
-      \cp ${dm_liste} ${DEST} >> out_rsync 2>&1
-      status=$?
-    fi
-
-#       #RSYNC WITH NETWORK SSH CALL
-#       echo ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
-#       ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} >> out_rsync 2>&1
-
-#       #RSYNC WITH NFS USE
-#       echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync 2>&1
-#       ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1
-
-#       status=$?
-#       IGCM_sys_Rsync_out $status
-
-#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
-#       (( RET=RET+$? ))
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_Get : error"
-      cat out_rsync
-#      IGCM_debug_Exit "IGCM_sys_Get"
-    else
-      \rm out_rsync
+      i=0
+      while [ $i -lt $NB_ESSAI ] ; do
+        \cp ${dm_liste} ${DEST} >> out_rsync 2>&1
+        status=$?
+        if [ ${status} -gt 0 ]; then
+          IGCM_debug_Print 2 "IGCM_sys_Get : cp failed error code ${status} ${i}/${NB_ESSAI}"
+          IGCM_debug_Print 2 "IGCM_sys_Get : sleep ${DELAI} seconds and try again."
+          sleep $DELAI
+        else
+          break
+        fi
+        (( i = i + 1 ))
+      done
+      if [ ${status} -gt 0 ] ; then
+        echo "IGCM_sys_Get : error"
+        cat out_rsync
+        \rm out_rsync
+        IGCM_debug_Exit "IGCM_sys_Get"
+      else
+        \rm out_rsync
+      fi
     fi
   else
@@ -1348,9 +1365,16 @@
   IGCM_debug_PushStack "IGCM_sys_GetBuffer" $@
 
-  typeset DEST RET status buf_liste ifile target file_work
+  typeset DEST buf_liste ifile target file_work
+  typeset NB_ESSAI DELAI status i
 
   if ( $DEBUG_sys ) ; then
     echo "IGCM_sys_GetBuffer :" $@
   fi
+
+  # number of tentative
+  NB_ESSAI=3
+  # time delay between tentative
+  DELAI=2
+
   if [ $DRYRUN -le 2 ]; then
     if [ X${1} = X'/l' ] ; then
@@ -1364,22 +1388,50 @@
     #USUAL WAY
     if [ X${1} = X'/l' ] ; then
-      (( RET=0 ))
       for target in ${buf_liste[*]} ; do
         local_file=$( basename ${target} )
-        \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
-        (( RET = RET + $? ))
+        i=0
+        while [ $i -lt $NB_ESSAI ] ; do
+          \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
+          status=$?
+          if [ ${status} -gt 0 ]; then
+            IGCM_debug_Print 2 "IGCM_sys_GetBuffer : cp failed error code ${status} ${i}/${NB_ESSAI}"
+            IGCM_debug_Print 2 "IGCM_sys_GetBuffer : sleep ${DELAI} seconds and try again."
+            sleep $DELAI
+          else
+            break
+          fi
+          (( i = i + 1 ))
+        done
+        if [ ${status} -gt 0 ] ; then
+          echo "IGCM_sys_Get : error"
+          cat out_rsync
+          \rm out_rsync
+          IGCM_debug_Exit "IGCM_sys_GetBuffer"
+        else
+          \rm out_rsync
+        fi
       done
     else
-      \cp ${buf_liste} ${DEST} >> out_rsync 2>&1
-      status=$?
-    fi
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_GetBuffer : error"
-      cat out_rsync
-      \rm out_rsync
-      IGCM_debug_Exit "IGCM_sys_GetBuffer"
-    else
-      \rm out_rsync
+      i=0
+      while [ $i -lt $NB_ESSAI ] ; do
+        \cp ${buf_liste} ${DEST} >> out_rsync 2>&1
+        status=$?
+        if [ ${status} -gt 0 ]; then
+          IGCM_debug_Print 2 "IGCM_sys_GetBuffer : cp failed error code ${status} ${i}/${NB_ESSAI}"
+          IGCM_debug_Print 2 "IGCM_sys_GetBuffer : sleep ${DELAI} seconds and try again."
+          sleep $DELAI
+        else
+          break
+        fi
+        (( i = i + 1 ))
+      done
+      if [ ${status} -gt 0 ] ; then
+        echo "IGCM_sys_Get : error"
+        cat out_rsync
+        \rm out_rsync
+        IGCM_debug_Exit "IGCM_sys_GetBuffer"
+      else
+        \rm out_rsync
+      fi
     fi
   else
@@ -1552,5 +1604,5 @@
   i=0
   while [ $i -lt $NB_ESSAI ] ; do
-      /home/cont003/p86ipsl/X86_64/bin/rebuild -f -o $@ > out_rsync 2>&1
+    /home/cont003/p86ipsl/X86_64/bin/rebuild -f -o $@ > out_rsync 2>&1
     status=$?
     if [ ${status} -gt 0 ] ; then
Index: trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercurex9.ksh
===================================================================
--- trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercurex9.ksh	(revision 717)
+++ trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercurex9.ksh	(revision 719)
@@ -14,5 +14,5 @@
 #=========================================================
 # The documentation of this file can be automatically generated
-# if you use the prefix #D- for comments to be extracted. 
+# if you use the prefix #D- for comments to be extracted.
 # Extract with command: cat lib* | grep "^#D-" | cut -c "4-"
 #=========================================================
@@ -22,5 +22,5 @@
 #D-#==================================================
 #D-
-#D- This ksh library if a layer under some usefull 
+#D- This ksh library if a layer under some usefull
 #D-environment variables and shell commands.
 #D-All those definitions depend on host particularities.
@@ -676,11 +676,11 @@
 #D-  Error values and explanations can depend on your system version.
 function IGCM_sys_Rsync_out {
-  RET=$1
-  if [ ! $RET ] ; then
+  status=$1
+  if [ ! $status ] ; then
     echo "rsync error !"
   fi
 
   if [ $MYLANG = "fr" ]; then
-    case $RET in
+    case $status in
     0)  return ;;
     1)  echo "Erreur de rsync ; RERR_SYNTAX : "
@@ -730,9 +730,9 @@
       echo "Temps d'attente écoulé dans l'envoi/réception de données"
       return;;
-    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $RET
+    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $status
       return;;
     esac
   elif [ $MYLANG = "en" ] ; then
-    case $RET in
+    case $status in
     0)  return;;
     1)  echo "rsync error : Syntax or usage error "
@@ -771,5 +771,5 @@
     30) echo "rsync error : Timeout in data send/receive "
       return;;
-    *)  echo "rsync error : return code of rsync unknown :" $RET
+    *)  echo "rsync error : return code of rsync unknown :" $status
       return;;
     esac
@@ -1161,5 +1161,5 @@
 
     if [ X${skip} = Xfalse ] ; then
-      (( i = 0 ))
+      i=0
       while [ $i -lt $NB_ESSAI ] ; do
         # USUAL WAY
@@ -1296,5 +1296,5 @@
   IGCM_debug_PushStack "IGCM_sys_Get" $@
 
-  typeset DEST RET dm_liste ifile target file_work
+  typeset DEST dm_liste ifile target file_work
   typeset NB_ESSAI DELAI status i
 
@@ -1362,10 +1362,22 @@
     #fi
 
+    #   #RSYNC WITH NETWORK SSH CALL
+    #   echo ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
+    #   ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} >> out_rsync 2>&1
+
+    #   #RSYNC WITH NFS USE
+    #   echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync 2>&1
+    #   ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1
+
+    #   status=$?
+    #   IGCM_sys_Rsync_out $status
+
+    #   ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
+    #   (( status=status+$? ))
+
     #USUAL WAY
     if [ X${1} = X'/l' ] ; then
-      (( RET=0 ))
       for target in ${dm_liste[*]} ; do
         local_file=$( basename ${target} )
-        (( i = 0 ))
         # test if the target file is present before the loop
         IGCM_sys_TestFileArchive ${target}
@@ -1375,4 +1387,5 @@
           IGCM_debug_Exit "IGCM_sys_Get"
         else
+          i=0
           while [ $i -lt $NB_ESSAI ] ; do
             \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
@@ -1387,33 +1400,36 @@
             (( i = i + 1 ))
           done
-          (( RET = RET + status ))
+          if [ ${status} -gt 0 ] ; then
+            echo "IGCM_sys_Get : error"
+            cat out_rsync
+            \rm out_rsync
+            IGCM_debug_Exit "IGCM_sys_Get"
+          else
+            \rm out_rsync
+          fi
         fi
       done
     else
-      \cp ${dm_liste} ${DEST} >> out_rsync 2>&1
-      status=$?
-    fi
-
-#       #RSYNC WITH NETWORK SSH CALL
-#       echo ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
-#       ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} >> out_rsync 2>&1
-
-#       #RSYNC WITH NFS USE
-#       echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync 2>&1
-#       ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1
-
-#       status=$?
-#       IGCM_sys_Rsync_out $status
-
-#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
-#       (( RET=RET+$? ))
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_Get : error"
-      cat out_rsync
-      \rm out_rsync
-      IGCM_debug_Exit "IGCM_sys_Get"
-    else
-      \rm out_rsync
+      i=0
+      while [ $i -lt $NB_ESSAI ] ; do
+        \cp ${dm_liste} ${DEST} >> out_rsync 2>&1
+        status=$?
+        if [ ${status} -gt 0 ]; then
+          IGCM_debug_Print 2 "IGCM_sys_Get : cp failed error code ${status} ${i}/${NB_ESSAI}"
+          IGCM_debug_Print 2 "IGCM_sys_Get : sleep ${DELAI} seconds and try again."
+          sleep $DELAI
+        else
+          break
+        fi
+        (( i = i + 1 ))
+      done
+      if [ ${status} -gt 0 ] ; then
+        echo "IGCM_sys_Get : error"
+        cat out_rsync
+        \rm out_rsync
+        IGCM_debug_Exit "IGCM_sys_Get"
+      else
+        \rm out_rsync
+      fi
     fi
   else
@@ -1431,9 +1447,16 @@
   IGCM_debug_PushStack "IGCM_sys_GetBuffer" $@
 
-  typeset DEST RET status buf_liste ifile target file_work
+  typeset DEST buf_liste ifile target file_work
+  typeset NB_ESSAI DELAI status i
 
   if ( $DEBUG_sys ) ; then
     echo "IGCM_sys_GetBuffer :" $@
   fi
+
+  # number of tentative
+  NB_ESSAI=3
+  # time delay between tentative
+  DELAI=2
+
   if [ $DRYRUN -le 2 ]; then
     if [ X${1} = X'/l' ] ; then
@@ -1447,22 +1470,50 @@
     #USUAL WAY
     if [ X${1} = X'/l' ] ; then
-      (( RET=0 ))
       for target in ${buf_liste[*]} ; do
         local_file=$( basename ${target} )
-        \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
-        (( RET = RET + $? ))
+        i=0
+        while [ $i -lt $NB_ESSAI ] ; do
+          \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
+          status=$?
+          if [ ${status} -gt 0 ]; then
+            IGCM_debug_Print 2 "IGCM_sys_GetBuffer : cp failed error code ${status} ${i}/${NB_ESSAI}"
+            IGCM_debug_Print 2 "IGCM_sys_GetBuffer : sleep ${DELAI} seconds and try again."
+            sleep $DELAI
+          else
+            break
+          fi
+          (( i = i + 1 ))
+        done
+        if [ ${status} -gt 0 ] ; then
+          echo "IGCM_sys_Get : error"
+          cat out_rsync
+          \rm out_rsync
+          IGCM_debug_Exit "IGCM_sys_GetBuffer"
+        else
+          \rm out_rsync
+        fi
       done
     else
-      \cp ${buf_liste} ${DEST} >> out_rsync 2>&1
-      status=$?
-    fi
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_GetBuffer : error"
-      cat out_rsync
-      \rm out_rsync
-      IGCM_debug_Exit "IGCM_sys_GetBuffer"
-    else
-      \rm out_rsync
+      i=0
+      while [ $i -lt $NB_ESSAI ] ; do
+        \cp ${buf_liste} ${DEST} >> out_rsync 2>&1
+        status=$?
+        if [ ${status} -gt 0 ]; then
+          IGCM_debug_Print 2 "IGCM_sys_GetBuffer : cp failed error code ${status} ${i}/${NB_ESSAI}"
+          IGCM_debug_Print 2 "IGCM_sys_GetBuffer : sleep ${DELAI} seconds and try again."
+          sleep $DELAI
+        else
+          break
+        fi
+        (( i = i + 1 ))
+      done
+      if [ ${status} -gt 0 ] ; then
+        echo "IGCM_sys_Get : error"
+        cat out_rsync
+        \rm out_rsync
+        IGCM_debug_Exit "IGCM_sys_GetBuffer"
+      else
+        \rm out_rsync
+      fi
     fi
   else
Index: trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh
===================================================================
--- trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh	(revision 717)
+++ trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh	(revision 719)
@@ -883,5 +883,5 @@
     typeset status
 
-        #USUAL WAY
+    #USUAL WAY
     \cp -R $1 $2 > out_rsync 2>&1
     status=$?
@@ -919,5 +919,5 @@
     typeset status
 
-        #USUAL WAY
+    #USUAL WAY
     cp -RL $1 $2 > out_rsync 2>&1
     status=$?
@@ -1054,5 +1054,5 @@
 
     typeset status
-        #
+    #
     if [ X${JobType} = XRUN ] ; then
       if [ X${3} = X ] ; then
@@ -1094,4 +1094,7 @@
     echo "IGCM_sys_PutBuffer_Out :" $@
   fi
+
+  typeset status
+
   if [ $DRYRUN = 0 ]; then
     if [ ! -f ${1} ] ; then
@@ -1103,5 +1106,4 @@
     IGCM_sys_Mkdir $( dirname $2 )
     #
-    typeset status
 
     if [ X${JobType} = XRUN ] ; then
@@ -1157,5 +1159,5 @@
       echo "IGCM_sys_Get, ERROR : regular file ${dm_liste[0]} DOES NOT EXIST ."
       IGCM_debug_Exit "IGCM_sys_Get"
-            #return
+      #return
     fi
 
@@ -1283,5 +1285,4 @@
   return 0
 }
-
 
 #D-#==================================================
Index: trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh
===================================================================
--- trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh	(revision 717)
+++ trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh	(revision 719)
@@ -42,15 +42,15 @@
 # YOU MUST COMPILE YOUR EXE FILES FOR DRYRUN MODE !
 # -------------------------------------------------------------------------------------
-# | DRYRUN=  |	Date computations, | sys_Get	|  Exe    | sys_Put_Out; sys_Put_Rest |
-# |          |	Cp/Exe param files |		|  Chmod  |                           |
-# |          |      Qsub           |		|         |                           |
+# | DRYRUN=  |  Date computations, | sys_Get    |  Exe    | sys_Put_Out; sys_Put_Rest |
+# |          |  Cp/Exe param files |            |  Chmod  |                           |
+# |          |      Qsub           |            |         |                           |
 # -------------------------------------------------------------------------------------
-# |    0     |       yes           |	yes	|  yes    |      yes                  |
+# |    0     |       yes           |    yes     |  yes    |      yes                  |
 # -------------------------------------------------------------------------------------
-# |    1     |       yes           |	yes	|  yes    |      no                   |
+# |    1     |       yes           |    yes     |  yes    |      no                   |
 # -------------------------------------------------------------------------------------
-# |    2     |       yes           |	yes	|  no     |      no                   |
+# |    2     |       yes           |    yes     |  no     |      no                   |
 # -------------------------------------------------------------------------------------
-# |    3     |       yes           |	no	|  no     |      no                   |
+# |    3     |       yes           |    no      |  no     |      no                   |
 # -------------------------------------------------------------------------------------
 
@@ -346,5 +346,5 @@
   fi
 
-    cat  << END_MAIL > job_end.mail
+  cat  << END_MAIL > job_end.mail
 Dear ${LOGIN},
 
@@ -738,11 +738,11 @@
 #D-  Error values and explanations can depend on your system version.
 function IGCM_sys_Rsync_out {
-  RET=$1
-  if [ ! $RET ] ; then
+  status=$1
+  if [ ! $status ] ; then
     echo "rsync error !"
   fi
 
   if [ $MYLANG = "fr" ]; then
-    case $RET in
+    case $status in
     0)  return ;;
     1)  echo "Erreur de rsync ; RERR_SYNTAX : "
@@ -792,9 +792,9 @@
       echo "Temps d'attente écoulé dans l'envoi/réception de données"
       return;;
-    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $RET
+    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $status
       return;;
     esac
   elif [ $MYLANG = "en" ] ; then
-    case $RET in
+    case $status in
     0)  return;;
     1)  echo "rsync error : Syntax or usage error "
@@ -833,5 +833,5 @@
     30) echo "rsync error : Timeout in data send/receive "
       return;;
-    *)  echo "rsync error : return code of rsync unknown :" $RET
+    *)  echo "rsync error : return code of rsync unknown :" $status
       return;;
     esac
@@ -1302,5 +1302,5 @@
 
     if [ X${skip} = Xfalse ] ; then
-      (( i = 0 ))
+      i=0
       while [ $i -lt $NB_ESSAI ] ; do
         # USUAL WAY
@@ -1437,5 +1437,5 @@
   IGCM_debug_PushStack "IGCM_sys_Get" $@
 
-  typeset DEST RET dm_liste ifile target file_work
+  typeset DEST dm_liste ifile target file_work
   typeset NB_ESSAI DELAI status i
 
@@ -1503,10 +1503,22 @@
     #fi
 
+    #   #RSYNC WITH NETWORK SSH CALL
+    #   echo ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
+    #   ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} >> out_rsync 2>&1
+
+    #   #RSYNC WITH NFS USE
+    #   echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync 2>&1
+    #   ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1
+
+    #   status=$?
+    #   IGCM_sys_Rsync_out $status
+
+    #   ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
+    #   (( status=status+$? ))
+
     #USUAL WAY
     if [ X${1} = X'/l' ] ; then
-      (( RET=0 ))
       for target in ${dm_liste[*]} ; do
         local_file=$( basename ${target} )
-        (( i = 0 ))
         # test if the target file is present before the loop
         IGCM_sys_TestFileArchive ${target}
@@ -1516,4 +1528,5 @@
           IGCM_debug_Exit "IGCM_sys_Get"
         else
+          i=0
           while [ $i -lt $NB_ESSAI ] ; do
             \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
@@ -1528,33 +1541,36 @@
             (( i = i + 1 ))
           done
-          (( RET = RET + status ))
+          if [ ${status} -gt 0 ] ; then
+            echo "IGCM_sys_Get : error"
+            cat out_rsync
+            \rm out_rsync
+            IGCM_debug_Exit "IGCM_sys_Get"
+          else
+            \rm out_rsync
+          fi
         fi
       done
     else
-      \cp ${dm_liste} ${DEST} >> out_rsync 2>&1
-      status=$?
-    fi
-
-#       #RSYNC WITH NETWORK SSH CALL
-#       echo ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
-#       ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} >> out_rsync 2>&1
-
-#       #RSYNC WITH NFS USE
-#       echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync 2>&1
-#       ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1
-
-#       status=$?
-#       IGCM_sys_Rsync_out $status
-
-#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
-#       (( RET=RET+$? ))
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_Get : error"
-      cat out_rsync
-      \rm out_rsync
-      IGCM_debug_Exit "IGCM_sys_Get"
-    else
-      \rm out_rsync
+      i=0
+      while [ $i -lt $NB_ESSAI ] ; do
+        \cp ${dm_liste} ${DEST} >> out_rsync 2>&1
+        status=$?
+        if [ ${status} -gt 0 ]; then
+          IGCM_debug_Print 2 "IGCM_sys_Get : cp failed error code ${status} ${i}/${NB_ESSAI}"
+          IGCM_debug_Print 2 "IGCM_sys_Get : sleep ${DELAI} seconds and try again."
+          sleep $DELAI
+        else
+          break
+        fi
+        (( i = i + 1 ))
+      done
+      if [ ${status} -gt 0 ] ; then
+        echo "IGCM_sys_Get : error"
+        cat out_rsync
+        \rm out_rsync
+        IGCM_debug_Exit "IGCM_sys_Get"
+      else
+        \rm out_rsync
+      fi
     fi
   else
@@ -1572,9 +1588,16 @@
   IGCM_debug_PushStack "IGCM_sys_GetBuffer" $@
 
-  typeset DEST RET status buf_liste ifile target file_work
+  typeset DEST buf_liste ifile target file_work
+  typeset NB_ESSAI DELAI status i
 
   if ( $DEBUG_sys ) ; then
     echo "IGCM_sys_GetBuffer :" $@
   fi
+
+  # number of tentative
+  NB_ESSAI=3
+  # time delay between tentative
+  DELAI=2
+
   if [ $DRYRUN -le 2 ]; then
     if [ X${1} = X'/l' ] ; then
@@ -1588,22 +1611,50 @@
     #USUAL WAY
     if [ X${1} = X'/l' ] ; then
-      (( RET=0 ))
       for target in ${buf_liste[*]} ; do
         local_file=$( basename ${target} )
-        \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
-        (( RET = RET + $? ))
+        i=0
+        while [ $i -lt $NB_ESSAI ] ; do
+          \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
+          status=$?
+          if [ ${status} -gt 0 ]; then
+            IGCM_debug_Print 2 "IGCM_sys_GetBuffer : cp failed error code ${status} ${i}/${NB_ESSAI}"
+            IGCM_debug_Print 2 "IGCM_sys_GetBuffer : sleep ${DELAI} seconds and try again."
+            sleep $DELAI
+          else
+            break
+          fi
+          (( i = i + 1 ))
+        done
+        if [ ${status} -gt 0 ] ; then
+          echo "IGCM_sys_Get : error"
+          cat out_rsync
+          \rm out_rsync
+          IGCM_debug_Exit "IGCM_sys_GetBuffer"
+        else
+          \rm out_rsync
+        fi
       done
     else
-      \cp ${buf_liste} ${DEST} >> out_rsync 2>&1
-      status=$?
-    fi
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_GetBuffer : error"
-      cat out_rsync
-      \rm out_rsync
-      IGCM_debug_Exit "IGCM_sys_GetBuffer"
-    else
-      \rm out_rsync
+      i=0
+      while [ $i -lt $NB_ESSAI ] ; do
+        \cp ${buf_liste} ${DEST} >> out_rsync 2>&1
+        status=$?
+        if [ ${status} -gt 0 ]; then
+          IGCM_debug_Print 2 "IGCM_sys_GetBuffer : cp failed error code ${status} ${i}/${NB_ESSAI}"
+          IGCM_debug_Print 2 "IGCM_sys_GetBuffer : sleep ${DELAI} seconds and try again."
+          sleep $DELAI
+        else
+          break
+        fi
+        (( i = i + 1 ))
+      done
+      if [ ${status} -gt 0 ] ; then
+        echo "IGCM_sys_Get : error"
+        cat out_rsync
+        \rm out_rsync
+        IGCM_debug_Exit "IGCM_sys_GetBuffer"
+      else
+        \rm out_rsync
+      fi
     fi
   else
Index: trunk/libIGCM/libIGCM_sys/libIGCM_sys_ulam.ksh
===================================================================
--- trunk/libIGCM/libIGCM_sys/libIGCM_sys_ulam.ksh	(revision 717)
+++ trunk/libIGCM/libIGCM_sys/libIGCM_sys_ulam.ksh	(revision 719)
@@ -509,11 +509,11 @@
 #D-  Error values and explanations can depend on your system version.
 function IGCM_sys_Rsync_out {
-  RET=$1
-  if [ ! $RET ] ; then
+  status=$1
+  if [ ! $status ] ; then
     echo "rsync error !"
   fi
 
   if [ $MYLANG = "fr" ]; then
-    case $RET in
+    case $status in
     0)  return ;;
     1)  echo "Erreur de rsync ; RERR_SYNTAX : "
@@ -563,9 +563,9 @@
       echo "Temps d'attente écoulé dans l'envoi/réception de données"
       return;;
-    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $RET
+    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $status
       return;;
     esac
   elif [ $MYLANG = "en" ] ; then
-    case $RET in
+    case $status in
     0)  return;;
     1)  echo "rsync error : Syntax or usage error "
@@ -604,5 +604,5 @@
     30) echo "rsync error : Timeout in data send/receive "
       return;;
-    *)  echo "rsync error : return code of rsync unknown :" $RET
+    *)  echo "rsync error : return code of rsync unknown :" $status
       return;;
     esac
@@ -624,11 +624,11 @@
   fi
 
-  typeset RET
+  typeset status
 
   echo cp $@ > out_rsync 2>&1
   \cp $@ >> out_rsync 2>&1
-  RET=$?
-
-  if [ ${RET} -gt 0 ] ; then
+  status=$?
+
+  if [ ${status} -gt 0 ] ; then
     echo "IGCM_sys_Cp : error."
     cat out_rsync
@@ -649,11 +649,11 @@
   fi
 
-  typeset RET
+  typeset status
 
   echo rm $@ > out_rsync 2>&1
   \rm $@ >> out_rsync 2>&1
-  RET=$?
-
-  if [ ${RET} -gt 0 ] ; then
+  status=$?
+
+  if [ ${status} -gt 0 ] ; then
     echo "IGCM_sys_Rm : error."
     cat out_rsync
@@ -691,11 +691,11 @@
   if [ $DRYRUN = 0 ]; then
 
-    typeset RET
+    typeset status
 
     echo mv $@ > out_rsync 2>&1
     \mv $@ >> out_rsync 2>&1
-    RET=$?
-
-    if [ ${RET} -gt 0 ] ; then
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Mv : error in mv."
       cat out_rsync
@@ -726,5 +726,5 @@
     fi
 
-    typeset RET
+    typeset status
 
     # Only if we use rsync
@@ -733,7 +733,7 @@
     #USUAL WAY
     rcp -r $1 gaya:$2 > out_rsync 2>&1
-    RET=$?
-
-    if [ ${RET} -gt 0 ] ; then
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Put_Dir : error."
       cat out_rsync
@@ -768,11 +768,11 @@
 #	fi
 
-    typeset RET
+    typeset status
 
     #USUAL WAY
     rcp -rp gaya:$1 $2 > out_rsync 2>&1
-    RET=$?
-
-    if [ ${RET} -gt 0 ] ; then
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Get_Dir : error."
       cat out_rsync
@@ -803,11 +803,11 @@
     fi
 
-    typeset RET
+    typeset status
 
     #USUAL WAY
     rcp -r ${MASTER}:$1 $2 > out_rsync 2>&1
-    RET=$?
-
-    if [ ${RET} -gt 0 ] ; then
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Get_Master : error."
       cat out_rsync
@@ -837,5 +837,5 @@
     fi
 
-    typeset RET
+    typeset status
         #
     if [ X${JobType} = XRUN ] ; then
@@ -848,5 +848,5 @@
     # USUAL WAY
     mfput $1 $2 > out_rsync 2>&1
-    RET=$?
+    status=$?
 
 #       #RSYNC WITH NETWORK RSH CALL
@@ -858,11 +858,11 @@
 #       ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1
 
-#       RET=$?
-#       IGCM_sys_Rsync_out $RET
+#       status=$?
+#       IGCM_sys_Rsync_out $status
 
 #       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
-#       (( RET=RET+$? ))
-
-    if [ ${RET} -gt 0 ] ; then
+#       (( status=status+$? ))
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Put_Out : error."
       cat out_rsync
@@ -870,7 +870,7 @@
             #
       mfput $1 $2 > out_rsync 2>&1
-      RET=$?
+      status=$?
             #
-      if [ ${RET} -gt 0 ] ; then
+      if [ ${status} -gt 0 ] ; then
         echo "IGCM_sys_Put_Out : error."
         IGCM_debug_Print 1 "mfput failed twice. You have a problem"
@@ -894,5 +894,5 @@
   IGCM_debug_PushStack "IGCM_sys_Get" $@
 
-  typeset DEST RET dm_liste ifile target
+  typeset DEST status dm_liste ifile target
 
   if ( $DEBUG_sys ) ; then
@@ -910,6 +910,6 @@
     # test if the (first) file is present in the old computation :
     IGCM_sys_TestFileArchive ${dm_liste[0]}
-    RET=$?
-    if [ ${RET} -gt 0 ] ; then
+    status=$?
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Get, ERROR : regular file ${dm_liste[0]} DOES NOT EXIST ."
       IGCM_debug_Exit "IGCM_sys_Get"
@@ -942,9 +942,9 @@
 #   ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1
 
-#   RET=$?
-#   IGCM_sys_Rsync_out $RET
+#   status=$?
+#   IGCM_sys_Rsync_out $status
 
 #   ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
-#   (( RET=RET+$? ))
+#   (( status=status+$? ))
 
   else
@@ -974,5 +974,5 @@
     fi
 
-    typeset RET
+    typeset status
     #
     rsh gaya exec /bin/ksh <<EOF
@@ -984,7 +984,7 @@
           /bin/chmod -R u+w ${R_SAVE}/${1}
 EOF
-    RET=$?
-
-    if [ ${RET} -gt 0 ] ; then
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Put_Dods : error."
       IGCM_debug_Exit "IGCM_sys_Put_Dods"
Index: trunk/libIGCM/libIGCM_sys/libIGCM_sys_vargas.ksh
===================================================================
--- trunk/libIGCM/libIGCM_sys/libIGCM_sys_vargas.ksh	(revision 717)
+++ trunk/libIGCM/libIGCM_sys/libIGCM_sys_vargas.ksh	(revision 719)
@@ -644,11 +644,11 @@
 #D-  Error values and explanations can depend on your system version.
 function IGCM_sys_Rsync_out {
-  RET=$1
-  if [ ! $RET ] ; then
+  status=$1
+  if [ ! $status ] ; then
     echo "rsync error !"
   fi
 
   if [ $MYLANG = "fr" ]; then
-    case $RET in
+    case $status in
     0)  return ;;
     1)  echo "Erreur de rsync ; RERR_SYNTAX : "
@@ -698,9 +698,9 @@
       echo "Temps d'attente écoulé dans l'envoi/réception de données"
       return;;
-    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $RET
+    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $status
       return;;
     esac
   elif [ $MYLANG = "en" ] ; then
-    case $RET in
+    case $status in
     0)  return;;
     1)  echo "rsync error : Syntax or usage error "
@@ -739,5 +739,5 @@
     30) echo "rsync error : Timeout in data send/receive "
       return;;
-    *)  echo "rsync error : return code of rsync unknown :" $RET
+    *)  echo "rsync error : return code of rsync unknown :" $status
       return;;
     esac
@@ -759,5 +759,5 @@
   fi
 
-  typeset RET
+  typeset status
 
   IGCM_sys_RshPost <<-EOF
@@ -765,11 +765,11 @@
 EOF
   rsh ulam -n hostname > /dev/null 2>&1
-  RET=$?
-  if [ $RET -eq 0 ] ; then
+  status=$?
+  if [ $status -eq 0 ] ; then
     echo ${RSYNC} ${RSYNC_opt} -e "rsh " ${libIGCM} ulam:${HOME_POST}/MIRROR/${PATHlibIGCM} > out_rsync 2>&1
     ${RSYNC} ${RSYNC_opt} -e "rsh " ${libIGCM} ulam:${HOME_POST}/MIRROR/${PATHlibIGCM} >> out_rsync 2>&1
-    RET=$?
-
-    if [ ${RET} -gt 0 ] ; then
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on ulam."
       cat out_rsync
@@ -793,11 +793,11 @@
   fi
 
-  typeset RET
+  typeset status
 
   echo cp $@ > out_rsync 2>&1
   \cp $@ >> out_rsync 2>&1
-  RET=$?
-
-  if [ ${RET} -gt 0 ] ; then
+  status=$?
+
+  if [ ${status} -gt 0 ] ; then
     echo "IGCM_sys_Cp : error."
     cat out_rsync
@@ -820,11 +820,11 @@
   fi
 
-  typeset RET
+  typeset status
 
   echo rm $@ > out_rsync 2>&1
   \rm $@ >> out_rsync 2>&1
-  RET=$?
-
-  if [ ${RET} -gt 0 ] ; then
+  status=$?
+
+  if [ ${status} -gt 0 ] ; then
     echo "IGCM_sys_Rm : error."
     cat out_rsync
@@ -864,11 +864,11 @@
   if [ $DRYRUN = 0 ]; then
 
-    typeset RET
+    typeset status
 
     echo mv $@ > out_rsync 2>&1
     \mv $@ >> out_rsync 2>&1
-    RET=$?
-
-    if [ ${RET} -gt 0 ] ; then
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Mv : error in mv."
       cat out_rsync
@@ -901,5 +901,5 @@
     fi
 
-    typeset RET
+    typeset status
 
     # Only if we use rsync
@@ -908,7 +908,7 @@
     #USUAL WAY
     rcp -r $1 ${STOREHOST}:$2 > out_rsync 2>&1
-    RET=$?
-
-    if [ ${RET} -gt 0 ] ; then
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Put_Dir : error."
       cat out_rsync
@@ -940,11 +940,11 @@
     fi
 
-    typeset RET
+    typeset status
 
         #USUAL WAY
     rcp -rp ${STOREHOST}:$1 $2 > out_rsync 2>&1
-    RET=$?
-
-    if [ ${RET} -gt 0 ] ; then
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Get_Dir : error."
       cat out_rsync
@@ -980,5 +980,5 @@
     fi
 
-    typeset RET
+    typeset status
         #
     if [ X${JobType} = XRUN ] ; then
@@ -991,5 +991,5 @@
     #USUAL WAY
     mfput $1 $2 > out_rsync 2>&1
-    RET=$?
+    status=$?
 
 #       #RSYNC WITH NETWORK RSH CALL
@@ -1001,11 +1001,11 @@
 #       ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1
 
-#       RET=$?
-#       IGCM_sys_Rsync_out $RET
+#       status=$?
+#       IGCM_sys_Rsync_out $status
 
 #       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
-#       (( RET=RET+$? ))
-
-    if [ ${RET} -gt 0 ] ; then
+#       (( status=status+$? ))
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Put_Rest : error."
       cat out_rsync
@@ -1037,5 +1037,5 @@
     fi
 
-    typeset RET
+    typeset status
     #
     if [ X${JobType} = XRUN ] ; then
@@ -1046,7 +1046,7 @@
     # USUAL WAY
     \cp $1 $2 > out_rsync 2>&1
-    RET=$?
-
-    if [ ${RET} -gt 0 ] ; then
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_PutBuffer_Rest : error."
       cat out_rsync
@@ -1078,5 +1078,5 @@
     fi
 
-    typeset RET
+    typeset status
         #
     if [ X${JobType} = XRUN ] ; then
@@ -1091,5 +1091,5 @@
     #USUAL WAY
     mfput $1 $2 > out_rsync 2>&1
-    RET=$?
+    status=$?
 
 #       #RSYNC WITH NETWORK RSH CALL
@@ -1101,11 +1101,11 @@
 #       ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1
 
-#       RET=$?
-#       IGCM_sys_Rsync_out $RET
+#       status=$?
+#       IGCM_sys_Rsync_out $status
 
 #       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
-#       (( RET=RET+$? ))
-
-    if [ ${RET} -gt 0 ] ; then
+#       (( status=status+$? ))
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Put_Out : error."
       cat out_rsync
@@ -1141,5 +1141,5 @@
     IGCM_sys_Mkdir $( dirname $2 )
     #
-    typeset RET
+    typeset status
 
     if [ X${JobType} = XRUN ] ; then
@@ -1151,7 +1151,7 @@
     # USUAL WAY
     \cp $1 $2 > out_rsync 2>&1
-    RET=$?
-
-    if [ ${RET} -gt 0 ] ; then
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_PutBuffer_Out : error."
       cat out_rsync
@@ -1175,5 +1175,5 @@
   IGCM_debug_PushStack "IGCM_sys_Get" $@
 
-  typeset DEST RET dm_liste ifile target
+  typeset DEST status dm_liste ifile target
 
   if ( $DEBUG_sys ) ; then
@@ -1191,6 +1191,6 @@
     # test if the (first) file is present in the old computation :
     IGCM_sys_TestFileArchive ${dm_liste[0]}
-    RET=$?
-    if [ ${RET} -gt 0 ] ; then
+    status=$?
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Get, ERROR : regular file ${dm_liste[0]} DOES NOT EXIST ."
       IGCM_debug_Exit "IGCM_sys_Get"
@@ -1211,5 +1211,5 @@
     #USUAL WAY
     mfget ${dm_liste[*]} ${DEST} > out_rsync 2>&1
-    RET=$?
+    status=$?
 
 #       #RSYNC WITH NETWORK RSH CALL
@@ -1221,11 +1221,11 @@
 #       ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1
 
-#       RET=$?
-#       IGCM_sys_Rsync_out $RET
+#       status=$?
+#       IGCM_sys_Rsync_out $status
 
 #       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
-#       (( RET=RET+$? ))
-
-    if [ ${RET} -gt 0 ] ; then
+#       (( status=status+$? ))
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Get : copy error."
       cat out_rsync
@@ -1248,5 +1248,5 @@
   IGCM_debug_PushStack "IGCM_sys_GetBuffer" $@
 
-  typeset DEST RET buf_liste ifile target file_work
+  typeset DEST status buf_liste ifile target file_work
 
   if ( $DEBUG_sys ) ; then
@@ -1264,16 +1264,16 @@
     #USUAL WAY
     if [ X${1} = X'/l' ] ; then
-      (( RET=0 ))
+      (( status=0 ))
       for target in ${buf_liste[*]} ; do
         local_file=$( basename ${target} )
         \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
-        (( RET = RET + $? ))
+        (( status = status + $? ))
       done
     else
       \cp ${buf_liste} ${DEST} >> out_rsync 2>&1
-      RET=$?
-    fi
-
-    if [ ${RET} -gt 0 ] ; then
+      status=$?
+    fi
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_GetBuffer : copy error."
       cat out_rsync
