- Timestamp:
- 10/12/12 09:58:03 (12 years ago)
- Location:
- trunk/libIGCM/libIGCM_sys
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh
r712 r713 860 860 861 861 if [ ${RET} -gt 0 ] ; then 862 echo "IGCM_sys_Cp : error ."862 echo "IGCM_sys_Cp : error code ${RET}" 863 863 cat out_rsync 864 864 IGCM_debug_Exit "IGCM_sys_Cp" … … 887 887 888 888 if [ ${RET} -gt 0 ] ; then 889 echo "IGCM_sys_Rm : error ."889 echo "IGCM_sys_Rm : error code ${RET}" 890 890 cat out_rsync 891 891 IGCM_debug_Exit "IGCM_sys_Rm" … … 915 915 916 916 if [ ${RET} -gt 0 ] ; then 917 echo "IGCM_sys_RmRunDir : error ."917 echo "IGCM_sys_RmRunDir : error code ${RET}" 918 918 cat out_rsync 919 919 IGCM_debug_Exit "IGCM_sys_RmRunDir" … … 944 944 945 945 if [ ${RET} -gt 0 ] ; then 946 echo "IGCM_sys_Mv : error in mv."946 echo "IGCM_sys_Mv : error code ${RET}" 947 947 cat out_rsync 948 948 IGCM_debug_Exit "IGCM_sys_Mv" … … 984 984 985 985 if [ ${RET} -gt 0 ] ; then 986 echo "IGCM_sys_Put_Dir : error ."986 echo "IGCM_sys_Put_Dir : error code ${RET}" 987 987 cat out_rsync 988 988 IGCM_debug_Exit "IGCM_sys_Put_Dir" … … 1024 1024 # USUAL WAY 1025 1025 # add 'ccc_hsm get' (to demigrate all offline files) to reduce time of this command : 1026 ccc_hsm get $1/*1026 ccc_hsm get -r $1 1027 1027 1028 1028 i=0 … … 1031 1031 status=$? 1032 1032 if [ ${status} -gt 0 ]; then 1033 IGCM_debug_Print 2 "IGCM_sys_Get_Dir : cp failed ${i}/${NB_ESSAI}"1033 IGCM_debug_Print 2 "IGCM_sys_Get_Dir : cp failed error code ${status} ${i}/${NB_ESSAI}" 1034 1034 IGCM_debug_Print 2 "IGCM_sys_Get_Dir : sleep ${DELAI} seconds and try again." 1035 1035 sleep $DELAI … … 1081 1081 status=$? 1082 1082 if [ ${status} -gt 0 ]; then 1083 IGCM_debug_Print 2 "IGCM_sys_Get_Master : cp failed ${i}/${NB_ESSAI}"1083 IGCM_debug_Print 2 "IGCM_sys_Get_Master : cp failed error code ${status} ${i}/${NB_ESSAI}" 1084 1084 IGCM_debug_Print 2 "IGCM_sys_Get_Master : sleep ${DELAI} seconds and try again." 1085 1085 sleep $DELAI … … 1152 1152 1153 1153 if [ ${RET} -gt 0 ] ; then 1154 echo "IGCM_sys_Put_Rest : error."1154 echo "IGCM_sys_Put_Rest : cp failed error code ${RET}" 1155 1155 cat out_rsync 1156 1156 IGCM_debug_Exit "IGCM_sys_Put_Rest" … … 1193 1193 1194 1194 if [ ${RET} -gt 0 ] ; then 1195 echo "IGCM_sys_PutBuffer_Rest : error ."1195 echo "IGCM_sys_PutBuffer_Rest : error code ${RET}" 1196 1196 cat out_rsync 1197 1197 IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest" … … 1281 1281 status=$? 1282 1282 if [ ${status} -gt 0 ]; then 1283 IGCM_debug_Print 2 "IGCM_sys_Put_Out : cp failed ${i}/${NB_ESSAI}"1283 IGCM_debug_Print 2 "IGCM_sys_Put_Out : cp failed error code ${status} ${i}/${NB_ESSAI}" 1284 1284 IGCM_debug_Print 2 "IGCM_sys_Put_Out : sleep ${DELAI} seconds and try again." 1285 1285 sleep $DELAI … … 1378 1378 status=$? 1379 1379 if [ ${status} -gt 0 ]; then 1380 IGCM_debug_Print 2 "IGCM_sys_PutBuffer_Out : cp failed ${i}/${NB_ESSAI}"1380 IGCM_debug_Print 2 "IGCM_sys_PutBuffer_Out : cp failed error code ${status} ${i}/${NB_ESSAI}" 1381 1381 IGCM_debug_Print 2 "IGCM_sys_PutBuffer_Out : sleep ${DELAI} seconds and try again." 1382 1382 sleep $DELAI … … 1450 1450 RET=$? 1451 1451 if [ ${RET} -gt 0 ] ; then 1452 echo "WARNING IGCM_sys_Get : demigration error."1452 echo "WARNING IGCM_sys_Get : error code ${RET}" 1453 1453 cat out_rsync 1454 1454 echo "WARNING IGCM_sys_Get : will stop later if the cp fails." … … 1493 1493 status=$? 1494 1494 if [ ${status} -gt 0 ]; then 1495 IGCM_debug_Print 2 "IGCM_sys_Get : cp failed ${i}/${NB_ESSAI}"1495 IGCM_debug_Print 2 "IGCM_sys_Get : cp failed error code ${status} ${i}/${NB_ESSAI}" 1496 1496 IGCM_debug_Print 2 "IGCM_sys_Get : sleep ${DELAI} seconds and try again." 1497 1497 sleep $DELAI … … 1524 1524 1525 1525 if [ ${RET} -gt 0 ] ; then 1526 echo "IGCM_sys_Get : copy error."1526 echo "IGCM_sys_Get : error code ${RET}" 1527 1527 cat out_rsync 1528 1528 IGCM_debug_Exit "IGCM_sys_Get" … … 1572 1572 1573 1573 if [ ${RET} -gt 0 ] ; then 1574 echo "IGCM_sys_GetBuffer : copy error."1574 echo "IGCM_sys_GetBuffer : error code ${RET}" 1575 1575 cat out_rsync 1576 1576 IGCM_debug_Exit "IGCM_sys_GetBuffer" … … 2004 2004 echo "IGCM_sys_ncap2 :" $@ 2005 2005 fi 2006 ncap2 "$@" 2007 if [ $? -gt 0 ] ; then 2008 echo "IGCM_sys_ncap2 : erreur ${@}." 2009 IGCM_debug_Exit "ncap2" 2006 2007 typeset NB_ESSAI DELAI status i 2008 # number of tentative 2009 NB_ESSAI=3 2010 # time delay between tentative 2011 DELAI=2 2012 2013 i=0 2014 while [ $i -lt $NB_ESSAI ] ; do 2015 ncap2 "$@" > out_rsync 2>&1 2016 status=$? 2017 if [ ${status} -gt 0 ] ; then 2018 IGCM_debug_Print 2 "IGCM_sys_ncap2 : error code ${status}" 2019 cat out_rsync 2020 \rm out_rsync 2021 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2022 else 2023 \rm out_rsync 2024 break 2025 fi 2026 (( i = i + 1 )) 2027 done 2028 2029 if [ ${status} -gt 0 ] ; then 2030 echo "IGCM_sys_ncap2 : ncap2 error" 2031 IGCM_debug_Exit "ncap2" 2010 2032 fi 2011 2033 … … 2018 2040 echo "IGCM_sys_ncatted :" $@ 2019 2041 fi 2020 ncatted "$@" 2021 if [ $? -gt 0 ] ; then 2022 echo "IGCM_sys_ncatted : erreur ${@}." 2023 IGCM_debug_Exit "ncatted" 2042 2043 typeset NB_ESSAI DELAI status i 2044 # number of tentative 2045 NB_ESSAI=3 2046 # time delay between tentative 2047 DELAI=2 2048 2049 i=0 2050 while [ $i -lt $NB_ESSAI ] ; do 2051 ncatted "$@" > out_rsync 2>&1 2052 status=$? 2053 if [ ${status} -gt 0 ] ; then 2054 IGCM_debug_Print 2 "IGCM_sys_ncatted : error code ${status}" 2055 cat out_rsync 2056 \rm out_rsync 2057 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2058 else 2059 \rm out_rsync 2060 break 2061 fi 2062 (( i = i + 1 )) 2063 done 2064 2065 if [ ${status} -gt 0 ] ; then 2066 echo "IGCM_sys_ncatted : ncatted error" 2067 IGCM_debug_Exit "ncatted" 2024 2068 fi 2025 2069 … … 2032 2076 echo "IGCM_sys_ncbo :" $@ 2033 2077 fi 2034 ncbo $@ 2035 if [ $? -gt 0 ] ; then 2036 echo "IGCM_sys_ncbo : erreur ${@}." 2037 IGCM_debug_Exit "ncbo" 2078 2079 typeset NB_ESSAI DELAI status i 2080 # number of tentative 2081 NB_ESSAI=3 2082 # time delay between tentative 2083 DELAI=2 2084 2085 i=0 2086 while [ $i -lt $NB_ESSAI ] ; do 2087 ncbo $@ > out_rsync 2>&1 2088 status=$? 2089 if [ ${status} -gt 0 ] ; then 2090 IGCM_debug_Print 2 "IGCM_sys_ncbo : error code ${status}" 2091 cat out_rsync 2092 \rm out_rsync 2093 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2094 else 2095 \rm out_rsync 2096 break 2097 fi 2098 (( i = i + 1 )) 2099 done 2100 2101 if [ ${status} -gt 0 ] ; then 2102 echo "IGCM_sys_ncbo : ncbo error" 2103 IGCM_debug_Exit "ncbo" 2038 2104 fi 2039 2105 … … 2046 2112 echo "IGCM_sys_ncdiff :" $@ 2047 2113 fi 2048 ncdiff $@ 2049 if [ $? -gt 0 ] ; then 2050 echo "IGCM_sys_ncdiff : erreur ${@}." 2051 IGCM_debug_Exit "ncdiff" 2114 2115 typeset NB_ESSAI DELAI status i 2116 # number of tentative 2117 NB_ESSAI=3 2118 # time delay between tentative 2119 DELAI=2 2120 2121 i=0 2122 while [ $i -lt $NB_ESSAI ] ; do 2123 ncdiff $@ > out_rsync 2>&1 2124 status=$? 2125 if [ ${status} -gt 0 ] ; then 2126 IGCM_debug_Print 2 "IGCM_sys_ncdiff : error code ${status}" 2127 cat out_rsync 2128 \rm out_rsync 2129 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2130 else 2131 \rm out_rsync 2132 break 2133 fi 2134 (( i = i + 1 )) 2135 done 2136 2137 if [ ${status} -gt 0 ] ; then 2138 echo "IGCM_sys_ncdiff : ncdiff error" 2139 IGCM_debug_Exit "ncdiff" 2052 2140 fi 2053 2141 … … 2060 2148 echo "IGCM_sys_ncea :" $@ 2061 2149 fi 2062 ncea $@ 2063 if [ $? -gt 0 ] ; then 2064 echo "IGCM_sys_ncea : erreur ${@}." 2065 IGCM_debug_Exit "ncea" 2150 2151 typeset NB_ESSAI DELAI status i 2152 # number of tentative 2153 NB_ESSAI=3 2154 # time delay between tentative 2155 DELAI=2 2156 2157 i=0 2158 while [ $i -lt $NB_ESSAI ] ; do 2159 ncea $@ > out_rsync 2>&1 2160 status=$? 2161 if [ ${status} -gt 0 ] ; then 2162 IGCM_debug_Print 2 "IGCM_sys_ncea : error code ${status}" 2163 cat out_rsync 2164 \rm out_rsync 2165 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2166 else 2167 \rm out_rsync 2168 break 2169 fi 2170 (( i = i + 1 )) 2171 done 2172 2173 if [ ${status} -gt 0 ] ; then 2174 echo "IGCM_sys_ncea : ncea error" 2175 IGCM_debug_Exit "ncea" 2066 2176 fi 2067 2177 … … 2074 2184 echo "IGCM_sys_ncecat :" $@ 2075 2185 fi 2076 ncecat $@ 2077 if [ $? -gt 0 ] ; then 2078 echo "IGCM_sys_ncecat : erreur ${@}." 2079 IGCM_debug_Exit "ncecat" 2186 2187 typeset NB_ESSAI DELAI status i 2188 # number of tentative 2189 NB_ESSAI=3 2190 # time delay between tentative 2191 DELAI=2 2192 2193 i=0 2194 while [ $i -lt $NB_ESSAI ] ; do 2195 ncecat $@ > out_rsync 2>&1 2196 status=$? 2197 if [ ${status} -gt 0 ] ; then 2198 IGCM_debug_Print 2 "IGCM_sys_ncecat : error code ${status}" 2199 cat out_rsync 2200 \rm out_rsync 2201 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2202 else 2203 \rm out_rsync 2204 break 2205 fi 2206 (( i = i + 1 )) 2207 done 2208 2209 if [ ${status} -gt 0 ] ; then 2210 echo "IGCM_sys_ncecat : ncecat error" 2211 IGCM_debug_Exit "ncecat" 2080 2212 fi 2081 2213 … … 2088 2220 echo "IGCM_sys_ncflint :" $@ 2089 2221 fi 2090 ncflint $@ 2091 if [ $? -gt 0 ] ; then 2092 echo "IGCM_sys_ncflint : erreur ${@}." 2093 IGCM_debug_Exit "ncflint" 2222 2223 typeset NB_ESSAI DELAI status i 2224 # number of tentative 2225 NB_ESSAI=3 2226 # time delay between tentative 2227 DELAI=2 2228 2229 i=0 2230 while [ $i -lt $NB_ESSAI ] ; do 2231 ncflint $@ > out_rsync 2>&1 2232 status=$? 2233 if [ ${status} -gt 0 ] ; then 2234 IGCM_debug_Print 2 "IGCM_sys_ncflint : error code ${status}" 2235 cat out_rsync 2236 \rm out_rsync 2237 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2238 else 2239 \rm out_rsync 2240 break 2241 fi 2242 (( i = i + 1 )) 2243 done 2244 2245 if [ ${status} -gt 0 ] ; then 2246 echo "IGCM_sys_ncflint : ncflint error" 2247 IGCM_debug_Exit "ncflint" 2094 2248 fi 2095 2249 … … 2102 2256 echo "IGCM_sys_ncks :" $@ 2103 2257 fi 2104 ncks $@ 2105 if [ $? -gt 0 ] ; then 2106 echo "IGCM_sys_ncks : erreur ${@}." 2107 IGCM_debug_Exit "ncks" 2258 2259 typeset NB_ESSAI DELAI status i 2260 # number of tentative 2261 NB_ESSAI=3 2262 # time delay between tentative 2263 DELAI=2 2264 2265 i=0 2266 while [ $i -lt $NB_ESSAI ] ; do 2267 ncks $@ > out_rsync 2>&1 2268 status=$? 2269 if [ ${status} -gt 0 ] ; then 2270 IGCM_debug_Print 2 "IGCM_sys_ncks : error code ${status}" 2271 cat out_rsync 2272 \rm out_rsync 2273 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2274 else 2275 \rm out_rsync 2276 break 2277 fi 2278 (( i = i + 1 )) 2279 done 2280 2281 if [ ${status} -gt 0 ] ; then 2282 echo "IGCM_sys_ncks : ncks error" 2283 IGCM_debug_Exit "ncks" 2108 2284 fi 2109 2285 … … 2116 2292 echo "IGCM_sys_ncpdq :" $@ 2117 2293 fi 2118 ncpdq $@ 2119 if [ $? -gt 0 ] ; then 2120 echo "IGCM_sys_ncpdq : erreur ${@}." 2121 IGCM_debug_Exit "ncpdq" 2294 2295 typeset NB_ESSAI DELAI status i 2296 # number of tentative 2297 NB_ESSAI=3 2298 # time delay between tentative 2299 DELAI=2 2300 2301 i=0 2302 while [ $i -lt $NB_ESSAI ] ; do 2303 ncpdq $@ > out_rsync 2>&1 2304 status=$? 2305 if [ ${status} -gt 0 ] ; then 2306 IGCM_debug_Print 2 "IGCM_sys_ncpdq : error code ${status}" 2307 cat out_rsync 2308 \rm out_rsync 2309 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2310 else 2311 \rm out_rsync 2312 break 2313 fi 2314 (( i = i + 1 )) 2315 done 2316 2317 if [ ${status} -gt 0 ] ; then 2318 echo "IGCM_sys_ncpdq : ncpdq error" 2319 IGCM_debug_Exit "ncpdq" 2122 2320 fi 2123 2321 … … 2130 2328 echo "IGCM_sys_ncra :" $@ 2131 2329 fi 2132 ncra $@ 2133 if [ $? -gt 0 ] ; then 2134 echo "IGCM_sys_ncra : erreur ${@}." 2135 IGCM_debug_Exit "ncra" 2330 2331 typeset NB_ESSAI DELAI status i 2332 # number of tentative 2333 NB_ESSAI=3 2334 # time delay between tentative 2335 DELAI=2 2336 2337 i=0 2338 while [ $i -lt $NB_ESSAI ] ; do 2339 ncra $@ > out_rsync 2>&1 2340 status=$? 2341 if [ ${status} -gt 0 ] ; then 2342 IGCM_debug_Print 2 "IGCM_sys_ncra : error code ${status}" 2343 cat out_rsync 2344 \rm out_rsync 2345 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2346 else 2347 \rm out_rsync 2348 break 2349 fi 2350 (( i = i + 1 )) 2351 done 2352 2353 if [ ${status} -gt 0 ] ; then 2354 echo "IGCM_sys_ncra : ncra error" 2355 IGCM_debug_Exit "ncra" 2136 2356 fi 2137 2357 … … 2144 2364 echo "IGCM_sys_ncrcat :" $@ 2145 2365 fi 2146 ncrcat $@ 2147 if [ $? -gt 0 ] ; then 2148 echo "IGCM_sys_ncrcat : erreur ${@}." 2149 # IGCM_debug_Exit "ncrcat" 2366 2367 typeset NB_ESSAI DELAI status i 2368 # number of tentative 2369 NB_ESSAI=3 2370 # time delay between tentative 2371 DELAI=2 2372 2373 i=0 2374 while [ $i -lt $NB_ESSAI ] ; do 2375 ncrcat $@ > out_rsync 2>&1 2376 status=$? 2377 if [ ${status} -gt 0 ] ; then 2378 IGCM_debug_Print 2 "IGCM_sys_ncrcat : error code ${status}" 2379 cat out_rsync 2380 \rm out_rsync 2381 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2382 else 2383 \rm out_rsync 2384 break 2385 fi 2386 (( i = i + 1 )) 2387 done 2388 2389 if [ ${status} -gt 0 ] ; then 2390 echo "IGCM_sys_ncrcat : ncrcat error" 2391 #IGCM_debug_Exit "ncrcat" 2150 2392 fi 2151 2393 … … 2158 2400 echo "IGCM_sys_ncrename :" $@ 2159 2401 fi 2160 ncrename $@ 2161 if [ $? -gt 0 ] ; then 2162 echo "IGCM_sys_ncrename : erreur ${@}." 2163 IGCM_debug_Exit "ncrename" 2402 2403 typeset NB_ESSAI DELAI status i 2404 # number of tentative 2405 NB_ESSAI=3 2406 # time delay between tentative 2407 DELAI=2 2408 2409 i=0 2410 while [ $i -lt $NB_ESSAI ] ; do 2411 ncrename $@ > out_rsync 2>&1 2412 status=$? 2413 if [ ${status} -gt 0 ] ; then 2414 IGCM_debug_Print 2 "IGCM_sys_ncrename : error code ${status}" 2415 cat out_rsync 2416 \rm out_rsync 2417 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2418 else 2419 \rm out_rsync 2420 break 2421 fi 2422 (( i = i + 1 )) 2423 done 2424 2425 if [ ${status} -gt 0 ] ; then 2426 echo "IGCM_sys_ncrename : ncrename error" 2427 IGCM_debug_Exit "ncrename" 2164 2428 fi 2165 2429 … … 2172 2436 echo "IGCM_sys_ncwa :" $@ 2173 2437 fi 2174 ncwa $@ 2175 if [ $? -gt 0 ] ; then 2176 echo "IGCM_sys_ncwa : erreur ${@}." 2177 IGCM_debug_Exit "ncwa" 2438 2439 typeset NB_ESSAI DELAI status i 2440 # number of tentative 2441 NB_ESSAI=3 2442 # time delay between tentative 2443 DELAI=2 2444 2445 i=0 2446 while [ $i -lt $NB_ESSAI ] ; do 2447 ncwa $@ > out_rsync 2>&1 2448 status=$? 2449 if [ ${status} -gt 0 ] ; then 2450 IGCM_debug_Print 2 "IGCM_sys_ncwa : error code ${status}" 2451 cat out_rsync 2452 \rm out_rsync 2453 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2454 else 2455 \rm out_rsync 2456 break 2457 fi 2458 (( i = i + 1 )) 2459 done 2460 2461 if [ ${status} -gt 0 ] ; then 2462 echo "IGCM_sys_ncwa : ncwa error" 2463 IGCM_debug_Exit "ncwa" 2178 2464 fi 2179 2465 … … 2189 2475 echo "IGCM_sys_cdo :" $@ 2190 2476 fi 2191 \cdo $@ 2192 if [ $? -gt 0 ] ; then 2193 echo "IGCM_sys_cdo : erreur ${@}." 2477 2478 typeset status 2479 2480 \cdo $@ > out_rsync 2>&1 2481 status=$? 2482 if [ ${status} -gt 0 ] ; then 2483 echo "IGCM_sys_cdo : error code ${status}" 2484 cat out_rsync 2485 \rm out_rsync 2194 2486 IGCM_debug_PopStack "IGCM_sys_cdo" 2195 2487 return 1 -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercure.ksh
r710 r713 830 830 # add dmget (to demigrate all offline files) to reduce time of this command : 831 831 #dmget $1/* 832 ccc_hsm get $1/*832 ccc_hsm get -r $1 833 833 \cp -r $1 $2 > out_rsync 2>&1 834 834 RET=$? -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh
r705 r713 1047 1047 # add dmfind/dmget (to demigrate all offline files) : 1048 1048 #dmfind $1 -state MIG -o -state OFL -o -state PAR | dmget 1049 ccc_hsm get -r $1 1049 1050 \cp -r $1 $2 > out_rsync 2>&1 1050 1051 RET=$?
Note: See TracChangeset
for help on using the changeset viewer.