Changeset 714 for trunk/libIGCM/libIGCM_sys/libIGCM_sys_ulam.ksh
- Timestamp:
- 10/12/12 10:11:24 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_ulam.ksh
r697 r714 1141 1141 echo "IGCM_sys_ncap2 :" $@ 1142 1142 fi 1143 ncap2 "$@" 1144 if [ $? -gt 0 ] ; then 1145 echo "IGCM_sys_ncap2 : erreur ${@}." 1146 IGCM_debug_Exit "ncap2" 1143 1144 typeset NB_ESSAI DELAI status i 1145 # number of tentative 1146 NB_ESSAI=3 1147 # time delay between tentative 1148 DELAI=2 1149 1150 i=0 1151 while [ $i -lt $NB_ESSAI ] ; do 1152 ncap2 "$@" > out_rsync 2>&1 1153 status=$? 1154 if [ ${status} -gt 0 ] ; then 1155 IGCM_debug_Print 2 "IGCM_sys_ncap2 : error code ${status}" 1156 cat out_rsync 1157 \rm out_rsync 1158 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1159 else 1160 \rm out_rsync 1161 break 1162 fi 1163 (( i = i + 1 )) 1164 done 1165 1166 if [ ${status} -gt 0 ] ; then 1167 echo "IGCM_sys_ncap2 : ncap2 error" 1168 IGCM_debug_Exit "ncap2" 1147 1169 fi 1148 1170 … … 1155 1177 echo "IGCM_sys_ncatted :" $@ 1156 1178 fi 1157 ncatted "$@" 1158 if [ $? -gt 0 ] ; then 1159 echo "IGCM_sys_ncatted : erreur ${@}." 1160 IGCM_debug_Exit "ncatted" 1179 1180 typeset NB_ESSAI DELAI status i 1181 # number of tentative 1182 NB_ESSAI=3 1183 # time delay between tentative 1184 DELAI=2 1185 1186 i=0 1187 while [ $i -lt $NB_ESSAI ] ; do 1188 ncatted "$@" > out_rsync 2>&1 1189 status=$? 1190 if [ ${status} -gt 0 ] ; then 1191 IGCM_debug_Print 2 "IGCM_sys_ncatted : error code ${status}" 1192 cat out_rsync 1193 \rm out_rsync 1194 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1195 else 1196 \rm out_rsync 1197 break 1198 fi 1199 (( i = i + 1 )) 1200 done 1201 1202 if [ ${status} -gt 0 ] ; then 1203 echo "IGCM_sys_ncatted : ncatted error" 1204 IGCM_debug_Exit "ncatted" 1161 1205 fi 1162 1206 … … 1169 1213 echo "IGCM_sys_ncbo :" $@ 1170 1214 fi 1171 ncbo $@ 1172 if [ $? -gt 0 ] ; then 1173 echo "IGCM_sys_ncbo : erreur ${@}." 1174 IGCM_debug_Exit "ncbo" 1215 1216 typeset NB_ESSAI DELAI status i 1217 # number of tentative 1218 NB_ESSAI=3 1219 # time delay between tentative 1220 DELAI=2 1221 1222 i=0 1223 while [ $i -lt $NB_ESSAI ] ; do 1224 ncbo $@ > out_rsync 2>&1 1225 status=$? 1226 if [ ${status} -gt 0 ] ; then 1227 IGCM_debug_Print 2 "IGCM_sys_ncbo : error code ${status}" 1228 cat out_rsync 1229 \rm out_rsync 1230 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1231 else 1232 \rm out_rsync 1233 break 1234 fi 1235 (( i = i + 1 )) 1236 done 1237 1238 if [ ${status} -gt 0 ] ; then 1239 echo "IGCM_sys_ncbo : ncbo error" 1240 IGCM_debug_Exit "ncbo" 1175 1241 fi 1176 1242 … … 1183 1249 echo "IGCM_sys_ncdiff :" $@ 1184 1250 fi 1185 ncdiff $@ 1186 if [ $? -gt 0 ] ; then 1187 echo "IGCM_sys_ncdiff : erreur ${@}." 1188 IGCM_debug_Exit "ncdiff" 1251 1252 typeset NB_ESSAI DELAI status i 1253 # number of tentative 1254 NB_ESSAI=3 1255 # time delay between tentative 1256 DELAI=2 1257 1258 i=0 1259 while [ $i -lt $NB_ESSAI ] ; do 1260 ncdiff $@ > out_rsync 2>&1 1261 status=$? 1262 if [ ${status} -gt 0 ] ; then 1263 IGCM_debug_Print 2 "IGCM_sys_ncdiff : error code ${status}" 1264 cat out_rsync 1265 \rm out_rsync 1266 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1267 else 1268 \rm out_rsync 1269 break 1270 fi 1271 (( i = i + 1 )) 1272 done 1273 1274 if [ ${status} -gt 0 ] ; then 1275 echo "IGCM_sys_ncdiff : ncdiff error" 1276 IGCM_debug_Exit "ncdiff" 1189 1277 fi 1190 1278 … … 1197 1285 echo "IGCM_sys_ncea :" $@ 1198 1286 fi 1199 ncea $@ 1200 if [ $? -gt 0 ] ; then 1201 echo "IGCM_sys_ncea : erreur ${@}." 1202 IGCM_debug_Exit "ncea" 1287 1288 typeset NB_ESSAI DELAI status i 1289 # number of tentative 1290 NB_ESSAI=3 1291 # time delay between tentative 1292 DELAI=2 1293 1294 i=0 1295 while [ $i -lt $NB_ESSAI ] ; do 1296 ncea $@ > out_rsync 2>&1 1297 status=$? 1298 if [ ${status} -gt 0 ] ; then 1299 IGCM_debug_Print 2 "IGCM_sys_ncea : error code ${status}" 1300 cat out_rsync 1301 \rm out_rsync 1302 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1303 else 1304 \rm out_rsync 1305 break 1306 fi 1307 (( i = i + 1 )) 1308 done 1309 1310 if [ ${status} -gt 0 ] ; then 1311 echo "IGCM_sys_ncea : ncea error" 1312 IGCM_debug_Exit "ncea" 1203 1313 fi 1204 1314 … … 1211 1321 echo "IGCM_sys_ncecat :" $@ 1212 1322 fi 1213 ncecat $@ 1214 if [ $? -gt 0 ] ; then 1215 echo "IGCM_sys_ncecat : erreur ${@}." 1216 IGCM_debug_Exit "ncecat" 1323 1324 typeset NB_ESSAI DELAI status i 1325 # number of tentative 1326 NB_ESSAI=3 1327 # time delay between tentative 1328 DELAI=2 1329 1330 i=0 1331 while [ $i -lt $NB_ESSAI ] ; do 1332 ncecat $@ > out_rsync 2>&1 1333 status=$? 1334 if [ ${status} -gt 0 ] ; then 1335 IGCM_debug_Print 2 "IGCM_sys_ncecat : error code ${status}" 1336 cat out_rsync 1337 \rm out_rsync 1338 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1339 else 1340 \rm out_rsync 1341 break 1342 fi 1343 (( i = i + 1 )) 1344 done 1345 1346 if [ ${status} -gt 0 ] ; then 1347 echo "IGCM_sys_ncecat : ncecat error" 1348 IGCM_debug_Exit "ncecat" 1217 1349 fi 1218 1350 … … 1225 1357 echo "IGCM_sys_ncflint :" $@ 1226 1358 fi 1227 ncflint $@ 1228 if [ $? -gt 0 ] ; then 1229 echo "IGCM_sys_ncflint : erreur ${@}." 1230 IGCM_debug_Exit "ncflint" 1359 1360 typeset NB_ESSAI DELAI status i 1361 # number of tentative 1362 NB_ESSAI=3 1363 # time delay between tentative 1364 DELAI=2 1365 1366 i=0 1367 while [ $i -lt $NB_ESSAI ] ; do 1368 ncflint $@ > out_rsync 2>&1 1369 status=$? 1370 if [ ${status} -gt 0 ] ; then 1371 IGCM_debug_Print 2 "IGCM_sys_ncflint : error code ${status}" 1372 cat out_rsync 1373 \rm out_rsync 1374 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1375 else 1376 \rm out_rsync 1377 break 1378 fi 1379 (( i = i + 1 )) 1380 done 1381 1382 if [ ${status} -gt 0 ] ; then 1383 echo "IGCM_sys_ncflint : ncflint error" 1384 IGCM_debug_Exit "ncflint" 1231 1385 fi 1232 1386 … … 1239 1393 echo "IGCM_sys_ncks :" $@ 1240 1394 fi 1241 ncks $@ 1242 if [ $? -gt 0 ] ; then 1243 echo "IGCM_sys_ncks : erreur ${@}." 1244 IGCM_debug_Exit "ncks" 1395 1396 typeset NB_ESSAI DELAI status i 1397 # number of tentative 1398 NB_ESSAI=3 1399 # time delay between tentative 1400 DELAI=2 1401 1402 i=0 1403 while [ $i -lt $NB_ESSAI ] ; do 1404 ncks $@ > out_rsync 2>&1 1405 status=$? 1406 if [ ${status} -gt 0 ] ; then 1407 IGCM_debug_Print 2 "IGCM_sys_ncks : error code ${status}" 1408 cat out_rsync 1409 \rm out_rsync 1410 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1411 else 1412 \rm out_rsync 1413 break 1414 fi 1415 (( i = i + 1 )) 1416 done 1417 1418 if [ ${status} -gt 0 ] ; then 1419 echo "IGCM_sys_ncks : ncks error" 1420 IGCM_debug_Exit "ncks" 1245 1421 fi 1246 1422 … … 1253 1429 echo "IGCM_sys_ncpdq :" $@ 1254 1430 fi 1255 ncpdq $@ 1256 if [ $? -gt 0 ] ; then 1257 echo "IGCM_sys_ncpdq : erreur ${@}." 1258 IGCM_debug_Exit "ncpdq" 1431 1432 typeset NB_ESSAI DELAI status i 1433 # number of tentative 1434 NB_ESSAI=3 1435 # time delay between tentative 1436 DELAI=2 1437 1438 i=0 1439 while [ $i -lt $NB_ESSAI ] ; do 1440 ncpdq $@ > out_rsync 2>&1 1441 status=$? 1442 if [ ${status} -gt 0 ] ; then 1443 IGCM_debug_Print 2 "IGCM_sys_ncpdq : error code ${status}" 1444 cat out_rsync 1445 \rm out_rsync 1446 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1447 else 1448 \rm out_rsync 1449 break 1450 fi 1451 (( i = i + 1 )) 1452 done 1453 1454 if [ ${status} -gt 0 ] ; then 1455 echo "IGCM_sys_ncpdq : ncpdq error" 1456 IGCM_debug_Exit "ncpdq" 1259 1457 fi 1260 1458 … … 1267 1465 echo "IGCM_sys_ncra :" $@ 1268 1466 fi 1269 ncra $@ 1270 if [ $? -gt 0 ] ; then 1271 echo "IGCM_sys_ncra : erreur ${@}." 1272 IGCM_debug_Exit "ncra" 1467 1468 typeset NB_ESSAI DELAI status i 1469 # number of tentative 1470 NB_ESSAI=3 1471 # time delay between tentative 1472 DELAI=2 1473 1474 i=0 1475 while [ $i -lt $NB_ESSAI ] ; do 1476 ncra $@ > out_rsync 2>&1 1477 status=$? 1478 if [ ${status} -gt 0 ] ; then 1479 IGCM_debug_Print 2 "IGCM_sys_ncra : error code ${status}" 1480 cat out_rsync 1481 \rm out_rsync 1482 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1483 else 1484 \rm out_rsync 1485 break 1486 fi 1487 (( i = i + 1 )) 1488 done 1489 1490 if [ ${status} -gt 0 ] ; then 1491 echo "IGCM_sys_ncra : ncra error" 1492 IGCM_debug_Exit "ncra" 1273 1493 fi 1274 1494 … … 1281 1501 echo "IGCM_sys_ncrcat :" $@ 1282 1502 fi 1283 ncrcat $@ 1284 if [ $? -gt 0 ] ; then 1285 echo "IGCM_sys_ncrcat : erreur ${@}." 1286 # IGCM_debug_Exit "ncrcat" 1503 1504 typeset NB_ESSAI DELAI status i 1505 # number of tentative 1506 NB_ESSAI=3 1507 # time delay between tentative 1508 DELAI=2 1509 1510 i=0 1511 while [ $i -lt $NB_ESSAI ] ; do 1512 ncrcat $@ > out_rsync 2>&1 1513 status=$? 1514 if [ ${status} -gt 0 ] ; then 1515 IGCM_debug_Print 2 "IGCM_sys_ncrcat : error code ${status}" 1516 cat out_rsync 1517 \rm out_rsync 1518 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1519 else 1520 \rm out_rsync 1521 break 1522 fi 1523 (( i = i + 1 )) 1524 done 1525 1526 if [ ${status} -gt 0 ] ; then 1527 echo "IGCM_sys_ncrcat : ncrcat error" 1528 #IGCM_debug_Exit "ncrcat" 1287 1529 fi 1288 1530 … … 1295 1537 echo "IGCM_sys_ncrename :" $@ 1296 1538 fi 1297 ncrename $@ 1298 if [ $? -gt 0 ] ; then 1299 echo "IGCM_sys_ncrename : erreur ${@}." 1300 IGCM_debug_Exit "ncrename" 1539 1540 typeset NB_ESSAI DELAI status i 1541 # number of tentative 1542 NB_ESSAI=3 1543 # time delay between tentative 1544 DELAI=2 1545 1546 i=0 1547 while [ $i -lt $NB_ESSAI ] ; do 1548 ncrename $@ > out_rsync 2>&1 1549 status=$? 1550 if [ ${status} -gt 0 ] ; then 1551 IGCM_debug_Print 2 "IGCM_sys_ncrename : error code ${status}" 1552 cat out_rsync 1553 \rm out_rsync 1554 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1555 else 1556 \rm out_rsync 1557 break 1558 fi 1559 (( i = i + 1 )) 1560 done 1561 1562 if [ ${status} -gt 0 ] ; then 1563 echo "IGCM_sys_ncrename : ncrename error" 1564 IGCM_debug_Exit "ncrename" 1301 1565 fi 1302 1566 … … 1309 1573 echo "IGCM_sys_ncwa :" $@ 1310 1574 fi 1311 ncwa $@ 1312 if [ $? -gt 0 ] ; then 1313 echo "IGCM_sys_ncwa : erreur ${@}." 1314 IGCM_debug_Exit "ncwa" 1575 1576 typeset NB_ESSAI DELAI status i 1577 # number of tentative 1578 NB_ESSAI=3 1579 # time delay between tentative 1580 DELAI=2 1581 1582 i=0 1583 while [ $i -lt $NB_ESSAI ] ; do 1584 ncwa $@ > out_rsync 2>&1 1585 status=$? 1586 if [ ${status} -gt 0 ] ; then 1587 IGCM_debug_Print 2 "IGCM_sys_ncwa : error code ${status}" 1588 cat out_rsync 1589 \rm out_rsync 1590 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1591 else 1592 \rm out_rsync 1593 break 1594 fi 1595 (( i = i + 1 )) 1596 done 1597 1598 if [ ${status} -gt 0 ] ; then 1599 echo "IGCM_sys_ncwa : ncwa error" 1600 IGCM_debug_Exit "ncwa" 1315 1601 fi 1316 1602 … … 1323 1609 function IGCM_sys_cdo { 1324 1610 IGCM_debug_PushStack "IGCM_sys_cdo" -- $@ 1325 1326 \cdo $@ 1327 if [ $? -gt 0 ] ; then 1328 echo "IGCM_sys_cdo : erreur ${@}." 1611 if ( $DEBUG_sys ) ; then 1612 echo "IGCM_sys_cdo :" $@ 1613 fi 1614 1615 typeset status 1616 1617 \cdo $@ > out_rsync 2>&1 1618 status=$? 1619 if [ ${status} -gt 0 ] ; then 1620 echo "IGCM_sys_cdo : error code ${status}" 1621 cat out_rsync 1622 \rm out_rsync 1329 1623 IGCM_debug_PopStack "IGCM_sys_cdo" 1330 1624 return 1
Note: See TracChangeset
for help on using the changeset viewer.