Changeset 792 for trunk/libIGCM


Ignore:
Timestamp:
02/13/13 12:29:15 (11 years ago)
Author:
sdipsl
Message:

Bugfixes ada.

  • R_FIG was wrong
  • Some adaptation for the test case
File:
1 edited

Legend:

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

    r791 r792  
    142142#==================================================== 
    143143#- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
    144 typeset R_FIG=${STORAGE}/IGCM_OUT 
     144typeset R_FIG=${ARCHIVE}/IGCM_OUT 
    145145 
    146146#==================================================== 
     
    189189  IGCM_debug_PushStack "IGCM_sys_ChangeArchive" 
    190190 
    191   R_OUT=${SCRATCHDIR}/IGCM_OUT 
    192   R_FIG=${SCRATCHDIR}/IGCM_OUT 
     191  R_OUT=${WORKDIR}/IGCM_OUT 
     192  R_FIG=${WORKDIR}/IGCM_OUT 
    193193 
    194194  IGCM_debug_Print 1 "R_OUT   has been redefined = ${R_OUT}" 
     
    920920    #IGCM_sys_TestDirArchive $( dirname $2 ) 
    921921    # 
    922     #USUAL WAY 
    923     rcp -r $1 ${STOREHOST}:$2 > out_rsync 2>&1 
    924     status=$? 
    925  
    926     if [ ${status} -gt 0 ] ; then 
    927       echo "IGCM_sys_Put_Dir : error code ${status}" 
     922    #Command depends on targeted file system 
     923    IGCM_sys_IsFileArchived $1 
     924    if [ $? = 0 ] ; then 
     925      \rcp -r $1 ${STOREHOST}:$2 > out_rsync 2>&1 
     926      status=$? 
     927    else 
     928      \cp -r $1 $2 > out_rsync 2>&1  
     929      status=$? 
     930    fi 
     931 
     932    if [ ${status} -gt 0 ] ; then 
     933      IGCM_debug_Print 2 "IGCM_sys_Put_Dir : rcp or cp failed error code ${status}" 
    928934      cat out_rsync 
    929935      IGCM_debug_Exit "IGCM_sys_Put_Dir" 
     
    969975    i=0 
    970976    while [ $i -lt $NB_ESSAI ] ; do 
    971       rcp -rp ${STOREHOST}:$1 $2 > out_rsync 2>&1 
     977      \rcp -rp ${STOREHOST}:$1 $2 > out_rsync 2>&1 
    972978      status=$? 
    973979      if [ ${status} -gt 0 ]; then 
    974         IGCM_debug_Print 2 "IGCM_sys_Get_Dir : cp failed error code ${status} ${i}/${NB_ESSAI}" 
     980        IGCM_debug_Print 2 "IGCM_sys_Get_Dir : rcp failed error code ${status} ${i}/${NB_ESSAI}" 
    975981        IGCM_debug_Print 2 "IGCM_sys_Get_Dir : sleep ${DELAI} seconds and try again." 
    976982        sleep $DELAI 
     
    10761082    #IGCM_sys_MkdirArchive $( dirname $2 ) 
    10771083    # 
    1078     #USUAL WAY 
    1079     mfput $1 $2 > out_rsync 2>&1 
    1080     status=$? 
     1084    #Command depends on targeted file system 
     1085    IGCM_sys_IsFileArchived $1 
     1086    if [ $? = 0 ] ; then 
     1087      mfput $1 $2 > out_rsync 2>&1 
     1088      status=$? 
     1089    else 
     1090      \cp $1 $2 > out_rsync 2>&1 
     1091      status=$? 
     1092    fi 
    10811093 
    10821094#       #RSYNC WITH NETWORK RSH CALL 
     
    10951107 
    10961108    if [ ${status} -gt 0 ] ; then 
    1097       echo "IGCM_sys_Put_Rest : mfput failed error code ${status}" 
     1109      echo "IGCM_sys_Put_Rest : mfput or cp failed error code ${status}" 
    10981110      cat out_rsync 
    10991111      IGCM_debug_Exit "IGCM_sys_Put_Rest" 
     
    11801192    #IGCM_sys_MkdirArchive $( dirname $2 ) 
    11811193    # 
    1182     #USUAL WAY 
    1183     mfput $1 $2 > out_rsync 2>&1 
    1184     status=$? 
     1194    #Command depends on targeted file system 
     1195    IGCM_sys_IsFileArchived $1 
     1196    if [ $? = 0 ] ; then 
     1197      mfput $1 $2 > out_rsync 2>&1 
     1198      status=$? 
     1199    else 
     1200      \cp $1 $2 > out_rsync 2>&1 
     1201      status=$? 
     1202    fi 
    11851203 
    11861204#       #RSYNC WITH NETWORK RSH CALL 
     
    11991217 
    12001218    if [ ${status} -gt 0 ] ; then 
    1201       echo "IGCM_sys_Put_Out : error." 
     1219      IGCM_debug_Print 2 "IGCM_sys_Put_Out : mfput or cp failed error code ${status}" 
    12021220      cat out_rsync 
    12031221      IGCM_debug_Exit "IGCM_sys_Put_Out" 
     
    13331351    fi 
    13341352 
    1335     #USUAL WAY 
    1336     mfget ${dm_liste[*]} ${DEST} > out_rsync 2>&1 
    1337     status=$? 
     1353    #Command depends on targeted file system 
     1354    IGCM_sys_IsFileArchived ${dm_liste[0]} 
     1355    if [ $? = 0 ] ; then 
     1356      mfget ${dm_liste[*]} ${DEST} > out_rsync 2>&1 
     1357      status=$? 
     1358    else 
     1359      \cp ${dm_liste[*]} ${DEST} > out_rsync 2>&1 
     1360      status=$? 
     1361    fi 
    13381362 
    13391363#       #RSYNC WITH NETWORK RSH CALL 
     
    13521376 
    13531377    if [ ${status} -gt 0 ] ; then 
    1354       echo "IGCM_sys_Get : copy error." 
     1378      IGCM_debug_Print 2 "IGCM_sys_Get : mfget or cp failed error code ${status}" 
    13551379      cat out_rsync 
    13561380      IGCM_debug_Exit "IGCM_sys_Get" 
Note: See TracChangeset for help on using the changeset viewer.