From: Nabil Ghodbane Date: Fri, 7 Apr 2023 08:00:50 +0000 (+0200) Subject: spns #34285: openturns tag is 1.20.1 X-Git-Tag: V9_11_0~66 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=379a1fecfd56b9d8cb23e6efbcdefec951d79c16;p=tools%2Fsat_salome.git spns #34285: openturns tag is 1.20.1 --- diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index 8e2d024..d616ca4 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -91,7 +91,7 @@ APPLICATION : opencv : 'native' openmpi: 'native' openVKL : '0.11.0' - openturns: '1.20' + openturns: '1.20.1' ospray : '2.4.0' packaging : 'native' packagespy : '74152cd' @@ -212,7 +212,7 @@ __overwrite__ : 'APPLICATION.products.cminpack' : 'native' 'APPLICATION.products.netcdf' : '4.6.2' 'APPLICATION.products.PyFMI' : {tag: '2.6', base: 'no', section: 'version_2_6_no_pip' } - 'APPLICATION.products.openturns' : {tag: '1.20', base: 'no', section: 'version_1_20_UB20_04' } + 'APPLICATION.products.openturns' : {tag: '1.20.1',base: 'no', section: 'version_1_20_1_UB20_04' } 'APPLICATION.products.scipy' : {tag: '1.5.2', base: 'no', section: 'version_1_5_2_no_pip' } # scipy >= 1.4 - system one too old } { @@ -228,7 +228,7 @@ __overwrite__ : 'APPLICATION.products.PyFMI' : {tag: '2.6', base: 'no', section: 'version_2_6_no_pip' } 'APPLICATION.products.root' : {tag: '6.22.02', base: 'no', section: 'version_6_22_02_UB22_04' } 'APPLICATION.products.medfile' : {tag: '4.1.1', base: 'no', section: 'version_4_1_1_UB22_04' } - 'APPLICATION.products.openturns' : {tag: '1.20', base: 'no', section: 'version_1_20_UB22_04' } + 'APPLICATION.products.openturns' : {tag: '1.20.1', base: 'no', section: 'version_1_20_1_UB22_04' } } { # DB10: @@ -243,7 +243,7 @@ __overwrite__ : 'APPLICATION.products.PyQt' : '5.15.3' 'APPLICATION.products.sip' : '5.5.0' 'APPLICATION.products.ParaView' : {tag: '5.11.0', base: 'no', section: 'version_5_11_0_MPI_DB10', hpc: 'yes'} - 'APPLICATION.products.scipy' : {tag: '1.5.2', base: 'no', section: 'version_1_5_2_no_pip' } # scipy >= 1.4 - system one too old + 'APPLICATION.products.scipy' : {tag: '1.5.2', base: 'no', section: 'version_1_5_2_no_pip' } # scipy >= 1.4 - system one too old 'APPLICATION.products.swig' : '4.0.2' 'APPLICATION.products.openmpi' : '4.1.5' } @@ -252,7 +252,7 @@ __overwrite__ : 'APPLICATION.products.opencv' : '3.2.0' 'APPLICATION.products.cminpack' : 'native' 'APPLICATION.products.PyFMI' : {tag:'2.6', base: 'no', section: 'version_2_6_no_pip'} - 'APPLICATION.products.openturns' : {tag: '1.20', base: 'no', section: 'version_1_20_DB11' } + 'APPLICATION.products.openturns' : {tag: '1.20.1', base: 'no', section: 'version_1_20_1_DB11' } } { # CentOS 8 repositories don't include sphinxintl package which must be installed through pip. @@ -264,7 +264,7 @@ __overwrite__ : 'APPLICATION.products.statsmodels' : {tag: '0.6.1', base: 'no', section: 'version_0_6_1_no_pip' } 'APPLICATION.products.gdal' : {tag:'2.4.0', base: 'no', section: 'version_2_4_0_CO8' } # spns #29324 'APPLICATION.products.swig' : '4.0.2' - 'APPLICATION.products.openturns' : {tag: '1.20', base: 'no', section: 'version_1_20_CO8' } + 'APPLICATION.products.openturns' : {tag: '1.20.1', base: 'no', section: 'version_1_20_1_CO8' } } { __condition__ : "VARS.dist in ['FD32']" @@ -273,7 +273,7 @@ __overwrite__ : 'APPLICATION.products.PyFMI' : {tag: '2.6', base: 'no', section: 'version_2_6_no_pip' } 'APPLICATION.products.Sphinx' : {tag: '1.7.6', base: 'no', section: 'version_1_7_6_no_pip' } 'APPLICATION.products.gdal' : {tag:'2.4.0', base: 'no', section: 'version_2_4_0_FD32' } # spns #29324 - 'APPLICATION.products.openturns' : {tag: '1.20', base: 'no', section: 'version_1_20_FD32' } + 'APPLICATION.products.openturns' : {tag: '1.20.1',base: 'no', section: 'version_1_20_1_FD32' } } { __condition__ : "VARS.dist in ['FD34']" @@ -284,7 +284,7 @@ __overwrite__ : 'APPLICATION.products.PyFMI' : {tag: '2.6', base: 'no', section: 'version_2_6_no_pip' } 'APPLICATION.products.root' : {tag:'6.22.02', base: 'no', section: 'version_6_22_02_FD34' } 'APPLICATION.products.gdal' : {tag:'2.4.0', base: 'no', section: 'version_2_4_0_FD34' } # spns #29324 - 'APPLICATION.products.openturns' : {tag: '1.20', base: 'no', section: 'version_1_20_FD34' } + 'APPLICATION.products.openturns' : {tag: '1.20.1', base: 'no', section: 'version_1_20_1_FD34' } } { __condition__ : "VARS.dist in ['FD36']" diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index cc1509e..c37b294 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -88,7 +88,7 @@ APPLICATION : omniORBpy : '4.2.3' opencv : '3.2.0' openVKL: '0.11.0' - openturns: '1.20' + openturns: '1.20.1' ospray : '2.4.0' packaging : '19.0' ParaView : {tag:'5.11.0', base: 'no', section: 'version_5_11_0'} diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index c588208..e35754a 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -92,7 +92,7 @@ APPLICATION : omniORBpy : '4.2.5' opencv : '3.2.0' openmpi : '4.0.3' - openturns: '1.20' + openturns: '1.20.1' openVKL: '0.11.0' ospray : '2.4.0' packaging : '17.1' @@ -222,18 +222,18 @@ __overwrite__ : { __condition__ : "VARS.dist in ['CO7']" 'APPLICATION.rm_products' : ['gcc', 'gmp', 'mpc', 'mpfr'] - 'APPLICATION.products.openturns' : {tag: '1.20', base: 'no', section: 'version_1_20_CO7' } + 'APPLICATION.products.openturns' : {tag: '1.20.1', base: 'no', section: 'version_1_20_1_CO7' } } { __condition__ : "VARS.dist in ['CO8']" 'APPLICATION.rm_products' : ['gcc', 'gmp', 'mpc', 'mpfr', 'zeromq'] 'APPLICATION.products.gdal' : {tag:'2.4.0', base: 'no', section: 'version_2_4_0_CO8' } # spns #29324 'APPLICATION.products.ParaView' : {tag: '5.11.0', base: 'no', section: 'version_5_11_0_MPI_CO8', hpc: 'yes'} - 'APPLICATION.products.openturns': {tag: '1.20', base: 'no', section: 'version_1_20_CO8' } + 'APPLICATION.products.openturns': {tag: '1.20.1', base: 'no', section: 'version_1_20_1_CO8' } } { __condition__ : "VARS.dist in ['DB09']" - 'APPLICATION.products.openturns' : {tag: '1.20', base: 'no', section: 'version_1_20_DB09' } + 'APPLICATION.products.openturns' : {tag: '1.20.1', base: 'no', section: 'version_1_20_1_DB09' } } { __condition__ : "VARS.dist in ['DB10']" diff --git a/products/compil_scripts/openturns-1.20.1.sh b/products/compil_scripts/openturns-1.20.1.sh new file mode 100755 index 0000000..4e96090 --- /dev/null +++ b/products/compil_scripts/openturns-1.20.1.sh @@ -0,0 +1,446 @@ +#!/bin/bash + +echo "##########################################################################" +echo "openturns" $VERSION +echo "##########################################################################" + +# we don't install in python directory -> modify environment as described in INSTALL file + +#mkdir -p $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages +export PATH=$(pwd)/bin:$PATH +export PYTHONPATH=$(pwd):$PYTHONPATH +export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH + +CMAKE_OPTIONS="" +if [ -n "$SAT_HPC" ] && [ -n "$MPI_ROOT_DIR" ]; then + echo "WARNING: setting CC and CXX environment variables and target MPI wrapper" + CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}" + CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}" +fi + +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}" +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib" +CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release" +CMAKE_OPTIONS+=" -DPYTHON_EXECUTABLE=${PYTHONBIN}" + +if [ -n "$SWIG_ROOT_DIR" ] && [ "$SAT_swig_IS_NATIVE" != "1" ]; then + CMAKE_OPTIONS+=" -DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig" +fi + +if [ -n "$TBB_ROOT_DIR" ] && [ "$SAT_tbb_IS_NATIVE" != "1" ]; then + CMAKE_OPTIONS+=" -DTBB_ROOT_DIR=${TBB_ROOT_DIR}" + CMAKE_OPTIONS+=" -Dtbb_DIR=${TBB_ROOT_DIR}/lib/cmake" +fi + +# https://github.com/persalys/persalys/issues/745 +LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION" +case $LINUX_DISTRIBUTION in + UB22*|CO8*|CO9*|FD36|FD37) + echo "WARNING: switching OFF TBB support" + CMAKE_OPTIONS+=" -DUSE_TBB=OFF" + ;; + *) + ;; +esac + +# Blas/Lapack +if [ -n "$LAPACK_ROOT_DIR" ] && [ "$SAT_lapack_IS_NATIVE" != "1" ]; then + CMAKE_OPTIONS+=" -DLAPACK_DIR=${LAPACK_ROOT_DIR}/lib/cmake/lapack-3.8.0" + CMAKE_OPTIONS+=" -DCBLAS_DIR=${LAPACK_ROOT_DIR}/lib/cmake/cblas-3.8.0" + CMAKE_OPTIONS+=" -DCBLAS_LIBRARIES=$LAPACK_ROOT_DIR/lib/libcblas.so" + CMAKE_OPTIONS+=" -DBLAS_LIBRARIES=$LAPACK_ROOT_DIR/lib/libblas.so" +fi + +### libxml2 settings +if [ -n "$LIBXML2_ROOT_DIR" ] && [ "$SAT_libxml2_IS_NATIVE" != "1" ]; then + CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" + CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" + CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" +fi + +# HDF5 +if [ -n "$HDF5_ROOT_DIR" ] && [ "$SAT_hdf5_IS_NATIVE" != "1" ]; then + CMAKE_OPTIONS+=" -DHDF5_DIR:PATH=${HDF5_ROOT_DIR}/share/cmake/hdf5" + CMAKE_OPTIONS+=" -DHDF5_USE_STATIC_LIBRARIES:BOOL=OFF" + CMAKE_OPTIONS+=" -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}" + CMAKE_OPTIONS+=" -DHDF5_hdf5_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib" + CMAKE_OPTIONS+=" -DHDF5_hdf5_hl_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" + CMAKE_OPTIONS+=" -DHDF5_HL_LIBRARY=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" + CMAKE_OPTIONS+=" -DHDF5_C_INCLUDE_DIR=${HDF5_ROOT_DIR}/include" +fi + +# CMINPACK +if [ -n "$CMINPACK_ROOT_DIR" ] && [ "$SAT_cminpack_IS_NATIVE" != "1" ]; then + CMAKE_OPTIONS+=" -DCMINPACK_ROOT_DIR=${CMINPACK_ROOT_DIR}" + CMAKE_OPTIONS+=" -DCMINPACK_INCLUDE_DIR=${CMINPACK_ROOT_DIR}/include/cminpack-1" + CMAKE_OPTIONS+=" -DCMINPACK_LIBRARY=$CMINPACK_ROOT_DIR/lib/libcminpack_s.a" +else + CMAKE_OPTIONS+=" -DCMINPACK_ROOT_DIR=${CMINPACK_ROOT_DIR}" + CMAKE_OPTIONS+=" -DCMINPACK_INCLUDE_DIR=${CMINPACK_ROOT_DIR}/include/cminpack-1" +fi + +# Blas/Lapack +if [ -n "$LAPACK_ROOT_DIR" ] && [ "$SAT_lapack_IS_NATIVE" != "1" ]; then + CMAKE_OPTIONS+=" -DLAPACK_DIR=${LAPACK_ROOT_DIR}/lib/cmake/lapack-3.8.0" + CMAKE_OPTIONS+=" -DCBLAS_DIR=${LAPACK_ROOT_DIR}/lib/cmake/cblas-3.8.0" + CMAKE_OPTIONS+=" -DCBLAS_LIBRARIES=$LAPACK_ROOT_DIR/lib/libcblas.so" + CMAKE_OPTIONS+=" -DBLAS_LIBRARIES=$LAPACK_ROOT_DIR/lib/libblas.so" +fi + +if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" && -f /usr/lib64/libcblas.so && -f /usr/lib64/libblas.so ]]; then + CMAKE_OPTIONS+=" -DCBLAS_LIBRARIES=/usr/lib64/libcblas.so" + CMAKE_OPTIONS+=" -DBLAS_LIBRARIES=/usr/lib64/libblas.so" +fi + +### libxml2 settings +if [ -n "$LIBXML2_ROOT_DIR" ] && [ "$SAT_libxml2_IS_NATIVE" != "1" ]; then + CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" + CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" + CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" +fi + +## nlopt +if [ -n "$NLOPT_ROOT_DIR" ] && [ "$SAT_nlopt_IS_NATIVE" != "1" ]; then + CMAKE_OPTIONS+=" -DNLOPT_INCLUDE_DIRS:STRING=${NLOPT_ROOT_DIR}/include" + CMAKE_OPTIONS+=" -DNLOPT_LIBRARIES:STRING=${NLOPT_ROOT_DIR}/lib" + CMAKE_OPTIONS+=" -DNLOPT_DIR:STRING=${NLOPT_ROOT_DIR}" +fi + +echo +echo "*** cmake" $CMAKE_OPTIONS + +rm -rf $BUILD_DIR +mkdir -p $BUILD_DIR/openturns +mkdir -p $BUILD_DIR/cache/pip + +# since we are using several nodes and share the same $HOME +# compilation can get screwed up. +# following this discussion: https://tex.stackexchange.com/questions/467824/is-it-possible-to-relocate-my-texmf-directory +# we define the following environment variables +export TEXMFHOME=$BUILD_DIR/texmf +export TEXMFVAR=$BUILD_DIR/texlive +export TEXMFCONFIG=$BUILD_DIR/texlive +mkdir -p $TEXMFHOME +mkdir -p $TEXMFVAR +mkdir -p $TEXMFCONFIG + +cd $BUILD_DIR/openturns +cmake $CMAKE_OPTIONS $SOURCE_DIR/openturns-1.20.1 +if [ $? -ne 0 ] +then + echo "ERROR on cmake" + exit 1 +fi + +echo +echo "*** make" $MAKE_OPTIONS +make $MAKE_OPTIONS +if [ $? -ne 0 ] +then + echo "ERROR on make" + exit 2 +fi + +echo +echo "*** make install" +make install +if [ $? -ne 0 ] +then + echo "ERROR on make install" + exit 3 +fi + +echo +echo "*** check installation" +if [! -d "${PRODUCT_INSTALL}/lib" ]; then + mkdir -p ${PRODUCT_INSTALL}/lib +fi + +if [ -d "${PRODUCT_INSTALL}/lib64" ]; then + echo "WARNING: moving lib64 to lib" + mv ${PRODUCT_INSTALL}/lib64/* ${PRODUCT_INSTALL}/lib/ + rmdir ${PRODUCT_INSTALL}/lib64 +elif [ -d "${PRODUCT_INSTALL}/local/lib64" ]; then + echo "WARNING: moving local/lib64 to lib" + mv ${PRODUCT_INSTALL}/local/lib64/* ${PRODUCT_INSTALL}/lib/ + rmdir ${PRODUCT_INSTALL}/local/lib64 +fi + +if [[ -d "${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages" ]]; then + echo "WARNING: renaming ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages as ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages" + cd ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION} + ls -l + mv dist-packages site-packages + ls -l + cd $BUILD_DIR/openturns +fi + +export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:${PYTHONPATH} +export LD_LIBRARY_PATH=${PRODUCT_INSTALL}/lib:${LD_LIBRARY_PATH} +chmod +x ${SOURCE_DIR}/openturns-1.20.1/python/test/t_features.py +${SOURCE_DIR}/openturns-1.20.1/python/test/t_features.py +if [ $? -ne 0 ] +then + echo "ERROR testing Openturns features...." + exit 4 +fi + +LD_LIBRARY_PATH_REF=${LD_LIBRARY_PATH} +if [[ -d "$SOURCE_DIR/otfftw-0.12" ]]; then + declare -A OTC + OTC["otagrum"]="0.6" + OTC["otfftw"]="0.12" + OTC["otmixmod"]="0.13" + OTC["otmorris"]="0.13" + OTC["otpmml"]="1.12" + OTC["otrobopt"]="0.11" + OTC["otsubsetinverse"]="1.9" + OTC["otsvm"]="0.11" + + for k in ${!OTC[@]}; + do + echo + echo "*** C O M P O N E N T : $k-${OTC[$k]} " + if [[ $k == "otagrum" ]]; then + echo "WARNING: skipping $k.." + continue + fi + cd $BUILD_DIR + mkdir ${BUILD_DIR}/$k + cd ${BUILD_DIR}/$k + CMAKE_EXTRA_OPTIONS= + if [[ $DIST_NAME == "CO" ]]; then + CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" # needs extra latex modules on CentOS 7, 8 + CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" + fi + if [[ $k == "otmixmod" ]]; then + CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" + CMAKE_EXTRA_OPTIONS+=" -DSOURCEFILES=$SOURCE_DIR/$k-${OTC[$k]}" + elif [[ $k == "otsubsetinverse" ]]; then + CMAKE_EXTRA_OPTIONS+=" -DOPENTURNS_HOME=$PRODUCT_INSTALL" + CMAKE_EXTRA_OPTIONS+=" -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON" + CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" + elif [[ $k == "otfftw" ]]; then + CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" + elif [[ $k == "otmorris" ]]; then + case $LINUX_DISTRIBUTION in + DB*|FD*|UB*) + echo "WARNING: switching OFF documentation build" + CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" + CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" # missing package to be installed. + ;; + esac + elif [[ $k == "otrobopt" ]]; then + case $LINUX_DISTRIBUTION in + DB*|FD*|UB*) + echo "WARNING: switching OFF documentation build" + CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" + CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" # missing package to be installed. + ;; + esac + elif [[ $k == "otsvm" ]]; then + case $LINUX_DISTRIBUTION in + DB*|FD*|UB*) + echo "WARNING: switching OFF documentation build" + CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" + CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" # missing package to be installed. + ;; + esac + elif [[ $k == "otpmml" ]]; then + CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" + fi + + echo + echo "*** cmake " $CMAKE_OPTIONS ${CMAKE_EXTRA_OPTIONS} $SOURCE_DIR/$k-${OTC[$k]} + cmake $CMAKE_OPTIONS ${CMAKE_EXTRA_OPTIONS} $SOURCE_DIR/$k-${OTC[$k]} + if [ $? -ne 0 ] + then + echo "ERROR on cmake" + exit 1 + fi + + echo + echo "*** make" $MAKE_OPTIONS + make $MAKE_OPTIONS + if [ $? -ne 0 ] + then + echo "ERROR on make" + exit 2 + fi + + echo + echo "*** make install" + make install + if [ $? -ne 0 ] + then + echo "ERROR on make install" + exit 3 + fi + done + + declare -A OTP + OTP["otfmi"]="0.15" + OTP["otpod"]="0.6.9" + OTP["otwrapy"]="0.11" + for k in ${!OTP[@]}; + do + echo + echo "*** C O M P O N E N T : $k-${OTP[$k]} " + + if [ "$SAT_Python_IS_NATIVE" == "1" ]; then + if [ $k == "otfmi" ]; then + echo "INFO: install dill-0.3.4" + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/dill-0.3.4/dill-0.3.4-py2.py3-none-any.whl --no-deps --prefix=$PRODUCT_INSTALL + if [ $? -ne 0 ] + then + echo "FATAL: could not install dill-0.3.4" + exit 6 + fi + elif [ $k == "otpod" ]; then + if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" ]]; then + echo "*** skipping: since system Cython too old" + continue + fi + echo "INFO: install scikit-learn-0.24.2" + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-0.24.2/scikit-learn-0.24.2.tar.gz --no-deps --prefix=$PRODUCT_INSTALL + if [ $? -ne 0 ] + then + echo "FATAL: could not install scikit-0.24.2" + exit 6 + fi + echo "INFO: install threadpoolctl-3.0.0" + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/threadpoolctl-3.0.0/threadpoolctl-3.0.0-py3-none-any.whl --no-deps --prefix=$PRODUCT_INSTALL + if [ $? -ne 0 ] + then + echo "FATAL: could not install threadpoolctl 3.0.0" + exit 6 + fi + fi + else # non native Python + if [[ $k == "otfmi" ]]; then + echo "INFO: install dill-0.3.4" + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/dill-0.3.4/dill-0.3.4-py2.py3-none-any.whl --no-deps + if [ $? -ne 0 ] + then + echo "FATAL: could not install dikk-0.3.4" + exit 5 + fi + elif [[ $k == "otpod" ]]; then + echo "INFO: install threadpoolctl-3.0.0" + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/threadpoolctl-3.0.0/threadpoolctl-3.0.0-py3-none-any.whl --no-deps + if [ $? -ne 0 ] + then + echo "FATAL: could not install readpoolctl 3.0.0" + exit 6 + fi + echo "INFO: install joblib-1.1.0" + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/joblib-1.1.0/joblib-1.1.0-py2.py3-none-any.whl --no-deps + if [ $? -ne 0 ] + then + echo "FATAL: could not install joblib-1.1.0" + exit 6 + fi + echo "INFO: install decorator-5.1.0" + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/decorator-5.1.0/decorator-5.1.0-py3-none-any.whl --no-deps + if [ $? -ne 0 ] + then + echo "FATAL: could not install decorator-5.1.0" + exit 6 + fi + echo "INFO: install scikit-learn-0.24.2" + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-0.24.2/scikit-learn-0.24.2.tar.gz --no-deps + if [ $? -ne 0 ] + then + echo "FATAL: could not install scikit-0.24.2" + exit 6 + fi + fi + fi + + cd $BUILD_DIR + mkdir ${BUILD_DIR}/$k + cd ${BUILD_DIR}/$k + cp -R $SOURCE_DIR/$k-${OTP[$k]}/* . + # + $PYTHONBIN setup.py build + if [ $? -ne 0 ] + then + echo "ERROR on ${PYTHONBIN} setup.py build" + exit 4 + fi + # + $PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL + if [ $? -ne 0 ] + then + echo "ERROR on ${PYTHONBIN} setup.py install --prefix=$PRODUCT_INSTALL" + exit 5 + fi + done + + # + # O P E N T U R N S + # + if [ -f ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages/site.py ]; then + echo "INFO: site.py already installed" + elif [ "$SAT_Python_IS_NATIVE" == "1" ]; then + # check first whether the init.py file is installed + echo "WARNING: missing init.py file. Installing it from system Python installation" + SITE_PATCH= + LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION" + case $LINUX_DISTRIBUTION in + DB11) + SITE_PATCH=/usr/lib/pypy/dist-packages/setuptools/site-patch.py + ;; + DB10) + SITE_PATCH=/usr/lib/python3/dist-packages/setuptools/site-patch.py + ;; + UB22*) + SITE_PATCH=/usr/lib/pypy/dist-packages/setuptools/site-patch.py + ;; + UB20*) + SITE_PATCH=/usr/lib/python3/dist-packages/setuptools/site-patch.py + ;; + FD32) + SITE_PATCH=/usr/lib/python3.8/site-packages/setuptools/site-patch.py + ;; + FD34) + SITE_PATCH=$SOURCE_DIR/addons/site-patch.py + ;; + FD36) + SITE_PATCH=$SOURCE_DIR/addons/site-patch.py + ;; + FD37) + SITE_PATCH=$SOURCE_DIR/addons/site-patch.py + ;; + CO8*) + SITE_PATCH=/usr/lib/pypy/dist-packages/setuptools/site-patch.py + ;; + *) + SITE_PATCH=$SOURCE_DIR/addons/site-patch.py + ;; + esac + # check whether this file exists + if [ "${SITE_PATCH}" == "" ]; then + cp $SOURCE_DIR/addons/site-patch.py ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages/site.py + else + cp $SITE_PATCH ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages/site.py + fi + elif [ -f ${PYTHON_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/setuptools/site-patch.py ]; then + cp ${PYTHON_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/setuptools/site-patch.py ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages/site.py + else + echo "ERROR: could not find site-patch.py" + exit 7 + fi +fi + +cd ${PRODUCT_INSTALL}/lib +# On some nodes, the link to OT is not done properly. +if [[ ! -f libOT.so.0 ]]; then + echo "INFO: Fixing libOT.so" + ln -sf libOT.so.0.21.0 libOT.so.0.21 + ln -sf libOT.so.0.21 libOT.so.0 + ln -sf libOT.so.0 libOT.so +fi + +echo +echo "########## END" diff --git a/products/compil_scripts/openturns-1.20.sh b/products/compil_scripts/openturns-1.20.sh deleted file mode 100755 index 88e1198..0000000 --- a/products/compil_scripts/openturns-1.20.sh +++ /dev/null @@ -1,446 +0,0 @@ -#!/bin/bash - -echo "##########################################################################" -echo "openturns" $VERSION -echo "##########################################################################" - -# we don't install in python directory -> modify environment as described in INSTALL file - -#mkdir -p $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages -export PATH=$(pwd)/bin:$PATH -export PYTHONPATH=$(pwd):$PYTHONPATH -export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH - -CMAKE_OPTIONS="" -if [ -n "$SAT_HPC" ] && [ -n "$MPI_ROOT_DIR" ]; then - echo "WARNING: setting CC and CXX environment variables and target MPI wrapper" - CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}" - CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}" -fi - -CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}" -CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib" -CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release" -CMAKE_OPTIONS+=" -DPYTHON_EXECUTABLE=${PYTHONBIN}" - -if [ -n "$SWIG_ROOT_DIR" ] && [ "$SAT_swig_IS_NATIVE" != "1" ]; then - CMAKE_OPTIONS+=" -DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig" -fi - -if [ -n "$TBB_ROOT_DIR" ] && [ "$SAT_tbb_IS_NATIVE" != "1" ]; then - CMAKE_OPTIONS+=" -DTBB_ROOT_DIR=${TBB_ROOT_DIR}" - CMAKE_OPTIONS+=" -Dtbb_DIR=${TBB_ROOT_DIR}/lib/cmake" -fi - -# https://github.com/persalys/persalys/issues/745 -LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION" -case $LINUX_DISTRIBUTION in - UB22*|CO8*|CO9*|FD36|FD37) - echo "WARNING: switching OFF TBB support" - CMAKE_OPTIONS+=" -DUSE_TBB=OFF" - ;; - *) - ;; -esac - -# Blas/Lapack -if [ -n "$LAPACK_ROOT_DIR" ] && [ "$SAT_lapack_IS_NATIVE" != "1" ]; then - CMAKE_OPTIONS+=" -DLAPACK_DIR=${LAPACK_ROOT_DIR}/lib/cmake/lapack-3.8.0" - CMAKE_OPTIONS+=" -DCBLAS_DIR=${LAPACK_ROOT_DIR}/lib/cmake/cblas-3.8.0" - CMAKE_OPTIONS+=" -DCBLAS_LIBRARIES=$LAPACK_ROOT_DIR/lib/libcblas.so" - CMAKE_OPTIONS+=" -DBLAS_LIBRARIES=$LAPACK_ROOT_DIR/lib/libblas.so" -fi - -### libxml2 settings -if [ -n "$LIBXML2_ROOT_DIR" ] && [ "$SAT_libxml2_IS_NATIVE" != "1" ]; then - CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" - CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" - CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" -fi - -# HDF5 -if [ -n "$HDF5_ROOT_DIR" ] && [ "$SAT_hdf5_IS_NATIVE" != "1" ]; then - CMAKE_OPTIONS+=" -DHDF5_DIR:PATH=${HDF5_ROOT_DIR}/share/cmake/hdf5" - CMAKE_OPTIONS+=" -DHDF5_USE_STATIC_LIBRARIES:BOOL=OFF" - CMAKE_OPTIONS+=" -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}" - CMAKE_OPTIONS+=" -DHDF5_hdf5_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib" - CMAKE_OPTIONS+=" -DHDF5_hdf5_hl_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" - CMAKE_OPTIONS+=" -DHDF5_HL_LIBRARY=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" - CMAKE_OPTIONS+=" -DHDF5_C_INCLUDE_DIR=${HDF5_ROOT_DIR}/include" -fi - -# CMINPACK -if [ -n "$CMINPACK_ROOT_DIR" ] && [ "$SAT_cminpack_IS_NATIVE" != "1" ]; then - CMAKE_OPTIONS+=" -DCMINPACK_ROOT_DIR=${CMINPACK_ROOT_DIR}" - CMAKE_OPTIONS+=" -DCMINPACK_INCLUDE_DIR=${CMINPACK_ROOT_DIR}/include/cminpack-1" - CMAKE_OPTIONS+=" -DCMINPACK_LIBRARY=$CMINPACK_ROOT_DIR/lib/libcminpack_s.a" -else - CMAKE_OPTIONS+=" -DCMINPACK_ROOT_DIR=${CMINPACK_ROOT_DIR}" - CMAKE_OPTIONS+=" -DCMINPACK_INCLUDE_DIR=${CMINPACK_ROOT_DIR}/include/cminpack-1" -fi - -# Blas/Lapack -if [ -n "$LAPACK_ROOT_DIR" ] && [ "$SAT_lapack_IS_NATIVE" != "1" ]; then - CMAKE_OPTIONS+=" -DLAPACK_DIR=${LAPACK_ROOT_DIR}/lib/cmake/lapack-3.8.0" - CMAKE_OPTIONS+=" -DCBLAS_DIR=${LAPACK_ROOT_DIR}/lib/cmake/cblas-3.8.0" - CMAKE_OPTIONS+=" -DCBLAS_LIBRARIES=$LAPACK_ROOT_DIR/lib/libcblas.so" - CMAKE_OPTIONS+=" -DBLAS_LIBRARIES=$LAPACK_ROOT_DIR/lib/libblas.so" -fi - -if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" && -f /usr/lib64/libcblas.so && -f /usr/lib64/libblas.so ]]; then - CMAKE_OPTIONS+=" -DCBLAS_LIBRARIES=/usr/lib64/libcblas.so" - CMAKE_OPTIONS+=" -DBLAS_LIBRARIES=/usr/lib64/libblas.so" -fi - -### libxml2 settings -if [ -n "$LIBXML2_ROOT_DIR" ] && [ "$SAT_libxml2_IS_NATIVE" != "1" ]; then - CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" - CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" - CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" -fi - -## nlopt -if [ -n "$NLOPT_ROOT_DIR" ] && [ "$SAT_nlopt_IS_NATIVE" != "1" ]; then - CMAKE_OPTIONS+=" -DNLOPT_INCLUDE_DIRS:STRING=${NLOPT_ROOT_DIR}/include" - CMAKE_OPTIONS+=" -DNLOPT_LIBRARIES:STRING=${NLOPT_ROOT_DIR}/lib" - CMAKE_OPTIONS+=" -DNLOPT_DIR:STRING=${NLOPT_ROOT_DIR}" -fi - -echo -echo "*** cmake" $CMAKE_OPTIONS - -rm -rf $BUILD_DIR -mkdir -p $BUILD_DIR/openturns -mkdir -p $BUILD_DIR/cache/pip - -# since we are using several nodes and share the same $HOME -# compilation can get screwed up. -# following this discussion: https://tex.stackexchange.com/questions/467824/is-it-possible-to-relocate-my-texmf-directory -# we define the following environment variables -export TEXMFHOME=$BUILD_DIR/texmf -export TEXMFVAR=$BUILD_DIR/texlive -export TEXMFCONFIG=$BUILD_DIR/texlive -mkdir -p $TEXMFHOME -mkdir -p $TEXMFVAR -mkdir -p $TEXMFCONFIG - -cd $BUILD_DIR/openturns -cmake $CMAKE_OPTIONS $SOURCE_DIR/openturns-1.20 -if [ $? -ne 0 ] -then - echo "ERROR on cmake" - exit 1 -fi - -echo -echo "*** make" $MAKE_OPTIONS -make $MAKE_OPTIONS -if [ $? -ne 0 ] -then - echo "ERROR on make" - exit 2 -fi - -echo -echo "*** make install" -make install -if [ $? -ne 0 ] -then - echo "ERROR on make install" - exit 3 -fi - -echo -echo "*** check installation" -if [! -d "${PRODUCT_INSTALL}/lib" ]; then - mkdir -p ${PRODUCT_INSTALL}/lib -fi - -if [ -d "${PRODUCT_INSTALL}/lib64" ]; then - echo "WARNING: moving lib64 to lib" - mv ${PRODUCT_INSTALL}/lib64/* ${PRODUCT_INSTALL}/lib/ - rmdir ${PRODUCT_INSTALL}/lib64 -elif [ -d "${PRODUCT_INSTALL}/local/lib64" ]; then - echo "WARNING: moving local/lib64 to lib" - mv ${PRODUCT_INSTALL}/local/lib64/* ${PRODUCT_INSTALL}/lib/ - rmdir ${PRODUCT_INSTALL}/local/lib64 -fi - -if [[ -d "${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages" ]]; then - echo "WARNING: renaming ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages as ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages" - cd ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION} - ls -l - mv dist-packages site-packages - ls -l - cd $BUILD_DIR/openturns -fi - -export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:${PYTHONPATH} -export LD_LIBRARY_PATH=${PRODUCT_INSTALL}/lib:${LD_LIBRARY_PATH} -chmod +x ${SOURCE_DIR}/openturns-1.20/python/test/t_features.py -${SOURCE_DIR}/openturns-1.20/python/test/t_features.py -if [ $? -ne 0 ] -then - echo "ERROR testing Openturns features...." - exit 4 -fi - -LD_LIBRARY_PATH_REF=${LD_LIBRARY_PATH} -if [[ -d "$SOURCE_DIR/otfftw-0.12" ]]; then - declare -A OTC - OTC["otagrum"]="0.6" - OTC["otfftw"]="0.12" - OTC["otmixmod"]="0.13" - OTC["otmorris"]="0.13" - OTC["otpmml"]="1.12" - OTC["otrobopt"]="0.11" - OTC["otsubsetinverse"]="1.9" - OTC["otsvm"]="0.11" - - for k in ${!OTC[@]}; - do - echo - echo "*** C O M P O N E N T : $k-${OTC[$k]} " - if [[ $k == "otagrum" ]]; then - echo "WARNING: skipping $k.." - continue - fi - cd $BUILD_DIR - mkdir ${BUILD_DIR}/$k - cd ${BUILD_DIR}/$k - CMAKE_EXTRA_OPTIONS= - if [[ $DIST_NAME == "CO" ]]; then - CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" # needs extra latex modules on CentOS 7, 8 - CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" - fi - if [[ $k == "otmixmod" ]]; then - CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" - CMAKE_EXTRA_OPTIONS+=" -DSOURCEFILES=$SOURCE_DIR/$k-${OTC[$k]}" - elif [[ $k == "otsubsetinverse" ]]; then - CMAKE_EXTRA_OPTIONS+=" -DOPENTURNS_HOME=$PRODUCT_INSTALL" - CMAKE_EXTRA_OPTIONS+=" -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON" - CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" - elif [[ $k == "otfftw" ]]; then - CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" - elif [[ $k == "otmorris" ]]; then - case $LINUX_DISTRIBUTION in - DB*|FD*|UB*) - echo "WARNING: switching OFF documentation build" - CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" - CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" # missing package to be installed. - ;; - esac - elif [[ $k == "otrobopt" ]]; then - case $LINUX_DISTRIBUTION in - DB*|FD*|UB*) - echo "WARNING: switching OFF documentation build" - CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" - CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" # missing package to be installed. - ;; - esac - elif [[ $k == "otsvm" ]]; then - case $LINUX_DISTRIBUTION in - DB*|FD*|UB*) - echo "WARNING: switching OFF documentation build" - CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" - CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" # missing package to be installed. - ;; - esac - elif [[ $k == "otpmml" ]]; then - CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" - fi - - echo - echo "*** cmake " $CMAKE_OPTIONS ${CMAKE_EXTRA_OPTIONS} $SOURCE_DIR/$k-${OTC[$k]} - cmake $CMAKE_OPTIONS ${CMAKE_EXTRA_OPTIONS} $SOURCE_DIR/$k-${OTC[$k]} - if [ $? -ne 0 ] - then - echo "ERROR on cmake" - exit 1 - fi - - echo - echo "*** make" $MAKE_OPTIONS - make $MAKE_OPTIONS - if [ $? -ne 0 ] - then - echo "ERROR on make" - exit 2 - fi - - echo - echo "*** make install" - make install - if [ $? -ne 0 ] - then - echo "ERROR on make install" - exit 3 - fi - done - - declare -A OTP - OTP["otfmi"]="0.15" - OTP["otpod"]="0.6.9" - OTP["otwrapy"]="0.11" - for k in ${!OTP[@]}; - do - echo - echo "*** C O M P O N E N T : $k-${OTP[$k]} " - - if [ "$SAT_Python_IS_NATIVE" == "1" ]; then - if [ $k == "otfmi" ]; then - echo "INFO: install dill-0.3.4" - ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/dill-0.3.4/dill-0.3.4-py2.py3-none-any.whl --no-deps --prefix=$PRODUCT_INSTALL - if [ $? -ne 0 ] - then - echo "FATAL: could not install dill-0.3.4" - exit 6 - fi - elif [ $k == "otpod" ]; then - if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" ]]; then - echo "*** skipping: since system Cython too old" - continue - fi - echo "INFO: install scikit-learn-0.24.2" - ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-0.24.2/scikit-learn-0.24.2.tar.gz --no-deps --prefix=$PRODUCT_INSTALL - if [ $? -ne 0 ] - then - echo "FATAL: could not install scikit-0.24.2" - exit 6 - fi - echo "INFO: install threadpoolctl-3.0.0" - ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/threadpoolctl-3.0.0/threadpoolctl-3.0.0-py3-none-any.whl --no-deps --prefix=$PRODUCT_INSTALL - if [ $? -ne 0 ] - then - echo "FATAL: could not install threadpoolctl 3.0.0" - exit 6 - fi - fi - else # non native Python - if [[ $k == "otfmi" ]]; then - echo "INFO: install dill-0.3.4" - ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/dill-0.3.4/dill-0.3.4-py2.py3-none-any.whl --no-deps - if [ $? -ne 0 ] - then - echo "FATAL: could not install dikk-0.3.4" - exit 5 - fi - elif [[ $k == "otpod" ]]; then - echo "INFO: install threadpoolctl-3.0.0" - ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/threadpoolctl-3.0.0/threadpoolctl-3.0.0-py3-none-any.whl --no-deps - if [ $? -ne 0 ] - then - echo "FATAL: could not install readpoolctl 3.0.0" - exit 6 - fi - echo "INFO: install joblib-1.1.0" - ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/joblib-1.1.0/joblib-1.1.0-py2.py3-none-any.whl --no-deps - if [ $? -ne 0 ] - then - echo "FATAL: could not install joblib-1.1.0" - exit 6 - fi - echo "INFO: install decorator-5.1.0" - ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/decorator-5.1.0/decorator-5.1.0-py3-none-any.whl --no-deps - if [ $? -ne 0 ] - then - echo "FATAL: could not install decorator-5.1.0" - exit 6 - fi - echo "INFO: install scikit-learn-0.24.2" - ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-0.24.2/scikit-learn-0.24.2.tar.gz --no-deps - if [ $? -ne 0 ] - then - echo "FATAL: could not install scikit-0.24.2" - exit 6 - fi - fi - fi - - cd $BUILD_DIR - mkdir ${BUILD_DIR}/$k - cd ${BUILD_DIR}/$k - cp -R $SOURCE_DIR/$k-${OTP[$k]}/* . - # - $PYTHONBIN setup.py build - if [ $? -ne 0 ] - then - echo "ERROR on ${PYTHONBIN} setup.py build" - exit 4 - fi - # - $PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL - if [ $? -ne 0 ] - then - echo "ERROR on ${PYTHONBIN} setup.py install --prefix=$PRODUCT_INSTALL" - exit 5 - fi - done - - # - # O P E N T U R N S - # - if [ -f ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages/site.py ]; then - echo "INFO: site.py already installed" - elif [ "$SAT_Python_IS_NATIVE" == "1" ]; then - # check first whether the init.py file is installed - echo "WARNING: missing init.py file. Installing it from system Python installation" - SITE_PATCH= - LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION" - case $LINUX_DISTRIBUTION in - DB11) - SITE_PATCH=/usr/lib/pypy/dist-packages/setuptools/site-patch.py - ;; - DB10) - SITE_PATCH=/usr/lib/python3/dist-packages/setuptools/site-patch.py - ;; - UB22*) - SITE_PATCH=/usr/lib/pypy/dist-packages/setuptools/site-patch.py - ;; - UB20*) - SITE_PATCH=/usr/lib/python3/dist-packages/setuptools/site-patch.py - ;; - FD32) - SITE_PATCH=/usr/lib/python3.8/site-packages/setuptools/site-patch.py - ;; - FD34) - SITE_PATCH=$SOURCE_DIR/addons/site-patch.py - ;; - FD36) - SITE_PATCH=$SOURCE_DIR/addons/site-patch.py - ;; - FD37) - SITE_PATCH=$SOURCE_DIR/addons/site-patch.py - ;; - CO8*) - SITE_PATCH=/usr/lib/pypy/dist-packages/setuptools/site-patch.py - ;; - *) - SITE_PATCH=$SOURCE_DIR/addons/site-patch.py - ;; - esac - # check whether this file exists - if [ "${SITE_PATCH}" == "" ]; then - cp $SOURCE_DIR/addons/site-patch.py ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages/site.py - else - cp $SITE_PATCH ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages/site.py - fi - elif [ -f ${PYTHON_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/setuptools/site-patch.py ]; then - cp ${PYTHON_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/setuptools/site-patch.py ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages/site.py - else - echo "ERROR: could not find site-patch.py" - exit 7 - fi -fi - -cd ${PRODUCT_INSTALL}/lib -# On some nodes, the link to OT is not done properly. -if [[ ! -f libOT.so.0 ]]; then - echo "INFO: Fixing libOT.so" - ln -sf libOT.so.0.21.0 libOT.so.0.21 - ln -sf libOT.so.0.21 libOT.so.0 - ln -sf libOT.so.0 libOT.so -fi - -echo -echo "########## END" diff --git a/products/openturns.pyconf b/products/openturns.pyconf index e62a5d2..906e854 100644 --- a/products/openturns.pyconf +++ b/products/openturns.pyconf @@ -35,7 +35,7 @@ default_win : opt_depend : [] } -version_1_20 : +version_1_20_1 : { compil_script : "openturns-1.20" + $VARS.scriptExtension patches : [] @@ -43,7 +43,7 @@ version_1_20 : opt_depend : ['pandas', 'statsmodels'] } -version_1_20_UB22_04 : +version_1_20_1_UB22_04 : { compil_script : "openturns-1.20" + $VARS.scriptExtension patches : ['openturns-1.20.0002.patch'] @@ -51,73 +51,73 @@ version_1_20_UB22_04 : opt_depend : ['pandas', 'statsmodels'] } -version_1_20_UB20_04 : +version_1_20_1_UB20_04 : { - compil_script : "openturns-1.20" + $VARS.scriptExtension + compil_script : "openturns-1.20.1" + $VARS.scriptExtension patches : ['openturns-1.20.0002.patch'] depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI'] opt_depend : ['pandas', 'statsmodels'] } -version_1_20_DB11 : +version_1_20_1_DB11 : { - compil_script : "openturns-1.20" + $VARS.scriptExtension + compil_script : "openturns-1.20.1" + $VARS.scriptExtension patches : ['openturns-1.20.0002.patch'] depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI'] opt_depend : ['pandas', 'statsmodels'] } -version_1_20_DB09 : +version_1_20_1_DB09 : { - compil_script : "openturns-1.20" + $VARS.scriptExtension + compil_script : "openturns-1.20.1" + $VARS.scriptExtension patches : ['openturns-1.20.0001.patch'] depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI'] opt_depend : ['pandas', 'statsmodels'] } -version_1_20_CO8 : +version_1_20_1_CO8 : { - compil_script : "openturns-1.20" + $VARS.scriptExtension + compil_script : "openturns-1.20.1" + $VARS.scriptExtension patches : ['openturns-1.20.0001.patch'] depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI'] opt_depend : ['pandas', 'statsmodels'] } -version_1_20_CO7 : +version_1_20_1_CO7 : { - compil_script : "openturns-1.20" + $VARS.scriptExtension + compil_script : "openturns-1.20.1" + $VARS.scriptExtension patches : ['openturns-1.20.0001.patch'] depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI'] opt_depend : ['pandas', 'statsmodels'] } -version_1_20_FD37 : +version_1_20_1_FD37 : { - compil_script : "openturns-1.20" + $VARS.scriptExtension + compil_script : "openturns-1.20.1" + $VARS.scriptExtension patches : [] depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI'] opt_depend : ['pandas', 'statsmodels'] } -version_1_20_FD36 : +version_1_20_1_FD36 : { - compil_script : "openturns-1.20" + $VARS.scriptExtension + compil_script : "openturns-1.20.1" + $VARS.scriptExtension patches : [] depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI'] opt_depend : ['pandas', 'statsmodels'] } -version_1_20_FD34 : +version_1_20_1_FD34 : { - compil_script : "openturns-1.20" + $VARS.scriptExtension + compil_script : "openturns-1.20.1" + $VARS.scriptExtension patches : ['openturns-1.20.0002.patch'] depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI'] opt_depend : ['pandas', 'statsmodels'] } -version_1_20_FD32 : +version_1_20_1_FD32 : { - compil_script : "openturns-1.20" + $VARS.scriptExtension + compil_script : "openturns-1.20.1" + $VARS.scriptExtension patches : ['openturns-1.20.0002.patch', 'openturns-1.20.0003.patch'] depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI'] opt_depend : ['pandas', 'statsmodels']