- Timestamp:
- 10/12/12 10:11:24 (12 years ago)
- Location:
- trunk/libIGCM/libIGCM_sys
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_cesium.ksh
r705 r714 1630 1630 echo "IGCM_sys_ncap2 :" $@ 1631 1631 fi 1632 ncap2 "$@" 1633 if [ $? -gt 0 ] ; then 1634 echo "IGCM_sys_ncap2 : erreur ${@}." 1635 IGCM_debug_Exit "ncap2" 1632 1633 typeset NB_ESSAI DELAI status i 1634 # number of tentative 1635 NB_ESSAI=3 1636 # time delay between tentative 1637 DELAI=2 1638 1639 i=0 1640 while [ $i -lt $NB_ESSAI ] ; do 1641 ncap2 "$@" > out_rsync 2>&1 1642 status=$? 1643 if [ ${status} -gt 0 ] ; then 1644 IGCM_debug_Print 2 "IGCM_sys_ncap2 : error code ${status}" 1645 cat out_rsync 1646 \rm out_rsync 1647 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1648 else 1649 \rm out_rsync 1650 break 1651 fi 1652 (( i = i + 1 )) 1653 done 1654 1655 if [ ${status} -gt 0 ] ; then 1656 echo "IGCM_sys_ncap2 : ncap2 error" 1657 IGCM_debug_Exit "ncap2" 1636 1658 fi 1637 1659 … … 1644 1666 echo "IGCM_sys_ncatted :" $@ 1645 1667 fi 1646 ncatted "$@" 1647 if [ $? -gt 0 ] ; then 1648 echo "IGCM_sys_ncatted : erreur ${@}." 1649 IGCM_debug_Exit "ncatted" 1668 1669 typeset NB_ESSAI DELAI status i 1670 # number of tentative 1671 NB_ESSAI=3 1672 # time delay between tentative 1673 DELAI=2 1674 1675 i=0 1676 while [ $i -lt $NB_ESSAI ] ; do 1677 ncatted "$@" > out_rsync 2>&1 1678 status=$? 1679 if [ ${status} -gt 0 ] ; then 1680 IGCM_debug_Print 2 "IGCM_sys_ncatted : error code ${status}" 1681 cat out_rsync 1682 \rm out_rsync 1683 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1684 else 1685 \rm out_rsync 1686 break 1687 fi 1688 (( i = i + 1 )) 1689 done 1690 1691 if [ ${status} -gt 0 ] ; then 1692 echo "IGCM_sys_ncatted : ncatted error" 1693 IGCM_debug_Exit "ncatted" 1650 1694 fi 1651 1695 … … 1658 1702 echo "IGCM_sys_ncbo :" $@ 1659 1703 fi 1660 ncbo $@ 1661 if [ $? -gt 0 ] ; then 1662 echo "IGCM_sys_ncbo : erreur ${@}." 1663 IGCM_debug_Exit "ncbo" 1704 1705 typeset NB_ESSAI DELAI status i 1706 # number of tentative 1707 NB_ESSAI=3 1708 # time delay between tentative 1709 DELAI=2 1710 1711 i=0 1712 while [ $i -lt $NB_ESSAI ] ; do 1713 ncbo $@ > out_rsync 2>&1 1714 status=$? 1715 if [ ${status} -gt 0 ] ; then 1716 IGCM_debug_Print 2 "IGCM_sys_ncbo : error code ${status}" 1717 cat out_rsync 1718 \rm out_rsync 1719 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1720 else 1721 \rm out_rsync 1722 break 1723 fi 1724 (( i = i + 1 )) 1725 done 1726 1727 if [ ${status} -gt 0 ] ; then 1728 echo "IGCM_sys_ncbo : ncbo error" 1729 IGCM_debug_Exit "ncbo" 1664 1730 fi 1665 1731 … … 1672 1738 echo "IGCM_sys_ncdiff :" $@ 1673 1739 fi 1674 ncdiff $@ 1675 if [ $? -gt 0 ] ; then 1676 echo "IGCM_sys_ncdiff : erreur ${@}." 1677 IGCM_debug_Exit "ncdiff" 1740 1741 typeset NB_ESSAI DELAI status i 1742 # number of tentative 1743 NB_ESSAI=3 1744 # time delay between tentative 1745 DELAI=2 1746 1747 i=0 1748 while [ $i -lt $NB_ESSAI ] ; do 1749 ncdiff $@ > out_rsync 2>&1 1750 status=$? 1751 if [ ${status} -gt 0 ] ; then 1752 IGCM_debug_Print 2 "IGCM_sys_ncdiff : error code ${status}" 1753 cat out_rsync 1754 \rm out_rsync 1755 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1756 else 1757 \rm out_rsync 1758 break 1759 fi 1760 (( i = i + 1 )) 1761 done 1762 1763 if [ ${status} -gt 0 ] ; then 1764 echo "IGCM_sys_ncdiff : ncdiff error" 1765 IGCM_debug_Exit "ncdiff" 1678 1766 fi 1679 1767 … … 1686 1774 echo "IGCM_sys_ncea :" $@ 1687 1775 fi 1688 ncea $@ 1689 if [ $? -gt 0 ] ; then 1690 echo "IGCM_sys_ncea : erreur ${@}." 1691 IGCM_debug_Exit "ncea" 1776 1777 typeset NB_ESSAI DELAI status i 1778 # number of tentative 1779 NB_ESSAI=3 1780 # time delay between tentative 1781 DELAI=2 1782 1783 i=0 1784 while [ $i -lt $NB_ESSAI ] ; do 1785 ncea $@ > out_rsync 2>&1 1786 status=$? 1787 if [ ${status} -gt 0 ] ; then 1788 IGCM_debug_Print 2 "IGCM_sys_ncea : error code ${status}" 1789 cat out_rsync 1790 \rm out_rsync 1791 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1792 else 1793 \rm out_rsync 1794 break 1795 fi 1796 (( i = i + 1 )) 1797 done 1798 1799 if [ ${status} -gt 0 ] ; then 1800 echo "IGCM_sys_ncea : ncea error" 1801 IGCM_debug_Exit "ncea" 1692 1802 fi 1693 1803 … … 1700 1810 echo "IGCM_sys_ncecat :" $@ 1701 1811 fi 1702 ncecat $@ 1703 if [ $? -gt 0 ] ; then 1704 echo "IGCM_sys_ncecat : erreur ${@}." 1705 IGCM_debug_Exit "ncecat" 1812 1813 typeset NB_ESSAI DELAI status i 1814 # number of tentative 1815 NB_ESSAI=3 1816 # time delay between tentative 1817 DELAI=2 1818 1819 i=0 1820 while [ $i -lt $NB_ESSAI ] ; do 1821 ncecat $@ > out_rsync 2>&1 1822 status=$? 1823 if [ ${status} -gt 0 ] ; then 1824 IGCM_debug_Print 2 "IGCM_sys_ncecat : error code ${status}" 1825 cat out_rsync 1826 \rm out_rsync 1827 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1828 else 1829 \rm out_rsync 1830 break 1831 fi 1832 (( i = i + 1 )) 1833 done 1834 1835 if [ ${status} -gt 0 ] ; then 1836 echo "IGCM_sys_ncecat : ncecat error" 1837 IGCM_debug_Exit "ncecat" 1706 1838 fi 1707 1839 … … 1714 1846 echo "IGCM_sys_ncflint :" $@ 1715 1847 fi 1716 ncflint $@ 1717 if [ $? -gt 0 ] ; then 1718 echo "IGCM_sys_ncflint : erreur ${@}." 1719 IGCM_debug_Exit "ncflint" 1848 1849 typeset NB_ESSAI DELAI status i 1850 # number of tentative 1851 NB_ESSAI=3 1852 # time delay between tentative 1853 DELAI=2 1854 1855 i=0 1856 while [ $i -lt $NB_ESSAI ] ; do 1857 ncflint $@ > out_rsync 2>&1 1858 status=$? 1859 if [ ${status} -gt 0 ] ; then 1860 IGCM_debug_Print 2 "IGCM_sys_ncflint : error code ${status}" 1861 cat out_rsync 1862 \rm out_rsync 1863 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1864 else 1865 \rm out_rsync 1866 break 1867 fi 1868 (( i = i + 1 )) 1869 done 1870 1871 if [ ${status} -gt 0 ] ; then 1872 echo "IGCM_sys_ncflint : ncflint error" 1873 IGCM_debug_Exit "ncflint" 1720 1874 fi 1721 1875 … … 1728 1882 echo "IGCM_sys_ncks :" $@ 1729 1883 fi 1730 ncks $@ 1731 if [ $? -gt 0 ] ; then 1732 echo "IGCM_sys_ncks : erreur ${@}." 1733 IGCM_debug_Exit "ncks" 1884 1885 typeset NB_ESSAI DELAI status i 1886 # number of tentative 1887 NB_ESSAI=3 1888 # time delay between tentative 1889 DELAI=2 1890 1891 i=0 1892 while [ $i -lt $NB_ESSAI ] ; do 1893 ncks $@ > out_rsync 2>&1 1894 status=$? 1895 if [ ${status} -gt 0 ] ; then 1896 IGCM_debug_Print 2 "IGCM_sys_ncks : error code ${status}" 1897 cat out_rsync 1898 \rm out_rsync 1899 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1900 else 1901 \rm out_rsync 1902 break 1903 fi 1904 (( i = i + 1 )) 1905 done 1906 1907 if [ ${status} -gt 0 ] ; then 1908 echo "IGCM_sys_ncks : ncks error" 1909 IGCM_debug_Exit "ncks" 1734 1910 fi 1735 1911 … … 1742 1918 echo "IGCM_sys_ncpdq :" $@ 1743 1919 fi 1744 ncpdq $@ 1745 if [ $? -gt 0 ] ; then 1746 echo "IGCM_sys_ncpdq : erreur ${@}." 1747 IGCM_debug_Exit "ncpdq" 1920 1921 typeset NB_ESSAI DELAI status i 1922 # number of tentative 1923 NB_ESSAI=3 1924 # time delay between tentative 1925 DELAI=2 1926 1927 i=0 1928 while [ $i -lt $NB_ESSAI ] ; do 1929 ncpdq $@ > out_rsync 2>&1 1930 status=$? 1931 if [ ${status} -gt 0 ] ; then 1932 IGCM_debug_Print 2 "IGCM_sys_ncpdq : error code ${status}" 1933 cat out_rsync 1934 \rm out_rsync 1935 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1936 else 1937 \rm out_rsync 1938 break 1939 fi 1940 (( i = i + 1 )) 1941 done 1942 1943 if [ ${status} -gt 0 ] ; then 1944 echo "IGCM_sys_ncpdq : ncpdq error" 1945 IGCM_debug_Exit "ncpdq" 1748 1946 fi 1749 1947 … … 1756 1954 echo "IGCM_sys_ncra :" $@ 1757 1955 fi 1758 ncra $@ 1759 if [ $? -gt 0 ] ; then 1760 echo "IGCM_sys_ncra : erreur ${@}." 1761 IGCM_debug_Exit "ncra" 1956 1957 typeset NB_ESSAI DELAI status i 1958 # number of tentative 1959 NB_ESSAI=3 1960 # time delay between tentative 1961 DELAI=2 1962 1963 i=0 1964 while [ $i -lt $NB_ESSAI ] ; do 1965 ncra $@ > out_rsync 2>&1 1966 status=$? 1967 if [ ${status} -gt 0 ] ; then 1968 IGCM_debug_Print 2 "IGCM_sys_ncra : error code ${status}" 1969 cat out_rsync 1970 \rm out_rsync 1971 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1972 else 1973 \rm out_rsync 1974 break 1975 fi 1976 (( i = i + 1 )) 1977 done 1978 1979 if [ ${status} -gt 0 ] ; then 1980 echo "IGCM_sys_ncra : ncra error" 1981 IGCM_debug_Exit "ncra" 1762 1982 fi 1763 1983 … … 1770 1990 echo "IGCM_sys_ncrcat :" $@ 1771 1991 fi 1772 ncrcat $@ 1773 if [ $? -gt 0 ] ; then 1774 echo "IGCM_sys_ncrcat : erreur ${@}." 1775 # IGCM_debug_Exit "ncrcat" 1992 1993 typeset NB_ESSAI DELAI status i 1994 # number of tentative 1995 NB_ESSAI=3 1996 # time delay between tentative 1997 DELAI=2 1998 1999 i=0 2000 while [ $i -lt $NB_ESSAI ] ; do 2001 ncrcat $@ > out_rsync 2>&1 2002 status=$? 2003 if [ ${status} -gt 0 ] ; then 2004 IGCM_debug_Print 2 "IGCM_sys_ncrcat : error code ${status}" 2005 cat out_rsync 2006 \rm out_rsync 2007 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2008 else 2009 \rm out_rsync 2010 break 2011 fi 2012 (( i = i + 1 )) 2013 done 2014 2015 if [ ${status} -gt 0 ] ; then 2016 echo "IGCM_sys_ncrcat : ncrcat error" 2017 #IGCM_debug_Exit "ncrcat" 1776 2018 fi 1777 2019 … … 1784 2026 echo "IGCM_sys_ncrename :" $@ 1785 2027 fi 1786 ncrename $@ 1787 if [ $? -gt 0 ] ; then 1788 echo "IGCM_sys_ncrename : erreur ${@}." 1789 IGCM_debug_Exit "ncrename" 2028 2029 typeset NB_ESSAI DELAI status i 2030 # number of tentative 2031 NB_ESSAI=3 2032 # time delay between tentative 2033 DELAI=2 2034 2035 i=0 2036 while [ $i -lt $NB_ESSAI ] ; do 2037 ncrename $@ > out_rsync 2>&1 2038 status=$? 2039 if [ ${status} -gt 0 ] ; then 2040 IGCM_debug_Print 2 "IGCM_sys_ncrename : error code ${status}" 2041 cat out_rsync 2042 \rm out_rsync 2043 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2044 else 2045 \rm out_rsync 2046 break 2047 fi 2048 (( i = i + 1 )) 2049 done 2050 2051 if [ ${status} -gt 0 ] ; then 2052 echo "IGCM_sys_ncrename : ncrename error" 2053 IGCM_debug_Exit "ncrename" 1790 2054 fi 1791 2055 … … 1798 2062 echo "IGCM_sys_ncwa :" $@ 1799 2063 fi 1800 ncwa $@ 1801 if [ $? -gt 0 ] ; then 1802 echo "IGCM_sys_ncwa : erreur ${@}." 1803 IGCM_debug_Exit "ncwa" 2064 2065 typeset NB_ESSAI DELAI status i 2066 # number of tentative 2067 NB_ESSAI=3 2068 # time delay between tentative 2069 DELAI=2 2070 2071 i=0 2072 while [ $i -lt $NB_ESSAI ] ; do 2073 ncwa $@ > out_rsync 2>&1 2074 status=$? 2075 if [ ${status} -gt 0 ] ; then 2076 IGCM_debug_Print 2 "IGCM_sys_ncwa : error code ${status}" 2077 cat out_rsync 2078 \rm out_rsync 2079 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2080 else 2081 \rm out_rsync 2082 break 2083 fi 2084 (( i = i + 1 )) 2085 done 2086 2087 if [ ${status} -gt 0 ] ; then 2088 echo "IGCM_sys_ncwa : ncwa error" 2089 IGCM_debug_Exit "ncwa" 1804 2090 fi 1805 2091 … … 1815 2101 echo "IGCM_sys_cdo :" $@ 1816 2102 fi 1817 \cdo $@ 1818 if [ $? -gt 0 ] ; then 1819 echo "IGCM_sys_cdo : erreur ${@}." 2103 2104 typeset status 2105 2106 \cdo $@ > out_rsync 2>&1 2107 status=$? 2108 if [ ${status} -gt 0 ] ; then 2109 echo "IGCM_sys_cdo : error code ${status}" 2110 cat out_rsync 2111 \rm out_rsync 1820 2112 IGCM_debug_PopStack "IGCM_sys_cdo" 1821 2113 return 1 -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh
r713 r714 1996 1996 } 1997 1997 1998 ############################################################ 1999 # Check of space available on temporary filesytems 2000 function IGCM_sys_check_quota { 2001 IGCM_debug_PushStack "IGCM_sys_check_quota" 2002 if ( $DEBUG_sys ) ; then 2003 echo "IGCM_sys_check_quota" 2004 fi 2005 IGCM_debug_PopStack "IGCM_sys_check_quota" 2006 } 2007 1998 2008 ############################################################## 1999 2009 # NCO OPERATOR … … 2493 2503 IGCM_debug_PopStack "IGCM_sys_cdo" 2494 2504 } 2495 2496 ############################################################2497 # Check of space available on temporary filesytems2498 function IGCM_sys_check_quota {2499 IGCM_debug_PushStack "IGCM_sys_check_quota"2500 if ( $DEBUG_sys ) ; then2501 echo "IGCM_sys_check_quota"2502 fi2503 IGCM_debug_PopStack "IGCM_sys_check_quota"2504 } -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh
r697 r714 1700 1700 # NCO OPERATOR 1701 1701 1702 1702 1703 function IGCM_sys_ncap2 { 1703 1704 IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@ … … 1705 1706 echo "IGCM_sys_ncap2 :" $@ 1706 1707 fi 1707 /usr/local/bin/ncap2 "$@" 1708 if [ $? -gt 0 ] ; then 1709 echo "IGCM_sys_ncap2 : erreur ${@}." 1710 IGCM_debug_Exit "ncap2" 1708 1709 typeset NB_ESSAI DELAI status i 1710 # number of tentative 1711 NB_ESSAI=3 1712 # time delay between tentative 1713 DELAI=2 1714 1715 i=0 1716 while [ $i -lt $NB_ESSAI ] ; do 1717 ncap2 "$@" > out_rsync 2>&1 1718 status=$? 1719 if [ ${status} -gt 0 ] ; then 1720 IGCM_debug_Print 2 "IGCM_sys_ncap2 : error code ${status}" 1721 cat out_rsync 1722 \rm out_rsync 1723 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1724 else 1725 \rm out_rsync 1726 break 1727 fi 1728 (( i = i + 1 )) 1729 done 1730 1731 if [ ${status} -gt 0 ] ; then 1732 echo "IGCM_sys_ncap2 : ncap2 error" 1733 IGCM_debug_Exit "ncap2" 1711 1734 fi 1712 1735 … … 1719 1742 echo "IGCM_sys_ncatted :" $@ 1720 1743 fi 1721 /usr/local/bin/ncatted "$@" 1722 if [ $? -gt 0 ] ; then 1723 echo "IGCM_sys_ncatted : erreur ${@}." 1724 IGCM_debug_Exit "ncatted" 1744 1745 typeset NB_ESSAI DELAI status i 1746 # number of tentative 1747 NB_ESSAI=3 1748 # time delay between tentative 1749 DELAI=2 1750 1751 i=0 1752 while [ $i -lt $NB_ESSAI ] ; do 1753 ncatted "$@" > out_rsync 2>&1 1754 status=$? 1755 if [ ${status} -gt 0 ] ; then 1756 IGCM_debug_Print 2 "IGCM_sys_ncatted : error code ${status}" 1757 cat out_rsync 1758 \rm out_rsync 1759 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1760 else 1761 \rm out_rsync 1762 break 1763 fi 1764 (( i = i + 1 )) 1765 done 1766 1767 if [ ${status} -gt 0 ] ; then 1768 echo "IGCM_sys_ncatted : ncatted error" 1769 IGCM_debug_Exit "ncatted" 1725 1770 fi 1726 1771 … … 1733 1778 echo "IGCM_sys_ncbo :" $@ 1734 1779 fi 1735 /usr/local/bin/ncbo $@ 1736 if [ $? -gt 0 ] ; then 1737 echo "IGCM_sys_ncbo : erreur ${@}." 1738 IGCM_debug_Exit "ncbo" 1780 1781 typeset NB_ESSAI DELAI status i 1782 # number of tentative 1783 NB_ESSAI=3 1784 # time delay between tentative 1785 DELAI=2 1786 1787 i=0 1788 while [ $i -lt $NB_ESSAI ] ; do 1789 ncbo $@ > out_rsync 2>&1 1790 status=$? 1791 if [ ${status} -gt 0 ] ; then 1792 IGCM_debug_Print 2 "IGCM_sys_ncbo : error code ${status}" 1793 cat out_rsync 1794 \rm out_rsync 1795 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1796 else 1797 \rm out_rsync 1798 break 1799 fi 1800 (( i = i + 1 )) 1801 done 1802 1803 if [ ${status} -gt 0 ] ; then 1804 echo "IGCM_sys_ncbo : ncbo error" 1805 IGCM_debug_Exit "ncbo" 1739 1806 fi 1740 1807 … … 1747 1814 echo "IGCM_sys_ncdiff :" $@ 1748 1815 fi 1749 /usr/local/bin/ncdiff $@ 1750 if [ $? -gt 0 ] ; then 1751 echo "IGCM_sys_ncdiff : erreur ${@}." 1752 IGCM_debug_Exit "ncdiff" 1816 1817 typeset NB_ESSAI DELAI status i 1818 # number of tentative 1819 NB_ESSAI=3 1820 # time delay between tentative 1821 DELAI=2 1822 1823 i=0 1824 while [ $i -lt $NB_ESSAI ] ; do 1825 ncdiff $@ > out_rsync 2>&1 1826 status=$? 1827 if [ ${status} -gt 0 ] ; then 1828 IGCM_debug_Print 2 "IGCM_sys_ncdiff : error code ${status}" 1829 cat out_rsync 1830 \rm out_rsync 1831 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1832 else 1833 \rm out_rsync 1834 break 1835 fi 1836 (( i = i + 1 )) 1837 done 1838 1839 if [ ${status} -gt 0 ] ; then 1840 echo "IGCM_sys_ncdiff : ncdiff error" 1841 IGCM_debug_Exit "ncdiff" 1753 1842 fi 1754 1843 … … 1761 1850 echo "IGCM_sys_ncea :" $@ 1762 1851 fi 1763 /usr/local/bin/ncea $@ 1764 if [ $? -gt 0 ] ; then 1765 echo "IGCM_sys_ncea : erreur ${@}." 1766 IGCM_debug_Exit "ncea" 1852 1853 typeset NB_ESSAI DELAI status i 1854 # number of tentative 1855 NB_ESSAI=3 1856 # time delay between tentative 1857 DELAI=2 1858 1859 i=0 1860 while [ $i -lt $NB_ESSAI ] ; do 1861 ncea $@ > out_rsync 2>&1 1862 status=$? 1863 if [ ${status} -gt 0 ] ; then 1864 IGCM_debug_Print 2 "IGCM_sys_ncea : error code ${status}" 1865 cat out_rsync 1866 \rm out_rsync 1867 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1868 else 1869 \rm out_rsync 1870 break 1871 fi 1872 (( i = i + 1 )) 1873 done 1874 1875 if [ ${status} -gt 0 ] ; then 1876 echo "IGCM_sys_ncea : ncea error" 1877 IGCM_debug_Exit "ncea" 1767 1878 fi 1768 1879 … … 1775 1886 echo "IGCM_sys_ncecat :" $@ 1776 1887 fi 1777 /usr/local/bin/ncecat $@ 1778 if [ $? -gt 0 ] ; then 1779 echo "IGCM_sys_ncecat : erreur ${@}." 1780 IGCM_debug_Exit "ncecat" 1888 1889 typeset NB_ESSAI DELAI status i 1890 # number of tentative 1891 NB_ESSAI=3 1892 # time delay between tentative 1893 DELAI=2 1894 1895 i=0 1896 while [ $i -lt $NB_ESSAI ] ; do 1897 ncecat $@ > out_rsync 2>&1 1898 status=$? 1899 if [ ${status} -gt 0 ] ; then 1900 IGCM_debug_Print 2 "IGCM_sys_ncecat : error code ${status}" 1901 cat out_rsync 1902 \rm out_rsync 1903 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1904 else 1905 \rm out_rsync 1906 break 1907 fi 1908 (( i = i + 1 )) 1909 done 1910 1911 if [ ${status} -gt 0 ] ; then 1912 echo "IGCM_sys_ncecat : ncecat error" 1913 IGCM_debug_Exit "ncecat" 1781 1914 fi 1782 1915 … … 1789 1922 echo "IGCM_sys_ncflint :" $@ 1790 1923 fi 1791 /usr/local/bin/ncflint $@ 1792 if [ $? -gt 0 ] ; then 1793 echo "IGCM_sys_ncflint : erreur ${@}." 1794 IGCM_debug_Exit "ncflint" 1924 1925 typeset NB_ESSAI DELAI status i 1926 # number of tentative 1927 NB_ESSAI=3 1928 # time delay between tentative 1929 DELAI=2 1930 1931 i=0 1932 while [ $i -lt $NB_ESSAI ] ; do 1933 ncflint $@ > out_rsync 2>&1 1934 status=$? 1935 if [ ${status} -gt 0 ] ; then 1936 IGCM_debug_Print 2 "IGCM_sys_ncflint : error code ${status}" 1937 cat out_rsync 1938 \rm out_rsync 1939 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1940 else 1941 \rm out_rsync 1942 break 1943 fi 1944 (( i = i + 1 )) 1945 done 1946 1947 if [ ${status} -gt 0 ] ; then 1948 echo "IGCM_sys_ncflint : ncflint error" 1949 IGCM_debug_Exit "ncflint" 1795 1950 fi 1796 1951 … … 1803 1958 echo "IGCM_sys_ncks :" $@ 1804 1959 fi 1805 /usr/local/bin/ncks $@ 1806 if [ $? -gt 0 ] ; then 1807 echo "IGCM_sys_ncks : erreur ${@}." 1808 IGCM_debug_Exit "ncks" 1960 1961 typeset NB_ESSAI DELAI status i 1962 # number of tentative 1963 NB_ESSAI=3 1964 # time delay between tentative 1965 DELAI=2 1966 1967 i=0 1968 while [ $i -lt $NB_ESSAI ] ; do 1969 ncks $@ > out_rsync 2>&1 1970 status=$? 1971 if [ ${status} -gt 0 ] ; then 1972 IGCM_debug_Print 2 "IGCM_sys_ncks : error code ${status}" 1973 cat out_rsync 1974 \rm out_rsync 1975 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1976 else 1977 \rm out_rsync 1978 break 1979 fi 1980 (( i = i + 1 )) 1981 done 1982 1983 if [ ${status} -gt 0 ] ; then 1984 echo "IGCM_sys_ncks : ncks error" 1985 IGCM_debug_Exit "ncks" 1809 1986 fi 1810 1987 … … 1817 1994 echo "IGCM_sys_ncpdq :" $@ 1818 1995 fi 1819 /usr/local/bin/ncpdq $@ 1820 if [ $? -gt 0 ] ; then 1821 echo "IGCM_sys_ncpdq : erreur ${@}." 1822 IGCM_debug_Exit "ncpdq" 1996 1997 typeset NB_ESSAI DELAI status i 1998 # number of tentative 1999 NB_ESSAI=3 2000 # time delay between tentative 2001 DELAI=2 2002 2003 i=0 2004 while [ $i -lt $NB_ESSAI ] ; do 2005 ncpdq $@ > out_rsync 2>&1 2006 status=$? 2007 if [ ${status} -gt 0 ] ; then 2008 IGCM_debug_Print 2 "IGCM_sys_ncpdq : error code ${status}" 2009 cat out_rsync 2010 \rm out_rsync 2011 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2012 else 2013 \rm out_rsync 2014 break 2015 fi 2016 (( i = i + 1 )) 2017 done 2018 2019 if [ ${status} -gt 0 ] ; then 2020 echo "IGCM_sys_ncpdq : ncpdq error" 2021 IGCM_debug_Exit "ncpdq" 1823 2022 fi 1824 2023 … … 1831 2030 echo "IGCM_sys_ncra :" $@ 1832 2031 fi 1833 /usr/local/bin/ncra $@ 1834 if [ $? -gt 0 ] ; then 1835 echo "IGCM_sys_ncra : erreur ${@}." 1836 IGCM_debug_Exit "ncra" 2032 2033 typeset NB_ESSAI DELAI status i 2034 # number of tentative 2035 NB_ESSAI=3 2036 # time delay between tentative 2037 DELAI=2 2038 2039 i=0 2040 while [ $i -lt $NB_ESSAI ] ; do 2041 ncra $@ > out_rsync 2>&1 2042 status=$? 2043 if [ ${status} -gt 0 ] ; then 2044 IGCM_debug_Print 2 "IGCM_sys_ncra : error code ${status}" 2045 cat out_rsync 2046 \rm out_rsync 2047 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2048 else 2049 \rm out_rsync 2050 break 2051 fi 2052 (( i = i + 1 )) 2053 done 2054 2055 if [ ${status} -gt 0 ] ; then 2056 echo "IGCM_sys_ncra : ncra error" 2057 IGCM_debug_Exit "ncra" 1837 2058 fi 1838 2059 … … 1845 2066 echo "IGCM_sys_ncrcat :" $@ 1846 2067 fi 1847 /usr/local/bin/ncrcat $@ 1848 if [ $? -gt 0 ] ; then 1849 echo "IGCM_sys_ncrcat : erreur ${@}." 1850 # IGCM_debug_Exit "ncrcat" 2068 2069 typeset NB_ESSAI DELAI status i 2070 # number of tentative 2071 NB_ESSAI=3 2072 # time delay between tentative 2073 DELAI=2 2074 2075 i=0 2076 while [ $i -lt $NB_ESSAI ] ; do 2077 ncrcat $@ > out_rsync 2>&1 2078 status=$? 2079 if [ ${status} -gt 0 ] ; then 2080 IGCM_debug_Print 2 "IGCM_sys_ncrcat : error code ${status}" 2081 cat out_rsync 2082 \rm out_rsync 2083 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2084 else 2085 \rm out_rsync 2086 break 2087 fi 2088 (( i = i + 1 )) 2089 done 2090 2091 if [ ${status} -gt 0 ] ; then 2092 echo "IGCM_sys_ncrcat : ncrcat error" 2093 #IGCM_debug_Exit "ncrcat" 1851 2094 fi 1852 2095 … … 1859 2102 echo "IGCM_sys_ncrename :" $@ 1860 2103 fi 1861 /usr/local/bin/ncrename $@ 1862 if [ $? -gt 0 ] ; then 1863 echo "IGCM_sys_ncrename : erreur ${@}." 1864 IGCM_debug_Exit "ncrename" 2104 2105 typeset NB_ESSAI DELAI status i 2106 # number of tentative 2107 NB_ESSAI=3 2108 # time delay between tentative 2109 DELAI=2 2110 2111 i=0 2112 while [ $i -lt $NB_ESSAI ] ; do 2113 ncrename $@ > out_rsync 2>&1 2114 status=$? 2115 if [ ${status} -gt 0 ] ; then 2116 IGCM_debug_Print 2 "IGCM_sys_ncrename : error code ${status}" 2117 cat out_rsync 2118 \rm out_rsync 2119 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2120 else 2121 \rm out_rsync 2122 break 2123 fi 2124 (( i = i + 1 )) 2125 done 2126 2127 if [ ${status} -gt 0 ] ; then 2128 echo "IGCM_sys_ncrename : ncrename error" 2129 IGCM_debug_Exit "ncrename" 1865 2130 fi 1866 2131 … … 1873 2138 echo "IGCM_sys_ncwa :" $@ 1874 2139 fi 1875 /usr/local/bin/ncwa $@ 1876 if [ $? -gt 0 ] ; then 1877 echo "IGCM_sys_ncwa : erreur ${@}." 1878 IGCM_debug_Exit "ncwa" 2140 2141 typeset NB_ESSAI DELAI status i 2142 # number of tentative 2143 NB_ESSAI=3 2144 # time delay between tentative 2145 DELAI=2 2146 2147 i=0 2148 while [ $i -lt $NB_ESSAI ] ; do 2149 ncwa $@ > out_rsync 2>&1 2150 status=$? 2151 if [ ${status} -gt 0 ] ; then 2152 IGCM_debug_Print 2 "IGCM_sys_ncwa : error code ${status}" 2153 cat out_rsync 2154 \rm out_rsync 2155 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2156 else 2157 \rm out_rsync 2158 break 2159 fi 2160 (( i = i + 1 )) 2161 done 2162 2163 if [ ${status} -gt 0 ] ; then 2164 echo "IGCM_sys_ncwa : ncwa error" 2165 IGCM_debug_Exit "ncwa" 1879 2166 fi 1880 2167 … … 1887 2174 function IGCM_sys_cdo { 1888 2175 IGCM_debug_PushStack "IGCM_sys_cdo" -- $@ 1889 1890 \cdo $@ 1891 if [ $? -gt 0 ] ; then 1892 echo "IGCM_sys_cdo : erreur ${@}." 2176 if ( $DEBUG_sys ) ; then 2177 echo "IGCM_sys_cdo :" $@ 2178 fi 2179 2180 typeset status 2181 2182 \cdo $@ > out_rsync 2>&1 2183 status=$? 2184 if [ ${status} -gt 0 ] ; then 2185 echo "IGCM_sys_cdo : error code ${status}" 2186 cat out_rsync 2187 \rm out_rsync 1893 2188 IGCM_debug_PopStack "IGCM_sys_cdo" 1894 2189 return 1 -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercure.ksh
r713 r714 1632 1632 echo "IGCM_sys_ncap2 :" $@ 1633 1633 fi 1634 ncap2 "$@" 1635 if [ $? -gt 0 ] ; then 1636 echo "IGCM_sys_ncap2 : erreur ${@}." 1637 IGCM_debug_Exit "ncap2" 1634 1635 typeset NB_ESSAI DELAI status i 1636 # number of tentative 1637 NB_ESSAI=3 1638 # time delay between tentative 1639 DELAI=2 1640 1641 i=0 1642 while [ $i -lt $NB_ESSAI ] ; do 1643 ncap2 "$@" > out_rsync 2>&1 1644 status=$? 1645 if [ ${status} -gt 0 ] ; then 1646 IGCM_debug_Print 2 "IGCM_sys_ncap2 : error code ${status}" 1647 cat out_rsync 1648 \rm out_rsync 1649 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1650 else 1651 \rm out_rsync 1652 break 1653 fi 1654 (( i = i + 1 )) 1655 done 1656 1657 if [ ${status} -gt 0 ] ; then 1658 echo "IGCM_sys_ncap2 : ncap2 error" 1659 IGCM_debug_Exit "ncap2" 1638 1660 fi 1639 1661 … … 1646 1668 echo "IGCM_sys_ncatted :" $@ 1647 1669 fi 1648 ncatted "$@" 1649 if [ $? -gt 0 ] ; then 1650 echo "IGCM_sys_ncatted : erreur ${@}." 1651 IGCM_debug_Exit "ncatted" 1670 1671 typeset NB_ESSAI DELAI status i 1672 # number of tentative 1673 NB_ESSAI=3 1674 # time delay between tentative 1675 DELAI=2 1676 1677 i=0 1678 while [ $i -lt $NB_ESSAI ] ; do 1679 ncatted "$@" > out_rsync 2>&1 1680 status=$? 1681 if [ ${status} -gt 0 ] ; then 1682 IGCM_debug_Print 2 "IGCM_sys_ncatted : error code ${status}" 1683 cat out_rsync 1684 \rm out_rsync 1685 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1686 else 1687 \rm out_rsync 1688 break 1689 fi 1690 (( i = i + 1 )) 1691 done 1692 1693 if [ ${status} -gt 0 ] ; then 1694 echo "IGCM_sys_ncatted : ncatted error" 1695 IGCM_debug_Exit "ncatted" 1652 1696 fi 1653 1697 … … 1660 1704 echo "IGCM_sys_ncbo :" $@ 1661 1705 fi 1662 ncbo $@ 1663 if [ $? -gt 0 ] ; then 1664 echo "IGCM_sys_ncbo : erreur ${@}." 1665 IGCM_debug_Exit "ncbo" 1706 1707 typeset NB_ESSAI DELAI status i 1708 # number of tentative 1709 NB_ESSAI=3 1710 # time delay between tentative 1711 DELAI=2 1712 1713 i=0 1714 while [ $i -lt $NB_ESSAI ] ; do 1715 ncbo $@ > out_rsync 2>&1 1716 status=$? 1717 if [ ${status} -gt 0 ] ; then 1718 IGCM_debug_Print 2 "IGCM_sys_ncbo : error code ${status}" 1719 cat out_rsync 1720 \rm out_rsync 1721 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1722 else 1723 \rm out_rsync 1724 break 1725 fi 1726 (( i = i + 1 )) 1727 done 1728 1729 if [ ${status} -gt 0 ] ; then 1730 echo "IGCM_sys_ncbo : ncbo error" 1731 IGCM_debug_Exit "ncbo" 1666 1732 fi 1667 1733 … … 1674 1740 echo "IGCM_sys_ncdiff :" $@ 1675 1741 fi 1676 ncdiff $@ 1677 if [ $? -gt 0 ] ; then 1678 echo "IGCM_sys_ncdiff : erreur ${@}." 1679 IGCM_debug_Exit "ncdiff" 1742 1743 typeset NB_ESSAI DELAI status i 1744 # number of tentative 1745 NB_ESSAI=3 1746 # time delay between tentative 1747 DELAI=2 1748 1749 i=0 1750 while [ $i -lt $NB_ESSAI ] ; do 1751 ncdiff $@ > out_rsync 2>&1 1752 status=$? 1753 if [ ${status} -gt 0 ] ; then 1754 IGCM_debug_Print 2 "IGCM_sys_ncdiff : error code ${status}" 1755 cat out_rsync 1756 \rm out_rsync 1757 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1758 else 1759 \rm out_rsync 1760 break 1761 fi 1762 (( i = i + 1 )) 1763 done 1764 1765 if [ ${status} -gt 0 ] ; then 1766 echo "IGCM_sys_ncdiff : ncdiff error" 1767 IGCM_debug_Exit "ncdiff" 1680 1768 fi 1681 1769 … … 1688 1776 echo "IGCM_sys_ncea :" $@ 1689 1777 fi 1690 ncea $@ 1691 if [ $? -gt 0 ] ; then 1692 echo "IGCM_sys_ncea : erreur ${@}." 1693 IGCM_debug_Exit "ncea" 1778 1779 typeset NB_ESSAI DELAI status i 1780 # number of tentative 1781 NB_ESSAI=3 1782 # time delay between tentative 1783 DELAI=2 1784 1785 i=0 1786 while [ $i -lt $NB_ESSAI ] ; do 1787 ncea $@ > out_rsync 2>&1 1788 status=$? 1789 if [ ${status} -gt 0 ] ; then 1790 IGCM_debug_Print 2 "IGCM_sys_ncea : error code ${status}" 1791 cat out_rsync 1792 \rm out_rsync 1793 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1794 else 1795 \rm out_rsync 1796 break 1797 fi 1798 (( i = i + 1 )) 1799 done 1800 1801 if [ ${status} -gt 0 ] ; then 1802 echo "IGCM_sys_ncea : ncea error" 1803 IGCM_debug_Exit "ncea" 1694 1804 fi 1695 1805 … … 1702 1812 echo "IGCM_sys_ncecat :" $@ 1703 1813 fi 1704 ncecat $@ 1705 if [ $? -gt 0 ] ; then 1706 echo "IGCM_sys_ncecat : erreur ${@}." 1707 IGCM_debug_Exit "ncecat" 1814 1815 typeset NB_ESSAI DELAI status i 1816 # number of tentative 1817 NB_ESSAI=3 1818 # time delay between tentative 1819 DELAI=2 1820 1821 i=0 1822 while [ $i -lt $NB_ESSAI ] ; do 1823 ncecat $@ > out_rsync 2>&1 1824 status=$? 1825 if [ ${status} -gt 0 ] ; then 1826 IGCM_debug_Print 2 "IGCM_sys_ncecat : error code ${status}" 1827 cat out_rsync 1828 \rm out_rsync 1829 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1830 else 1831 \rm out_rsync 1832 break 1833 fi 1834 (( i = i + 1 )) 1835 done 1836 1837 if [ ${status} -gt 0 ] ; then 1838 echo "IGCM_sys_ncecat : ncecat error" 1839 IGCM_debug_Exit "ncecat" 1708 1840 fi 1709 1841 … … 1716 1848 echo "IGCM_sys_ncflint :" $@ 1717 1849 fi 1718 ncflint $@ 1719 if [ $? -gt 0 ] ; then 1720 echo "IGCM_sys_ncflint : erreur ${@}." 1721 IGCM_debug_Exit "ncflint" 1850 1851 typeset NB_ESSAI DELAI status i 1852 # number of tentative 1853 NB_ESSAI=3 1854 # time delay between tentative 1855 DELAI=2 1856 1857 i=0 1858 while [ $i -lt $NB_ESSAI ] ; do 1859 ncflint $@ > out_rsync 2>&1 1860 status=$? 1861 if [ ${status} -gt 0 ] ; then 1862 IGCM_debug_Print 2 "IGCM_sys_ncflint : error code ${status}" 1863 cat out_rsync 1864 \rm out_rsync 1865 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1866 else 1867 \rm out_rsync 1868 break 1869 fi 1870 (( i = i + 1 )) 1871 done 1872 1873 if [ ${status} -gt 0 ] ; then 1874 echo "IGCM_sys_ncflint : ncflint error" 1875 IGCM_debug_Exit "ncflint" 1722 1876 fi 1723 1877 … … 1730 1884 echo "IGCM_sys_ncks :" $@ 1731 1885 fi 1732 ncks $@ 1733 if [ $? -gt 0 ] ; then 1734 echo "IGCM_sys_ncks : erreur ${@}." 1735 IGCM_debug_Exit "ncks" 1886 1887 typeset NB_ESSAI DELAI status i 1888 # number of tentative 1889 NB_ESSAI=3 1890 # time delay between tentative 1891 DELAI=2 1892 1893 i=0 1894 while [ $i -lt $NB_ESSAI ] ; do 1895 ncks $@ > out_rsync 2>&1 1896 status=$? 1897 if [ ${status} -gt 0 ] ; then 1898 IGCM_debug_Print 2 "IGCM_sys_ncks : error code ${status}" 1899 cat out_rsync 1900 \rm out_rsync 1901 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1902 else 1903 \rm out_rsync 1904 break 1905 fi 1906 (( i = i + 1 )) 1907 done 1908 1909 if [ ${status} -gt 0 ] ; then 1910 echo "IGCM_sys_ncks : ncks error" 1911 IGCM_debug_Exit "ncks" 1736 1912 fi 1737 1913 … … 1744 1920 echo "IGCM_sys_ncpdq :" $@ 1745 1921 fi 1746 ncpdq $@ 1747 if [ $? -gt 0 ] ; then 1748 echo "IGCM_sys_ncpdq : erreur ${@}." 1749 IGCM_debug_Exit "ncpdq" 1922 1923 typeset NB_ESSAI DELAI status i 1924 # number of tentative 1925 NB_ESSAI=3 1926 # time delay between tentative 1927 DELAI=2 1928 1929 i=0 1930 while [ $i -lt $NB_ESSAI ] ; do 1931 ncpdq $@ > out_rsync 2>&1 1932 status=$? 1933 if [ ${status} -gt 0 ] ; then 1934 IGCM_debug_Print 2 "IGCM_sys_ncpdq : error code ${status}" 1935 cat out_rsync 1936 \rm out_rsync 1937 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1938 else 1939 \rm out_rsync 1940 break 1941 fi 1942 (( i = i + 1 )) 1943 done 1944 1945 if [ ${status} -gt 0 ] ; then 1946 echo "IGCM_sys_ncpdq : ncpdq error" 1947 IGCM_debug_Exit "ncpdq" 1750 1948 fi 1751 1949 … … 1758 1956 echo "IGCM_sys_ncra :" $@ 1759 1957 fi 1760 ncra $@ 1761 if [ $? -gt 0 ] ; then 1762 echo "IGCM_sys_ncra : erreur ${@}." 1763 IGCM_debug_Exit "ncra" 1958 1959 typeset NB_ESSAI DELAI status i 1960 # number of tentative 1961 NB_ESSAI=3 1962 # time delay between tentative 1963 DELAI=2 1964 1965 i=0 1966 while [ $i -lt $NB_ESSAI ] ; do 1967 ncra $@ > out_rsync 2>&1 1968 status=$? 1969 if [ ${status} -gt 0 ] ; then 1970 IGCM_debug_Print 2 "IGCM_sys_ncra : error code ${status}" 1971 cat out_rsync 1972 \rm out_rsync 1973 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1974 else 1975 \rm out_rsync 1976 break 1977 fi 1978 (( i = i + 1 )) 1979 done 1980 1981 if [ ${status} -gt 0 ] ; then 1982 echo "IGCM_sys_ncra : ncra error" 1983 IGCM_debug_Exit "ncra" 1764 1984 fi 1765 1985 … … 1772 1992 echo "IGCM_sys_ncrcat :" $@ 1773 1993 fi 1774 ncrcat $@ 1775 if [ $? -gt 0 ] ; then 1776 echo "IGCM_sys_ncrcat : erreur ${@}." 1777 # IGCM_debug_Exit "ncrcat" 1994 1995 typeset NB_ESSAI DELAI status i 1996 # number of tentative 1997 NB_ESSAI=3 1998 # time delay between tentative 1999 DELAI=2 2000 2001 i=0 2002 while [ $i -lt $NB_ESSAI ] ; do 2003 ncrcat $@ > out_rsync 2>&1 2004 status=$? 2005 if [ ${status} -gt 0 ] ; then 2006 IGCM_debug_Print 2 "IGCM_sys_ncrcat : error code ${status}" 2007 cat out_rsync 2008 \rm out_rsync 2009 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2010 else 2011 \rm out_rsync 2012 break 2013 fi 2014 (( i = i + 1 )) 2015 done 2016 2017 if [ ${status} -gt 0 ] ; then 2018 echo "IGCM_sys_ncrcat : ncrcat error" 2019 #IGCM_debug_Exit "ncrcat" 1778 2020 fi 1779 2021 … … 1786 2028 echo "IGCM_sys_ncrename :" $@ 1787 2029 fi 1788 ncrename $@ 1789 if [ $? -gt 0 ] ; then 1790 echo "IGCM_sys_ncrename : erreur ${@}." 1791 IGCM_debug_Exit "ncrename" 2030 2031 typeset NB_ESSAI DELAI status i 2032 # number of tentative 2033 NB_ESSAI=3 2034 # time delay between tentative 2035 DELAI=2 2036 2037 i=0 2038 while [ $i -lt $NB_ESSAI ] ; do 2039 ncrename $@ > out_rsync 2>&1 2040 status=$? 2041 if [ ${status} -gt 0 ] ; then 2042 IGCM_debug_Print 2 "IGCM_sys_ncrename : error code ${status}" 2043 cat out_rsync 2044 \rm out_rsync 2045 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2046 else 2047 \rm out_rsync 2048 break 2049 fi 2050 (( i = i + 1 )) 2051 done 2052 2053 if [ ${status} -gt 0 ] ; then 2054 echo "IGCM_sys_ncrename : ncrename error" 2055 IGCM_debug_Exit "ncrename" 1792 2056 fi 1793 2057 … … 1800 2064 echo "IGCM_sys_ncwa :" $@ 1801 2065 fi 1802 ncwa $@ 1803 if [ $? -gt 0 ] ; then 1804 echo "IGCM_sys_ncwa : erreur ${@}." 1805 IGCM_debug_Exit "ncwa" 2066 2067 typeset NB_ESSAI DELAI status i 2068 # number of tentative 2069 NB_ESSAI=3 2070 # time delay between tentative 2071 DELAI=2 2072 2073 i=0 2074 while [ $i -lt $NB_ESSAI ] ; do 2075 ncwa $@ > out_rsync 2>&1 2076 status=$? 2077 if [ ${status} -gt 0 ] ; then 2078 IGCM_debug_Print 2 "IGCM_sys_ncwa : error code ${status}" 2079 cat out_rsync 2080 \rm out_rsync 2081 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2082 else 2083 \rm out_rsync 2084 break 2085 fi 2086 (( i = i + 1 )) 2087 done 2088 2089 if [ ${status} -gt 0 ] ; then 2090 echo "IGCM_sys_ncwa : ncwa error" 2091 IGCM_debug_Exit "ncwa" 1806 2092 fi 1807 2093 … … 1817 2103 echo "IGCM_sys_cdo :" $@ 1818 2104 fi 1819 \cdo $@ 1820 if [ $? -gt 0 ] ; then 1821 echo "IGCM_sys_cdo : erreur ${@}." 2105 2106 typeset status 2107 2108 \cdo $@ > out_rsync 2>&1 2109 status=$? 2110 if [ ${status} -gt 0 ] ; then 2111 echo "IGCM_sys_cdo : error code ${status}" 2112 cat out_rsync 2113 \rm out_rsync 1822 2114 IGCM_debug_PopStack "IGCM_sys_cdo" 1823 2115 return 1 -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh
r704 r714 1721 1721 # NCO OPERATOR 1722 1722 1723 1723 1724 function IGCM_sys_ncap2 { 1724 1725 IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@ … … 1726 1727 echo "IGCM_sys_ncap2 :" $@ 1727 1728 fi 1728 /usr/local/bin/ncap2 "$@" 1729 if [ $? -gt 0 ] ; then 1730 echo "IGCM_sys_ncap2 : erreur ${@}." 1731 IGCM_debug_Exit "ncap2" 1729 1730 typeset NB_ESSAI DELAI status i 1731 # number of tentative 1732 NB_ESSAI=3 1733 # time delay between tentative 1734 DELAI=2 1735 1736 i=0 1737 while [ $i -lt $NB_ESSAI ] ; do 1738 ncap2 "$@" > out_rsync 2>&1 1739 status=$? 1740 if [ ${status} -gt 0 ] ; then 1741 IGCM_debug_Print 2 "IGCM_sys_ncap2 : error code ${status}" 1742 cat out_rsync 1743 \rm out_rsync 1744 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1745 else 1746 \rm out_rsync 1747 break 1748 fi 1749 (( i = i + 1 )) 1750 done 1751 1752 if [ ${status} -gt 0 ] ; then 1753 echo "IGCM_sys_ncap2 : ncap2 error" 1754 IGCM_debug_Exit "ncap2" 1732 1755 fi 1733 1756 … … 1740 1763 echo "IGCM_sys_ncatted :" $@ 1741 1764 fi 1742 /usr/local/bin/ncatted "$@" 1743 if [ $? -gt 0 ] ; then 1744 echo "IGCM_sys_ncatted : erreur ${@}." 1745 IGCM_debug_Exit "ncatted" 1765 1766 typeset NB_ESSAI DELAI status i 1767 # number of tentative 1768 NB_ESSAI=3 1769 # time delay between tentative 1770 DELAI=2 1771 1772 i=0 1773 while [ $i -lt $NB_ESSAI ] ; do 1774 ncatted "$@" > out_rsync 2>&1 1775 status=$? 1776 if [ ${status} -gt 0 ] ; then 1777 IGCM_debug_Print 2 "IGCM_sys_ncatted : error code ${status}" 1778 cat out_rsync 1779 \rm out_rsync 1780 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1781 else 1782 \rm out_rsync 1783 break 1784 fi 1785 (( i = i + 1 )) 1786 done 1787 1788 if [ ${status} -gt 0 ] ; then 1789 echo "IGCM_sys_ncatted : ncatted error" 1790 IGCM_debug_Exit "ncatted" 1746 1791 fi 1747 1792 … … 1754 1799 echo "IGCM_sys_ncbo :" $@ 1755 1800 fi 1756 /usr/local/bin/ncbo $@ 1757 if [ $? -gt 0 ] ; then 1758 echo "IGCM_sys_ncbo : erreur ${@}." 1759 IGCM_debug_Exit "ncbo" 1801 1802 typeset NB_ESSAI DELAI status i 1803 # number of tentative 1804 NB_ESSAI=3 1805 # time delay between tentative 1806 DELAI=2 1807 1808 i=0 1809 while [ $i -lt $NB_ESSAI ] ; do 1810 ncbo $@ > out_rsync 2>&1 1811 status=$? 1812 if [ ${status} -gt 0 ] ; then 1813 IGCM_debug_Print 2 "IGCM_sys_ncbo : error code ${status}" 1814 cat out_rsync 1815 \rm out_rsync 1816 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1817 else 1818 \rm out_rsync 1819 break 1820 fi 1821 (( i = i + 1 )) 1822 done 1823 1824 if [ ${status} -gt 0 ] ; then 1825 echo "IGCM_sys_ncbo : ncbo error" 1826 IGCM_debug_Exit "ncbo" 1760 1827 fi 1761 1828 … … 1768 1835 echo "IGCM_sys_ncdiff :" $@ 1769 1836 fi 1770 /usr/local/bin/ncdiff $@ 1771 if [ $? -gt 0 ] ; then 1772 echo "IGCM_sys_ncdiff : erreur ${@}." 1773 IGCM_debug_Exit "ncdiff" 1837 1838 typeset NB_ESSAI DELAI status i 1839 # number of tentative 1840 NB_ESSAI=3 1841 # time delay between tentative 1842 DELAI=2 1843 1844 i=0 1845 while [ $i -lt $NB_ESSAI ] ; do 1846 ncdiff $@ > out_rsync 2>&1 1847 status=$? 1848 if [ ${status} -gt 0 ] ; then 1849 IGCM_debug_Print 2 "IGCM_sys_ncdiff : error code ${status}" 1850 cat out_rsync 1851 \rm out_rsync 1852 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1853 else 1854 \rm out_rsync 1855 break 1856 fi 1857 (( i = i + 1 )) 1858 done 1859 1860 if [ ${status} -gt 0 ] ; then 1861 echo "IGCM_sys_ncdiff : ncdiff error" 1862 IGCM_debug_Exit "ncdiff" 1774 1863 fi 1775 1864 … … 1782 1871 echo "IGCM_sys_ncea :" $@ 1783 1872 fi 1784 /usr/local/bin/ncea $@ 1785 if [ $? -gt 0 ] ; then 1786 echo "IGCM_sys_ncea : erreur ${@}." 1787 IGCM_debug_Exit "ncea" 1873 1874 typeset NB_ESSAI DELAI status i 1875 # number of tentative 1876 NB_ESSAI=3 1877 # time delay between tentative 1878 DELAI=2 1879 1880 i=0 1881 while [ $i -lt $NB_ESSAI ] ; do 1882 ncea $@ > out_rsync 2>&1 1883 status=$? 1884 if [ ${status} -gt 0 ] ; then 1885 IGCM_debug_Print 2 "IGCM_sys_ncea : error code ${status}" 1886 cat out_rsync 1887 \rm out_rsync 1888 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1889 else 1890 \rm out_rsync 1891 break 1892 fi 1893 (( i = i + 1 )) 1894 done 1895 1896 if [ ${status} -gt 0 ] ; then 1897 echo "IGCM_sys_ncea : ncea error" 1898 IGCM_debug_Exit "ncea" 1788 1899 fi 1789 1900 … … 1796 1907 echo "IGCM_sys_ncecat :" $@ 1797 1908 fi 1798 /usr/local/bin/ncecat $@ 1799 if [ $? -gt 0 ] ; then 1800 echo "IGCM_sys_ncecat : erreur ${@}." 1801 IGCM_debug_Exit "ncecat" 1909 1910 typeset NB_ESSAI DELAI status i 1911 # number of tentative 1912 NB_ESSAI=3 1913 # time delay between tentative 1914 DELAI=2 1915 1916 i=0 1917 while [ $i -lt $NB_ESSAI ] ; do 1918 ncecat $@ > out_rsync 2>&1 1919 status=$? 1920 if [ ${status} -gt 0 ] ; then 1921 IGCM_debug_Print 2 "IGCM_sys_ncecat : error code ${status}" 1922 cat out_rsync 1923 \rm out_rsync 1924 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1925 else 1926 \rm out_rsync 1927 break 1928 fi 1929 (( i = i + 1 )) 1930 done 1931 1932 if [ ${status} -gt 0 ] ; then 1933 echo "IGCM_sys_ncecat : ncecat error" 1934 IGCM_debug_Exit "ncecat" 1802 1935 fi 1803 1936 … … 1810 1943 echo "IGCM_sys_ncflint :" $@ 1811 1944 fi 1812 /usr/local/bin/ncflint $@ 1813 if [ $? -gt 0 ] ; then 1814 echo "IGCM_sys_ncflint : erreur ${@}." 1815 IGCM_debug_Exit "ncflint" 1945 1946 typeset NB_ESSAI DELAI status i 1947 # number of tentative 1948 NB_ESSAI=3 1949 # time delay between tentative 1950 DELAI=2 1951 1952 i=0 1953 while [ $i -lt $NB_ESSAI ] ; do 1954 ncflint $@ > out_rsync 2>&1 1955 status=$? 1956 if [ ${status} -gt 0 ] ; then 1957 IGCM_debug_Print 2 "IGCM_sys_ncflint : error code ${status}" 1958 cat out_rsync 1959 \rm out_rsync 1960 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1961 else 1962 \rm out_rsync 1963 break 1964 fi 1965 (( i = i + 1 )) 1966 done 1967 1968 if [ ${status} -gt 0 ] ; then 1969 echo "IGCM_sys_ncflint : ncflint error" 1970 IGCM_debug_Exit "ncflint" 1816 1971 fi 1817 1972 … … 1824 1979 echo "IGCM_sys_ncks :" $@ 1825 1980 fi 1826 /usr/local/bin/ncks $@ 1827 if [ $? -gt 0 ] ; then 1828 echo "IGCM_sys_ncks : erreur ${@}." 1829 IGCM_debug_Exit "ncks" 1981 1982 typeset NB_ESSAI DELAI status i 1983 # number of tentative 1984 NB_ESSAI=3 1985 # time delay between tentative 1986 DELAI=2 1987 1988 i=0 1989 while [ $i -lt $NB_ESSAI ] ; do 1990 ncks $@ > out_rsync 2>&1 1991 status=$? 1992 if [ ${status} -gt 0 ] ; then 1993 IGCM_debug_Print 2 "IGCM_sys_ncks : error code ${status}" 1994 cat out_rsync 1995 \rm out_rsync 1996 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1997 else 1998 \rm out_rsync 1999 break 2000 fi 2001 (( i = i + 1 )) 2002 done 2003 2004 if [ ${status} -gt 0 ] ; then 2005 echo "IGCM_sys_ncks : ncks error" 2006 IGCM_debug_Exit "ncks" 1830 2007 fi 1831 2008 … … 1838 2015 echo "IGCM_sys_ncpdq :" $@ 1839 2016 fi 1840 /usr/local/bin/ncpdq $@ 1841 if [ $? -gt 0 ] ; then 1842 echo "IGCM_sys_ncpdq : erreur ${@}." 1843 IGCM_debug_Exit "ncpdq" 2017 2018 typeset NB_ESSAI DELAI status i 2019 # number of tentative 2020 NB_ESSAI=3 2021 # time delay between tentative 2022 DELAI=2 2023 2024 i=0 2025 while [ $i -lt $NB_ESSAI ] ; do 2026 ncpdq $@ > out_rsync 2>&1 2027 status=$? 2028 if [ ${status} -gt 0 ] ; then 2029 IGCM_debug_Print 2 "IGCM_sys_ncpdq : error code ${status}" 2030 cat out_rsync 2031 \rm out_rsync 2032 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2033 else 2034 \rm out_rsync 2035 break 2036 fi 2037 (( i = i + 1 )) 2038 done 2039 2040 if [ ${status} -gt 0 ] ; then 2041 echo "IGCM_sys_ncpdq : ncpdq error" 2042 IGCM_debug_Exit "ncpdq" 1844 2043 fi 1845 2044 … … 1852 2051 echo "IGCM_sys_ncra :" $@ 1853 2052 fi 1854 /usr/local/bin/ncra $@ 1855 if [ $? -gt 0 ] ; then 1856 echo "IGCM_sys_ncra : erreur ${@}." 1857 IGCM_debug_Exit "ncra" 2053 2054 typeset NB_ESSAI DELAI status i 2055 # number of tentative 2056 NB_ESSAI=3 2057 # time delay between tentative 2058 DELAI=2 2059 2060 i=0 2061 while [ $i -lt $NB_ESSAI ] ; do 2062 ncra $@ > out_rsync 2>&1 2063 status=$? 2064 if [ ${status} -gt 0 ] ; then 2065 IGCM_debug_Print 2 "IGCM_sys_ncra : error code ${status}" 2066 cat out_rsync 2067 \rm out_rsync 2068 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2069 else 2070 \rm out_rsync 2071 break 2072 fi 2073 (( i = i + 1 )) 2074 done 2075 2076 if [ ${status} -gt 0 ] ; then 2077 echo "IGCM_sys_ncra : ncra error" 2078 IGCM_debug_Exit "ncra" 1858 2079 fi 1859 2080 … … 1866 2087 echo "IGCM_sys_ncrcat :" $@ 1867 2088 fi 1868 /usr/local/bin/ncrcat $@ 1869 if [ $? -gt 0 ] ; then 1870 echo "IGCM_sys_ncrcat : erreur ${@}." 1871 # IGCM_debug_Exit "ncrcat" 2089 2090 typeset NB_ESSAI DELAI status i 2091 # number of tentative 2092 NB_ESSAI=3 2093 # time delay between tentative 2094 DELAI=2 2095 2096 i=0 2097 while [ $i -lt $NB_ESSAI ] ; do 2098 ncrcat $@ > out_rsync 2>&1 2099 status=$? 2100 if [ ${status} -gt 0 ] ; then 2101 IGCM_debug_Print 2 "IGCM_sys_ncrcat : error code ${status}" 2102 cat out_rsync 2103 \rm out_rsync 2104 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2105 else 2106 \rm out_rsync 2107 break 2108 fi 2109 (( i = i + 1 )) 2110 done 2111 2112 if [ ${status} -gt 0 ] ; then 2113 echo "IGCM_sys_ncrcat : ncrcat error" 2114 #IGCM_debug_Exit "ncrcat" 1872 2115 fi 1873 2116 … … 1880 2123 echo "IGCM_sys_ncrename :" $@ 1881 2124 fi 1882 /usr/local/bin/ncrename $@ 1883 if [ $? -gt 0 ] ; then 1884 echo "IGCM_sys_ncrename : erreur ${@}." 1885 IGCM_debug_Exit "ncrename" 2125 2126 typeset NB_ESSAI DELAI status i 2127 # number of tentative 2128 NB_ESSAI=3 2129 # time delay between tentative 2130 DELAI=2 2131 2132 i=0 2133 while [ $i -lt $NB_ESSAI ] ; do 2134 ncrename $@ > out_rsync 2>&1 2135 status=$? 2136 if [ ${status} -gt 0 ] ; then 2137 IGCM_debug_Print 2 "IGCM_sys_ncrename : error code ${status}" 2138 cat out_rsync 2139 \rm out_rsync 2140 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2141 else 2142 \rm out_rsync 2143 break 2144 fi 2145 (( i = i + 1 )) 2146 done 2147 2148 if [ ${status} -gt 0 ] ; then 2149 echo "IGCM_sys_ncrename : ncrename error" 2150 IGCM_debug_Exit "ncrename" 1886 2151 fi 1887 2152 … … 1894 2159 echo "IGCM_sys_ncwa :" $@ 1895 2160 fi 1896 /usr/local/bin/ncwa $@ 1897 if [ $? -gt 0 ] ; then 1898 echo "IGCM_sys_ncwa : erreur ${@}." 1899 IGCM_debug_Exit "ncwa" 2161 2162 typeset NB_ESSAI DELAI status i 2163 # number of tentative 2164 NB_ESSAI=3 2165 # time delay between tentative 2166 DELAI=2 2167 2168 i=0 2169 while [ $i -lt $NB_ESSAI ] ; do 2170 ncwa $@ > out_rsync 2>&1 2171 status=$? 2172 if [ ${status} -gt 0 ] ; then 2173 IGCM_debug_Print 2 "IGCM_sys_ncwa : error code ${status}" 2174 cat out_rsync 2175 \rm out_rsync 2176 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2177 else 2178 \rm out_rsync 2179 break 2180 fi 2181 (( i = i + 1 )) 2182 done 2183 2184 if [ ${status} -gt 0 ] ; then 2185 echo "IGCM_sys_ncwa : ncwa error" 2186 IGCM_debug_Exit "ncwa" 1900 2187 fi 1901 2188 … … 1908 2195 function IGCM_sys_cdo { 1909 2196 IGCM_debug_PushStack "IGCM_sys_cdo" -- $@ 1910 1911 \cdo $@ 1912 if [ $? -gt 0 ] ; then 1913 echo "IGCM_sys_cdo : erreur ${@}." 2197 if ( $DEBUG_sys ) ; then 2198 echo "IGCM_sys_cdo :" $@ 2199 fi 2200 2201 typeset status 2202 2203 \cdo $@ > out_rsync 2>&1 2204 status=$? 2205 if [ ${status} -gt 0 ] ; then 2206 echo "IGCM_sys_cdo : error code ${status}" 2207 cat out_rsync 2208 \rm out_rsync 1914 2209 IGCM_debug_PopStack "IGCM_sys_cdo" 1915 2210 return 1 -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh
r713 r714 2270 2270 echo "IGCM_sys_ncap2 :" $@ 2271 2271 fi 2272 ncap2 "$@" 2273 if [ $? -gt 0 ] ; then 2274 echo "IGCM_sys_ncap2 : erreur ${@}." 2275 IGCM_debug_Exit "ncap2" 2272 2273 typeset NB_ESSAI DELAI status i 2274 # number of tentative 2275 NB_ESSAI=3 2276 # time delay between tentative 2277 DELAI=2 2278 2279 i=0 2280 while [ $i -lt $NB_ESSAI ] ; do 2281 ncap2 "$@" > out_rsync 2>&1 2282 status=$? 2283 if [ ${status} -gt 0 ] ; then 2284 IGCM_debug_Print 2 "IGCM_sys_ncap2 : error code ${status}" 2285 cat out_rsync 2286 \rm out_rsync 2287 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2288 else 2289 \rm out_rsync 2290 break 2291 fi 2292 (( i = i + 1 )) 2293 done 2294 2295 if [ ${status} -gt 0 ] ; then 2296 echo "IGCM_sys_ncap2 : ncap2 error" 2297 IGCM_debug_Exit "ncap2" 2276 2298 fi 2277 2299 … … 2284 2306 echo "IGCM_sys_ncatted :" $@ 2285 2307 fi 2286 ncatted "$@" 2287 if [ $? -gt 0 ] ; then 2288 echo "IGCM_sys_ncatted : erreur ${@}." 2289 IGCM_debug_Exit "ncatted" 2308 2309 typeset NB_ESSAI DELAI status i 2310 # number of tentative 2311 NB_ESSAI=3 2312 # time delay between tentative 2313 DELAI=2 2314 2315 i=0 2316 while [ $i -lt $NB_ESSAI ] ; do 2317 ncatted "$@" > out_rsync 2>&1 2318 status=$? 2319 if [ ${status} -gt 0 ] ; then 2320 IGCM_debug_Print 2 "IGCM_sys_ncatted : error code ${status}" 2321 cat out_rsync 2322 \rm out_rsync 2323 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2324 else 2325 \rm out_rsync 2326 break 2327 fi 2328 (( i = i + 1 )) 2329 done 2330 2331 if [ ${status} -gt 0 ] ; then 2332 echo "IGCM_sys_ncatted : ncatted error" 2333 IGCM_debug_Exit "ncatted" 2290 2334 fi 2291 2335 … … 2298 2342 echo "IGCM_sys_ncbo :" $@ 2299 2343 fi 2300 ncbo $@ 2301 if [ $? -gt 0 ] ; then 2302 echo "IGCM_sys_ncbo : erreur ${@}." 2303 IGCM_debug_Exit "ncbo" 2344 2345 typeset NB_ESSAI DELAI status i 2346 # number of tentative 2347 NB_ESSAI=3 2348 # time delay between tentative 2349 DELAI=2 2350 2351 i=0 2352 while [ $i -lt $NB_ESSAI ] ; do 2353 ncbo $@ > out_rsync 2>&1 2354 status=$? 2355 if [ ${status} -gt 0 ] ; then 2356 IGCM_debug_Print 2 "IGCM_sys_ncbo : error code ${status}" 2357 cat out_rsync 2358 \rm out_rsync 2359 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2360 else 2361 \rm out_rsync 2362 break 2363 fi 2364 (( i = i + 1 )) 2365 done 2366 2367 if [ ${status} -gt 0 ] ; then 2368 echo "IGCM_sys_ncbo : ncbo error" 2369 IGCM_debug_Exit "ncbo" 2304 2370 fi 2305 2371 … … 2312 2378 echo "IGCM_sys_ncdiff :" $@ 2313 2379 fi 2314 ncdiff $@ 2315 if [ $? -gt 0 ] ; then 2316 echo "IGCM_sys_ncdiff : erreur ${@}." 2317 IGCM_debug_Exit "ncdiff" 2380 2381 typeset NB_ESSAI DELAI status i 2382 # number of tentative 2383 NB_ESSAI=3 2384 # time delay between tentative 2385 DELAI=2 2386 2387 i=0 2388 while [ $i -lt $NB_ESSAI ] ; do 2389 ncdiff $@ > out_rsync 2>&1 2390 status=$? 2391 if [ ${status} -gt 0 ] ; then 2392 IGCM_debug_Print 2 "IGCM_sys_ncdiff : error code ${status}" 2393 cat out_rsync 2394 \rm out_rsync 2395 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2396 else 2397 \rm out_rsync 2398 break 2399 fi 2400 (( i = i + 1 )) 2401 done 2402 2403 if [ ${status} -gt 0 ] ; then 2404 echo "IGCM_sys_ncdiff : ncdiff error" 2405 IGCM_debug_Exit "ncdiff" 2318 2406 fi 2319 2407 … … 2326 2414 echo "IGCM_sys_ncea :" $@ 2327 2415 fi 2328 ncea $@ 2329 if [ $? -gt 0 ] ; then 2330 echo "IGCM_sys_ncea : erreur ${@}." 2331 IGCM_debug_Exit "ncea" 2416 2417 typeset NB_ESSAI DELAI status i 2418 # number of tentative 2419 NB_ESSAI=3 2420 # time delay between tentative 2421 DELAI=2 2422 2423 i=0 2424 while [ $i -lt $NB_ESSAI ] ; do 2425 ncea $@ > out_rsync 2>&1 2426 status=$? 2427 if [ ${status} -gt 0 ] ; then 2428 IGCM_debug_Print 2 "IGCM_sys_ncea : error code ${status}" 2429 cat out_rsync 2430 \rm out_rsync 2431 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2432 else 2433 \rm out_rsync 2434 break 2435 fi 2436 (( i = i + 1 )) 2437 done 2438 2439 if [ ${status} -gt 0 ] ; then 2440 echo "IGCM_sys_ncea : ncea error" 2441 IGCM_debug_Exit "ncea" 2332 2442 fi 2333 2443 … … 2340 2450 echo "IGCM_sys_ncecat :" $@ 2341 2451 fi 2342 ncecat $@ 2343 if [ $? -gt 0 ] ; then 2344 echo "IGCM_sys_ncecat : erreur ${@}." 2345 IGCM_debug_Exit "ncecat" 2452 2453 typeset NB_ESSAI DELAI status i 2454 # number of tentative 2455 NB_ESSAI=3 2456 # time delay between tentative 2457 DELAI=2 2458 2459 i=0 2460 while [ $i -lt $NB_ESSAI ] ; do 2461 ncecat $@ > out_rsync 2>&1 2462 status=$? 2463 if [ ${status} -gt 0 ] ; then 2464 IGCM_debug_Print 2 "IGCM_sys_ncecat : error code ${status}" 2465 cat out_rsync 2466 \rm out_rsync 2467 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2468 else 2469 \rm out_rsync 2470 break 2471 fi 2472 (( i = i + 1 )) 2473 done 2474 2475 if [ ${status} -gt 0 ] ; then 2476 echo "IGCM_sys_ncecat : ncecat error" 2477 IGCM_debug_Exit "ncecat" 2346 2478 fi 2347 2479 … … 2354 2486 echo "IGCM_sys_ncflint :" $@ 2355 2487 fi 2356 ncflint $@ 2357 if [ $? -gt 0 ] ; then 2358 echo "IGCM_sys_ncflint : erreur ${@}." 2359 IGCM_debug_Exit "ncflint" 2488 2489 typeset NB_ESSAI DELAI status i 2490 # number of tentative 2491 NB_ESSAI=3 2492 # time delay between tentative 2493 DELAI=2 2494 2495 i=0 2496 while [ $i -lt $NB_ESSAI ] ; do 2497 ncflint $@ > out_rsync 2>&1 2498 status=$? 2499 if [ ${status} -gt 0 ] ; then 2500 IGCM_debug_Print 2 "IGCM_sys_ncflint : error code ${status}" 2501 cat out_rsync 2502 \rm out_rsync 2503 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2504 else 2505 \rm out_rsync 2506 break 2507 fi 2508 (( i = i + 1 )) 2509 done 2510 2511 if [ ${status} -gt 0 ] ; then 2512 echo "IGCM_sys_ncflint : ncflint error" 2513 IGCM_debug_Exit "ncflint" 2360 2514 fi 2361 2515 … … 2368 2522 echo "IGCM_sys_ncks :" $@ 2369 2523 fi 2370 ncks $@ 2371 if [ $? -gt 0 ] ; then 2372 echo "IGCM_sys_ncks : erreur ${@}." 2373 IGCM_debug_Exit "ncks" 2524 2525 typeset NB_ESSAI DELAI status i 2526 # number of tentative 2527 NB_ESSAI=3 2528 # time delay between tentative 2529 DELAI=2 2530 2531 i=0 2532 while [ $i -lt $NB_ESSAI ] ; do 2533 ncks $@ > out_rsync 2>&1 2534 status=$? 2535 if [ ${status} -gt 0 ] ; then 2536 IGCM_debug_Print 2 "IGCM_sys_ncks : error code ${status}" 2537 cat out_rsync 2538 \rm out_rsync 2539 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2540 else 2541 \rm out_rsync 2542 break 2543 fi 2544 (( i = i + 1 )) 2545 done 2546 2547 if [ ${status} -gt 0 ] ; then 2548 echo "IGCM_sys_ncks : ncks error" 2549 IGCM_debug_Exit "ncks" 2374 2550 fi 2375 2551 … … 2382 2558 echo "IGCM_sys_ncpdq :" $@ 2383 2559 fi 2384 ncpdq $@ 2385 if [ $? -gt 0 ] ; then 2386 echo "IGCM_sys_ncpdq : erreur ${@}." 2387 IGCM_debug_Exit "ncpdq" 2560 2561 typeset NB_ESSAI DELAI status i 2562 # number of tentative 2563 NB_ESSAI=3 2564 # time delay between tentative 2565 DELAI=2 2566 2567 i=0 2568 while [ $i -lt $NB_ESSAI ] ; do 2569 ncpdq $@ > out_rsync 2>&1 2570 status=$? 2571 if [ ${status} -gt 0 ] ; then 2572 IGCM_debug_Print 2 "IGCM_sys_ncpdq : error code ${status}" 2573 cat out_rsync 2574 \rm out_rsync 2575 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2576 else 2577 \rm out_rsync 2578 break 2579 fi 2580 (( i = i + 1 )) 2581 done 2582 2583 if [ ${status} -gt 0 ] ; then 2584 echo "IGCM_sys_ncpdq : ncpdq error" 2585 IGCM_debug_Exit "ncpdq" 2388 2586 fi 2389 2587 … … 2396 2594 echo "IGCM_sys_ncra :" $@ 2397 2595 fi 2398 ncra $@ 2399 if [ $? -gt 0 ] ; then 2400 echo "IGCM_sys_ncra : erreur ${@}." 2401 IGCM_debug_Exit "ncra" 2596 2597 typeset NB_ESSAI DELAI status i 2598 # number of tentative 2599 NB_ESSAI=3 2600 # time delay between tentative 2601 DELAI=2 2602 2603 i=0 2604 while [ $i -lt $NB_ESSAI ] ; do 2605 ncra $@ > out_rsync 2>&1 2606 status=$? 2607 if [ ${status} -gt 0 ] ; then 2608 IGCM_debug_Print 2 "IGCM_sys_ncra : error code ${status}" 2609 cat out_rsync 2610 \rm out_rsync 2611 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2612 else 2613 \rm out_rsync 2614 break 2615 fi 2616 (( i = i + 1 )) 2617 done 2618 2619 if [ ${status} -gt 0 ] ; then 2620 echo "IGCM_sys_ncra : ncra error" 2621 IGCM_debug_Exit "ncra" 2402 2622 fi 2403 2623 … … 2410 2630 echo "IGCM_sys_ncrcat :" $@ 2411 2631 fi 2412 ncrcat --omp_num_threads 2 $@ 2413 if [ $? -gt 0 ] ; then 2414 echo "IGCM_sys_ncrcat : erreur ${@}." 2415 # IGCM_debug_Exit "ncrcat" 2632 2633 typeset NB_ESSAI DELAI status i 2634 # number of tentative 2635 NB_ESSAI=3 2636 # time delay between tentative 2637 DELAI=2 2638 2639 i=0 2640 while [ $i -lt $NB_ESSAI ] ; do 2641 ncrcat $@ > out_rsync 2>&1 2642 status=$? 2643 if [ ${status} -gt 0 ] ; then 2644 IGCM_debug_Print 2 "IGCM_sys_ncrcat : error code ${status}" 2645 cat out_rsync 2646 \rm out_rsync 2647 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2648 else 2649 \rm out_rsync 2650 break 2651 fi 2652 (( i = i + 1 )) 2653 done 2654 2655 if [ ${status} -gt 0 ] ; then 2656 echo "IGCM_sys_ncrcat : ncrcat error" 2657 #IGCM_debug_Exit "ncrcat" 2416 2658 fi 2417 2659 … … 2424 2666 echo "IGCM_sys_ncrename :" $@ 2425 2667 fi 2426 ncrename $@ 2427 if [ $? -gt 0 ] ; then 2428 echo "IGCM_sys_ncrename : erreur ${@}." 2429 IGCM_debug_Exit "ncrename" 2668 2669 typeset NB_ESSAI DELAI status i 2670 # number of tentative 2671 NB_ESSAI=3 2672 # time delay between tentative 2673 DELAI=2 2674 2675 i=0 2676 while [ $i -lt $NB_ESSAI ] ; do 2677 ncrename $@ > out_rsync 2>&1 2678 status=$? 2679 if [ ${status} -gt 0 ] ; then 2680 IGCM_debug_Print 2 "IGCM_sys_ncrename : error code ${status}" 2681 cat out_rsync 2682 \rm out_rsync 2683 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2684 else 2685 \rm out_rsync 2686 break 2687 fi 2688 (( i = i + 1 )) 2689 done 2690 2691 if [ ${status} -gt 0 ] ; then 2692 echo "IGCM_sys_ncrename : ncrename error" 2693 IGCM_debug_Exit "ncrename" 2430 2694 fi 2431 2695 … … 2438 2702 echo "IGCM_sys_ncwa :" $@ 2439 2703 fi 2440 ncwa $@ 2441 if [ $? -gt 0 ] ; then 2442 echo "IGCM_sys_ncwa : erreur ${@}." 2443 IGCM_debug_Exit "ncwa" 2704 2705 typeset NB_ESSAI DELAI status i 2706 # number of tentative 2707 NB_ESSAI=3 2708 # time delay between tentative 2709 DELAI=2 2710 2711 i=0 2712 while [ $i -lt $NB_ESSAI ] ; do 2713 ncwa $@ > out_rsync 2>&1 2714 status=$? 2715 if [ ${status} -gt 0 ] ; then 2716 IGCM_debug_Print 2 "IGCM_sys_ncwa : error code ${status}" 2717 cat out_rsync 2718 \rm out_rsync 2719 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2720 else 2721 \rm out_rsync 2722 break 2723 fi 2724 (( i = i + 1 )) 2725 done 2726 2727 if [ ${status} -gt 0 ] ; then 2728 echo "IGCM_sys_ncwa : ncwa error" 2729 IGCM_debug_Exit "ncwa" 2444 2730 fi 2445 2731 … … 2455 2741 echo "IGCM_sys_cdo :" $@ 2456 2742 fi 2457 \cdo $@ 2458 if [ $? -gt 0 ] ; then 2459 echo "IGCM_sys_cdo : erreur ${@}." 2743 2744 typeset status 2745 2746 \cdo $@ > out_rsync 2>&1 2747 status=$? 2748 if [ ${status} -gt 0 ] ; then 2749 echo "IGCM_sys_cdo : error code ${status}" 2750 cat out_rsync 2751 \rm out_rsync 2460 2752 IGCM_debug_PopStack "IGCM_sys_cdo" 2461 2753 return 1 -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_ulam.ksh
r697 r714 1141 1141 echo "IGCM_sys_ncap2 :" $@ 1142 1142 fi 1143 ncap2 "$@" 1144 if [ $? -gt 0 ] ; then 1145 echo "IGCM_sys_ncap2 : erreur ${@}." 1146 IGCM_debug_Exit "ncap2" 1143 1144 typeset NB_ESSAI DELAI status i 1145 # number of tentative 1146 NB_ESSAI=3 1147 # time delay between tentative 1148 DELAI=2 1149 1150 i=0 1151 while [ $i -lt $NB_ESSAI ] ; do 1152 ncap2 "$@" > out_rsync 2>&1 1153 status=$? 1154 if [ ${status} -gt 0 ] ; then 1155 IGCM_debug_Print 2 "IGCM_sys_ncap2 : error code ${status}" 1156 cat out_rsync 1157 \rm out_rsync 1158 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1159 else 1160 \rm out_rsync 1161 break 1162 fi 1163 (( i = i + 1 )) 1164 done 1165 1166 if [ ${status} -gt 0 ] ; then 1167 echo "IGCM_sys_ncap2 : ncap2 error" 1168 IGCM_debug_Exit "ncap2" 1147 1169 fi 1148 1170 … … 1155 1177 echo "IGCM_sys_ncatted :" $@ 1156 1178 fi 1157 ncatted "$@" 1158 if [ $? -gt 0 ] ; then 1159 echo "IGCM_sys_ncatted : erreur ${@}." 1160 IGCM_debug_Exit "ncatted" 1179 1180 typeset NB_ESSAI DELAI status i 1181 # number of tentative 1182 NB_ESSAI=3 1183 # time delay between tentative 1184 DELAI=2 1185 1186 i=0 1187 while [ $i -lt $NB_ESSAI ] ; do 1188 ncatted "$@" > out_rsync 2>&1 1189 status=$? 1190 if [ ${status} -gt 0 ] ; then 1191 IGCM_debug_Print 2 "IGCM_sys_ncatted : error code ${status}" 1192 cat out_rsync 1193 \rm out_rsync 1194 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1195 else 1196 \rm out_rsync 1197 break 1198 fi 1199 (( i = i + 1 )) 1200 done 1201 1202 if [ ${status} -gt 0 ] ; then 1203 echo "IGCM_sys_ncatted : ncatted error" 1204 IGCM_debug_Exit "ncatted" 1161 1205 fi 1162 1206 … … 1169 1213 echo "IGCM_sys_ncbo :" $@ 1170 1214 fi 1171 ncbo $@ 1172 if [ $? -gt 0 ] ; then 1173 echo "IGCM_sys_ncbo : erreur ${@}." 1174 IGCM_debug_Exit "ncbo" 1215 1216 typeset NB_ESSAI DELAI status i 1217 # number of tentative 1218 NB_ESSAI=3 1219 # time delay between tentative 1220 DELAI=2 1221 1222 i=0 1223 while [ $i -lt $NB_ESSAI ] ; do 1224 ncbo $@ > out_rsync 2>&1 1225 status=$? 1226 if [ ${status} -gt 0 ] ; then 1227 IGCM_debug_Print 2 "IGCM_sys_ncbo : error code ${status}" 1228 cat out_rsync 1229 \rm out_rsync 1230 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1231 else 1232 \rm out_rsync 1233 break 1234 fi 1235 (( i = i + 1 )) 1236 done 1237 1238 if [ ${status} -gt 0 ] ; then 1239 echo "IGCM_sys_ncbo : ncbo error" 1240 IGCM_debug_Exit "ncbo" 1175 1241 fi 1176 1242 … … 1183 1249 echo "IGCM_sys_ncdiff :" $@ 1184 1250 fi 1185 ncdiff $@ 1186 if [ $? -gt 0 ] ; then 1187 echo "IGCM_sys_ncdiff : erreur ${@}." 1188 IGCM_debug_Exit "ncdiff" 1251 1252 typeset NB_ESSAI DELAI status i 1253 # number of tentative 1254 NB_ESSAI=3 1255 # time delay between tentative 1256 DELAI=2 1257 1258 i=0 1259 while [ $i -lt $NB_ESSAI ] ; do 1260 ncdiff $@ > out_rsync 2>&1 1261 status=$? 1262 if [ ${status} -gt 0 ] ; then 1263 IGCM_debug_Print 2 "IGCM_sys_ncdiff : error code ${status}" 1264 cat out_rsync 1265 \rm out_rsync 1266 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1267 else 1268 \rm out_rsync 1269 break 1270 fi 1271 (( i = i + 1 )) 1272 done 1273 1274 if [ ${status} -gt 0 ] ; then 1275 echo "IGCM_sys_ncdiff : ncdiff error" 1276 IGCM_debug_Exit "ncdiff" 1189 1277 fi 1190 1278 … … 1197 1285 echo "IGCM_sys_ncea :" $@ 1198 1286 fi 1199 ncea $@ 1200 if [ $? -gt 0 ] ; then 1201 echo "IGCM_sys_ncea : erreur ${@}." 1202 IGCM_debug_Exit "ncea" 1287 1288 typeset NB_ESSAI DELAI status i 1289 # number of tentative 1290 NB_ESSAI=3 1291 # time delay between tentative 1292 DELAI=2 1293 1294 i=0 1295 while [ $i -lt $NB_ESSAI ] ; do 1296 ncea $@ > out_rsync 2>&1 1297 status=$? 1298 if [ ${status} -gt 0 ] ; then 1299 IGCM_debug_Print 2 "IGCM_sys_ncea : error code ${status}" 1300 cat out_rsync 1301 \rm out_rsync 1302 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1303 else 1304 \rm out_rsync 1305 break 1306 fi 1307 (( i = i + 1 )) 1308 done 1309 1310 if [ ${status} -gt 0 ] ; then 1311 echo "IGCM_sys_ncea : ncea error" 1312 IGCM_debug_Exit "ncea" 1203 1313 fi 1204 1314 … … 1211 1321 echo "IGCM_sys_ncecat :" $@ 1212 1322 fi 1213 ncecat $@ 1214 if [ $? -gt 0 ] ; then 1215 echo "IGCM_sys_ncecat : erreur ${@}." 1216 IGCM_debug_Exit "ncecat" 1323 1324 typeset NB_ESSAI DELAI status i 1325 # number of tentative 1326 NB_ESSAI=3 1327 # time delay between tentative 1328 DELAI=2 1329 1330 i=0 1331 while [ $i -lt $NB_ESSAI ] ; do 1332 ncecat $@ > out_rsync 2>&1 1333 status=$? 1334 if [ ${status} -gt 0 ] ; then 1335 IGCM_debug_Print 2 "IGCM_sys_ncecat : error code ${status}" 1336 cat out_rsync 1337 \rm out_rsync 1338 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1339 else 1340 \rm out_rsync 1341 break 1342 fi 1343 (( i = i + 1 )) 1344 done 1345 1346 if [ ${status} -gt 0 ] ; then 1347 echo "IGCM_sys_ncecat : ncecat error" 1348 IGCM_debug_Exit "ncecat" 1217 1349 fi 1218 1350 … … 1225 1357 echo "IGCM_sys_ncflint :" $@ 1226 1358 fi 1227 ncflint $@ 1228 if [ $? -gt 0 ] ; then 1229 echo "IGCM_sys_ncflint : erreur ${@}." 1230 IGCM_debug_Exit "ncflint" 1359 1360 typeset NB_ESSAI DELAI status i 1361 # number of tentative 1362 NB_ESSAI=3 1363 # time delay between tentative 1364 DELAI=2 1365 1366 i=0 1367 while [ $i -lt $NB_ESSAI ] ; do 1368 ncflint $@ > out_rsync 2>&1 1369 status=$? 1370 if [ ${status} -gt 0 ] ; then 1371 IGCM_debug_Print 2 "IGCM_sys_ncflint : error code ${status}" 1372 cat out_rsync 1373 \rm out_rsync 1374 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1375 else 1376 \rm out_rsync 1377 break 1378 fi 1379 (( i = i + 1 )) 1380 done 1381 1382 if [ ${status} -gt 0 ] ; then 1383 echo "IGCM_sys_ncflint : ncflint error" 1384 IGCM_debug_Exit "ncflint" 1231 1385 fi 1232 1386 … … 1239 1393 echo "IGCM_sys_ncks :" $@ 1240 1394 fi 1241 ncks $@ 1242 if [ $? -gt 0 ] ; then 1243 echo "IGCM_sys_ncks : erreur ${@}." 1244 IGCM_debug_Exit "ncks" 1395 1396 typeset NB_ESSAI DELAI status i 1397 # number of tentative 1398 NB_ESSAI=3 1399 # time delay between tentative 1400 DELAI=2 1401 1402 i=0 1403 while [ $i -lt $NB_ESSAI ] ; do 1404 ncks $@ > out_rsync 2>&1 1405 status=$? 1406 if [ ${status} -gt 0 ] ; then 1407 IGCM_debug_Print 2 "IGCM_sys_ncks : error code ${status}" 1408 cat out_rsync 1409 \rm out_rsync 1410 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1411 else 1412 \rm out_rsync 1413 break 1414 fi 1415 (( i = i + 1 )) 1416 done 1417 1418 if [ ${status} -gt 0 ] ; then 1419 echo "IGCM_sys_ncks : ncks error" 1420 IGCM_debug_Exit "ncks" 1245 1421 fi 1246 1422 … … 1253 1429 echo "IGCM_sys_ncpdq :" $@ 1254 1430 fi 1255 ncpdq $@ 1256 if [ $? -gt 0 ] ; then 1257 echo "IGCM_sys_ncpdq : erreur ${@}." 1258 IGCM_debug_Exit "ncpdq" 1431 1432 typeset NB_ESSAI DELAI status i 1433 # number of tentative 1434 NB_ESSAI=3 1435 # time delay between tentative 1436 DELAI=2 1437 1438 i=0 1439 while [ $i -lt $NB_ESSAI ] ; do 1440 ncpdq $@ > out_rsync 2>&1 1441 status=$? 1442 if [ ${status} -gt 0 ] ; then 1443 IGCM_debug_Print 2 "IGCM_sys_ncpdq : error code ${status}" 1444 cat out_rsync 1445 \rm out_rsync 1446 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1447 else 1448 \rm out_rsync 1449 break 1450 fi 1451 (( i = i + 1 )) 1452 done 1453 1454 if [ ${status} -gt 0 ] ; then 1455 echo "IGCM_sys_ncpdq : ncpdq error" 1456 IGCM_debug_Exit "ncpdq" 1259 1457 fi 1260 1458 … … 1267 1465 echo "IGCM_sys_ncra :" $@ 1268 1466 fi 1269 ncra $@ 1270 if [ $? -gt 0 ] ; then 1271 echo "IGCM_sys_ncra : erreur ${@}." 1272 IGCM_debug_Exit "ncra" 1467 1468 typeset NB_ESSAI DELAI status i 1469 # number of tentative 1470 NB_ESSAI=3 1471 # time delay between tentative 1472 DELAI=2 1473 1474 i=0 1475 while [ $i -lt $NB_ESSAI ] ; do 1476 ncra $@ > out_rsync 2>&1 1477 status=$? 1478 if [ ${status} -gt 0 ] ; then 1479 IGCM_debug_Print 2 "IGCM_sys_ncra : error code ${status}" 1480 cat out_rsync 1481 \rm out_rsync 1482 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1483 else 1484 \rm out_rsync 1485 break 1486 fi 1487 (( i = i + 1 )) 1488 done 1489 1490 if [ ${status} -gt 0 ] ; then 1491 echo "IGCM_sys_ncra : ncra error" 1492 IGCM_debug_Exit "ncra" 1273 1493 fi 1274 1494 … … 1281 1501 echo "IGCM_sys_ncrcat :" $@ 1282 1502 fi 1283 ncrcat $@ 1284 if [ $? -gt 0 ] ; then 1285 echo "IGCM_sys_ncrcat : erreur ${@}." 1286 # IGCM_debug_Exit "ncrcat" 1503 1504 typeset NB_ESSAI DELAI status i 1505 # number of tentative 1506 NB_ESSAI=3 1507 # time delay between tentative 1508 DELAI=2 1509 1510 i=0 1511 while [ $i -lt $NB_ESSAI ] ; do 1512 ncrcat $@ > out_rsync 2>&1 1513 status=$? 1514 if [ ${status} -gt 0 ] ; then 1515 IGCM_debug_Print 2 "IGCM_sys_ncrcat : error code ${status}" 1516 cat out_rsync 1517 \rm out_rsync 1518 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1519 else 1520 \rm out_rsync 1521 break 1522 fi 1523 (( i = i + 1 )) 1524 done 1525 1526 if [ ${status} -gt 0 ] ; then 1527 echo "IGCM_sys_ncrcat : ncrcat error" 1528 #IGCM_debug_Exit "ncrcat" 1287 1529 fi 1288 1530 … … 1295 1537 echo "IGCM_sys_ncrename :" $@ 1296 1538 fi 1297 ncrename $@ 1298 if [ $? -gt 0 ] ; then 1299 echo "IGCM_sys_ncrename : erreur ${@}." 1300 IGCM_debug_Exit "ncrename" 1539 1540 typeset NB_ESSAI DELAI status i 1541 # number of tentative 1542 NB_ESSAI=3 1543 # time delay between tentative 1544 DELAI=2 1545 1546 i=0 1547 while [ $i -lt $NB_ESSAI ] ; do 1548 ncrename $@ > out_rsync 2>&1 1549 status=$? 1550 if [ ${status} -gt 0 ] ; then 1551 IGCM_debug_Print 2 "IGCM_sys_ncrename : error code ${status}" 1552 cat out_rsync 1553 \rm out_rsync 1554 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1555 else 1556 \rm out_rsync 1557 break 1558 fi 1559 (( i = i + 1 )) 1560 done 1561 1562 if [ ${status} -gt 0 ] ; then 1563 echo "IGCM_sys_ncrename : ncrename error" 1564 IGCM_debug_Exit "ncrename" 1301 1565 fi 1302 1566 … … 1309 1573 echo "IGCM_sys_ncwa :" $@ 1310 1574 fi 1311 ncwa $@ 1312 if [ $? -gt 0 ] ; then 1313 echo "IGCM_sys_ncwa : erreur ${@}." 1314 IGCM_debug_Exit "ncwa" 1575 1576 typeset NB_ESSAI DELAI status i 1577 # number of tentative 1578 NB_ESSAI=3 1579 # time delay between tentative 1580 DELAI=2 1581 1582 i=0 1583 while [ $i -lt $NB_ESSAI ] ; do 1584 ncwa $@ > out_rsync 2>&1 1585 status=$? 1586 if [ ${status} -gt 0 ] ; then 1587 IGCM_debug_Print 2 "IGCM_sys_ncwa : error code ${status}" 1588 cat out_rsync 1589 \rm out_rsync 1590 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1591 else 1592 \rm out_rsync 1593 break 1594 fi 1595 (( i = i + 1 )) 1596 done 1597 1598 if [ ${status} -gt 0 ] ; then 1599 echo "IGCM_sys_ncwa : ncwa error" 1600 IGCM_debug_Exit "ncwa" 1315 1601 fi 1316 1602 … … 1323 1609 function IGCM_sys_cdo { 1324 1610 IGCM_debug_PushStack "IGCM_sys_cdo" -- $@ 1325 1326 \cdo $@ 1327 if [ $? -gt 0 ] ; then 1328 echo "IGCM_sys_cdo : erreur ${@}." 1611 if ( $DEBUG_sys ) ; then 1612 echo "IGCM_sys_cdo :" $@ 1613 fi 1614 1615 typeset status 1616 1617 \cdo $@ > out_rsync 2>&1 1618 status=$? 1619 if [ ${status} -gt 0 ] ; then 1620 echo "IGCM_sys_cdo : error code ${status}" 1621 cat out_rsync 1622 \rm out_rsync 1329 1623 IGCM_debug_PopStack "IGCM_sys_cdo" 1330 1624 return 1
Note: See TracChangeset
for help on using the changeset viewer.