From: Nabil Ghodbane Date: Wed, 23 Mar 2022 21:11:57 +0000 (+0100) Subject: spns #26828: openturns 1.18 - to be tested. Note that the presence of a system wide... X-Git-Tag: V9_9_0~128 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f1f49a586a8bc4191fe3a7486e08c40c22c9826d;p=tools%2Fsat_salome.git spns #26828: openturns 1.18 - to be tested. Note that the presence of a system wide installation screws up openturns plugins. This issue was originaly reported on the SALOME forum --- diff --git a/products/compil_scripts/openturns-1.18.sh b/products/compil_scripts/openturns-1.18.sh new file mode 100755 index 0000000..a29c256 --- /dev/null +++ b/products/compil_scripts/openturns-1.18.sh @@ -0,0 +1,313 @@ +#!/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:0:3}/site-packages +export PATH=$(pwd)/bin:$PATH +export PYTHONPATH=$(pwd):$PYTHONPATH +export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION:0:3}/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_BUILD_TYPE:STRING=Release" +CMAKE_OPTIONS+=" -DPYTHON_EXECUTABLE=${PYTHONBIN}" +CMAKE_OPTIONS+=" -DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig" + +if [ -n "$TBB_ROOT_DIR" ] && [ "${TBB_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DTBB_ROOT_DIR=${TBB_ROOT_DIR}" +fi + +### libxml2 settings +if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; 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" ] && [ "${HDF5_ROOT_DIR}" != "/usr" ]; 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" ] && [ "${CMINPACK_ROOT_DIR}" != "/usr" ]; 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" ] && [ "${LAPACK_ROOT_DIR}" != "/" ]; 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" && $APPLICATION_NAME =~ native && -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" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; 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" ] && [ "${NLOPT_ROOT_DIR}" != "/usr" ]; 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 +mkdir -p $BUILD_DIR/openturns +cd $BUILD_DIR/openturns +cmake $CMAKE_OPTIONS $SOURCE_DIR/openturns-1.18 +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}/lib64" ] +then + mv ${PRODUCT_INSTALL}/lib64/* ${PRODUCT_INSTALL}/lib + rmdir ${PRODUCT_INSTALL}/lib64 +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.18/python/test/t_features.py +${SOURCE_DIR}/openturns-1.18/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.11" ]]; then + + declare -A OTC + OTC["otagrum"]="0.5" + OTC["otfftw"]="0.11" + OTC["otmixmod"]="0.12" + OTC["otmorris"]="0.10" + OTC["otpmml"]="1.11" + OTC["otrobopt"]="0.10" + OTC["otsubsetinverse"]="1.8" + OTC["otsvm"]="0.10" + + 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 == "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.14" + OTP["otpod"]="0.6.7" + OTP["otwrapy"]="0.10" + for k in ${!OTP[@]}; + do + echo + echo "*** C O M P O N E N T : $k-${OTP[$k]} " + + if [[ $DIST_NAME == "DB" && $DIST_VERSION == "10" && $APPLICATION_NAME =~ native && $k == "otfmi" ]]; then + echo "INFO: install dill-0.3.4" + ${PYTHONBIN} -m pip install $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 + fi + if [[ $DIST_NAME == "DB" && $DIST_VERSION == "10" && $APPLICATION_NAME =~ native && $k == "otpod" ]]; then + echo "INFO: install scikit-learn-0.24.2" + ${PYTHONBIN} -m pip install $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 $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 + if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" && $APPLICATION_NAME =~ native && $k == "otpod" ]]; then + echo "*** skipping: since system Cython too old" + continue + fi + # For non native builds install everything, since Python is embedded + if [[ ! $APPLICATION_NAME =~ native ]]; then + if [[ $k == "otfmi" ]]; then + echo "INFO: install dill-0.3.4" + ${PYTHONBIN} -m pip install $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 $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 $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 $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 $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 + else + if [[ $DIST_NAME == "FD" && $DIST_VERSION == "32" && $k == "otpod" ]]; then + echo "INFO: install scikit-learn-0.24.2" + ${PYTHONBIN} -m pip install $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 + 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 +fi + +echo +echo "########## END" diff --git a/products/openturns.pyconf b/products/openturns.pyconf index 65b50c0..2091e42 100644 --- a/products/openturns.pyconf +++ b/products/openturns.pyconf @@ -35,14 +35,31 @@ default_win : opt_depend : [] } -version_1_16 : +version_1_18 : { - compil_script : "openturns-1.16" + $VARS.scriptExtension - patches : ['openturns-1.16.0001.patch','openturns-1.16.0002.patch'] + compil_script : "openturns-1.18" + $VARS.scriptExtension + patches : ['openturns-1.18.0001.patch'] + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI'] + opt_depend : ['pandas', 'statsmodels'] } -version_1_16_win : +version_1_18_FD32 : { + compil_script : "openturns-1.18" + $VARS.scriptExtension + patches : ['openturns-1.18.0001.patch', 'openturns-1.18.0002.patch'] + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI'] + opt_depend : ['pandas', 'statsmodels'] +} + +version_1_18_win : +{ + properties : + { + incremental : "yes" + pip : "yes" + } + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'pthreads'] + opt_depend : [] patches : [] } @@ -73,3 +90,14 @@ version_1_17_win : opt_depend : [] patches : [] } + +version_1_16 : +{ + compil_script : "openturns-1.16" + $VARS.scriptExtension + patches : ['openturns-1.16.0001.patch','openturns-1.16.0002.patch'] +} + +version_1_16_win : +{ + patches : [] +} diff --git a/products/patches/openturns-1.18.0001.patch b/products/patches/openturns-1.18.0001.patch new file mode 100644 index 0000000..b679218 --- /dev/null +++ b/products/patches/openturns-1.18.0001.patch @@ -0,0 +1,243 @@ +diff -Naur openturns-1.18_ref/openturns-1.18/CMakeLists.txt openturns-1.18_new/openturns-1.18/CMakeLists.txt +--- openturns-1.17_ref/openturns-1.18/CMakeLists.txt 2021-09-21 13:59:56.000000000 +0200 ++++ openturns-1.17_new/openturns-1.18/CMakeLists.txt 2021-10-04 13:27:16.893096795 +0200 +@@ -133,6 +133,11 @@ + + set (CMAKE_CXX_STANDARD 11) + ++SET(LAPACK_ROOT_DIR $ENV{LAPACK_ROOT_DIR}) ++IF(LAPACK_ROOT_DIR) ++ LIST(APPEND CMAKE_PREFIX_PATH "${LAPACK_ROOT_DIR}") ++ENDIF(LAPACK_ROOT_DIR) ++ + if (NOT DEFINED LAPACK_LIBRARIES) + find_package (LAPACK REQUIRED) + if (LAPACK_FOUND) +@@ -140,6 +145,10 @@ + endif () + endif () + list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${LAPACK_LIBRARIES}) ++IF (DEFINED CBLAS_LIBRARIES) ++ MESSAGE(STATUS "CBLAS_LIBRARIES is defined... adding to the list of libraries ${CBLAS_LIBRARIES}") ++ LIST (APPEND OPENTURNS_PRIVATE_LIBRARIES ${CBLAS_LIBRARIES}) ++ENDIF() + + if (USE_SPECTRA) + find_package (Spectra) +@@ -164,7 +173,11 @@ + endif () + + if (USE_TBB) +- find_package (TBB) ++ SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR}) ++ if(TBB_ROOT_DIR) ++ LIST(APPEND CMAKE_PREFIX_PATH "${TBB_ROOT_DIR}") ++ endif(TBB_ROOT_DIR) ++ find_package (TBB) + endif () + if (TBB_FOUND) + set (OPENTURNS_HAVE_TBB_TBB_H TRUE) +@@ -207,6 +220,10 @@ + endif () + + if (USE_LIBXML2) ++ SET(LIBXML2_ROOT_DIR $ENV{LIBXLM2_ROOT_DIR}) ++ if(LIBXML2_ROOT_DIR) ++ LIST(APPEND CMAKE_PREFIX_PATH "${LIBXML2_ROOT_DIR}") ++ endif(LIBXML2_ROOT_DIR) + find_package (LibXml2) + endif () + if (LIBXML2_FOUND) +@@ -216,7 +233,19 @@ + list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${LIBXML2_LIBRARIES}) + endif () + ++SET(MPI_ROOT_DIR $ENV{MPI_ROOT_DIR} CACHE PATH "Path to the MPI.") ++IF(MPI_ROOT_DIR) ++ LIST(APPEND CMAKE_PREFIX_PATH "${MPI_ROOT_DIR}") ++ find_package(MPI) ++ list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${MPI_INCLUDE_DIRS}) ++ list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${MPI_LIBRARIES}) ++ENDIF(MPI_ROOT_DIR) ++ + if (USE_HDF5) ++ SET(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to the HDF5.") ++ IF(HDF5_ROOT_DIR) ++ LIST(APPEND CMAKE_PREFIX_PATH "${HDF5_ROOT_DIR}") ++ ENDIF(HDF5_ROOT_DIR) + find_package(HDF5 COMPONENTS CXX) + endif () + if (HDF5_FOUND) +@@ -237,6 +266,10 @@ + endif () + + if (USE_BOOST) ++ SET(BOOST_ROOT_DIR $ENV{BOOST_ROOT_DIR} CACHE PATH "Path to the BOOST.") ++ IF(BOOST_ROOT_DIR) ++ LIST(APPEND CMAKE_PREFIX_PATH "${BOOST_ROOT_DIR}") ++ ENDIF(BOOST_ROOT_DIR) + find_package (Boost 1.46) + if (Boost_FOUND) + if (CMAKE_VERSION VERSION_LESS 3.15) +@@ -272,7 +305,11 @@ + endif () + + if (USE_NLOPT) +- find_package (NLopt CONFIG QUIET) ++ SET(NLOPT_ROOT_DIR $ENV{NLOPT_ROOT_DIR} CACHE PATH "Path to the NLOPT.") ++ IF(NLOPT_ROOT_DIR) ++ LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}") ++ ENDIF(NLOPT_ROOT_DIR) ++ find_package (NLopt) + if (NLopt_FOUND) + message(STATUS "Found NLopt: ${NLopt_DIR}") + else () +@@ -336,22 +373,22 @@ + endif () + + if (USE_CMINPACK) +- find_package (CMinpack CONFIG QUIET) +- if (CMinpack_FOUND) +- if (TARGET cminpack::cminpack) +- message (STATUS "Found CMinpack: ${CMinpack_DIR}") +- set (CMINPACK_LIBRARIES cminpack::cminpack) +- endif () +- else () +- # fallback to our macro if CMinpackConfig is not provided +- find_package (CMinpack) +- set (CMinpack_FOUND ${CMINPACK_FOUND}) +- endif () +- if (CMinpack_FOUND) +- set (OPENTURNS_HAVE_CMINPACK TRUE) +- list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${CMINPACK_INCLUDE_DIRS}) +- list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${CMINPACK_LIBRARIES}) +- endif () ++ SET(CMINPACK_ROOT_DIR $ENV{CMINPACK_ROOT_DIR} CACHE PATH "Path to the CMINPACK.") ++ IF(CMINPACK_ROOT_DIR) ++ LIST(APPEND CMAKE_PREFIX_PATH "${CMINPACK_ROOT_DIR}") ++ ENDIF(CMINPACK_ROOT_DIR) ++ find_package (CMinpack) ++ set (CMinpack_FOUND ${CMINPACK_FOUND}) ++endif () ++if (CMinpack_FOUND) ++ MESSAGE(STATUS "Found CMkinpack ...") ++ MESSAGE(STATUS " CMINPACK_LIBRARIES is set to: ${CMINPACK_LIBRARIES}") ++ set (OPENTURNS_HAVE_CMINPACK TRUE) ++ list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${CMINPACK_INCLUDE_DIRS}) ++ list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${CMINPACK_LIBRARIES}) ++else() ++ MESSAGE(STATUS "Could not find MinPack dependency") ++ set (OPENTURNS_HAVE_CMINPACK FALSE) + endif () + + if (USE_BONMIN) +diff -Naur openturns-1.18_ref/openturns-1.18/cmake/FindCMinpack.cmake openturns-1.18_new/openturns-1.18/cmake/FindCMinpack.cmake +--- openturns-1.18_ref/openturns-1.18/cmake/FindCMinpack.cmake 2021-09-21 13:28:10.246960802 +0200 ++++ openturns-1.18_new/openturns-1.18/cmake/FindCMinpack.cmake 2021-09-21 13:27:42.519698634 +0200 +@@ -22,14 +22,19 @@ + # (To distributed this file outside of CMake, substitute the full + # License text for the above reference.) + ++SET(CMINPACK_ROOT_DIR $ENV{CMINPACK_ROOT_DIR}) ++if(CMINPACK_ROOT_DIR) ++ LIST(APPEND CMAKE_PREFIX_PATH "${CMINPACK_ROOT_DIR}") ++endif(CMINPACK_ROOT_DIR) + find_path (CMINPACK_INCLUDE_DIR cminpack.h + PATH_SUFFIXES cminpack cminpack-1 + ) + + find_library (CMINPACK_LIBRARY + NAMES cminpack cminpack_s ++ HINTS ${CMINPACK_ROOT_DIR}/include ++ DOC "CMINPACK include directory" + ) +- + set (CMINPACK_LIBRARIES ${CMINPACK_LIBRARY}) + set (CMINPACK_INCLUDE_DIRS ${CMINPACK_INCLUDE_DIR}) + +diff -Naur openturns-1.18_ref/openturns-1.18/cmake/FindNLopt.cmake openturns-1.18_new/openturns-1.18/cmake/FindNLopt.cmake +--- openturns-1.18_ref/openturns-1.18/cmake/FindNLopt.cmake 2021-09-21 13:28:10.247960811 +0200 ++++ openturns-1.18_new/openturns-1.18/cmake/FindNLopt.cmake 2021-09-21 13:27:42.520698643 +0200 +@@ -11,8 +11,19 @@ + # NLOPT_ROOT_DIR - root dir (ex. /usr/local) + + # set NLOPT_INCLUDE_DIR ++SET(NLOPT_ROOT_DIR $ENV{NLOPT_ROOT_DIR}) ++ ++IF(NLOPT_ROOT_DIR) ++ LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}") ++ LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}/include") ++ LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}/lib") ++ELSE(NLOPT_ROOT_DIR) ++ MESSAGE(FATAL_ERROR "PLEASE SET ENVIRONMENT VARIABLE NLOPT_ROOT_DIR") ++ENDIF(NLOPT_ROOT_DIR) ++ + find_path (NLOPT_INCLUDE_DIR + NAMES nlopt.hpp ++ HINTS ${NLOPT_ROOT_DIR}/include + DOC + "Nlopt include directory" + ) +@@ -22,7 +33,8 @@ + + # set NLOPT_LIBRARY + find_library (NLOPT_LIBRARY +- NAMES nlopt_cxx nlopt ++ NAMES nlopt ++ HINTS ${NLOPT_ROOT_DIR}/lib + DOC + "Nlopt library location" + ) +diff -Naur openturns-1.18_ref/openturns-1.18/cmake/FindTBB.cmake openturns-1.18_new/openturns-1.18/cmake/FindTBB.cmake +--- openturns-1.18_ref/openturns-1.18/cmake/FindTBB.cmake 2021-09-21 13:28:10.242960764 +0200 ++++ openturns-1.18_new/openturns-1.18/cmake/FindTBB.cmake 2021-09-21 13:27:42.514698586 +0200 +@@ -27,6 +27,11 @@ + # (To distributed this file outside of CMake, substitute the full + # License text for the above reference.) + ++SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR}) ++IF(TBB_ROOT_DIR) ++ LIST(APPEND CMAKE_PREFIX_PATH "${TBB_ROOT_DIR}") ++ENDIF(TBB_ROOT_DIR) ++ + find_path (TBB_INCLUDE_DIR NAMES tbb/tbb.h DOC "TBB include directory") + + set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR}) +diff -Naur openturns-1.18_ref/openturns-1.18/lib/src/CMakeLists.txt openturns-1.18_new/openturns-1.18/lib/src/CMakeLists.txt +--- openturns-1.18_ref/openturns-1.18/lib/src/CMakeLists.txt 2021-09-21 13:27:57.412839452 +0200 ++++ openturns-1.18_new/openturns-1.18/lib/src/CMakeLists.txt 2021-09-21 13:27:14.134430243 +0200 +@@ -124,5 +124,5 @@ + if (UNIX AND BUILD_SHARED_LIBS) + set (OT_GDB_PY ${CMAKE_SHARED_LIBRARY_PREFIX}OT${CMAKE_SHARED_LIBRARY_SUFFIX}.${LIB_VERSION}-gdb.py) + execute_process (COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/libOT-gdb.py ${CMAKE_CURRENT_BINARY_DIR}/${OT_GDB_PY}) +- install (FILES libOT-gdb.py DESTINATION ${OPENTURNS_DATA_PATH}/gdb/auto-load/${LIBRARY_PATH} RENAME ${OT_GDB_PY}) ++ install (FILES libOT-gdb.py DESTINATION ${OPENTURNS_DATA_PATH}/gdb/auto-load RENAME ${OT_GDB_PY}) + endif () +diff -Naur openturns-1.18_ref/openturns-1.18/lib/src/Base/Common/openturns/TBB.hxx openturns-1.18_new/openturns-1.18/lib/src/Base/Common/openturns/TBB.hxx +--- openturns-1.18_ref/openturns-1.18/lib/src/Base/Common/openturns/TBB.hxx 2021-09-21 13:27:54.484811767 +0200 ++++ openturns-1.18_new/openturns-1.18/lib/src/Base/Common/openturns/TBB.hxx 2021-09-21 13:27:12.704416722 +0200 +@@ -35,6 +35,7 @@ + # define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1 + # endif + #endif ++#define TBB_PREVIEW_TASK_ARENA 1 + #include + #include + #include +diff -Naur openturns-1.18_ref/openturns-1.18/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx openturns-1.18_new/openturns-1.18/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx +--- openturns-1.18_ref/openturns-1.18/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2021-09-21 13:27:55.324819709 +0200 ++++ openturns-1.18_new/openturns-1.18/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2021-09-21 13:27:13.048419975 +0200 +@@ -24,6 +24,13 @@ + #include "openturns/PersistentObject.hxx" + #include "openturns/CovarianceModel.hxx" + #include "openturns/KarhunenLoeveResult.hxx" ++#ifdef __GNUC__ ++# include ++# if __GNUC_PREREQ(11,0) ++# include ++# endif ++#endif // __GNUC__ ++ + + BEGIN_NAMESPACE_OPENTURNS + diff --git a/products/patches/openturns-1.18.0002.patch b/products/patches/openturns-1.18.0002.patch new file mode 100644 index 0000000..31f89d1 --- /dev/null +++ b/products/patches/openturns-1.18.0002.patch @@ -0,0 +1,12 @@ +diff -Naur openturns_ref/otpod-0.6.7/setup.py openturns_new/otpod-0.6.7/setup.py +--- openturns_ref/otpod-0.6.7/setup.py 2022-01-04 09:49:08.874177684 +0100 ++++ openturns_new/otpod-0.6.7/setup.py 2022-01-04 09:48:41.115647314 +0100 +@@ -13,7 +13,7 @@ + + install_requires=['statsmodels>=0.6.1', + 'numpy>=1.10.4', +- 'scikit-learn>=0.17', ++ 'scikit-learn==0.24.2', + 'matplotlib>=1.5.1', + 'scipy>=0.17.0', + 'decorator>=4.0.9']