Changeset 676 for trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh
- Timestamp:
- 06/05/12 16:31:28 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh
r669 r676 1211 1211 echo "IGCM_sys_Put_Out :" $@ 1212 1212 fi 1213 1214 typeset NB_ESSAI DELAI RET i 1215 1216 # number of tentative 1217 NB_ESSAI=3 1218 # time delay between tentative 1219 DELAI=2 1220 1213 1221 if [ $DRYRUN = 0 ]; then 1214 1222 if [ ! -f ${1} ] ; then … … 1220 1228 IGCM_sys_MkdirArchive $( dirname $2 ) 1221 1229 # 1222 typeset RET1223 1230 1224 1231 #===================================================== … … 1242 1249 fi 1243 1250 # 1251 1252 (( i = 0 )) 1253 while [ $i -lt $NB_ESSAI ] ; do 1244 1254 # USUAL WAY 1245 \cp $1 $2 > out_rsync 2>&1 1246 RET=$? 1255 \cp $1 $2 > out_rsync 2>&1 1256 RET=$? 1257 if [ ${RET} -gt 0 ]; then 1258 IGCM_debug_Print 2 "IGCM_sys_Put_Out : cp failed ${i}/${NB_ESSAI}" 1259 IGCM_debug_Print 2 "IGCM_sys_Put_Out : sleep ${DELAI} seconds and try again." 1260 sleep $DELAI 1261 else 1262 break 1263 fi 1264 (( i = i + 1 )) 1265 done 1247 1266 1248 1267 # #RSYNC WITH NETWORK SSH CALL … … 1328 1347 1329 1348 typeset DEST RET dm_liste ifile target file_work 1349 typeset NB_ESSAI DELAI status i 1330 1350 1331 1351 if ( $DEBUG_sys ) ; then 1332 1352 echo "IGCM_sys_Get :" $@ 1333 1353 fi 1354 1355 # number of tentative 1356 NB_ESSAI=3 1357 # time delay between tentative 1358 DELAI=2 1359 1334 1360 if [ $DRYRUN -le 2 ]; then 1335 1361 if [ X${1} = X'/l' ] ; then … … 1357 1383 #fi 1358 1384 1359 # test if the (first) file is present in the old computation :1360 IGCM_sys_TestFileArchive ${dm_liste[0]}1361 RET=$?1362 if [ ${RET} -gt 0 ] ; then1363 echo "IGCM_sys_Get, ERROR : regular file ${dm_liste[0]} DOES NOT EXIST ."1364 IGCM_debug_Exit "IGCM_sys_Get"1365 fi1366 1367 #dmget ${dm_liste[*]} > out_rsync 2>&11368 1385 ccc_hsm get ${dm_liste[*]} > out_rsync 2>&1 1369 1386 RET=$? … … 1400 1417 for target in ${dm_liste[*]} ; do 1401 1418 local_file=$( basename ${target} ) 1402 \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1 1403 (( RET = RET + $? )) 1419 (( i = 0 )) 1420 # test if the target file is present before the loop 1421 IGCM_sys_TestFileArchive ${target} 1422 RET=$? 1423 if [ ${RET} -gt 0 ] ; then 1424 echo "IGCM_sys_Get, ERROR : regular file ${dm_liste[0]} DOES NOT EXIST ." 1425 IGCM_debug_Exit "IGCM_sys_Get" 1426 else 1427 while [ $i -lt $NB_ESSAI ] ; do 1428 \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1 1429 status=$? 1430 if [ ${status} -gt 0 ]; then 1431 IGCM_debug_Print 2 "IGCM_sys_Get : cp failed ${i}/${NB_ESSAI}" 1432 IGCM_debug_Print 2 "IGCM_sys_Get : sleep ${DELAI} seconds and try again." 1433 sleep $DELAI 1434 else 1435 break 1436 fi 1437 (( i = i + 1 )) 1438 done 1439 (( RET = RET + status )) 1440 fi 1404 1441 done 1405 1442 else
Note: See TracChangeset
for help on using the changeset viewer.