From: Nabil Ghodbane Date: Wed, 3 Nov 2021 14:29:44 +0000 (+0100) Subject: spns #24377: Openturns + ParaView X-Git-Tag: V9_8_0~58 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=344f7a595232e2fe0bc5bda446be13dbf84f680c;p=tools%2Fsat_salome.git spns #24377: Openturns + ParaView --- diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index 94cf199..614626b 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -40,6 +40,7 @@ APPLICATION : click : 'native' cmake : 'native' cppunit : 'native' + cminpack: '1.3.6' cycler : 'native' Cython : 'native' dateutil : 'native' @@ -47,6 +48,8 @@ APPLICATION : doxygen : 'native' eigen : 'native' embree : '3.12.2' + FMILibrary : '2.0.3' + fftw : 'native' freeimage : 'native' freetype : 'native' gl2ps : 'native' @@ -76,15 +79,17 @@ APPLICATION : omniORBpy : '4.2.3' opencv : 'native' openVKL : '0.11.0' - openturns: '1.16' + openturns: '1.17' ospray : '2.4.0' packaging : 'native' + pandas : 'native' ParaView : '5.9.0' petsc : {tag : '3.15.0', section: 'version_3_15_0'} Pillow : 'native' # 'native' not exists : freeCAD part but not delivered with it from package handler planegcs : '0.18-3cb6890' psutil : 'native' + PyFMI : '2.5' Pygments : 'native' pyparsing : 'native' PyQt : 'native' @@ -107,6 +112,7 @@ APPLICATION : sphinxintl: 'native' sphinx_rtd_theme : 'native' StaticMeshPlugin: '5.8.0' + statsmodels : 'native' swig : 'native' salome_system : 'native' tbb : 'native' @@ -152,9 +158,9 @@ APPLICATION : 'PYHELLO' 'EFICAS' 'EFICAS_TOOLS' - 'PY2CPP' - 'ADAO' - 'ADAO_INTERFACE' + 'PY2CPP' + 'ADAO' + 'ADAO_INTERFACE' 'PARAVISADDONS' 'CEATESTBASE' : {tag: 'SalomeV9'} } @@ -232,7 +238,6 @@ __overwrite__ : } { # FD 34 qt5 package is qt5-qtbase-devel. - __condition__ : "VARS.dist in ['FD34']" 'APPLICATION.products.omniORB' : '4.2.4' 'APPLICATION.products.omniORBpy': '4.2.4' @@ -240,4 +245,24 @@ __overwrite__ : 'PRODUCTS.qt.default.system_info.rpm' : [] 'PRODUCTS.qt.default.system_info.rpm_dev' : ["qt5-qtbase-devel"] } + { + __condition__ : "VARS.dist in ['FD32']" + 'PRODUCTS.PyFMI.version_2_5.properties.pip' : "no" + 'PRODUCTS.PyFMI.version_2_5.compil_script' : "PyFMI-2.5.sh" + } + { + __condition__ : "VARS.dist in ['DB10', 'UB20.04']" + 'APPLICATION.products.cminpack': 'native' + 'PRODUCTS.PyFMI.version_2_5.properties.pip' : "no" + 'PRODUCTS.PyFMI.version_2_5.compil_script' : "PyFMI-2.5.sh" + } + { + __condition__ : "VARS.dist in ['CO8']" + 'APPLICATION.products.statsmodels' : '0.6.1' # will fail otherwise - 0.8.0 does not match Cython. + 'APPLICATION.products.cminpack': '1.3.6' + 'PRODUCTS.PyFMI.version_2_5.properties.pip' : "no" + 'PRODUCTS.PyFMI.version_2_5.compil_script' : "PyFMI-2.5.sh" + 'PRODUCTS.statsmodels.version_0_6_1.properties.pip' : "no" + 'PRODUCTS.statsmodels.version_0_6_1.compil_script' : "statsmodels-0.6.1.sh" + } ] diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index 2b93760..c4980e4 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -37,14 +37,16 @@ APPLICATION : chardet : '3.0.4' click : '6.7' cmake : '3.12.1' + cminpack: '1.3.6' cppunit : '1.13.2' cycler : '0.10.0' - Cython : '0.25.2' - dateutil : '2.4.2' + Cython : '0.29.12' + dateutil : '2.6.1' docutils : '0.12' doxygen : '1.8.14' eigen : '3.3.4' embree : '3.12.2' + FMILibrary : '2.0.3' freeimage : '3.16.0' freetype : '2.9.1' gcc : '8.5.0' @@ -74,22 +76,25 @@ APPLICATION : omniORB : '4.2.2' omniORBpy : '4.2.2' opencv : '3.2.0' - openturns: '1.16' + openturns: '1.17' openVKL: '0.11.0' ospray : '2.4.0' packaging : '17.1' + pandas : '0.25.2' + patsy : '0.5.2' ParaView : '5.9.0' petsc : {tag : '3.15.0', section: 'version_3_15_0'} Pillow : '7.1.1' planegcs : '0.18-3cb6890' psutil : '5.7.2' + PyFMI : '2.5' Pygments : '2.0.2' pyparsing : '2.0.3' PyQt : '5.15.3' #PyQtChart : '5.9' pyreadline : '2.0' Python : '3.6.5' - pytz : '2015.7' + pytz : '2017.2' qt : '5.12.10' qwt : '6.1.2' requests : '2.19.1' @@ -107,6 +112,7 @@ APPLICATION : sphinx_rtd_theme : '0.4.3' sphinxintl: '0.9.10' StaticMeshPlugin: '5.8.0' + statsmodels: '0.8.0' swig : '3.0.12' tbb : '2019_U8' tcl : '8.6.0' diff --git a/products/ParaView.pyconf b/products/ParaView.pyconf index 287f291..867a9a6 100755 --- a/products/ParaView.pyconf +++ b/products/ParaView.pyconf @@ -19,7 +19,7 @@ default : 'cgns', 'Pygments' ] - opt_depend : ['openmpi', 'ospray','tbb'] + opt_depend : ['openmpi', 'ospray','tbb', 'openturns'] build_depend : ["cmake"] source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name diff --git a/products/PyFMI.pyconf b/products/PyFMI.pyconf index d0ecc76..a5b2c81 100644 --- a/products/PyFMI.pyconf +++ b/products/PyFMI.pyconf @@ -25,3 +25,12 @@ default : pip : "yes" } } + +version_2_5 : +{ + properties: + { + incremental : "yes" + pip : "yes" + } +} diff --git a/products/cminpack.pyconf b/products/cminpack.pyconf index 2fbca76..abdc5ee 100644 --- a/products/cminpack.pyconf +++ b/products/cminpack.pyconf @@ -2,9 +2,16 @@ default : { name : "cminpack" build_source : "cmake" - cmake_options : " -DUSE_BLAS=ON -DUSE_FPIC=ON -DBUILD_SHARED_LIBS=ON" + cmake_options : " -DUSE_BLAS=ON -DUSE_FPIC=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_LIBDIR:STRING=lib " compil_script : $name + $VARS.scriptExtension get_source : "archive" + system_info : + { + rpm : ['cminpack'] + rpm_dev : [] + apt : ['libcminpack1'] + apt_dev : ['libcminpack-dev'] + } environ : { env_script : $name + ".py" @@ -25,5 +32,7 @@ default : version_1_3_6 : { + build_source : "script" + compil_script: 'cminpack-1.3.6.sh' patches : ['cminpack-1.3.6-cblas.patch'] } \ No newline at end of file diff --git a/products/compil_scripts/ParaView-5.9.0.sh b/products/compil_scripts/ParaView-5.9.0.sh index 019d22b..07a48f3 100755 --- a/products/compil_scripts/ParaView-5.9.0.sh +++ b/products/compil_scripts/ParaView-5.9.0.sh @@ -157,7 +157,11 @@ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_USE_EXTERNAL_VTK_hdf5:BOOL=ON" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_DIR:PATH=${HDF5_ROOT_DIR}/share/cmake/hdf5" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_USE_STATIC_LIBRARIES:BOOL=OFF" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}" - +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_hdf5_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_hdf5_hl_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_hdf5_CXX_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib/libhdf5_cxx.so" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_HL_LIBRARY=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_C_INCLUDE_DIR=${HDF5_ROOT_DIR}/include" ### CGNS CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_USE_EXTERNAL_ParaView_cgns:BOOL=ON" if [ "$CGNS_ROOT_DIR" != "/usr" ] @@ -212,6 +216,20 @@ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_PLUGIN_ENABLE_pvblot:BOOL=OFF" # allow additional plugins CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_ALL_NEW_OBJECT_FACTORY:BOOL=ON" +# Openturns: +if [ -n "$OPENTURNS_VERSION" ]; then + function version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1"; } + if version_ge $OPENTURNS_VERSION "1.17" ; then + echo "INFO: Adding OpenTURNS version ${OPENTURNS_VERSION} support..." + CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_ENABLE_OPENTURNS=ON" + CMAKE_OPTIONS="${CMAKE_OPTIONS} -DOpenTURNS_DIR=$OPENTURNS_ROOT_DIR/lib/cmake/openturns" + else + echo "WARNING: OpenTURNS ${OPENTURNS_VERSON} is not supported with current ParaView build..." + fi +else + echo "WARNING: No OpenTURNS environment variable is found..." +fi + echo echo "*** cmake" ${CMAKE_OPTIONS} cmake ${CMAKE_OPTIONS} $SOURCE_DIR diff --git a/products/compil_scripts/PyFMI-2.5.sh b/products/compil_scripts/PyFMI-2.5.sh new file mode 100755 index 0000000..09004f8 --- /dev/null +++ b/products/compil_scripts/PyFMI-2.5.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +#!/bin/bash + +echo "##########################################################################" +echo "PyFMI " $VERSION +echo "##########################################################################" + +echo "*** build in SOURCE directory" + + +cd $BUILD_DIR +cp -R $SOURCE_DIR/* . + +rm -f $BUILD_DIR/src/pyfmi/*.c +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 + +echo +echo "*** build with $PYTHONBIN" +$PYTHONBIN setup.py build +if [ $? -ne 0 ] +then + echo "ERROR on build" + exit 2 +fi + +echo +echo "*** install with $PYTHONBIN" +$PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL --fmil-home=$PRODUCT_INSTALL +if [ $? -ne 0 ] +then + echo "ERROR on install" + exit 3 +fi + +echo +echo "########## END" diff --git a/products/compil_scripts/cminpack-1.3.6.sh b/products/compil_scripts/cminpack-1.3.6.sh new file mode 100755 index 0000000..e64e8a0 --- /dev/null +++ b/products/compil_scripts/cminpack-1.3.6.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +echo "##########################################################################" +echo "Cminpack " $VERSION +echo "##########################################################################" + +if [ -n "$MPI_ROOT_DIR" ] +then + echo "WARNING: setting CC and CXX environment variables and target MPI wrapper" + export CC=${MPI_ROOT_DIR}/bin/mpicc + export CXX=${MPI_ROOT_DIR}/bin/mpicxx +fi + +CMAKE_OPTIONS="" +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}" +CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release" +CMAKE_OPTIONS+=" -DUSE_BLAS=ON" +CMAKE_OPTIONS+=" -DUSE_FPIC=ON" +CMAKE_OPTIONS+=" -DBUILD_EXAMPLES=OFF" +###CMAKE_OPTIONS+=" -DBUILD_SHARED_LIBS=ON" +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib" +# strangely on CentOS 8 - CMake fails to find CBLAS include directory +if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" && $APPLICATION_NAME =~ native && -d /usr/include/cblas ]]; then + CMAKE_OPTIONS+=" -DCBLAS_INCLUDE_DIRS=/usr/include/cblas " +fi + +echo +echo "*** cmake" $CMAKE_OPTIONS +cmake $CMAKE_OPTIONS $SOURCE_DIR +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 + echo "WARNING: renaming lib64 to lib..." + mv ${PRODUCT_INSTALL}/lib64 ${PRODUCT_INSTALL}/lib +fi + +echo +echo "########## END" diff --git a/products/compil_scripts/lapack.sh b/products/compil_scripts/lapack.sh index bd63705..4b83818 100755 --- a/products/compil_scripts/lapack.sh +++ b/products/compil_scripts/lapack.sh @@ -22,6 +22,7 @@ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_FLAGS=-fPIC" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_C_FLAGS=-fPIC" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DUSE_OPTIMIZED_BLAS=OFF" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCBLAS=ON" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DBLAS=ON" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLAPACKE=ON" echo diff --git a/products/compil_scripts/openturns-1.16.sh b/products/compil_scripts/openturns-1.16.sh new file mode 100755 index 0000000..927bcc9 --- /dev/null +++ b/products/compil_scripts/openturns-1.16.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +echo "##########################################################################" +echo "openturns" $VERSION +echo "##########################################################################" + +if [ -n "$MPI_ROOT_DIR" ] +then + echo "WARNING: setting CC and CXX environment variables and target MPI wrapper" + export CC=${MPI_ROOT_DIR}/bin/mpicc + export CXX=${MPI_ROOT_DIR}/bin/mpicxx +fi + +CMAKE_OPTIONS="" +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" + +echo +echo "*** cmake" $CMAKE_OPTIONS +cmake $CMAKE_OPTIONS $SOURCE_DIR +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}/python/test/t_features.py +${SOURCE_DIR}/python/test/t_features.py +if [ $? -ne 0 ] +then + echo "ERROR testing Openturns features...." + exit 4 +fi + +echo +echo "########## END" diff --git a/products/compil_scripts/openturns-1.17.sh b/products/compil_scripts/openturns-1.17.sh new file mode 100755 index 0000000..5aff590 --- /dev/null +++ b/products/compil_scripts/openturns-1.17.sh @@ -0,0 +1,276 @@ +#!/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 + +if [ -n "$MPI_ROOT_DIR" ] +then + echo "WARNING: setting CC and CXX environment variables and target MPI wrapper" + export CC=${MPI_ROOT_DIR}/bin/mpicc + export CXX=${MPI_ROOT_DIR}/bin/mpicxx +fi + +CMAKE_OPTIONS="" +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 && -d /usr/lib64/libcblas.so && -d /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.17 +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.17/python/test/t_features.py +${SOURCE_DIR}/openturns-1.17/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.4" + OTC["otfftw"]="0.11" + OTC["otmixmod"]="0.12" + OTC["otmorris"]="0.10" + OTC["otpmml"]="1.11" + OTC["otrobopt"]="0.9" + 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 [[ $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" # needs extra latex modules on CentOS 7 + elif [[ $k == "otpmml" ]]; then + CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" # needs extra latex modules on CentOS 7 + 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.11" + 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 == "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 + 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/compil_scripts/statsmodels-0.6.1.sh b/products/compil_scripts/statsmodels-0.6.1.sh new file mode 100755 index 0000000..bf29f39 --- /dev/null +++ b/products/compil_scripts/statsmodels-0.6.1.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +#!/bin/bash + +echo "##########################################################################" +echo "statsmodels " $VERSION +echo "##########################################################################" + +echo "*** build in SOURCE directory" + + +cd $BUILD_DIR +cp -R $SOURCE_DIR/* . + +if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" && $APPLICATION_NAME =~ native ]]; then + PRODUCT_LIB=lib64 +else + PRODUCT_LIB=lib +fi +mkdir -p $PRODUCT_INSTALL/${PRODUCT_LIB}/python${PYTHON_VERSION:0:3}/site-packages +export PATH=$(pwd)/bin:$PATH +export PYTHONPATH=$(pwd):$PYTHONPATH +export PYTHONPATH=${PRODUCT_INSTALL}/${PRODUCT_LIB}/python${PYTHON_VERSION:0:3}/site-packages:$PYTHONPATH + +echo +echo "*** build with $PYTHONBIN" +###$PYTHONBIN setup.py clean +$PYTHONBIN setup.py build +if [ $? -ne 0 ] +then + echo "ERROR on build" + exit 2 +fi + +echo +echo "*** install with $PYTHONBIN" +$PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL +if [ $? -ne 0 ] +then + echo "ERROR on install" + exit 3 +fi + +echo +echo "########## END" diff --git a/products/compil_scripts/statsmodels-0.8.0.sh b/products/compil_scripts/statsmodels-0.8.0.sh new file mode 100755 index 0000000..bf29f39 --- /dev/null +++ b/products/compil_scripts/statsmodels-0.8.0.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +#!/bin/bash + +echo "##########################################################################" +echo "statsmodels " $VERSION +echo "##########################################################################" + +echo "*** build in SOURCE directory" + + +cd $BUILD_DIR +cp -R $SOURCE_DIR/* . + +if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" && $APPLICATION_NAME =~ native ]]; then + PRODUCT_LIB=lib64 +else + PRODUCT_LIB=lib +fi +mkdir -p $PRODUCT_INSTALL/${PRODUCT_LIB}/python${PYTHON_VERSION:0:3}/site-packages +export PATH=$(pwd)/bin:$PATH +export PYTHONPATH=$(pwd):$PYTHONPATH +export PYTHONPATH=${PRODUCT_INSTALL}/${PRODUCT_LIB}/python${PYTHON_VERSION:0:3}/site-packages:$PYTHONPATH + +echo +echo "*** build with $PYTHONBIN" +###$PYTHONBIN setup.py clean +$PYTHONBIN setup.py build +if [ $? -ne 0 ] +then + echo "ERROR on build" + exit 2 +fi + +echo +echo "*** install with $PYTHONBIN" +$PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL +if [ $? -ne 0 ] +then + echo "ERROR on install" + exit 3 +fi + +echo +echo "########## END" diff --git a/products/env_scripts/PyFMI.py b/products/env_scripts/PyFMI.py index 7e83f24..b9d18e8 100644 --- a/products/env_scripts/PyFMI.py +++ b/products/env_scripts/PyFMI.py @@ -6,6 +6,7 @@ import platform def set_env(env, prereq_dir, version): env.set('PYFMI_ROOT_DIR', prereq_dir) - + pyver = 'python' + env.get('PYTHON_VERSION') + env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages')) def set_nativ_env(env): pass diff --git a/products/env_scripts/cminpack.py b/products/env_scripts/cminpack.py index a27bbce..45a5378 100644 --- a/products/env_scripts/cminpack.py +++ b/products/env_scripts/cminpack.py @@ -3,8 +3,10 @@ import os.path def set_env(env, prereq_dir, version): env.set('CMINPACK_ROOT_DIR', prereq_dir) + env.set('CMINPACK_DIR', os.path.join(prereq_dir,'share','cmake','Cminpack')) env.prepend('PATH', os.path.join(prereq_dir,'bin')) env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib')) def set_nativ_env(env): + env.set('CMINPACK_ROOT_DIR', '/usr') pass diff --git a/products/env_scripts/lapack.py b/products/env_scripts/lapack.py index 688695d..26ecc76 100644 --- a/products/env_scripts/lapack.py +++ b/products/env_scripts/lapack.py @@ -22,4 +22,5 @@ def set_env(env, prereq_dir, version): def set_nativ_env(env): env.set('LAPACKHOME', '/usr') + env.set('LAPACK_ROOT_DIR', '/') diff --git a/products/env_scripts/openturns.py b/products/env_scripts/openturns.py index 3527208..6a77f3f 100644 --- a/products/env_scripts/openturns.py +++ b/products/env_scripts/openturns.py @@ -3,10 +3,10 @@ import os.path def set_env(env, prereq_dir, version): env.set('OPENTURNS_ROOT_DIR', prereq_dir) + env.set('OPENTURNS_VERSION',version) env.prepend('PATH', os.path.join(prereq_dir,'bin')) env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib')) pyver = 'python' + env.get('PYTHON_VERSION') env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages')) - def set_nativ_env(env): pass diff --git a/products/openturns.pyconf b/products/openturns.pyconf index 7b50d65..3c61734 100644 --- a/products/openturns.pyconf +++ b/products/openturns.pyconf @@ -37,6 +37,7 @@ default_win : version_1_16 : { + compil_script : "openturns-1.16" + $VARS.scriptExtension patches : ['openturns-1.16.0001.patch','openturns-1.16.0002.patch'] } @@ -44,3 +45,16 @@ version_1_16_win : { patches : [] } + +version_1_17 : +{ + compil_script : "openturns-1.17" + $VARS.scriptExtension + patches : ['openturns-1.17.0001.patch'] + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI'] + opt_depend : ['pandas', 'statsmodels'] +} + +version_1_17_win : +{ + patches : [] +} diff --git a/products/patches/openturns-1.17.0001.patch b/products/patches/openturns-1.17.0001.patch new file mode 100644 index 0000000..1e98e9b --- /dev/null +++ b/products/patches/openturns-1.17.0001.patch @@ -0,0 +1,243 @@ +diff -Naur openturns-1.17_ref/openturns-1.17/CMakeLists.txt openturns-1.17_new/openturns-1.17/CMakeLists.txt +--- openturns-1.17_ref/openturns-1.17/CMakeLists.txt 2021-09-21 13:59:56.000000000 +0200 ++++ openturns-1.17_new/openturns-1.17/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.17_ref/openturns-1.17/cmake/FindCMinpack.cmake openturns-1.17_new/openturns-1.17/cmake/FindCMinpack.cmake +--- openturns-1.17_ref/openturns-1.17/cmake/FindCMinpack.cmake 2021-09-21 13:28:10.246960802 +0200 ++++ openturns-1.17_new/openturns-1.17/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.17_ref/openturns-1.17/cmake/FindNLopt.cmake openturns-1.17_new/openturns-1.17/cmake/FindNLopt.cmake +--- openturns-1.17_ref/openturns-1.17/cmake/FindNLopt.cmake 2021-09-21 13:28:10.247960811 +0200 ++++ openturns-1.17_new/openturns-1.17/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.17_ref/openturns-1.17/cmake/FindTBB.cmake openturns-1.17_new/openturns-1.17/cmake/FindTBB.cmake +--- openturns-1.17_ref/openturns-1.17/cmake/FindTBB.cmake 2021-09-21 13:28:10.242960764 +0200 ++++ openturns-1.17_new/openturns-1.17/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.17_ref/openturns-1.17/lib/src/CMakeLists.txt openturns-1.17_new/openturns-1.17/lib/src/CMakeLists.txt +--- openturns-1.17_ref/openturns-1.17/lib/src/CMakeLists.txt 2021-09-21 13:27:57.412839452 +0200 ++++ openturns-1.17_new/openturns-1.17/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.17_ref/openturns-1.17/lib/src/Base/Common/openturns/TBB.hxx openturns-1.17_new/openturns-1.17/lib/src/Base/Common/openturns/TBB.hxx +--- openturns-1.17_ref/openturns-1.17/lib/src/Base/Common/openturns/TBB.hxx 2021-09-21 13:27:54.484811767 +0200 ++++ openturns-1.17_new/openturns-1.17/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.17_ref/openturns-1.17/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx openturns-1.17_new/openturns-1.17/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx +--- openturns-1.17_ref/openturns-1.17/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2021-09-21 13:27:55.324819709 +0200 ++++ openturns-1.17_new/openturns-1.17/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/patsy.pyconf b/products/patsy.pyconf new file mode 100644 index 0000000..107fad8 --- /dev/null +++ b/products/patsy.pyconf @@ -0,0 +1,28 @@ +default : +{ + name : "patsy" + build_source : "script" + compil_script : "pip_install" + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : [] + rpm_dev : [] + apt : [] + apt_dev : [] + } + environ : + { + + } + depend : ["Python", "setuptools"] + opt_depend : ['pandas'] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties: + { + incremental : "yes" + pip : "yes" + } +} diff --git a/products/statsmodels.pyconf b/products/statsmodels.pyconf new file mode 100644 index 0000000..decc12d --- /dev/null +++ b/products/statsmodels.pyconf @@ -0,0 +1,46 @@ +default : +{ + name : "statsmodels" + build_source : "script" + compil_script : "pip_install" + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ['python3-statsmodels'] + rpm_dev : ['python3-statsmodels'] + apt : ['python3-statsmodels'] + apt_dev : ['python3-statsmodels'] + } + environ : + { + + } + depend : ["Python", "setuptools","PyFMI"] + opt_depend : ['pandas', 'patsy'] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties: + { + incremental : "yes" + pip : "yes" + } +} + +version_0_8_0: +{ + properties: + { + incremental : "yes" + pip : "yes" + } +} + +version_0_6_1: +{ + properties: + { + incremental : "yes" + pip : "yes" + } +}