Ignore:
Timestamp:
02/13/13 12:44:51 (11 years ago)
Author:
sdipsl
Message:

Continue adaptation to have the correct behaviour when SpaceName?=TEST

Reminder when SpaceName?=TEST everything will go in ada $WORKDIR not in gaya $HOMEGAYA

File:
1 edited

Legend:

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

    r792 r793  
    344344  fi 
    345345  #- creation de repertoire sur le serveur fichier 
    346   rsh ${STOREHOST} -n mkdir -p $1 
     346  IGCM_sys_IsFileArchived $1 
     347  if [ $? = 0 ] ; then 
     348    rsh ${STOREHOST} -n mkdir -p $1 
     349  else 
     350    mkdir -p $1 
     351  fi   
    347352 
    348353  if [ $? -gt 0 ] ; then 
     
    969974    #IGCM_sys_TestDirArchive $( dirname $2 ) 
    970975    # 
    971     # USUAL WAY 
    972     # add dmget (to demigrate all offline files) to reduce time of this command : 
    973     IGCM_sys_RshArchive "dmfind $1 -state MIG -o -state OFL -o -state PAR | dmget -q -n" 
    974  
    975     i=0 
    976     while [ $i -lt $NB_ESSAI ] ; do 
    977       \rcp -rp ${STOREHOST}:$1 $2 > out_rsync 2>&1 
     976    # Command depends on targeted filesystem 
     977    IGCM_sys_IsFileArchived $1 
     978    if [ $? = 0 ] ; then 
     979      # add dmget (to demigrate all offline files) to reduce time of this command : 
     980      IGCM_sys_RshArchive "dmfind $1 -state MIG -o -state OFL -o -state PAR | dmget -q -n" 
     981      i=0 
     982      while [ $i -lt $NB_ESSAI ] ; do 
     983        \rcp -rp ${STOREHOST}:$1 $2 > out_rsync 2>&1 
     984        status=$? 
     985        if [ ${status} -gt 0 ]; then 
     986          IGCM_debug_Print 2 "IGCM_sys_Get_Dir : rcp failed error code ${status} ${i}/${NB_ESSAI}" 
     987          IGCM_debug_Print 2 "IGCM_sys_Get_Dir : sleep ${DELAI} seconds and try again." 
     988          sleep $DELAI 
     989        else 
     990          break 
     991        fi 
     992        (( i = i + 1 )) 
     993      done 
     994    else 
     995      \cp -rp $1 $2 > out_rsync 2>&1 
    978996      status=$? 
    979       if [ ${status} -gt 0 ]; then 
    980         IGCM_debug_Print 2 "IGCM_sys_Get_Dir : rcp failed error code ${status} ${i}/${NB_ESSAI}" 
    981         IGCM_debug_Print 2 "IGCM_sys_Get_Dir : sleep ${DELAI} seconds and try again." 
    982         sleep $DELAI 
     997      if [ ${status} -gt 0 ] ; then 
     998        IGCM_debug_Print 2 "IGCM_sys_Get_Dir : cp failed error code ${status}" 
     999        cat out_rsync 
     1000        IGCM_debug_Exit "IGCM_sys_Get_Dir" 
    9831001      else 
    984         break 
     1002        \rm out_rsync 
    9851003      fi 
    986       (( i = i + 1 )) 
    987     done 
    988  
     1004    fi 
    9891005    if [ ${status} -gt 0 ] ; then 
    9901006      echo "IGCM_sys_Get_Dir : error." 
Note: See TracChangeset for help on using the changeset viewer.