Changeset 938 for trunk/libIGCM/libIGCM_sys
- Timestamp:
- 08/23/13 11:38:14 (11 years ago)
- Location:
- trunk/libIGCM/libIGCM_sys
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh
r936 r938 824 824 mkdir -p ${HOME}/MIRROR/${PATHlibIGCM} 825 825 826 echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > out_rsync2>&1827 ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> out_rsync2>&1826 echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > /tmp/out_command.$$ 2>&1 827 ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> /tmp/out_command.$$ 2>&1 828 828 status=$? 829 829 830 830 if [ ${status} -gt 0 ] ; then 831 831 echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on frontend." 832 cat out_rsync832 cat /tmp/out_command.$$ 833 833 fi 834 834 IGCM_debug_PopStack "IGCM_sys_Mirror_libIGCM" … … 848 848 typeset status 849 849 850 echo cp $@ > out_rsync2>&1851 \cp $@ >> out_rsync2>&1850 echo cp $@ > /tmp/out_command.$$ 2>&1 851 \cp $@ >> /tmp/out_command.$$ 2>&1 852 852 status=$? 853 853 854 854 if [ ${status} -gt 0 ] ; then 855 855 echo "IGCM_sys_Cp : error code ${status}" 856 cat out_rsync856 cat /tmp/out_command.$$ 857 857 IGCM_debug_Exit "IGCM_sys_Cp" 858 858 else 859 \rm out_rsync859 \rm /tmp/out_command.$$ 860 860 fi 861 861 IGCM_debug_PopStack "IGCM_sys_Cp" … … 875 875 typeset status 876 876 877 echo rm $@ > out_rsync2>&1878 \rm $@ >> out_rsync2>&1877 echo rm $@ > /tmp/out_command.$$ 2>&1 878 \rm $@ >> /tmp/out_command.$$ 2>&1 879 879 status=$? 880 880 881 881 if [ ${status} -gt 0 ] ; then 882 882 echo "IGCM_sys_Rm : error code ${status}" 883 cat out_rsync883 cat /tmp/out_command.$$ 884 884 IGCM_debug_Exit "IGCM_sys_Rm" 885 885 else 886 \rm out_rsync886 \rm /tmp/out_command.$$ 887 887 fi 888 888 IGCM_debug_PopStack "IGCM_sys_Rm" … … 919 919 typeset status 920 920 921 echo mv $@ > out_rsync2>&1922 \mv $@ >> out_rsync2>&1921 echo mv $@ > /tmp/out_command.$$ 2>&1 922 \mv $@ >> /tmp/out_command.$$ 2>&1 923 923 status=$? 924 924 925 925 if [ ${status} -gt 0 ] ; then 926 926 echo "IGCM_sys_Mv : error code ${status}" 927 cat out_rsync927 cat /tmp/out_command.$$ 928 928 IGCM_debug_Exit "IGCM_sys_Mv" 929 929 else 930 \rm out_rsync930 \rm /tmp/out_command.$$ 931 931 fi 932 932 fi … … 960 960 DEBUG_sys=false IGCM_sys_IsFileArchived $2 961 961 if [ $? = 0 ] ; then 962 \rcp -r $1 ${STOREHOST}:$2 > out_rsync2>&1962 \rcp -r $1 ${STOREHOST}:$2 > /tmp/out_command.$$ 2>&1 963 963 status=$? 964 964 else 965 \cp -r $1 $2 > out_rsync2>&1965 \cp -r $1 $2 > /tmp/out_command.$$ 2>&1 966 966 status=$? 967 967 fi … … 969 969 if [ ${status} -gt 0 ] ; then 970 970 IGCM_debug_Print 2 "IGCM_sys_Put_Dir : rcp or cp failed error code ${status}" 971 cat out_rsync971 cat /tmp/out_command.$$ 972 972 IGCM_debug_Exit "IGCM_sys_Put_Dir" 973 973 else 974 \rm out_rsync974 \rm /tmp/out_command.$$ 975 975 fi 976 976 fi … … 1011 1011 i=0 1012 1012 while [ $i -lt $NB_ESSAI ] ; do 1013 \rcp -rp ${STOREHOST}:$1 $2 > out_rsync2>&11013 \rcp -rp ${STOREHOST}:$1 $2 > /tmp/out_command.$$ 2>&1 1014 1014 status=$? 1015 1015 if [ ${status} -gt 0 ]; then … … 1023 1023 done 1024 1024 else 1025 \cp -rp $1 $2 > out_rsync2>&11025 \cp -rp $1 $2 > /tmp/out_command.$$ 2>&1 1026 1026 status=$? 1027 1027 if [ ${status} -gt 0 ] ; then 1028 1028 IGCM_debug_Print 2 "IGCM_sys_Get_Dir : cp failed error code ${status}" 1029 cat out_rsync1029 cat /tmp/out_command.$$ 1030 1030 IGCM_debug_Exit "IGCM_sys_Get_Dir" 1031 1031 else 1032 \rm out_rsync1032 \rm /tmp/out_command.$$ 1033 1033 fi 1034 1034 fi 1035 1035 if [ ${status} -gt 0 ] ; then 1036 1036 echo "IGCM_sys_Get_Dir : error." 1037 cat out_rsync1037 cat /tmp/out_command.$$ 1038 1038 IGCM_debug_Exit "IGCM_sys_Get_Dir" 1039 1039 else 1040 \rm out_rsync1040 \rm /tmp/out_command.$$ 1041 1041 fi 1042 1042 fi … … 1069 1069 i=0 1070 1070 while [ $i -lt $NB_ESSAI ] ; do 1071 \cp -urL $1 $2 > out_rsync2>&11071 \cp -urL $1 $2 > /tmp/out_command.$$ 2>&1 1072 1072 status=$? 1073 1073 if [ ${status} -gt 0 ]; then … … 1083 1083 if [ ${status} -gt 0 ] ; then 1084 1084 echo "IGCM_sys_Get_Master : error." 1085 cat out_rsync1085 cat /tmp/out_command.$$ 1086 1086 IGCM_debug_Exit "IGCM_sys_Get_Master" 1087 1087 else 1088 \rm out_rsync1088 \rm /tmp/out_command.$$ 1089 1089 fi 1090 1090 fi … … 1125 1125 DEBUG_sys=false IGCM_sys_IsFileArchived $2 1126 1126 if [ $? = 0 ] ; then 1127 mfput $1 $2 > out_rsync2>&11127 mfput $1 $2 > /tmp/out_command.$$ 2>&1 1128 1128 status=$? 1129 1129 else 1130 1130 IGCM_sys_MkdirArchive $( dirname $2 ) 1131 \cp $1 $2 > out_rsync2>&11131 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1132 1132 status=$? 1133 1133 fi … … 1135 1135 # #RSYNC WITH NETWORK RSH CALL 1136 1136 # IGCM_sys_MkdirArchive $( dirname $2 ) 1137 # echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync2>&11138 # ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> out_rsync2>&11137 # echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${2} > /tmp/out_command.$$ 2>&1 1138 # ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> /tmp/out_command.$$ 2>&1 1139 1139 1140 1140 # #RSYNC WITH NFS USE 1141 # echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync2>&11142 # ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync2>&11141 # echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > /tmp/out_command.$$ 2>&1 1142 # ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> /tmp/out_command.$$ 2>&1 1143 1143 1144 1144 # status=$? 1145 1145 # IGCM_sys_Rsync_out $status 1146 1146 1147 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync1147 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk /tmp/out_command.$$ 1148 1148 # (( status=status+$? )) 1149 1149 1150 1150 if [ ${status} -gt 0 ] ; then 1151 1151 echo "IGCM_sys_Put_Rest : mfput or cp failed error code ${status}" 1152 cat out_rsync1152 cat /tmp/out_command.$$ 1153 1153 IGCM_debug_Exit "IGCM_sys_Put_Rest" 1154 1154 else 1155 \rm out_rsync1155 \rm /tmp/out_command.$$ 1156 1156 fi 1157 1157 fi … … 1184 1184 # 1185 1185 # USUAL WAY 1186 \cp $1 $2 > out_rsync2>&11186 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1187 1187 status=$? 1188 1188 … … 1191 1191 [ -f ${2} ] && ls -l ${2} 1192 1192 [ -f ${2}/${1} ] && ls -l ${2}/${1} 1193 cat out_rsync1193 cat /tmp/out_command.$$ 1194 1194 IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest" 1195 1195 else 1196 \rm out_rsync1196 \rm /tmp/out_command.$$ 1197 1197 fi 1198 1198 fi … … 1244 1244 DEBUG_sys=false IGCM_sys_IsFileArchived $2 1245 1245 if [ $? = 0 ] ; then 1246 mfput $1 $2 > out_rsync2>&11246 mfput $1 $2 > /tmp/out_command.$$ 2>&1 1247 1247 status=$? 1248 1248 else 1249 1249 IGCM_sys_MkdirArchive $( dirname $2 ) 1250 \cp $1 $2 > out_rsync2>&11250 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1251 1251 status=$? 1252 1252 fi … … 1254 1254 # #RSYNC WITH NETWORK RSH CALL 1255 1255 # IGCM_sys_MkdirArchive $( dirname $2 ) 1256 # echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync2>&11257 # ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> out_rsync2>&11256 # echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${2} > /tmp/out_command.$$ 2>&1 1257 # ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> /tmp/out_command.$$ 2>&1 1258 1258 1259 1259 # #RSYNC WITH NFS USE 1260 # echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync2>&11261 # ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync2>&11260 # echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > /tmp/out_command.$$ 2>&1 1261 # ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> /tmp/out_command.$$ 2>&1 1262 1262 1263 1263 # status=$? 1264 1264 # IGCM_sys_Rsync_out $status 1265 1265 1266 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync1266 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk /tmp/out_command.$$ 1267 1267 # (( status=status+$? )) 1268 1268 1269 1269 if [ ${status} -gt 0 ] ; then 1270 1270 IGCM_debug_Print 2 "IGCM_sys_Put_Out : mfput or cp failed error code ${status}" 1271 cat out_rsync1271 cat /tmp/out_command.$$ 1272 1272 IGCM_debug_Exit "IGCM_sys_Put_Out" 1273 1273 else 1274 \rm out_rsync1274 \rm /tmp/out_command.$$ 1275 1275 fi 1276 1276 fi … … 1330 1330 while [ $i -lt $NB_ESSAI ] ; do 1331 1331 # USUAL WAY 1332 \cp $1 $2 > out_rsync2>&11332 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1333 1333 status=$? 1334 1334 if [ ${status} -gt 0 ]; then … … 1349 1349 [ -f ${2} ] && ls -l ${2} 1350 1350 [ -f ${2}/${1} ] && ls -l ${2}/${1} 1351 cat out_rsync1351 cat /tmp/out_command.$$ 1352 1352 IGCM_debug_Exit "IGCM_sys_PutBuffer_Out" 1353 1353 else … … 1360 1360 fi 1361 1361 1362 \rm out_rsync1362 \rm /tmp/out_command.$$ 1363 1363 fi 1364 1364 fi … … 1407 1407 DEBUG_sys=false IGCM_sys_IsFileArchived ${dm_liste[0]} 1408 1408 if [ $? = 0 ] ; then 1409 mfget ${dm_liste[*]} ${DEST} > out_rsync2>&11409 mfget ${dm_liste[*]} ${DEST} > /tmp/out_command.$$ 2>&1 1410 1410 status=$? 1411 1411 else 1412 \cp ${dm_liste[*]} ${DEST} > out_rsync2>&11412 \cp ${dm_liste[*]} ${DEST} > /tmp/out_command.$$ 2>&1 1413 1413 status=$? 1414 1414 fi 1415 1415 1416 1416 # #RSYNC WITH NETWORK RSH CALL 1417 # echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > out_rsync2>&11418 # ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} >> out_rsync2>&11417 # echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > /tmp/out_command.$$ 2>&1 1418 # ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} >> /tmp/out_command.$$ 2>&1 1419 1419 1420 1420 # #RSYNC WITH NFS USE 1421 # echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync2>&11422 # ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync2>&11421 # echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > /tmp/out_command.$$ 2>&1 1422 # ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> /tmp/out_command.$$ 2>&1 1423 1423 1424 1424 # status=$? 1425 1425 # IGCM_sys_Rsync_out $status 1426 1426 1427 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync1427 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk /tmp/out_command.$$ 1428 1428 # (( status=status+$? )) 1429 1429 1430 1430 if [ ${status} -gt 0 ] ; then 1431 1431 IGCM_debug_Print 2 "IGCM_sys_Get : mfget or cp failed error code ${status}" 1432 cat out_rsync1432 cat /tmp/out_command.$$ 1433 1433 IGCM_debug_Exit "IGCM_sys_Get" 1434 1434 else 1435 \rm out_rsync1435 \rm /tmp/out_command.$$ 1436 1436 fi 1437 1437 fi … … 1473 1473 i=0 1474 1474 while [ $i -lt $NB_ESSAI ] ; do 1475 \cp ${target} ${DEST}/${local_file} >> out_rsync2>&11475 \cp ${target} ${DEST}/${local_file} >> /tmp/out_command.$$ 2>&1 1476 1476 status=$? 1477 1477 if [ ${status} -gt 0 ]; then … … 1486 1486 if [ ${status} -gt 0 ] ; then 1487 1487 echo "IGCM_sys_Get : error" 1488 cat out_rsync1489 \rm out_rsync1488 cat /tmp/out_command.$$ 1489 \rm /tmp/out_command.$$ 1490 1490 IGCM_debug_Exit "IGCM_sys_GetBuffer" 1491 1491 else 1492 \rm out_rsync1492 \rm /tmp/out_command.$$ 1493 1493 fi 1494 1494 done … … 1496 1496 i=0 1497 1497 while [ $i -lt $NB_ESSAI ] ; do 1498 \cp ${buf_liste} ${DEST} >> out_rsync2>&11498 \cp ${buf_liste} ${DEST} >> /tmp/out_command.$$ 2>&1 1499 1499 status=$? 1500 1500 if [ ${status} -gt 0 ]; then … … 1509 1509 if [ ${status} -gt 0 ] ; then 1510 1510 echo "IGCM_sys_Get : error" 1511 cat out_rsync1512 \rm out_rsync1511 cat /tmp/out_command.$$ 1512 \rm /tmp/out_command.$$ 1513 1513 IGCM_debug_Exit "IGCM_sys_GetBuffer" 1514 1514 else 1515 \rm out_rsync1515 \rm /tmp/out_command.$$ 1516 1516 fi 1517 1517 fi … … 1636 1636 i=0 1637 1637 while [ $i -lt $NB_ESSAI ] ; do 1638 /smphome/rech/psl/rpsl035/bin/rebuild -f -o $@ > out_rsync2>&11638 /smphome/rech/psl/rpsl035/bin/rebuild -f -o $@ > /tmp/out_command.$$ 2>&1 1639 1639 status=$? 1640 1640 if [ ${status} -gt 0 ] ; then 1641 1641 IGCM_debug_Print 2 "IGCM_sys_rebuild : error code ${status}" 1642 cat out_rsync1643 \rm out_rsync1642 cat /tmp/out_command.$$ 1643 \rm /tmp/out_command.$$ 1644 1644 IGCM_debug_Print 2 "IGCM_sys_rebuild : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1645 1645 firstArg=${1} … … 1647 1647 sleep $DELAI 1648 1648 else 1649 \rm out_rsync1649 \rm /tmp/out_command.$$ 1650 1650 break 1651 1651 fi … … 2035 2035 i=0 2036 2036 while [ $i -lt $NB_ESSAI ] ; do 2037 ncap2 "$@" > out_rsync2>&12037 ncap2 "$@" > /tmp/out_command.$$ 2>&1 2038 2038 status=$? 2039 2039 if [ ${status} -gt 0 ] ; then 2040 2040 IGCM_debug_Print 2 "IGCM_sys_ncap2 : error code ${status}" 2041 cat out_rsync2042 \rm out_rsync2041 cat /tmp/out_command.$$ 2042 \rm /tmp/out_command.$$ 2043 2043 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2044 2044 sleep $DELAI 2045 2045 else 2046 \rm out_rsync2046 \rm /tmp/out_command.$$ 2047 2047 break 2048 2048 fi … … 2077 2077 i=0 2078 2078 while [ $i -lt $NB_ESSAI ] ; do 2079 ncatted "$@" > out_rsync2>&12079 ncatted "$@" > /tmp/out_command.$$ 2>&1 2080 2080 status=$? 2081 2081 if [ ${status} -gt 0 ] ; then 2082 2082 IGCM_debug_Print 2 "IGCM_sys_ncatted : error code ${status}" 2083 cat out_rsync2084 \rm out_rsync2083 cat /tmp/out_command.$$ 2084 \rm /tmp/out_command.$$ 2085 2085 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2086 2086 sleep $DELAI 2087 2087 else 2088 \rm out_rsync2088 \rm /tmp/out_command.$$ 2089 2089 break 2090 2090 fi … … 2119 2119 i=0 2120 2120 while [ $i -lt $NB_ESSAI ] ; do 2121 ncbo $@ > out_rsync2>&12121 ncbo $@ > /tmp/out_command.$$ 2>&1 2122 2122 status=$? 2123 2123 if [ ${status} -gt 0 ] ; then 2124 2124 IGCM_debug_Print 2 "IGCM_sys_ncbo : error code ${status}" 2125 cat out_rsync2126 \rm out_rsync2125 cat /tmp/out_command.$$ 2126 \rm /tmp/out_command.$$ 2127 2127 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2128 2128 sleep $DELAI 2129 2129 else 2130 \rm out_rsync2130 \rm /tmp/out_command.$$ 2131 2131 break 2132 2132 fi … … 2161 2161 i=0 2162 2162 while [ $i -lt $NB_ESSAI ] ; do 2163 ncdiff $@ > out_rsync2>&12163 ncdiff $@ > /tmp/out_command.$$ 2>&1 2164 2164 status=$? 2165 2165 if [ ${status} -gt 0 ] ; then 2166 2166 IGCM_debug_Print 2 "IGCM_sys_ncdiff : error code ${status}" 2167 cat out_rsync2168 \rm out_rsync2167 cat /tmp/out_command.$$ 2168 \rm /tmp/out_command.$$ 2169 2169 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2170 2170 sleep $DELAI 2171 2171 else 2172 \rm out_rsync2172 \rm /tmp/out_command.$$ 2173 2173 break 2174 2174 fi … … 2203 2203 i=0 2204 2204 while [ $i -lt $NB_ESSAI ] ; do 2205 ncea $@ > out_rsync2>&12205 ncea $@ > /tmp/out_command.$$ 2>&1 2206 2206 status=$? 2207 2207 if [ ${status} -gt 0 ] ; then 2208 2208 IGCM_debug_Print 2 "IGCM_sys_ncea : error code ${status}" 2209 cat out_rsync2210 \rm out_rsync2209 cat /tmp/out_command.$$ 2210 \rm /tmp/out_command.$$ 2211 2211 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2212 2212 sleep $DELAI 2213 2213 else 2214 \rm out_rsync2214 \rm /tmp/out_command.$$ 2215 2215 break 2216 2216 fi … … 2245 2245 i=0 2246 2246 while [ $i -lt $NB_ESSAI ] ; do 2247 ncecat $@ > out_rsync2>&12247 ncecat $@ > /tmp/out_command.$$ 2>&1 2248 2248 status=$? 2249 2249 if [ ${status} -gt 0 ] ; then 2250 2250 IGCM_debug_Print 2 "IGCM_sys_ncecat : error code ${status}" 2251 cat out_rsync2252 \rm out_rsync2251 cat /tmp/out_command.$$ 2252 \rm /tmp/out_command.$$ 2253 2253 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2254 2254 sleep $DELAI 2255 2255 else 2256 \rm out_rsync2256 \rm /tmp/out_command.$$ 2257 2257 break 2258 2258 fi … … 2287 2287 i=0 2288 2288 while [ $i -lt $NB_ESSAI ] ; do 2289 ncflint $@ > out_rsync2>&12289 ncflint $@ > /tmp/out_command.$$ 2>&1 2290 2290 status=$? 2291 2291 if [ ${status} -gt 0 ] ; then 2292 2292 IGCM_debug_Print 2 "IGCM_sys_ncflint : error code ${status}" 2293 cat out_rsync2294 \rm out_rsync2293 cat /tmp/out_command.$$ 2294 \rm /tmp/out_command.$$ 2295 2295 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2296 2296 sleep $DELAI 2297 2297 else 2298 \rm out_rsync2298 \rm /tmp/out_command.$$ 2299 2299 break 2300 2300 fi … … 2329 2329 i=0 2330 2330 while [ $i -lt $NB_ESSAI ] ; do 2331 ncks $@ > out_rsync2>&12331 ncks $@ > /tmp/out_command.$$ 2>&1 2332 2332 status=$? 2333 2333 if [ ${status} -gt 0 ] ; then 2334 2334 IGCM_debug_Print 2 "IGCM_sys_ncks : error code ${status}" 2335 cat out_rsync2336 \rm out_rsync2335 cat /tmp/out_command.$$ 2336 \rm /tmp/out_command.$$ 2337 2337 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2338 2338 sleep $DELAI 2339 2339 else 2340 \rm out_rsync2340 \rm /tmp/out_command.$$ 2341 2341 break 2342 2342 fi … … 2371 2371 i=0 2372 2372 while [ $i -lt $NB_ESSAI ] ; do 2373 ncpdq $@ > out_rsync2>&12373 ncpdq $@ > /tmp/out_command.$$ 2>&1 2374 2374 status=$? 2375 2375 if [ ${status} -gt 0 ] ; then 2376 2376 IGCM_debug_Print 2 "IGCM_sys_ncpdq : error code ${status}" 2377 cat out_rsync2378 \rm out_rsync2377 cat /tmp/out_command.$$ 2378 \rm /tmp/out_command.$$ 2379 2379 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2380 2380 sleep $DELAI 2381 2381 else 2382 \rm out_rsync2382 \rm /tmp/out_command.$$ 2383 2383 break 2384 2384 fi … … 2413 2413 i=0 2414 2414 while [ $i -lt $NB_ESSAI ] ; do 2415 ncra $@ > out_rsync2>&12415 ncra $@ > /tmp/out_command.$$ 2>&1 2416 2416 status=$? 2417 2417 if [ ${status} -gt 0 ] ; then 2418 2418 IGCM_debug_Print 2 "IGCM_sys_ncra : error code ${status}" 2419 cat out_rsync2420 \rm out_rsync2419 cat /tmp/out_command.$$ 2420 \rm /tmp/out_command.$$ 2421 2421 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2422 2422 sleep $DELAI 2423 2423 else 2424 \rm out_rsync2424 \rm /tmp/out_command.$$ 2425 2425 break 2426 2426 fi … … 2455 2455 i=0 2456 2456 while [ $i -lt $NB_ESSAI ] ; do 2457 ncrcat $@ > out_rsync2>&12457 ncrcat $@ > /tmp/out_command.$$ 2>&1 2458 2458 status=$? 2459 2459 if [ ${status} -gt 0 ] ; then 2460 2460 IGCM_debug_Print 2 "IGCM_sys_ncrcat : error code ${status}" 2461 cat out_rsync2462 \rm out_rsync2461 cat /tmp/out_command.$$ 2462 \rm /tmp/out_command.$$ 2463 2463 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2464 2464 sleep $DELAI 2465 elif [ ! "X$( grep "WARNING Intra-file non-monotonicity" out_rsync)" = "X" ] ; then2465 elif [ ! "X$( grep "WARNING Intra-file non-monotonicity" /tmp/out_command.$$ )" = "X" ] ; then 2466 2466 IGCM_debug_Print 2 "IGCM_sys_ncrcat : WARNING Intra-file non-monotonicity" 2467 cat out_rsync2467 cat /tmp/out_command.$$ 2468 2468 # remove files having corrupted time axis 2469 2469 eval lastArg=\${$#} 2470 2470 IGCM_debug_Print 2 "IGCM_sys_ncrcat : Delete ${lastArg}" 2471 2471 \rm ${lastArg} 2472 \rm out_rsync2472 \rm /tmp/out_command.$$ 2473 2473 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2474 2474 sleep $DELAI 2475 2475 else 2476 \rm out_rsync2476 \rm /tmp/out_command.$$ 2477 2477 break 2478 2478 fi … … 2507 2507 i=0 2508 2508 while [ $i -lt $NB_ESSAI ] ; do 2509 ncrename $@ > out_rsync2>&12509 ncrename $@ > /tmp/out_command.$$ 2>&1 2510 2510 status=$? 2511 2511 if [ ${status} -gt 0 ] ; then 2512 2512 IGCM_debug_Print 2 "IGCM_sys_ncrename : error code ${status}" 2513 cat out_rsync2514 \rm out_rsync2513 cat /tmp/out_command.$$ 2514 \rm /tmp/out_command.$$ 2515 2515 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2516 2516 sleep $DELAI 2517 2517 else 2518 \rm out_rsync2518 \rm /tmp/out_command.$$ 2519 2519 break 2520 2520 fi … … 2549 2549 i=0 2550 2550 while [ $i -lt $NB_ESSAI ] ; do 2551 ncwa $@ > out_rsync2>&12551 ncwa $@ > /tmp/out_command.$$ 2>&1 2552 2552 status=$? 2553 2553 if [ ${status} -gt 0 ] ; then 2554 2554 IGCM_debug_Print 2 "IGCM_sys_ncwa : error code ${status}" 2555 cat out_rsync2556 \rm out_rsync2555 cat /tmp/out_command.$$ 2556 \rm /tmp/out_command.$$ 2557 2557 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2558 2558 sleep $DELAI 2559 2559 else 2560 \rm out_rsync2560 \rm /tmp/out_command.$$ 2561 2561 break 2562 2562 fi … … 2588 2588 typeset status 2589 2589 2590 \cdo $@ > out_rsync2>&12590 \cdo $@ > /tmp/out_command.$$ 2>&1 2591 2591 status=$? 2592 2592 if [ ${status} -gt 0 ] ; then 2593 2593 echo "IGCM_sys_cdo : error code ${status}" 2594 cat out_rsync2595 \rm out_rsync2594 cat /tmp/out_command.$$ 2595 \rm /tmp/out_command.$$ 2596 2596 IGCM_debug_PopStack "IGCM_sys_cdo" 2597 2597 return 1 -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh
r936 r938 846 846 mkdir -p ${HOME}/MIRROR/${PATHlibIGCM} 847 847 848 echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > out_rsync2>&1849 ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> out_rsync2>&1848 echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > /tmp/out_command.$$ 2>&1 849 ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> /tmp/out_command.$$ 2>&1 850 850 status=$? 851 851 852 852 if [ ${status} -gt 0 ] ; then 853 853 echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on frontend." 854 cat out_rsync854 cat /tmp/out_command.$$ 855 855 fi 856 856 IGCM_debug_PopStack "IGCM_sys_Mirror_libIGCM" … … 870 870 typeset status 871 871 872 echo cp $@ > out_rsync2>&1873 \cp $@ >> out_rsync2>&1872 echo cp $@ > /tmp/out_command.$$ 2>&1 873 \cp $@ >> /tmp/out_command.$$ 2>&1 874 874 status=$? 875 875 876 876 if [ ${status} -gt 0 ] ; then 877 877 echo "IGCM_sys_Cp : error code ${status}" 878 cat out_rsync878 cat /tmp/out_command.$$ 879 879 IGCM_debug_Exit "IGCM_sys_Cp" 880 880 else 881 \rm out_rsync881 \rm /tmp/out_command.$$ 882 882 fi 883 883 IGCM_debug_PopStack "IGCM_sys_Cp" … … 897 897 typeset status 898 898 899 echo rm $@ > out_rsync2>&1900 \rm $@ >> out_rsync2>&1899 echo rm $@ > /tmp/out_command.$$ 2>&1 900 \rm $@ >> /tmp/out_command.$$ 2>&1 901 901 status=$? 902 902 903 903 if [ ${status} -gt 0 ] ; then 904 904 echo "IGCM_sys_Rm : error code ${status}" 905 cat out_rsync905 cat /tmp/out_command.$$ 906 906 IGCM_debug_Exit "IGCM_sys_Rm" 907 907 else 908 \rm out_rsync908 \rm /tmp/out_command.$$ 909 909 fi 910 910 IGCM_debug_PopStack "IGCM_sys_Rm" … … 925 925 typeset status 926 926 927 echo rm $@ > out_rsync2>&1928 \rm $@ >> out_rsync2>&1927 echo rm $@ > /tmp/out_command.$$ 2>&1 928 \rm $@ >> /tmp/out_command.$$ 2>&1 929 929 status=$? 930 930 931 931 if [ ${status} -gt 0 ] ; then 932 932 echo "IGCM_sys_RmRunDir : rm error code is ${status}." 933 cat out_rsync933 cat /tmp/out_command.$$ 934 934 IGCM_debug_Exit "IGCM_sys_RmRunDir" 935 935 else 936 \rm out_rsync936 \rm /tmp/out_command.$$ 937 937 fi 938 938 IGCM_debug_PopStack "IGCM_sys_RmRunDir" … … 954 954 typeset status 955 955 956 echo mv $@ > out_rsync2>&1957 \mv $@ >> out_rsync2>&1956 echo mv $@ > /tmp/out_command.$$ 2>&1 957 \mv $@ >> /tmp/out_command.$$ 2>&1 958 958 status=$? 959 959 960 960 if [ ${status} -gt 0 ] ; then 961 961 echo "IGCM_sys_Mv : error code ${status}" 962 cat out_rsync962 cat /tmp/out_command.$$ 963 963 IGCM_debug_Exit "IGCM_sys_Mv" 964 964 else 965 \rm out_rsync965 \rm /tmp/out_command.$$ 966 966 fi 967 967 fi … … 993 993 # 994 994 #USUAL WAY 995 \cp -r $1 $2 > out_rsync2>&1995 \cp -r $1 $2 > /tmp/out_command.$$ 2>&1 996 996 status=$? 997 997 998 998 if [ ${status} -gt 0 ] ; then 999 999 IGCM_debug_Print 2 "IGCM_sys_Put_Dir : cp failed error code ${status}" 1000 cat out_rsync1000 cat /tmp/out_command.$$ 1001 1001 IGCM_debug_Exit "IGCM_sys_Put_Dir" 1002 1002 else 1003 \rm out_rsync1003 \rm /tmp/out_command.$$ 1004 1004 fi 1005 1005 fi … … 1039 1039 i=0 1040 1040 while [ $i -lt $NB_ESSAI ] ; do 1041 \cp -ur $1 $2 >> out_rsync2>&11041 \cp -ur $1 $2 >> /tmp/out_command.$$ 2>&1 1042 1042 status=$? 1043 1043 if [ ${status} -gt 0 ] ; then … … 1053 1053 if [ ${status} -gt 0 ] ; then 1054 1054 echo "IGCM_sys_Get_Dir : error." 1055 cat out_rsync1055 cat /tmp/out_command.$$ 1056 1056 IGCM_debug_Exit "IGCM_sys_Get_Dir" 1057 1057 else 1058 \rm out_rsync1058 \rm /tmp/out_command.$$ 1059 1059 fi 1060 1060 fi … … 1087 1087 i=0 1088 1088 while [ $i -lt $NB_ESSAI ] ; do 1089 \cp -urL $1 $2 > out_rsync2>&11089 \cp -urL $1 $2 > /tmp/out_command.$$ 2>&1 1090 1090 status=$? 1091 1091 if [ ${status} -gt 0 ]; then … … 1101 1101 if [ ${status} -gt 0 ] ; then 1102 1102 echo "IGCM_sys_Get_Master : error." 1103 cat out_rsync1103 cat /tmp/out_command.$$ 1104 1104 IGCM_debug_Exit "IGCM_sys_Get_Master" 1105 1105 else 1106 \rm out_rsync1106 \rm /tmp/out_command.$$ 1107 1107 fi 1108 1108 fi … … 1136 1136 # 1137 1137 # USUAL WAY 1138 \cp $1 $2 > out_rsync2>&11138 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1139 1139 status=$? 1140 1140 1141 1141 # #RSYNC WITH NETWORK SSH CALL 1142 # echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync2>&11143 # ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> out_rsync2>&11142 # echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > /tmp/out_command.$$ 2>&1 1143 # ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> /tmp/out_command.$$ 2>&1 1144 1144 1145 1145 # #RSYNC WITH NFS USE 1146 # echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync2>&11147 # ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync2>&11146 # echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > /tmp/out_command.$$ 2>&1 1147 # ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> /tmp/out_command.$$ 2>&1 1148 1148 1149 1149 # status=$? 1150 1150 # IGCM_sys_Rsync_out $status 1151 1151 1152 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync1152 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk /tmp/out_command.$$ 1153 1153 # (( status=status+$? )) 1154 1154 … … 1158 1158 [ -f ${2} ] && ls -l ${2} 1159 1159 [ -f ${2}/${1} ] && ls -l ${2}/${1} 1160 cat out_rsync1160 cat /tmp/out_command.$$ 1161 1161 IGCM_debug_Exit "IGCM_sys_Put_Rest" 1162 1162 else … … 1167 1167 fi 1168 1168 1169 \rm out_rsync1169 \rm /tmp/out_command.$$ 1170 1170 fi 1171 1171 fi … … 1193 1193 # 1194 1194 # USUAL WAY 1195 \cp $1 $2 > out_rsync2>&11195 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1196 1196 status=$? 1197 1197 … … 1200 1200 [ -f ${2} ] && ls -l ${2} 1201 1201 [ -f ${2}/${1} ] && ls -l ${2}/${1} 1202 cat out_rsync1202 cat /tmp/out_command.$$ 1203 1203 IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest" 1204 1204 else … … 1209 1209 fi 1210 1210 1211 \rm out_rsync1211 \rm /tmp/out_command.$$ 1212 1212 fi 1213 1213 fi … … 1294 1294 while [ $i -lt $NB_ESSAI ] ; do 1295 1295 # USUAL WAY 1296 \cp $1 $2 > out_rsync2>&11296 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1297 1297 status=$? 1298 1298 if [ ${status} -gt 0 ]; then … … 1311 1311 1312 1312 # #RSYNC WITH NETWORK SSH CALL 1313 # echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync2>&11314 # ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> out_rsync2>&11313 # echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > /tmp/out_command.$$ 2>&1 1314 # ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> /tmp/out_command.$$ 2>&1 1315 1315 1316 1316 # #RSYNC WITH NFS USE 1317 # echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync2>&11318 # ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync2>&11317 # echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > /tmp/out_command.$$ 2>&1 1318 # ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> /tmp/out_command.$$ 2>&1 1319 1319 1320 1320 # status=$? 1321 1321 # IGCM_sys_Rsync_out $status 1322 1322 1323 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync1323 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk /tmp/out_command.$$ 1324 1324 # (( status=status+$? )) 1325 1325 … … 1329 1329 [ -f ${2} ] && ls -l ${2} 1330 1330 [ -f ${2}/${1} ] && ls -l ${2}/${1} 1331 cat out_rsync1331 cat /tmp/out_command.$$ 1332 1332 IGCM_debug_Exit "IGCM_sys_Put_Out" 1333 1333 else … … 1340 1340 fi 1341 1341 1342 \rm out_rsync1342 \rm /tmp/out_command.$$ 1343 1343 fi 1344 1344 fi … … 1398 1398 while [ $i -lt $NB_ESSAI ] ; do 1399 1399 # USUAL WAY 1400 \cp $1 $2 > out_rsync2>&11400 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1401 1401 status=$? 1402 1402 if [ ${status} -gt 0 ]; then … … 1417 1417 [ -f ${2} ] && ls -l ${2} 1418 1418 [ -f ${2}/${1} ] && ls -l ${2}/${1} 1419 cat out_rsync1419 cat /tmp/out_command.$$ 1420 1420 IGCM_debug_Exit "IGCM_sys_PutBuffer_Out" 1421 1421 else … … 1428 1428 fi 1429 1429 1430 \rm out_rsync1430 \rm /tmp/out_command.$$ 1431 1431 fi 1432 1432 fi … … 1479 1479 #fi 1480 1480 1481 ccc_hsm get ${dm_liste[*]} > out_rsync2>&11481 ccc_hsm get ${dm_liste[*]} > /tmp/out_command.$$ 2>&1 1482 1482 status=$? 1483 1483 if [ ${status} -gt 0 ] ; then 1484 1484 echo "WARNING IGCM_sys_Get : error code ${status}" 1485 cat out_rsync1485 cat /tmp/out_command.$$ 1486 1486 echo "WARNING IGCM_sys_Get : will stop later if the cp fails." 1487 1487 fi 1488 1488 1489 1489 #if [ ${status} -gt 0 ] ; then 1490 # if [ ! "X$( grep "Lost dmusrcmd connection" out_rsync)" = "X" ] ; then1491 # cat out_rsync1490 # if [ ! "X$( grep "Lost dmusrcmd connection" /tmp/out_command.$$ )" = "X" ] ; then 1491 # cat /tmp/out_command.$$ 1492 1492 # echo "WARNING IGCM_sys_Get : Lost dmusrcmd connection : " 1493 1493 # sleep 30 1494 1494 # echo "We try another time" 1495 ## dmget ${dm_liste[*]} > out_rsync2>&11496 # ccc_hsm get ${dm_liste[*]} > out_rsync2>&11495 ## dmget ${dm_liste[*]} > /tmp/out_command.$$ 2>&1 1496 # ccc_hsm get ${dm_liste[*]} > /tmp/out_command.$$ 2>&1 1497 1497 # status=$? 1498 1498 # if [ ${status} -gt 0 ] ; then 1499 1499 # echo "ERROR IGCM_sys_Get : again demigration error :" 1500 # cat out_rsync1500 # cat /tmp/out_command.$$ 1501 1501 # IGCM_debug_Exit "IGCM_sys_Get" 1502 1502 # fi 1503 1503 # else 1504 1504 # echo "ERROR IGCM_sys_Get : demigration error :" 1505 # cat out_rsync1505 # cat /tmp/out_command.$$ 1506 1506 # IGCM_debug_Exit "IGCM_sys_Get" 1507 1507 # fi … … 1509 1509 1510 1510 # #RSYNC WITH NETWORK SSH CALL 1511 # echo ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > out_rsync2>&11512 # ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} >> out_rsync2>&11511 # echo ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > /tmp/out_command.$$ 2>&1 1512 # ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} >> /tmp/out_command.$$ 2>&1 1513 1513 1514 1514 # #RSYNC WITH NFS USE 1515 # echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync2>&11516 # ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync2>&11515 # echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > /tmp/out_command.$$ 2>&1 1516 # ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> /tmp/out_command.$$ 2>&1 1517 1517 1518 1518 # status=$? 1519 1519 # IGCM_sys_Rsync_out $status 1520 1520 1521 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync1521 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk /tmp/out_command.$$ 1522 1522 # (( status=status+$? )) 1523 1523 … … 1535 1535 i=0 1536 1536 while [ $i -lt $NB_ESSAI ] ; do 1537 \cp ${target} ${DEST}/${local_file} >> out_rsync2>&11537 \cp ${target} ${DEST}/${local_file} >> /tmp/out_command.$$ 2>&1 1538 1538 status=$? 1539 1539 if [ ${status} -gt 0 ]; then … … 1548 1548 if [ ${status} -gt 0 ] ; then 1549 1549 echo "IGCM_sys_Get : error" 1550 cat out_rsync1551 \rm out_rsync1550 cat /tmp/out_command.$$ 1551 \rm /tmp/out_command.$$ 1552 1552 IGCM_debug_Exit "IGCM_sys_Get" 1553 1553 else 1554 \rm out_rsync1554 \rm /tmp/out_command.$$ 1555 1555 fi 1556 1556 fi … … 1559 1559 i=0 1560 1560 while [ $i -lt $NB_ESSAI ] ; do 1561 \cp ${dm_liste} ${DEST} >> out_rsync2>&11561 \cp ${dm_liste} ${DEST} >> /tmp/out_command.$$ 2>&1 1562 1562 status=$? 1563 1563 if [ ${status} -gt 0 ]; then … … 1572 1572 if [ ${status} -gt 0 ] ; then 1573 1573 echo "IGCM_sys_Get : error" 1574 cat out_rsync1575 \rm out_rsync1574 cat /tmp/out_command.$$ 1575 \rm /tmp/out_command.$$ 1576 1576 IGCM_debug_Exit "IGCM_sys_Get" 1577 1577 else 1578 \rm out_rsync1578 \rm /tmp/out_command.$$ 1579 1579 fi 1580 1580 fi … … 1617 1617 i=0 1618 1618 while [ $i -lt $NB_ESSAI ] ; do 1619 \cp ${target} ${DEST}/${local_file} >> out_rsync2>&11619 \cp ${target} ${DEST}/${local_file} >> /tmp/out_command.$$ 2>&1 1620 1620 status=$? 1621 1621 if [ ${status} -gt 0 ]; then … … 1630 1630 if [ ${status} -gt 0 ] ; then 1631 1631 echo "IGCM_sys_Get : error" 1632 cat out_rsync1633 \rm out_rsync1632 cat /tmp/out_command.$$ 1633 \rm /tmp/out_command.$$ 1634 1634 IGCM_debug_Exit "IGCM_sys_GetBuffer" 1635 1635 else 1636 \rm out_rsync1636 \rm /tmp/out_command.$$ 1637 1637 fi 1638 1638 done … … 1640 1640 i=0 1641 1641 while [ $i -lt $NB_ESSAI ] ; do 1642 \cp ${buf_liste} ${DEST} >> out_rsync2>&11642 \cp ${buf_liste} ${DEST} >> /tmp/out_command.$$ 2>&1 1643 1643 status=$? 1644 1644 if [ ${status} -gt 0 ]; then … … 1653 1653 if [ ${status} -gt 0 ] ; then 1654 1654 echo "IGCM_sys_Get : error" 1655 cat out_rsync1656 \rm out_rsync1655 cat /tmp/out_command.$$ 1656 \rm /tmp/out_command.$$ 1657 1657 IGCM_debug_Exit "IGCM_sys_GetBuffer" 1658 1658 else 1659 \rm out_rsync1659 \rm /tmp/out_command.$$ 1660 1660 fi 1661 1661 fi … … 1850 1850 i=0 1851 1851 while [ $i -lt $NB_ESSAI ] ; do 1852 ~p86ipsl/X64_CURIE/bin/rebuild -f -o $@ > out_rsync2>&11852 ~p86ipsl/X64_CURIE/bin/rebuild -f -o $@ > /tmp/out_command.$$ 2>&1 1853 1853 status=$? 1854 1854 if [ ${status} -gt 0 ] ; then 1855 1855 IGCM_debug_Print 2 "IGCM_sys_rebuild : error code ${status}" 1856 cat out_rsync1857 \rm out_rsync1856 cat /tmp/out_command.$$ 1857 \rm /tmp/out_command.$$ 1858 1858 IGCM_debug_Print 2 "IGCM_sys_rebuild : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1859 1859 firstArg=${1} … … 1861 1861 sleep $DELAI 1862 1862 else 1863 \rm out_rsync1863 \rm /tmp/out_command.$$ 1864 1864 break 1865 1865 fi … … 2357 2357 i=0 2358 2358 while [ $i -lt $NB_ESSAI ] ; do 2359 ncap2 "$@" > out_rsync2>&12359 ncap2 "$@" > /tmp/out_command.$$ 2>&1 2360 2360 status=$? 2361 2361 if [ ${status} -gt 0 ] ; then 2362 2362 IGCM_debug_Print 2 "IGCM_sys_ncap2 : error code ${status}" 2363 cat out_rsync2364 \rm out_rsync2363 cat /tmp/out_command.$$ 2364 \rm /tmp/out_command.$$ 2365 2365 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2366 2366 sleep $DELAI 2367 2367 else 2368 \rm out_rsync2368 \rm /tmp/out_command.$$ 2369 2369 break 2370 2370 fi … … 2399 2399 i=0 2400 2400 while [ $i -lt $NB_ESSAI ] ; do 2401 ncatted "$@" > out_rsync2>&12401 ncatted "$@" > /tmp/out_command.$$ 2>&1 2402 2402 status=$? 2403 2403 if [ ${status} -gt 0 ] ; then 2404 2404 IGCM_debug_Print 2 "IGCM_sys_ncatted : error code ${status}" 2405 cat out_rsync2406 \rm out_rsync2405 cat /tmp/out_command.$$ 2406 \rm /tmp/out_command.$$ 2407 2407 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2408 2408 sleep $DELAI 2409 2409 else 2410 \rm out_rsync2410 \rm /tmp/out_command.$$ 2411 2411 break 2412 2412 fi … … 2441 2441 i=0 2442 2442 while [ $i -lt $NB_ESSAI ] ; do 2443 ncbo $@ > out_rsync2>&12443 ncbo $@ > /tmp/out_command.$$ 2>&1 2444 2444 status=$? 2445 2445 if [ ${status} -gt 0 ] ; then 2446 2446 IGCM_debug_Print 2 "IGCM_sys_ncbo : error code ${status}" 2447 cat out_rsync2448 \rm out_rsync2447 cat /tmp/out_command.$$ 2448 \rm /tmp/out_command.$$ 2449 2449 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2450 2450 sleep $DELAI 2451 2451 else 2452 \rm out_rsync2452 \rm /tmp/out_command.$$ 2453 2453 break 2454 2454 fi … … 2483 2483 i=0 2484 2484 while [ $i -lt $NB_ESSAI ] ; do 2485 ncdiff $@ > out_rsync2>&12485 ncdiff $@ > /tmp/out_command.$$ 2>&1 2486 2486 status=$? 2487 2487 if [ ${status} -gt 0 ] ; then 2488 2488 IGCM_debug_Print 2 "IGCM_sys_ncdiff : error code ${status}" 2489 cat out_rsync2490 \rm out_rsync2489 cat /tmp/out_command.$$ 2490 \rm /tmp/out_command.$$ 2491 2491 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2492 2492 sleep $DELAI 2493 2493 else 2494 \rm out_rsync2494 \rm /tmp/out_command.$$ 2495 2495 break 2496 2496 fi … … 2525 2525 i=0 2526 2526 while [ $i -lt $NB_ESSAI ] ; do 2527 ncea $@ > out_rsync2>&12527 ncea $@ > /tmp/out_command.$$ 2>&1 2528 2528 status=$? 2529 2529 if [ ${status} -gt 0 ] ; then 2530 2530 IGCM_debug_Print 2 "IGCM_sys_ncea : error code ${status}" 2531 cat out_rsync2532 \rm out_rsync2531 cat /tmp/out_command.$$ 2532 \rm /tmp/out_command.$$ 2533 2533 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2534 2534 sleep $DELAI 2535 2535 else 2536 \rm out_rsync2536 \rm /tmp/out_command.$$ 2537 2537 break 2538 2538 fi … … 2567 2567 i=0 2568 2568 while [ $i -lt $NB_ESSAI ] ; do 2569 ncecat $@ > out_rsync2>&12569 ncecat $@ > /tmp/out_command.$$ 2>&1 2570 2570 status=$? 2571 2571 if [ ${status} -gt 0 ] ; then 2572 2572 IGCM_debug_Print 2 "IGCM_sys_ncecat : error code ${status}" 2573 cat out_rsync2574 \rm out_rsync2573 cat /tmp/out_command.$$ 2574 \rm /tmp/out_command.$$ 2575 2575 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2576 2576 sleep $DELAI 2577 2577 else 2578 \rm out_rsync2578 \rm /tmp/out_command.$$ 2579 2579 break 2580 2580 fi … … 2609 2609 i=0 2610 2610 while [ $i -lt $NB_ESSAI ] ; do 2611 ncflint $@ > out_rsync2>&12611 ncflint $@ > /tmp/out_command.$$ 2>&1 2612 2612 status=$? 2613 2613 if [ ${status} -gt 0 ] ; then 2614 2614 IGCM_debug_Print 2 "IGCM_sys_ncflint : error code ${status}" 2615 cat out_rsync2616 \rm out_rsync2615 cat /tmp/out_command.$$ 2616 \rm /tmp/out_command.$$ 2617 2617 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2618 2618 sleep $DELAI 2619 2619 else 2620 \rm out_rsync2620 \rm /tmp/out_command.$$ 2621 2621 break 2622 2622 fi … … 2651 2651 i=0 2652 2652 while [ $i -lt $NB_ESSAI ] ; do 2653 ncks $@ > out_rsync2>&12653 ncks $@ > /tmp/out_command.$$ 2>&1 2654 2654 status=$? 2655 2655 if [ ${status} -gt 0 ] ; then 2656 2656 IGCM_debug_Print 2 "IGCM_sys_ncks : error code ${status}" 2657 cat out_rsync2658 \rm out_rsync2657 cat /tmp/out_command.$$ 2658 \rm /tmp/out_command.$$ 2659 2659 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2660 2660 sleep $DELAI 2661 2661 else 2662 \rm out_rsync2662 \rm /tmp/out_command.$$ 2663 2663 break 2664 2664 fi … … 2693 2693 i=0 2694 2694 while [ $i -lt $NB_ESSAI ] ; do 2695 ncpdq $@ > out_rsync2>&12695 ncpdq $@ > /tmp/out_command.$$ 2>&1 2696 2696 status=$? 2697 2697 if [ ${status} -gt 0 ] ; then 2698 2698 IGCM_debug_Print 2 "IGCM_sys_ncpdq : error code ${status}" 2699 cat out_rsync2700 \rm out_rsync2699 cat /tmp/out_command.$$ 2700 \rm /tmp/out_command.$$ 2701 2701 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2702 2702 sleep $DELAI 2703 2703 else 2704 \rm out_rsync2704 \rm /tmp/out_command.$$ 2705 2705 break 2706 2706 fi … … 2735 2735 i=0 2736 2736 while [ $i -lt $NB_ESSAI ] ; do 2737 ncra $@ > out_rsync2>&12737 ncra $@ > /tmp/out_command.$$ 2>&1 2738 2738 status=$? 2739 2739 if [ ${status} -gt 0 ] ; then 2740 2740 IGCM_debug_Print 2 "IGCM_sys_ncra : error code ${status}" 2741 cat out_rsync2742 \rm out_rsync2741 cat /tmp/out_command.$$ 2742 \rm /tmp/out_command.$$ 2743 2743 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2744 2744 sleep $DELAI 2745 2745 else 2746 \rm out_rsync2746 \rm /tmp/out_command.$$ 2747 2747 break 2748 2748 fi … … 2777 2777 i=0 2778 2778 while [ $i -lt $NB_ESSAI ] ; do 2779 ncrcat $@ > out_rsync2>&12779 ncrcat $@ > /tmp/out_command.$$ 2>&1 2780 2780 status=$? 2781 2781 if [ ${status} -gt 0 ] ; then 2782 2782 IGCM_debug_Print 2 "IGCM_sys_ncrcat : error code ${status}" 2783 cat out_rsync2784 \rm out_rsync2783 cat /tmp/out_command.$$ 2784 \rm /tmp/out_command.$$ 2785 2785 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2786 2786 sleep $DELAI 2787 elif [ ! "X$( grep "WARNING Intra-file non-monotonicity" out_rsync)" = "X" ] ; then2787 elif [ ! "X$( grep "WARNING Intra-file non-monotonicity" /tmp/out_command.$$ )" = "X" ] ; then 2788 2788 IGCM_debug_Print 2 "IGCM_sys_ncrcat : WARNING Intra-file non-monotonicity" 2789 cat out_rsync2789 cat /tmp/out_command.$$ 2790 2790 # remove files having corrupted time axis 2791 2791 eval lastArg=\${$#} 2792 2792 IGCM_debug_Print 2 "IGCM_sys_ncrcat : Delete ${lastArg}" 2793 2793 \rm ${lastArg} 2794 \rm out_rsync2794 \rm /tmp/out_command.$$ 2795 2795 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2796 2796 sleep $DELAI 2797 2797 else 2798 \rm out_rsync2798 \rm /tmp/out_command.$$ 2799 2799 break 2800 2800 fi … … 2829 2829 i=0 2830 2830 while [ $i -lt $NB_ESSAI ] ; do 2831 ncrename $@ > out_rsync2>&12831 ncrename $@ > /tmp/out_command.$$ 2>&1 2832 2832 status=$? 2833 2833 if [ ${status} -gt 0 ] ; then 2834 2834 IGCM_debug_Print 2 "IGCM_sys_ncrename : error code ${status}" 2835 cat out_rsync2836 \rm out_rsync2835 cat /tmp/out_command.$$ 2836 \rm /tmp/out_command.$$ 2837 2837 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2838 2838 sleep $DELAI 2839 2839 else 2840 \rm out_rsync2840 \rm /tmp/out_command.$$ 2841 2841 break 2842 2842 fi … … 2871 2871 i=0 2872 2872 while [ $i -lt $NB_ESSAI ] ; do 2873 ncwa $@ > out_rsync2>&12873 ncwa $@ > /tmp/out_command.$$ 2>&1 2874 2874 status=$? 2875 2875 if [ ${status} -gt 0 ] ; then 2876 2876 IGCM_debug_Print 2 "IGCM_sys_ncwa : error code ${status}" 2877 cat out_rsync2878 \rm out_rsync2877 cat /tmp/out_command.$$ 2878 \rm /tmp/out_command.$$ 2879 2879 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2880 2880 sleep $DELAI 2881 2881 else 2882 \rm out_rsync2882 \rm /tmp/out_command.$$ 2883 2883 break 2884 2884 fi … … 2910 2910 typeset status 2911 2911 2912 \cdo $@ > out_rsync2>&12912 \cdo $@ > /tmp/out_command.$$ 2>&1 2913 2913 status=$? 2914 2914 if [ ${status} -gt 0 ] ; then 2915 2915 echo "IGCM_sys_cdo : error code ${status}" 2916 cat out_rsync2917 \rm out_rsync2916 cat /tmp/out_command.$$ 2917 \rm /tmp/out_command.$$ 2918 2918 IGCM_debug_PopStack "IGCM_sys_cdo" 2919 2919 return 1 -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh
r936 r938 720 720 mkdir -p ${HOME}/MIRROR/${PATHlibIGCM} 721 721 722 echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > out_rsync2>&1723 ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> out_rsync2>&1722 echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > /tmp/out_command.$$ 2>&1 723 ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> /tmp/out_command.$$ 2>&1 724 724 status=$? 725 725 726 726 if [ ${status} -gt 0 ] ; then 727 727 echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on frontend." 728 cat out_rsync728 cat /tmp/out_command.$$ 729 729 fi 730 730 IGCM_debug_PopStack "IGCM_sys_Mirror_libIGCM" … … 744 744 typeset status 745 745 746 echo cp $@ > out_rsync2>&1747 \cp $@ >> out_rsync2>&1746 echo cp $@ > /tmp/out_command.$$ 2>&1 747 \cp $@ >> /tmp/out_command.$$ 2>&1 748 748 status=$? 749 749 750 750 if [ ${status} -gt 0 ] ; then 751 751 echo "IGCM_sys_Cp : error code ${status}" 752 cat out_rsync752 cat /tmp/out_command.$$ 753 753 IGCM_debug_Exit "IGCM_sys_Cp" 754 754 else 755 \rm out_rsync755 \rm /tmp/out_command.$$ 756 756 fi 757 757 IGCM_debug_PopStack "IGCM_sys_Cp" … … 771 771 typeset status 772 772 773 echo rm $@ > out_rsync2>&1774 \rm $@ >> out_rsync2>&1773 echo rm $@ > /tmp/out_command.$$ 2>&1 774 \rm $@ >> /tmp/out_command.$$ 2>&1 775 775 status=$? 776 776 777 777 if [ ${status} -gt 0 ] ; then 778 778 echo "IGCM_sys_Rm : error code ${status}" 779 cat out_rsync779 cat /tmp/out_command.$$ 780 780 IGCM_debug_Exit "IGCM_sys_Rm" 781 781 else 782 \rm out_rsync782 \rm /tmp/out_command.$$ 783 783 fi 784 784 IGCM_debug_PopStack "IGCM_sys_Rm" … … 816 816 typeset status 817 817 818 echo mv $@ > out_rsync2>&1819 \mv $@ >> out_rsync2>&1818 echo mv $@ > /tmp/out_command.$$ 2>&1 819 \mv $@ >> /tmp/out_command.$$ 2>&1 820 820 status=$? 821 821 822 822 if [ ${status} -gt 0 ] ; then 823 823 echo "IGCM_sys_Mv : error code ${status}" 824 cat out_rsync824 cat /tmp/out_command.$$ 825 825 IGCM_debug_Exit "IGCM_sys_Mv" 826 826 else 827 \rm out_rsync827 \rm /tmp/out_command.$$ 828 828 fi 829 829 fi … … 855 855 # 856 856 #USUAL WAY 857 \cp -r $1 $2 > out_rsync2>&1857 \cp -r $1 $2 > /tmp/out_command.$$ 2>&1 858 858 status=$? 859 859 860 860 if [ ${status} -gt 0 ] ; then 861 861 IGCM_debug_Print 2 "IGCM_sys_Put_Dir : cp failed error code ${status}" 862 cat out_rsync862 cat /tmp/out_command.$$ 863 863 IGCM_debug_Exit "IGCM_sys_Put_Dir" 864 864 else 865 \rm out_rsync865 \rm /tmp/out_command.$$ 866 866 fi 867 867 fi … … 889 889 890 890 #USUAL WAY 891 \cp -ur $1 $2 > out_rsync2>&1891 \cp -ur $1 $2 > /tmp/out_command.$$ 2>&1 892 892 status=$? 893 893 894 894 if [ ${status} -gt 0 ] ; then 895 895 IGCM_debug_Print 2 "IGCM_sys_Get_Dir : cp failed error code ${status}" 896 cat out_rsync896 cat /tmp/out_command.$$ 897 897 IGCM_debug_Exit "IGCM_sys_Get_Dir" 898 898 else 899 \rm out_rsync899 \rm /tmp/out_command.$$ 900 900 fi 901 901 fi … … 928 928 i=0 929 929 while [ $i -lt $NB_ESSAI ] ; do 930 \cp -urL $1 $2 > out_rsync2>&1930 \cp -urL $1 $2 > /tmp/out_command.$$ 2>&1 931 931 status=$? 932 932 if [ ${status} -gt 0 ]; then … … 942 942 if [ ${status} -gt 0 ] ; then 943 943 echo "IGCM_sys_Get_Master : error." 944 cat out_rsync944 cat /tmp/out_command.$$ 945 945 IGCM_debug_Exit "IGCM_sys_Get_Master" 946 946 else 947 \rm out_rsync947 \rm /tmp/out_command.$$ 948 948 fi 949 949 fi … … 984 984 # 985 985 #USUAL WAY 986 \cp $1 $2 > out_rsync2>&1986 \cp $1 $2 > /tmp/out_command.$$ 2>&1 987 987 status=$? 988 988 989 989 # #RSYNC WITH NETWORK SSH CALL 990 # echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync2>&1991 # ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> out_rsync2>&1990 # echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > /tmp/out_command.$$ 2>&1 991 # ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> /tmp/out_command.$$ 2>&1 992 992 993 993 # #RSYNC WITH NFS USE 994 # echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync2>&1995 # ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync2>&1994 # echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > /tmp/out_command.$$ 2>&1 995 # ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> /tmp/out_command.$$ 2>&1 996 996 997 997 # status=$? 998 998 # IGCM_sys_Rsync_out $status 999 999 1000 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync1000 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk /tmp/out_command.$$ 1001 1001 # (( status=status+$? )) 1002 1002 1003 1003 if [ ${status} -gt 0 ] ; then 1004 1004 echo "IGCM_sys_Put_Rest : cp failed error code ${status}" 1005 cat out_rsync1005 cat /tmp/out_command.$$ 1006 1006 IGCM_debug_Exit "IGCM_sys_Put_Rest" 1007 1007 else 1008 \rm out_rsync1008 \rm /tmp/out_command.$$ 1009 1009 fi 1010 1010 fi … … 1037 1037 # 1038 1038 # USUAL WAY 1039 \cp $1 $2 > out_rsync2>&11039 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1040 1040 status=$? 1041 1041 … … 1044 1044 [ -f ${2} ] && ls -l ${2} 1045 1045 [ -f ${2}/${1} ] && ls -l ${2}/${1} 1046 cat out_rsync1046 cat /tmp/out_command.$$ 1047 1047 IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest" 1048 1048 else 1049 \rm out_rsync1049 \rm /tmp/out_command.$$ 1050 1050 fi 1051 1051 fi … … 1093 1093 # 1094 1094 1095 echo ${RSYNC} ${RSYNC_opt} $1 $2 > out_rsync2>&11096 ${RSYNC} ${RSYNC_opt} $1 $2 >> out_rsync2>&11095 echo ${RSYNC} ${RSYNC_opt} $1 $2 > /tmp/out_command.$$ 2>&1 1096 ${RSYNC} ${RSYNC_opt} $1 $2 >> /tmp/out_command.$$ 2>&1 1097 1097 status=$? 1098 1098 IGCM_sys_Rsync_out $status 1099 1099 1100 ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync1100 ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk /tmp/out_command.$$ 1101 1101 (( status=status+$? )) 1102 1102 1103 1103 if [ ${status} -gt 0 ] ; then 1104 1104 IGCM_debug_Print 2 "IGCM_sys_Put_Out : rsync failed error code ${status}" 1105 cat out_rsync1105 cat /tmp/out_command.$$ 1106 1106 IGCM_debug_Exit "IGCM_sys_Put_Out" 1107 1107 else 1108 \rm out_rsync1108 \rm /tmp/out_command.$$ 1109 1109 fi 1110 1110 fi … … 1164 1164 while [ $i -lt $NB_ESSAI ] ; do 1165 1165 # USUAL WAY 1166 \cp $1 $2 > out_rsync2>&11166 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1167 1167 status=$? 1168 1168 if [ ${status} -gt 0 ]; then … … 1183 1183 [ -f ${2} ] && ls -l ${2} 1184 1184 [ -f ${2}/${1} ] && ls -l ${2}/${1} 1185 cat out_rsync1185 cat /tmp/out_command.$$ 1186 1186 IGCM_debug_Exit "IGCM_sys_PutBuffer_Out" 1187 1187 else … … 1194 1194 fi 1195 1195 1196 \rm out_rsync1196 \rm /tmp/out_command.$$ 1197 1197 fi 1198 1198 fi … … 1232 1232 1233 1233 #USUAL WAY 1234 \cp ${dm_liste[*]} ${DEST} > out_rsync2>&11234 \cp ${dm_liste[*]} ${DEST} > /tmp/out_command.$$ 2>&1 1235 1235 status=$? 1236 1236 1237 1237 if [ ${status} -gt 0 ] ; then 1238 1238 IGCM_debug_Print 2 "IGCM_sys_Get : cp failed error code ${status}" 1239 cat out_rsync1239 cat /tmp/out_command.$$ 1240 1240 IGCM_debug_Exit "IGCM_sys_Get" 1241 1241 else 1242 \rm out_rsync1242 \rm /tmp/out_command.$$ 1243 1243 fi 1244 1244 fi … … 1280 1280 i=0 1281 1281 while [ $i -lt $NB_ESSAI ] ; do 1282 \cp ${target} ${DEST}/${local_file} >> out_rsync2>&11282 \cp ${target} ${DEST}/${local_file} >> /tmp/out_command.$$ 2>&1 1283 1283 status=$? 1284 1284 if [ ${status} -gt 0 ]; then … … 1293 1293 if [ ${status} -gt 0 ] ; then 1294 1294 echo "IGCM_sys_Get : error" 1295 cat out_rsync1296 \rm out_rsync1295 cat /tmp/out_command.$$ 1296 \rm /tmp/out_command.$$ 1297 1297 IGCM_debug_Exit "IGCM_sys_GetBuffer" 1298 1298 else 1299 \rm out_rsync1299 \rm /tmp/out_command.$$ 1300 1300 fi 1301 1301 done … … 1303 1303 i=0 1304 1304 while [ $i -lt $NB_ESSAI ] ; do 1305 \cp ${buf_liste} ${DEST} >> out_rsync2>&11305 \cp ${buf_liste} ${DEST} >> /tmp/out_command.$$ 2>&1 1306 1306 status=$? 1307 1307 if [ ${status} -gt 0 ]; then … … 1316 1316 if [ ${status} -gt 0 ] ; then 1317 1317 echo "IGCM_sys_Get : error" 1318 cat out_rsync1319 \rm out_rsync1318 cat /tmp/out_command.$$ 1319 \rm /tmp/out_command.$$ 1320 1320 IGCM_debug_Exit "IGCM_sys_GetBuffer" 1321 1321 else 1322 \rm out_rsync1322 \rm /tmp/out_command.$$ 1323 1323 fi 1324 1324 fi … … 1421 1421 i=0 1422 1422 while [ $i -lt $NB_ESSAI ] ; do 1423 rebuild -f -o $@ > out_rsync2>&11423 rebuild -f -o $@ > /tmp/out_command.$$ 2>&1 1424 1424 status=$? 1425 1425 if [ ${status} -gt 0 ] ; then 1426 1426 IGCM_debug_Print 2 "IGCM_sys_rebuild : error code ${status}" 1427 cat out_rsync1428 \rm out_rsync1427 cat /tmp/out_command.$$ 1428 \rm /tmp/out_command.$$ 1429 1429 IGCM_debug_Print 2 "IGCM_sys_rebuild : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1430 1430 firstArg=${1} … … 1432 1432 sleep $DELAI 1433 1433 else 1434 \rm out_rsync1434 \rm /tmp/out_command.$$ 1435 1435 break 1436 1436 fi … … 1940 1940 i=0 1941 1941 while [ $i -lt $NB_ESSAI ] ; do 1942 ncap2 "$@" > out_rsync2>&11942 ncap2 "$@" > /tmp/out_command.$$ 2>&1 1943 1943 status=$? 1944 1944 if [ ${status} -gt 0 ] ; then 1945 1945 IGCM_debug_Print 2 "IGCM_sys_ncap2 : error code ${status}" 1946 cat out_rsync1947 \rm out_rsync1946 cat /tmp/out_command.$$ 1947 \rm /tmp/out_command.$$ 1948 1948 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1949 1949 sleep $DELAI 1950 1950 else 1951 \rm out_rsync1951 \rm /tmp/out_command.$$ 1952 1952 break 1953 1953 fi … … 1982 1982 i=0 1983 1983 while [ $i -lt $NB_ESSAI ] ; do 1984 ncatted "$@" > out_rsync2>&11984 ncatted "$@" > /tmp/out_command.$$ 2>&1 1985 1985 status=$? 1986 1986 if [ ${status} -gt 0 ] ; then 1987 1987 IGCM_debug_Print 2 "IGCM_sys_ncatted : error code ${status}" 1988 cat out_rsync1989 \rm out_rsync1988 cat /tmp/out_command.$$ 1989 \rm /tmp/out_command.$$ 1990 1990 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1991 1991 sleep $DELAI 1992 1992 else 1993 \rm out_rsync1993 \rm /tmp/out_command.$$ 1994 1994 break 1995 1995 fi … … 2024 2024 i=0 2025 2025 while [ $i -lt $NB_ESSAI ] ; do 2026 ncbo $@ > out_rsync2>&12026 ncbo $@ > /tmp/out_command.$$ 2>&1 2027 2027 status=$? 2028 2028 if [ ${status} -gt 0 ] ; then 2029 2029 IGCM_debug_Print 2 "IGCM_sys_ncbo : error code ${status}" 2030 cat out_rsync2031 \rm out_rsync2030 cat /tmp/out_command.$$ 2031 \rm /tmp/out_command.$$ 2032 2032 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2033 2033 sleep $DELAI 2034 2034 else 2035 \rm out_rsync2035 \rm /tmp/out_command.$$ 2036 2036 break 2037 2037 fi … … 2066 2066 i=0 2067 2067 while [ $i -lt $NB_ESSAI ] ; do 2068 ncdiff $@ > out_rsync2>&12068 ncdiff $@ > /tmp/out_command.$$ 2>&1 2069 2069 status=$? 2070 2070 if [ ${status} -gt 0 ] ; then 2071 2071 IGCM_debug_Print 2 "IGCM_sys_ncdiff : error code ${status}" 2072 cat out_rsync2073 \rm out_rsync2072 cat /tmp/out_command.$$ 2073 \rm /tmp/out_command.$$ 2074 2074 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2075 2075 sleep $DELAI 2076 2076 else 2077 \rm out_rsync2077 \rm /tmp/out_command.$$ 2078 2078 break 2079 2079 fi … … 2108 2108 i=0 2109 2109 while [ $i -lt $NB_ESSAI ] ; do 2110 ncea $@ > out_rsync2>&12110 ncea $@ > /tmp/out_command.$$ 2>&1 2111 2111 status=$? 2112 2112 if [ ${status} -gt 0 ] ; then 2113 2113 IGCM_debug_Print 2 "IGCM_sys_ncea : error code ${status}" 2114 cat out_rsync2115 \rm out_rsync2114 cat /tmp/out_command.$$ 2115 \rm /tmp/out_command.$$ 2116 2116 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2117 2117 sleep $DELAI 2118 2118 else 2119 \rm out_rsync2119 \rm /tmp/out_command.$$ 2120 2120 break 2121 2121 fi … … 2150 2150 i=0 2151 2151 while [ $i -lt $NB_ESSAI ] ; do 2152 ncecat $@ > out_rsync2>&12152 ncecat $@ > /tmp/out_command.$$ 2>&1 2153 2153 status=$? 2154 2154 if [ ${status} -gt 0 ] ; then 2155 2155 IGCM_debug_Print 2 "IGCM_sys_ncecat : error code ${status}" 2156 cat out_rsync2157 \rm out_rsync2156 cat /tmp/out_command.$$ 2157 \rm /tmp/out_command.$$ 2158 2158 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2159 2159 sleep $DELAI 2160 2160 else 2161 \rm out_rsync2161 \rm /tmp/out_command.$$ 2162 2162 break 2163 2163 fi … … 2192 2192 i=0 2193 2193 while [ $i -lt $NB_ESSAI ] ; do 2194 ncflint $@ > out_rsync2>&12194 ncflint $@ > /tmp/out_command.$$ 2>&1 2195 2195 status=$? 2196 2196 if [ ${status} -gt 0 ] ; then 2197 2197 IGCM_debug_Print 2 "IGCM_sys_ncflint : error code ${status}" 2198 cat out_rsync2199 \rm out_rsync2198 cat /tmp/out_command.$$ 2199 \rm /tmp/out_command.$$ 2200 2200 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2201 2201 sleep $DELAI 2202 2202 else 2203 \rm out_rsync2203 \rm /tmp/out_command.$$ 2204 2204 break 2205 2205 fi … … 2234 2234 i=0 2235 2235 while [ $i -lt $NB_ESSAI ] ; do 2236 ncks $@ > out_rsync2>&12236 ncks $@ > /tmp/out_command.$$ 2>&1 2237 2237 status=$? 2238 2238 if [ ${status} -gt 0 ] ; then 2239 2239 IGCM_debug_Print 2 "IGCM_sys_ncks : error code ${status}" 2240 cat out_rsync2241 \rm out_rsync2240 cat /tmp/out_command.$$ 2241 \rm /tmp/out_command.$$ 2242 2242 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2243 2243 sleep $DELAI 2244 2244 else 2245 \rm out_rsync2245 \rm /tmp/out_command.$$ 2246 2246 break 2247 2247 fi … … 2276 2276 i=0 2277 2277 while [ $i -lt $NB_ESSAI ] ; do 2278 ncpdq $@ > out_rsync2>&12278 ncpdq $@ > /tmp/out_command.$$ 2>&1 2279 2279 status=$? 2280 2280 if [ ${status} -gt 0 ] ; then 2281 2281 IGCM_debug_Print 2 "IGCM_sys_ncpdq : error code ${status}" 2282 cat out_rsync2283 \rm out_rsync2282 cat /tmp/out_command.$$ 2283 \rm /tmp/out_command.$$ 2284 2284 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2285 2285 sleep $DELAI 2286 2286 else 2287 \rm out_rsync2287 \rm /tmp/out_command.$$ 2288 2288 break 2289 2289 fi … … 2318 2318 i=0 2319 2319 while [ $i -lt $NB_ESSAI ] ; do 2320 ncra $@ > out_rsync2>&12320 ncra $@ > /tmp/out_command.$$ 2>&1 2321 2321 status=$? 2322 2322 if [ ${status} -gt 0 ] ; then 2323 2323 IGCM_debug_Print 2 "IGCM_sys_ncra : error code ${status}" 2324 cat out_rsync2325 \rm out_rsync2324 cat /tmp/out_command.$$ 2325 \rm /tmp/out_command.$$ 2326 2326 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2327 2327 sleep $DELAI 2328 2328 else 2329 \rm out_rsync2329 \rm /tmp/out_command.$$ 2330 2330 break 2331 2331 fi … … 2360 2360 i=0 2361 2361 while [ $i -lt $NB_ESSAI ] ; do 2362 ncrcat $@ > out_rsync2>&12362 ncrcat $@ > /tmp/out_command.$$ 2>&1 2363 2363 status=$? 2364 2364 if [ ${status} -gt 0 ] ; then 2365 2365 IGCM_debug_Print 2 "IGCM_sys_ncrcat : error code ${status}" 2366 cat out_rsync2367 \rm out_rsync2366 cat /tmp/out_command.$$ 2367 \rm /tmp/out_command.$$ 2368 2368 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2369 2369 sleep $DELAI 2370 elif [ ! "X$( grep "WARNING Intra-file non-monotonicity" out_rsync)" = "X" ] ; then2370 elif [ ! "X$( grep "WARNING Intra-file non-monotonicity" /tmp/out_command.$$ )" = "X" ] ; then 2371 2371 IGCM_debug_Print 2 "IGCM_sys_ncrcat : WARNING Intra-file non-monotonicity" 2372 cat out_rsync2372 cat /tmp/out_command.$$ 2373 2373 # remove files having corrupted time axis 2374 2374 eval lastArg=\${$#} 2375 2375 IGCM_debug_Print 2 "IGCM_sys_ncrcat : Delete ${lastArg}" 2376 2376 \rm ${lastArg} 2377 \rm out_rsync2377 \rm /tmp/out_command.$$ 2378 2378 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2379 2379 sleep $DELAI 2380 2380 else 2381 \rm out_rsync2381 \rm /tmp/out_command.$$ 2382 2382 break 2383 2383 fi … … 2412 2412 i=0 2413 2413 while [ $i -lt $NB_ESSAI ] ; do 2414 ncrename $@ > out_rsync2>&12414 ncrename $@ > /tmp/out_command.$$ 2>&1 2415 2415 status=$? 2416 2416 if [ ${status} -gt 0 ] ; then 2417 2417 IGCM_debug_Print 2 "IGCM_sys_ncrename : error code ${status}" 2418 cat out_rsync2419 \rm out_rsync2418 cat /tmp/out_command.$$ 2419 \rm /tmp/out_command.$$ 2420 2420 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2421 2421 sleep $DELAI 2422 2422 else 2423 \rm out_rsync2423 \rm /tmp/out_command.$$ 2424 2424 break 2425 2425 fi … … 2454 2454 i=0 2455 2455 while [ $i -lt $NB_ESSAI ] ; do 2456 ncwa $@ > out_rsync2>&12456 ncwa $@ > /tmp/out_command.$$ 2>&1 2457 2457 status=$? 2458 2458 if [ ${status} -gt 0 ] ; then 2459 2459 IGCM_debug_Print 2 "IGCM_sys_ncwa : error code ${status}" 2460 cat out_rsync2461 \rm out_rsync2460 cat /tmp/out_command.$$ 2461 \rm /tmp/out_command.$$ 2462 2462 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2463 2463 sleep $DELAI 2464 2464 else 2465 \rm out_rsync2465 \rm /tmp/out_command.$$ 2466 2466 break 2467 2467 fi … … 2493 2493 typeset status 2494 2494 2495 \cdo $@ > out_rsync2>&12495 \cdo $@ > /tmp/out_command.$$ 2>&1 2496 2496 status=$? 2497 2497 if [ ${status} -gt 0 ] ; then 2498 2498 echo "IGCM_sys_cdo : error code ${status}" 2499 cat out_rsync2500 \rm out_rsync2499 cat /tmp/out_command.$$ 2500 \rm /tmp/out_command.$$ 2501 2501 IGCM_debug_PopStack "IGCM_sys_cdo" 2502 2502 return 1 -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_iitm.ksh
r936 r938 765 765 mkdir -p ${HOME}/MIRROR/${PATHlibIGCM} 766 766 767 echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > out_rsync2>&1768 ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> out_rsync2>&1767 echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > /tmp/out_command.$$ 2>&1 768 ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> /tmp/out_command.$$ 2>&1 769 769 status=$? 770 770 771 771 if [ ${status} -gt 0 ] ; then 772 772 echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on frontend." 773 cat out_rsync773 cat /tmp/out_command.$$ 774 774 fi 775 775 IGCM_debug_PopStack "IGCM_sys_Mirror_libIGCM" … … 789 789 typeset status 790 790 791 echo cp $@ > out_rsync2>&1792 \cp $@ >> out_rsync2>&1791 echo cp $@ > /tmp/out_command.$$ 2>&1 792 \cp $@ >> /tmp/out_command.$$ 2>&1 793 793 status=$? 794 794 795 795 if [ ${status} -gt 0 ] ; then 796 796 echo "IGCM_sys_Cp : error code ${status}" 797 cat out_rsync797 cat /tmp/out_command.$$ 798 798 IGCM_debug_Exit "IGCM_sys_Cp" 799 799 else 800 \rm out_rsync800 \rm /tmp/out_command.$$ 801 801 fi 802 802 IGCM_debug_PopStack "IGCM_sys_Cp" … … 816 816 typeset status 817 817 818 echo rm $@ > out_rsync2>&1819 \rm $@ >> out_rsync2>&1818 echo rm $@ > /tmp/out_command.$$ 2>&1 819 \rm $@ >> /tmp/out_command.$$ 2>&1 820 820 status=$? 821 821 822 822 if [ ${status} -gt 0 ] ; then 823 823 echo "IGCM_sys_Rm : error code ${status}" 824 cat out_rsync824 cat /tmp/out_command.$$ 825 825 IGCM_debug_Exit "IGCM_sys_Rm" 826 826 else 827 \rm out_rsync827 \rm /tmp/out_command.$$ 828 828 fi 829 829 IGCM_debug_PopStack "IGCM_sys_Rm" … … 844 844 typeset status 845 845 846 echo rm $@ > out_rsync2>&1847 \rm $@ >> out_rsync2>&1846 echo rm $@ > /tmp/out_command.$$ 2>&1 847 \rm $@ >> /tmp/out_command.$$ 2>&1 848 848 status=$? 849 849 850 850 if [ ${status} -gt 0 ] ; then 851 851 echo "IGCM_sys_RmRunDir : rm error code is ${status}." 852 cat out_rsync852 cat /tmp/out_command.$$ 853 853 IGCM_debug_Exit "IGCM_sys_RmRunDir" 854 854 else 855 \rm out_rsync855 \rm /tmp/out_command.$$ 856 856 fi 857 857 IGCM_debug_PopStack "IGCM_sys_RmRunDir" … … 873 873 typeset status 874 874 875 echo mv $@ > out_rsync2>&1876 \mv $@ >> out_rsync2>&1875 echo mv $@ > /tmp/out_command.$$ 2>&1 876 \mv $@ >> /tmp/out_command.$$ 2>&1 877 877 status=$? 878 878 879 879 if [ ${status} -gt 0 ] ; then 880 880 echo "IGCM_sys_Mv : error code ${status}" 881 cat out_rsync881 cat /tmp/out_command.$$ 882 882 IGCM_debug_Exit "IGCM_sys_Mv" 883 883 else 884 \rm out_rsync884 \rm /tmp/out_command.$$ 885 885 fi 886 886 fi … … 912 912 # 913 913 #USUAL WAY 914 \cp -r $1 $2 > out_rsync2>&1914 \cp -r $1 $2 > /tmp/out_command.$$ 2>&1 915 915 status=$? 916 916 917 917 if [ ${status} -gt 0 ] ; then 918 918 IGCM_debug_Print 2 "IGCM_sys_Put_Dir : cp failed error code ${status}" 919 cat out_rsync919 cat /tmp/out_command.$$ 920 920 IGCM_debug_Exit "IGCM_sys_Put_Dir" 921 921 else 922 \rm out_rsync922 \rm /tmp/out_command.$$ 923 923 fi 924 924 fi … … 946 946 947 947 #USUAL WAY 948 \cp -ur $1 $2 > out_rsync2>&1948 \cp -ur $1 $2 > /tmp/out_command.$$ 2>&1 949 949 status=$? 950 950 951 951 if [ ${status} -gt 0 ] ; then 952 952 IGCM_debug_Print 2 "IGCM_sys_Get_Dir : cp failed error code ${status}" 953 cat out_rsync953 cat /tmp/out_command.$$ 954 954 IGCM_debug_Exit "IGCM_sys_Get_Dir" 955 955 else 956 \rm out_rsync956 \rm /tmp/out_command.$$ 957 957 fi 958 958 fi … … 985 985 i=0 986 986 while [ $i -lt $NB_ESSAI ] ; do 987 \cp -urL $1 $2 > out_rsync2>&1987 \cp -urL $1 $2 > /tmp/out_command.$$ 2>&1 988 988 status=$? 989 989 if [ ${status} -gt 0 ]; then … … 999 999 if [ ${status} -gt 0 ] ; then 1000 1000 echo "IGCM_sys_Get_Master : error." 1001 cat out_rsync1001 cat /tmp/out_command.$$ 1002 1002 IGCM_debug_Exit "IGCM_sys_Get_Master" 1003 1003 else 1004 \rm out_rsync1004 \rm /tmp/out_command.$$ 1005 1005 fi 1006 1006 fi … … 1041 1041 # 1042 1042 #USUAL WAY 1043 \cp $1 $2 > out_rsync2>&11043 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1044 1044 status=$? 1045 1045 1046 1046 if [ ${status} -gt 0 ] ; then 1047 1047 echo "IGCM_sys_Put_Rest : cp failed error code ${status}" 1048 cat out_rsync1048 cat /tmp/out_command.$$ 1049 1049 IGCM_debug_Exit "IGCM_sys_Put_Rest" 1050 1050 else 1051 \rm out_rsync1051 \rm /tmp/out_command.$$ 1052 1052 fi 1053 1053 fi … … 1080 1080 # 1081 1081 # USUAL WAY 1082 \cp $1 $2 > out_rsync2>&11082 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1083 1083 status=$? 1084 1084 … … 1087 1087 [ -f ${2} ] && ls -l ${2} 1088 1088 [ -f ${2}/${1} ] && ls -l ${2}/${1} 1089 cat out_rsync1089 cat /tmp/out_command.$$ 1090 1090 IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest" 1091 1091 else 1092 \rm out_rsync1092 \rm /tmp/out_command.$$ 1093 1093 fi 1094 1094 fi … … 1136 1136 # 1137 1137 #USUAL WAY 1138 \cp $1 $2 > out_rsync2>&11138 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1139 1139 status=$? 1140 1140 1141 1141 if [ ${status} -gt 0 ] ; then 1142 1142 IGCM_debug_Print 2 "IGCM_sys_Put_Out : cp failed error code ${status}" 1143 cat out_rsync1143 cat /tmp/out_command.$$ 1144 1144 IGCM_debug_Exit "IGCM_sys_Put_Out" 1145 1145 else 1146 \rm out_rsync1146 \rm /tmp/out_command.$$ 1147 1147 fi 1148 1148 fi … … 1202 1202 while [ $i -lt $NB_ESSAI ] ; do 1203 1203 # USUAL WAY 1204 \cp $1 $2 > out_rsync2>&11204 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1205 1205 status=$? 1206 1206 if [ ${status} -gt 0 ]; then … … 1221 1221 [ -f ${2} ] && ls -l ${2} 1222 1222 [ -f ${2}/${1} ] && ls -l ${2}/${1} 1223 cat out_rsync1223 cat /tmp/out_command.$$ 1224 1224 IGCM_debug_Exit "IGCM_sys_PutBuffer_Out" 1225 1225 else … … 1232 1232 fi 1233 1233 1234 \rm out_rsync1234 \rm /tmp/out_command.$$ 1235 1235 fi 1236 1236 fi … … 1277 1277 1278 1278 #USUAL WAY 1279 \cp ${dm_liste[*]} ${DEST} > out_rsync2>&11279 \cp ${dm_liste[*]} ${DEST} > /tmp/out_command.$$ 2>&1 1280 1280 status=$? 1281 1281 1282 1282 if [ ${status} -gt 0 ] ; then 1283 1283 IGCM_debug_Print 2 "IGCM_sys_Get : cp failed error code ${status}" 1284 cat out_rsync1284 cat /tmp/out_command.$$ 1285 1285 IGCM_debug_Exit "IGCM_sys_Get" 1286 1286 else 1287 \rm out_rsync1287 \rm /tmp/out_command.$$ 1288 1288 fi 1289 1289 fi … … 1325 1325 i=0 1326 1326 while [ $i -lt $NB_ESSAI ] ; do 1327 \cp ${target} ${DEST}/${local_file} >> out_rsync2>&11327 \cp ${target} ${DEST}/${local_file} >> /tmp/out_command.$$ 2>&1 1328 1328 status=$? 1329 1329 if [ ${status} -gt 0 ]; then … … 1338 1338 if [ ${status} -gt 0 ] ; then 1339 1339 echo "IGCM_sys_Get : error" 1340 cat out_rsync1341 \rm out_rsync1340 cat /tmp/out_command.$$ 1341 \rm /tmp/out_command.$$ 1342 1342 IGCM_debug_Exit "IGCM_sys_GetBuffer" 1343 1343 else 1344 \rm out_rsync1344 \rm /tmp/out_command.$$ 1345 1345 fi 1346 1346 done … … 1348 1348 i=0 1349 1349 while [ $i -lt $NB_ESSAI ] ; do 1350 \cp ${buf_liste} ${DEST} >> out_rsync2>&11350 \cp ${buf_liste} ${DEST} >> /tmp/out_command.$$ 2>&1 1351 1351 status=$? 1352 1352 if [ ${status} -gt 0 ]; then … … 1361 1361 if [ ${status} -gt 0 ] ; then 1362 1362 echo "IGCM_sys_Get : error" 1363 cat out_rsync1364 \rm out_rsync1363 cat /tmp/out_command.$$ 1364 \rm /tmp/out_command.$$ 1365 1365 IGCM_debug_Exit "IGCM_sys_GetBuffer" 1366 1366 else 1367 \rm out_rsync1367 \rm /tmp/out_command.$$ 1368 1368 fi 1369 1369 fi … … 1458 1458 i=0 1459 1459 while [ $i -lt $NB_ESSAI ] ; do 1460 /gpfs1/home/sebastien/REBUILD/rebuild -f -o $@ > out_rsync2>&11460 /gpfs1/home/sebastien/REBUILD/rebuild -f -o $@ > /tmp/out_command.$$ 2>&1 1461 1461 status=$? 1462 1462 if [ ${status} -gt 0 ] ; then 1463 1463 IGCM_debug_Print 2 "IGCM_sys_rebuild : error code ${status}" 1464 cat out_rsync1465 \rm out_rsync1464 cat /tmp/out_command.$$ 1465 \rm /tmp/out_command.$$ 1466 1466 IGCM_debug_Print 2 "IGCM_sys_rebuild : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1467 1467 firstArg=${1} … … 1469 1469 sleep $DELAI 1470 1470 else 1471 \rm out_rsync1471 \rm /tmp/out_command.$$ 1472 1472 break 1473 1473 fi … … 1883 1883 i=0 1884 1884 while [ $i -lt $NB_ESSAI ] ; do 1885 ncap2 "$@" > out_rsync2>&11885 ncap2 "$@" > /tmp/out_command.$$ 2>&1 1886 1886 status=$? 1887 1887 if [ ${status} -gt 0 ] ; then 1888 1888 IGCM_debug_Print 2 "IGCM_sys_ncap2 : error code ${status}" 1889 cat out_rsync1890 \rm out_rsync1889 cat /tmp/out_command.$$ 1890 \rm /tmp/out_command.$$ 1891 1891 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1892 1892 sleep $DELAI 1893 1893 else 1894 \rm out_rsync1894 \rm /tmp/out_command.$$ 1895 1895 break 1896 1896 fi … … 1925 1925 i=0 1926 1926 while [ $i -lt $NB_ESSAI ] ; do 1927 ncatted "$@" > out_rsync2>&11927 ncatted "$@" > /tmp/out_command.$$ 2>&1 1928 1928 status=$? 1929 1929 if [ ${status} -gt 0 ] ; then 1930 1930 IGCM_debug_Print 2 "IGCM_sys_ncatted : error code ${status}" 1931 cat out_rsync1932 \rm out_rsync1931 cat /tmp/out_command.$$ 1932 \rm /tmp/out_command.$$ 1933 1933 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1934 1934 sleep $DELAI 1935 1935 else 1936 \rm out_rsync1936 \rm /tmp/out_command.$$ 1937 1937 break 1938 1938 fi … … 1967 1967 i=0 1968 1968 while [ $i -lt $NB_ESSAI ] ; do 1969 ncbo $@ > out_rsync2>&11969 ncbo $@ > /tmp/out_command.$$ 2>&1 1970 1970 status=$? 1971 1971 if [ ${status} -gt 0 ] ; then 1972 1972 IGCM_debug_Print 2 "IGCM_sys_ncbo : error code ${status}" 1973 cat out_rsync1974 \rm out_rsync1973 cat /tmp/out_command.$$ 1974 \rm /tmp/out_command.$$ 1975 1975 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1976 1976 sleep $DELAI 1977 1977 else 1978 \rm out_rsync1978 \rm /tmp/out_command.$$ 1979 1979 break 1980 1980 fi … … 2009 2009 i=0 2010 2010 while [ $i -lt $NB_ESSAI ] ; do 2011 ncdiff $@ > out_rsync2>&12011 ncdiff $@ > /tmp/out_command.$$ 2>&1 2012 2012 status=$? 2013 2013 if [ ${status} -gt 0 ] ; then 2014 2014 IGCM_debug_Print 2 "IGCM_sys_ncdiff : error code ${status}" 2015 cat out_rsync2016 \rm out_rsync2015 cat /tmp/out_command.$$ 2016 \rm /tmp/out_command.$$ 2017 2017 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2018 2018 sleep $DELAI 2019 2019 else 2020 \rm out_rsync2020 \rm /tmp/out_command.$$ 2021 2021 break 2022 2022 fi … … 2051 2051 i=0 2052 2052 while [ $i -lt $NB_ESSAI ] ; do 2053 ncea $@ > out_rsync2>&12053 ncea $@ > /tmp/out_command.$$ 2>&1 2054 2054 status=$? 2055 2055 if [ ${status} -gt 0 ] ; then 2056 2056 IGCM_debug_Print 2 "IGCM_sys_ncea : error code ${status}" 2057 cat out_rsync2058 \rm out_rsync2057 cat /tmp/out_command.$$ 2058 \rm /tmp/out_command.$$ 2059 2059 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2060 2060 sleep $DELAI 2061 2061 else 2062 \rm out_rsync2062 \rm /tmp/out_command.$$ 2063 2063 break 2064 2064 fi … … 2093 2093 i=0 2094 2094 while [ $i -lt $NB_ESSAI ] ; do 2095 ncecat $@ > out_rsync2>&12095 ncecat $@ > /tmp/out_command.$$ 2>&1 2096 2096 status=$? 2097 2097 if [ ${status} -gt 0 ] ; then 2098 2098 IGCM_debug_Print 2 "IGCM_sys_ncecat : error code ${status}" 2099 cat out_rsync2100 \rm out_rsync2099 cat /tmp/out_command.$$ 2100 \rm /tmp/out_command.$$ 2101 2101 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2102 2102 sleep $DELAI 2103 2103 else 2104 \rm out_rsync2104 \rm /tmp/out_command.$$ 2105 2105 break 2106 2106 fi … … 2135 2135 i=0 2136 2136 while [ $i -lt $NB_ESSAI ] ; do 2137 ncflint $@ > out_rsync2>&12137 ncflint $@ > /tmp/out_command.$$ 2>&1 2138 2138 status=$? 2139 2139 if [ ${status} -gt 0 ] ; then 2140 2140 IGCM_debug_Print 2 "IGCM_sys_ncflint : error code ${status}" 2141 cat out_rsync2142 \rm out_rsync2141 cat /tmp/out_command.$$ 2142 \rm /tmp/out_command.$$ 2143 2143 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2144 2144 sleep $DELAI 2145 2145 else 2146 \rm out_rsync2146 \rm /tmp/out_command.$$ 2147 2147 break 2148 2148 fi … … 2177 2177 i=0 2178 2178 while [ $i -lt $NB_ESSAI ] ; do 2179 ncks $@ > out_rsync2>&12179 ncks $@ > /tmp/out_command.$$ 2>&1 2180 2180 status=$? 2181 2181 if [ ${status} -gt 0 ] ; then 2182 2182 IGCM_debug_Print 2 "IGCM_sys_ncks : error code ${status}" 2183 cat out_rsync2184 \rm out_rsync2183 cat /tmp/out_command.$$ 2184 \rm /tmp/out_command.$$ 2185 2185 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2186 2186 sleep $DELAI 2187 2187 else 2188 \rm out_rsync2188 \rm /tmp/out_command.$$ 2189 2189 break 2190 2190 fi … … 2219 2219 i=0 2220 2220 while [ $i -lt $NB_ESSAI ] ; do 2221 ncpdq $@ > out_rsync2>&12221 ncpdq $@ > /tmp/out_command.$$ 2>&1 2222 2222 status=$? 2223 2223 if [ ${status} -gt 0 ] ; then 2224 2224 IGCM_debug_Print 2 "IGCM_sys_ncpdq : error code ${status}" 2225 cat out_rsync2226 \rm out_rsync2225 cat /tmp/out_command.$$ 2226 \rm /tmp/out_command.$$ 2227 2227 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2228 2228 sleep $DELAI 2229 2229 else 2230 \rm out_rsync2230 \rm /tmp/out_command.$$ 2231 2231 break 2232 2232 fi … … 2261 2261 i=0 2262 2262 while [ $i -lt $NB_ESSAI ] ; do 2263 ncra $@ > out_rsync2>&12263 ncra $@ > /tmp/out_command.$$ 2>&1 2264 2264 status=$? 2265 2265 if [ ${status} -gt 0 ] ; then 2266 2266 IGCM_debug_Print 2 "IGCM_sys_ncra : error code ${status}" 2267 cat out_rsync2268 \rm out_rsync2267 cat /tmp/out_command.$$ 2268 \rm /tmp/out_command.$$ 2269 2269 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2270 2270 sleep $DELAI 2271 2271 else 2272 \rm out_rsync2272 \rm /tmp/out_command.$$ 2273 2273 break 2274 2274 fi … … 2303 2303 i=0 2304 2304 while [ $i -lt $NB_ESSAI ] ; do 2305 ncrcat $@ > out_rsync2>&12305 ncrcat $@ > /tmp/out_command.$$ 2>&1 2306 2306 status=$? 2307 2307 if [ ${status} -gt 0 ] ; then 2308 2308 IGCM_debug_Print 2 "IGCM_sys_ncrcat : error code ${status}" 2309 cat out_rsync2310 \rm out_rsync2309 cat /tmp/out_command.$$ 2310 \rm /tmp/out_command.$$ 2311 2311 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2312 2312 sleep $DELAI 2313 elif [ ! "X$( grep "WARNING Intra-file non-monotonicity" out_rsync)" = "X" ] ; then2313 elif [ ! "X$( grep "WARNING Intra-file non-monotonicity" /tmp/out_command.$$ )" = "X" ] ; then 2314 2314 IGCM_debug_Print 2 "IGCM_sys_ncrcat : WARNING Intra-file non-monotonicity" 2315 cat out_rsync2315 cat /tmp/out_command.$$ 2316 2316 # remove files having corrupted time axis 2317 2317 eval lastArg=\${$#} 2318 2318 IGCM_debug_Print 2 "IGCM_sys_ncrcat : Delete ${lastArg}" 2319 2319 \rm ${lastArg} 2320 \rm out_rsync2320 \rm /tmp/out_command.$$ 2321 2321 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2322 2322 sleep $DELAI 2323 2323 else 2324 \rm out_rsync2324 \rm /tmp/out_command.$$ 2325 2325 break 2326 2326 fi … … 2355 2355 i=0 2356 2356 while [ $i -lt $NB_ESSAI ] ; do 2357 ncrename $@ > out_rsync2>&12357 ncrename $@ > /tmp/out_command.$$ 2>&1 2358 2358 status=$? 2359 2359 if [ ${status} -gt 0 ] ; then 2360 2360 IGCM_debug_Print 2 "IGCM_sys_ncrename : error code ${status}" 2361 cat out_rsync2362 \rm out_rsync2361 cat /tmp/out_command.$$ 2362 \rm /tmp/out_command.$$ 2363 2363 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2364 2364 sleep $DELAI 2365 2365 else 2366 \rm out_rsync2366 \rm /tmp/out_command.$$ 2367 2367 break 2368 2368 fi … … 2397 2397 i=0 2398 2398 while [ $i -lt $NB_ESSAI ] ; do 2399 ncwa $@ > out_rsync2>&12399 ncwa $@ > /tmp/out_command.$$ 2>&1 2400 2400 status=$? 2401 2401 if [ ${status} -gt 0 ] ; then 2402 2402 IGCM_debug_Print 2 "IGCM_sys_ncwa : error code ${status}" 2403 cat out_rsync2404 \rm out_rsync2403 cat /tmp/out_command.$$ 2404 \rm /tmp/out_command.$$ 2405 2405 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2406 2406 sleep $DELAI 2407 2407 else 2408 \rm out_rsync2408 \rm /tmp/out_command.$$ 2409 2409 break 2410 2410 fi … … 2436 2436 typeset status 2437 2437 2438 \cdo $@ > out_rsync2>&12438 \cdo $@ > /tmp/out_command.$$ 2>&1 2439 2439 status=$? 2440 2440 if [ ${status} -gt 0 ] ; then 2441 2441 echo "IGCM_sys_cdo : error code ${status}" 2442 cat out_rsync2443 \rm out_rsync2442 cat /tmp/out_command.$$ 2443 \rm /tmp/out_command.$$ 2444 2444 IGCM_debug_PopStack "IGCM_sys_cdo" 2445 2445 return 1 -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh
r936 r938 738 738 mkdir -p ${HOME}/MIRROR/${PATHlibIGCM} 739 739 740 echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > out_rsync2>&1741 ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> out_rsync2>&1740 echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > /tmp/out_command.$$ 2>&1 741 ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> /tmp/out_command.$$ 2>&1 742 742 status=$? 743 743 744 744 if [ ${status} -gt 0 ] ; then 745 745 echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on frontend." 746 cat out_rsync746 cat /tmp/out_command.$$ 747 747 fi 748 748 IGCM_debug_PopStack "IGCM_sys_Mirror_libIGCM" … … 762 762 typeset status 763 763 764 echo cp $@ > out_rsync2>&1765 \cp $@ >> out_rsync2>&1764 echo cp $@ > /tmp/out_command.$$ 2>&1 765 \cp $@ >> /tmp/out_command.$$ 2>&1 766 766 status=$? 767 767 768 768 if [ ${status} -gt 0 ] ; then 769 769 echo "IGCM_sys_Cp : error code ${status}" 770 cat out_rsync770 cat /tmp/out_command.$$ 771 771 IGCM_debug_Exit "IGCM_sys_Cp" 772 772 else 773 \rm out_rsync773 \rm /tmp/out_command.$$ 774 774 fi 775 775 IGCM_debug_PopStack "IGCM_sys_Cp" … … 789 789 typeset status 790 790 791 echo rm $@ > out_rsync2>&1792 \rm $@ >> out_rsync2>&1791 echo rm $@ > /tmp/out_command.$$ 2>&1 792 \rm $@ >> /tmp/out_command.$$ 2>&1 793 793 status=$? 794 794 795 795 if [ ${status} -gt 0 ] ; then 796 796 echo "IGCM_sys_Rm : error code ${status}" 797 cat out_rsync797 cat /tmp/out_command.$$ 798 798 IGCM_debug_Exit "IGCM_sys_Rm" 799 799 else 800 \rm out_rsync800 \rm /tmp/out_command.$$ 801 801 fi 802 802 IGCM_debug_PopStack "IGCM_sys_Rm" … … 817 817 typeset status 818 818 819 echo rm $@ > out_rsync2>&1820 \rm $@ >> out_rsync2>&1819 echo rm $@ > /tmp/out_command.$$ 2>&1 820 \rm $@ >> /tmp/out_command.$$ 2>&1 821 821 status=$? 822 822 823 823 if [ ${status} -gt 0 ] ; then 824 824 echo "IGCM_sys_RmRunDir : rm error code is ${status}." 825 cat out_rsync825 cat /tmp/out_command.$$ 826 826 IGCM_debug_Exit "IGCM_sys_RmRunDir" 827 827 else 828 \rm out_rsync828 \rm /tmp/out_command.$$ 829 829 fi 830 830 IGCM_debug_PopStack "IGCM_sys_RmRunDir" … … 846 846 typeset status 847 847 848 echo mv $@ > out_rsync2>&1849 \mv $@ >> out_rsync2>&1848 echo mv $@ > /tmp/out_command.$$ 2>&1 849 \mv $@ >> /tmp/out_command.$$ 2>&1 850 850 status=$? 851 851 852 852 if [ ${status} -gt 0 ] ; then 853 853 echo "IGCM_sys_Mv : error code ${status}" 854 cat out_rsync854 cat /tmp/out_command.$$ 855 855 IGCM_debug_Exit "IGCM_sys_Mv" 856 856 else 857 \rm out_rsync857 \rm /tmp/out_command.$$ 858 858 fi 859 859 fi … … 884 884 # 885 885 #USUAL WAY 886 \cp -r $1 $2 > out_rsync2>&1886 \cp -r $1 $2 > /tmp/out_command.$$ 2>&1 887 887 status=$? 888 888 889 889 if [ ${status} -gt 0 ] ; then 890 890 IGCM_debug_Print 2 "IGCM_sys_Put_Dir : cp failed error code ${status}" 891 cat out_rsync891 cat /tmp/out_command.$$ 892 892 IGCM_debug_Exit "IGCM_sys_Put_Dir" 893 893 else 894 \rm out_rsync894 \rm /tmp/out_command.$$ 895 895 fi 896 896 fi … … 918 918 919 919 #USUAL WAY 920 \cp -ur $1 $2 > out_rsync2>&1920 \cp -ur $1 $2 > /tmp/out_command.$$ 2>&1 921 921 status=$? 922 922 923 923 if [ ${status} -gt 0 ] ; then 924 924 IGCM_debug_Print 2 "IGCM_sys_Get_Dir : cp failed error code ${status}" 925 cat out_rsync925 cat /tmp/out_command.$$ 926 926 IGCM_debug_Exit "IGCM_sys_Get_Dir" 927 927 else 928 \rm out_rsync928 \rm /tmp/out_command.$$ 929 929 fi 930 930 fi … … 957 957 i=0 958 958 while [ $i -lt $NB_ESSAI ] ; do 959 \cp -urL $1 $2 > out_rsync2>&1959 \cp -urL $1 $2 > /tmp/out_command.$$ 2>&1 960 960 status=$? 961 961 if [ ${status} -gt 0 ]; then … … 971 971 if [ ${status} -gt 0 ] ; then 972 972 echo "IGCM_sys_Get_Master : error." 973 cat out_rsync973 cat /tmp/out_command.$$ 974 974 IGCM_debug_Exit "IGCM_sys_Get_Master" 975 975 else 976 \rm out_rsync976 \rm /tmp/out_command.$$ 977 977 fi 978 978 fi … … 1013 1013 # 1014 1014 #USUAL WAY 1015 \cp $1 $2 > out_rsync2>&11015 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1016 1016 status=$? 1017 1017 1018 1018 # #RSYNC WITH NETWORK SSH CALL 1019 # echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync2>&11020 # ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> out_rsync2>&11019 # echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > /tmp/out_command.$$ 2>&1 1020 # ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> /tmp/out_command.$$ 2>&1 1021 1021 1022 1022 # #RSYNC WITH NFS USE 1023 # echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync2>&11024 # ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync2>&11023 # echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > /tmp/out_command.$$ 2>&1 1024 # ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> /tmp/out_command.$$ 2>&1 1025 1025 1026 1026 # status=$? 1027 1027 # IGCM_sys_Rsync_out $status 1028 1028 1029 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync1029 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk /tmp/out_command.$$ 1030 1030 # (( status=status+$? )) 1031 1031 1032 1032 if [ ${status} -gt 0 ] ; then 1033 1033 echo "IGCM_sys_Put_Rest : cp failed error code ${status}" 1034 cat out_rsync1034 cat /tmp/out_command.$$ 1035 1035 IGCM_debug_Exit "IGCM_sys_Put_Rest" 1036 1036 else 1037 \rm out_rsync1037 \rm /tmp/out_command.$$ 1038 1038 fi 1039 1039 fi … … 1066 1066 # 1067 1067 # USUAL WAY 1068 \cp $1 $2 > out_rsync2>&11068 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1069 1069 status=$? 1070 1070 … … 1073 1073 [ -f ${2} ] && ls -l ${2} 1074 1074 [ -f ${2}/${1} ] && ls -l ${2}/${1} 1075 cat out_rsync1075 cat /tmp/out_command.$$ 1076 1076 IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest" 1077 1077 else 1078 \rm out_rsync1078 \rm /tmp/out_command.$$ 1079 1079 fi 1080 1080 fi … … 1122 1122 # 1123 1123 1124 echo ${RSYNC} ${RSYNC_opt} $1 $2 > out_rsync2>&11125 ${RSYNC} ${RSYNC_opt} $1 $2 >> out_rsync2>&11124 echo ${RSYNC} ${RSYNC_opt} $1 $2 > /tmp/out_command.$$ 2>&1 1125 ${RSYNC} ${RSYNC_opt} $1 $2 >> /tmp/out_command.$$ 2>&1 1126 1126 status=$? 1127 1127 IGCM_sys_Rsync_out $status 1128 1128 1129 ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync1129 ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk /tmp/out_command.$$ 1130 1130 (( status=status+$? )) 1131 1131 1132 1132 if [ ${status} -gt 0 ] ; then 1133 1133 IGCM_debug_Print 2 "IGCM_sys_Put_Out : rsync failed error code ${status}" 1134 cat out_rsync1134 cat /tmp/out_command.$$ 1135 1135 IGCM_debug_Exit "IGCM_sys_Put_Out" 1136 1136 else 1137 \rm out_rsync1137 \rm /tmp/out_command.$$ 1138 1138 fi 1139 1139 fi … … 1193 1193 while [ $i -lt $NB_ESSAI ] ; do 1194 1194 # USUAL WAY 1195 \cp $1 $2 > out_rsync2>&11195 \cp $1 $2 > /tmp/out_command.$$ 2>&1 1196 1196 status=$? 1197 1197 if [ ${status} -gt 0 ]; then … … 1212 1212 [ -f ${2} ] && ls -l ${2} 1213 1213 [ -f ${2}/${1} ] && ls -l ${2}/${1} 1214 cat out_rsync1214 cat /tmp/out_command.$$ 1215 1215 IGCM_debug_Exit "IGCM_sys_PutBuffer_Out" 1216 1216 else … … 1223 1223 fi 1224 1224 1225 \rm out_rsync1225 \rm /tmp/out_command.$$ 1226 1226 fi 1227 1227 fi … … 1261 1261 1262 1262 #USUAL WAY 1263 \cp ${dm_liste[*]} ${DEST} > out_rsync2>&11263 \cp ${dm_liste[*]} ${DEST} > /tmp/out_command.$$ 2>&1 1264 1264 status=$? 1265 1265 1266 1266 if [ ${status} -gt 0 ] ; then 1267 1267 IGCM_debug_Print 2 "IGCM_sys_Get : cp failed error code ${status}" 1268 cat out_rsync1268 cat /tmp/out_command.$$ 1269 1269 IGCM_debug_Exit "IGCM_sys_Get" 1270 1270 else 1271 \rm out_rsync1271 \rm /tmp/out_command.$$ 1272 1272 fi 1273 1273 fi … … 1309 1309 i=0 1310 1310 while [ $i -lt $NB_ESSAI ] ; do 1311 \cp ${target} ${DEST}/${local_file} >> out_rsync2>&11311 \cp ${target} ${DEST}/${local_file} >> /tmp/out_command.$$ 2>&1 1312 1312 status=$? 1313 1313 if [ ${status} -gt 0 ]; then … … 1322 1322 if [ ${status} -gt 0 ] ; then 1323 1323 echo "IGCM_sys_Get : error" 1324 cat out_rsync1325 \rm out_rsync1324 cat /tmp/out_command.$$ 1325 \rm /tmp/out_command.$$ 1326 1326 IGCM_debug_Exit "IGCM_sys_GetBuffer" 1327 1327 else 1328 \rm out_rsync1328 \rm /tmp/out_command.$$ 1329 1329 fi 1330 1330 done … … 1332 1332 i=0 1333 1333 while [ $i -lt $NB_ESSAI ] ; do 1334 \cp ${buf_liste} ${DEST} >> out_rsync2>&11334 \cp ${buf_liste} ${DEST} >> /tmp/out_command.$$ 2>&1 1335 1335 status=$? 1336 1336 if [ ${status} -gt 0 ]; then … … 1345 1345 if [ ${status} -gt 0 ] ; then 1346 1346 echo "IGCM_sys_Get : error" 1347 cat out_rsync1348 \rm out_rsync1347 cat /tmp/out_command.$$ 1348 \rm /tmp/out_command.$$ 1349 1349 IGCM_debug_Exit "IGCM_sys_GetBuffer" 1350 1350 else 1351 \rm out_rsync1351 \rm /tmp/out_command.$$ 1352 1352 fi 1353 1353 fi … … 1450 1450 i=0 1451 1451 while [ $i -lt $NB_ESSAI ] ; do 1452 /home/users/igcmg/rebuild/bin/rebuild -f -o $@ > out_rsync2>&11452 /home/users/igcmg/rebuild/bin/rebuild -f -o $@ > /tmp/out_command.$$ 2>&1 1453 1453 status=$? 1454 1454 if [ ${status} -gt 0 ] ; then 1455 1455 IGCM_debug_Print 2 "IGCM_sys_rebuild : error code ${status}" 1456 cat out_rsync1457 \rm out_rsync1456 cat /tmp/out_command.$$ 1457 \rm /tmp/out_command.$$ 1458 1458 IGCM_debug_Print 2 "IGCM_sys_rebuild : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1459 1459 firstArg=${1} … … 1461 1461 sleep $DELAI 1462 1462 else 1463 \rm out_rsync1463 \rm /tmp/out_command.$$ 1464 1464 break 1465 1465 fi … … 1969 1969 i=0 1970 1970 while [ $i -lt $NB_ESSAI ] ; do 1971 ncap2 "$@" > out_rsync2>&11971 ncap2 "$@" > /tmp/out_command.$$ 2>&1 1972 1972 status=$? 1973 1973 if [ ${status} -gt 0 ] ; then 1974 1974 IGCM_debug_Print 2 "IGCM_sys_ncap2 : error code ${status}" 1975 cat out_rsync1976 \rm out_rsync1975 cat /tmp/out_command.$$ 1976 \rm /tmp/out_command.$$ 1977 1977 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1978 1978 sleep $DELAI 1979 1979 else 1980 \rm out_rsync1980 \rm /tmp/out_command.$$ 1981 1981 break 1982 1982 fi … … 2011 2011 i=0 2012 2012 while [ $i -lt $NB_ESSAI ] ; do 2013 ncatted "$@" > out_rsync2>&12013 ncatted "$@" > /tmp/out_command.$$ 2>&1 2014 2014 status=$? 2015 2015 if [ ${status} -gt 0 ] ; then 2016 2016 IGCM_debug_Print 2 "IGCM_sys_ncatted : error code ${status}" 2017 cat out_rsync2018 \rm out_rsync2017 cat /tmp/out_command.$$ 2018 \rm /tmp/out_command.$$ 2019 2019 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2020 2020 sleep $DELAI 2021 2021 else 2022 \rm out_rsync2022 \rm /tmp/out_command.$$ 2023 2023 break 2024 2024 fi … … 2053 2053 i=0 2054 2054 while [ $i -lt $NB_ESSAI ] ; do 2055 ncbo $@ > out_rsync2>&12055 ncbo $@ > /tmp/out_command.$$ 2>&1 2056 2056 status=$? 2057 2057 if [ ${status} -gt 0 ] ; then 2058 2058 IGCM_debug_Print 2 "IGCM_sys_ncbo : error code ${status}" 2059 cat out_rsync2060 \rm out_rsync2059 cat /tmp/out_command.$$ 2060 \rm /tmp/out_command.$$ 2061 2061 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2062 2062 sleep $DELAI 2063 2063 else 2064 \rm out_rsync2064 \rm /tmp/out_command.$$ 2065 2065 break 2066 2066 fi … … 2095 2095 i=0 2096 2096 while [ $i -lt $NB_ESSAI ] ; do 2097 ncdiff $@ > out_rsync2>&12097 ncdiff $@ > /tmp/out_command.$$ 2>&1 2098 2098 status=$? 2099 2099 if [ ${status} -gt 0 ] ; then 2100 2100 IGCM_debug_Print 2 "IGCM_sys_ncdiff : error code ${status}" 2101 cat out_rsync2102 \rm out_rsync2101 cat /tmp/out_command.$$ 2102 \rm /tmp/out_command.$$ 2103 2103 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2104 2104 sleep $DELAI 2105 2105 else 2106 \rm out_rsync2106 \rm /tmp/out_command.$$ 2107 2107 break 2108 2108 fi … … 2137 2137 i=0 2138 2138 while [ $i -lt $NB_ESSAI ] ; do 2139 ncea $@ > out_rsync2>&12139 ncea $@ > /tmp/out_command.$$ 2>&1 2140 2140 status=$? 2141 2141 if [ ${status} -gt 0 ] ; then 2142 2142 IGCM_debug_Print 2 "IGCM_sys_ncea : error code ${status}" 2143 cat out_rsync2144 \rm out_rsync2143 cat /tmp/out_command.$$ 2144 \rm /tmp/out_command.$$ 2145 2145 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2146 2146 sleep $DELAI 2147 2147 else 2148 \rm out_rsync2148 \rm /tmp/out_command.$$ 2149 2149 break 2150 2150 fi … … 2179 2179 i=0 2180 2180 while [ $i -lt $NB_ESSAI ] ; do 2181 ncecat $@ > out_rsync2>&12181 ncecat $@ > /tmp/out_command.$$ 2>&1 2182 2182 status=$? 2183 2183 if [ ${status} -gt 0 ] ; then 2184 2184 IGCM_debug_Print 2 "IGCM_sys_ncecat : error code ${status}" 2185 cat out_rsync2186 \rm out_rsync2185 cat /tmp/out_command.$$ 2186 \rm /tmp/out_command.$$ 2187 2187 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2188 2188 sleep $DELAI 2189 2189 else 2190 \rm out_rsync2190 \rm /tmp/out_command.$$ 2191 2191 break 2192 2192 fi … … 2221 2221 i=0 2222 2222 while [ $i -lt $NB_ESSAI ] ; do 2223 ncflint $@ > out_rsync2>&12223 ncflint $@ > /tmp/out_command.$$ 2>&1 2224 2224 status=$? 2225 2225 if [ ${status} -gt 0 ] ; then 2226 2226 IGCM_debug_Print 2 "IGCM_sys_ncflint : error code ${status}" 2227 cat out_rsync2228 \rm out_rsync2227 cat /tmp/out_command.$$ 2228 \rm /tmp/out_command.$$ 2229 2229 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2230 2230 sleep $DELAI 2231 2231 else 2232 \rm out_rsync2232 \rm /tmp/out_command.$$ 2233 2233 break 2234 2234 fi … … 2263 2263 i=0 2264 2264 while [ $i -lt $NB_ESSAI ] ; do 2265 ncks $@ > out_rsync2>&12265 ncks $@ > /tmp/out_command.$$ 2>&1 2266 2266 status=$? 2267 2267 if [ ${status} -gt 0 ] ; then 2268 2268 IGCM_debug_Print 2 "IGCM_sys_ncks : error code ${status}" 2269 cat out_rsync2270 \rm out_rsync2269 cat /tmp/out_command.$$ 2270 \rm /tmp/out_command.$$ 2271 2271 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2272 2272 sleep $DELAI 2273 2273 else 2274 \rm out_rsync2274 \rm /tmp/out_command.$$ 2275 2275 break 2276 2276 fi … … 2305 2305 i=0 2306 2306 while [ $i -lt $NB_ESSAI ] ; do 2307 ncpdq $@ > out_rsync2>&12307 ncpdq $@ > /tmp/out_command.$$ 2>&1 2308 2308 status=$? 2309 2309 if [ ${status} -gt 0 ] ; then 2310 2310 IGCM_debug_Print 2 "IGCM_sys_ncpdq : error code ${status}" 2311 cat out_rsync2312 \rm out_rsync2311 cat /tmp/out_command.$$ 2312 \rm /tmp/out_command.$$ 2313 2313 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2314 2314 sleep $DELAI 2315 2315 else 2316 \rm out_rsync2316 \rm /tmp/out_command.$$ 2317 2317 break 2318 2318 fi … … 2347 2347 i=0 2348 2348 while [ $i -lt $NB_ESSAI ] ; do 2349 ncra $@ > out_rsync2>&12349 ncra $@ > /tmp/out_command.$$ 2>&1 2350 2350 status=$? 2351 2351 if [ ${status} -gt 0 ] ; then 2352 2352 IGCM_debug_Print 2 "IGCM_sys_ncra : error code ${status}" 2353 cat out_rsync2354 \rm out_rsync2353 cat /tmp/out_command.$$ 2354 \rm /tmp/out_command.$$ 2355 2355 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2356 2356 sleep $DELAI 2357 2357 else 2358 \rm out_rsync2358 \rm /tmp/out_command.$$ 2359 2359 break 2360 2360 fi … … 2389 2389 i=0 2390 2390 while [ $i -lt $NB_ESSAI ] ; do 2391 ncrcat $@ > out_rsync2>&12391 ncrcat $@ > /tmp/out_command.$$ 2>&1 2392 2392 status=$? 2393 2393 if [ ${status} -gt 0 ] ; then 2394 2394 IGCM_debug_Print 2 "IGCM_sys_ncrcat : error code ${status}" 2395 cat out_rsync2396 \rm out_rsync2395 cat /tmp/out_command.$$ 2396 \rm /tmp/out_command.$$ 2397 2397 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2398 2398 sleep $DELAI 2399 elif [ ! "X$( grep "WARNING Intra-file non-monotonicity" out_rsync)" = "X" ] ; then2399 elif [ ! "X$( grep "WARNING Intra-file non-monotonicity" /tmp/out_command.$$ )" = "X" ] ; then 2400 2400 IGCM_debug_Print 2 "IGCM_sys_ncrcat : WARNING Intra-file non-monotonicity" 2401 cat out_rsync2401 cat /tmp/out_command.$$ 2402 2402 # remove files having corrupted time axis 2403 2403 eval lastArg=\${$#} 2404 2404 IGCM_debug_Print 2 "IGCM_sys_ncrcat : Delete ${lastArg}" 2405 2405 \rm ${lastArg} 2406 \rm out_rsync2406 \rm /tmp/out_command.$$ 2407 2407 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2408 2408 sleep $DELAI 2409 2409 else 2410 \rm out_rsync2410 \rm /tmp/out_command.$$ 2411 2411 break 2412 2412 fi … … 2441 2441 i=0 2442 2442 while [ $i -lt $NB_ESSAI ] ; do 2443 ncrename $@ > out_rsync2>&12443 ncrename $@ > /tmp/out_command.$$ 2>&1 2444 2444 status=$? 2445 2445 if [ ${status} -gt 0 ] ; then 2446 2446 IGCM_debug_Print 2 "IGCM_sys_ncrename : error code ${status}" 2447 cat out_rsync2448 \rm out_rsync2447 cat /tmp/out_command.$$ 2448 \rm /tmp/out_command.$$ 2449 2449 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2450 2450 sleep $DELAI 2451 2451 else 2452 \rm out_rsync2452 \rm /tmp/out_command.$$ 2453 2453 break 2454 2454 fi … … 2483 2483 i=0 2484 2484 while [ $i -lt $NB_ESSAI ] ; do 2485 ncwa $@ > out_rsync2>&12485 ncwa $@ > /tmp/out_command.$$ 2>&1 2486 2486 status=$? 2487 2487 if [ ${status} -gt 0 ] ; then 2488 2488 IGCM_debug_Print 2 "IGCM_sys_ncwa : error code ${status}" 2489 cat out_rsync2490 \rm out_rsync2489 cat /tmp/out_command.$$ 2490 \rm /tmp/out_command.$$ 2491 2491 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2492 2492 sleep $DELAI 2493 2493 else 2494 \rm out_rsync2494 \rm /tmp/out_command.$$ 2495 2495 break 2496 2496 fi … … 2522 2522 typeset status 2523 2523 2524 \cdo $@ > out_rsync2>&12524 \cdo $@ > /tmp/out_command.$$ 2>&1 2525 2525 status=$? 2526 2526 if [ ${status} -gt 0 ] ; then 2527 2527 echo "IGCM_sys_cdo : error code ${status}" 2528 cat out_rsync2529 \rm out_rsync2528 cat /tmp/out_command.$$ 2529 \rm /tmp/out_command.$$ 2530 2530 IGCM_debug_PopStack "IGCM_sys_cdo" 2531 2531 return 1
Note: See TracChangeset
for help on using the changeset viewer.