Ignore:
Timestamp:
08/05/14 17:57:09 (10 years ago)
Author:
sdipsl
Message:

Some data movement optimization. See #202

File:
1 edited

Legend:

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

    r1026 r1037  
    12871287    if [ -f $2 ] ; then 
    12881288      IGCM_debug_Print 1 "$2 already exist" 
    1289       #dmget $2 
    12901289      ccc_hsm get $2 
    12911290      exist=true 
     
    13061305      i=0 
    13071306      while [ $i -lt $NB_ESSAI ] ; do 
    1308         # USUAL WAY 
    1309         \cp $1 $2 > /tmp/out_command.$$ 2>&1 
    1310         status=$? 
     1307        if [ $( stat -c %d $1 ) -ne $( stat -c %d $( dirname $2 ) ) ] ; then 
     1308          # USUAL WAY 
     1309          \cp $1 $2 > /tmp/out_command.$$ 2>&1 
     1310          status=$? 
     1311        else 
     1312          # NOT SO USUAL WAY 
     1313          \mv $1 $2 > /tmp/out_command.$$ 2>&1 
     1314          status=$? 
     1315        fi 
    13111316        if [ ${status} -gt 0 ]; then 
    13121317          IGCM_debug_Print 2 "IGCM_sys_Put_Out : cp failed error code ${status} ${i}/${NB_ESSAI}" 
     
    14101415      i=0 
    14111416      while [ $i -lt $NB_ESSAI ] ; do 
    1412         # USUAL WAY 
    1413         \cp $1 $2 > /tmp/out_command.$$ 2>&1 
    1414         status=$? 
     1417        if [ $( stat -c %d $1 ) -ne $( stat -c %d $( dirname $2 ) ) ] ; then 
     1418          # USUAL WAY 
     1419          \cp $1 $2 > /tmp/out_command.$$ 2>&1 
     1420          status=$? 
     1421        else 
     1422          # NOT SO USUAL WAY 
     1423          \mv $1 $2 > /tmp/out_command.$$ 2>&1 
     1424          status=$? 
     1425        fi 
    14151426        if [ ${status} -gt 0 ]; then 
    14161427          IGCM_debug_Print 2 "IGCM_sys_PutBuffer_Out : cp failed error code ${status} ${i}/${NB_ESSAI}" 
     
    15481559          i=0 
    15491560          while [ $i -lt $NB_ESSAI ] ; do 
    1550             \cp ${target} ${DEST}/${local_file} >> /tmp/out_command.$$ 2>&1 
     1561            #if [ X${DoLink} = Xtrue ] ; then 
     1562            #  \ln -s ${target} ${DEST}/${local_file} >> /tmp/out_command.$$ 2>&1 
     1563            #  status=$? 
     1564            #  else 
     1565            #  \cp ${target} ${DEST}/${local_file} >> /tmp/out_command.$$ 2>&1 
     1566            #  status=$? 
     1567            #fi 
     1568            \ln -s ${target} ${DEST}/${local_file} >> /tmp/out_command.$$ 2>&1 
    15511569            status=$? 
    15521570            if [ ${status} -gt 0 ]; then 
Note: See TracChangeset for help on using the changeset viewer.