From: nghodban Date: Mon, 13 Sep 2021 21:05:13 +0000 (+0200) Subject: spns #24377: openturns + ParaView X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=289eb946424ce08d1b6d16f56e55126c9abd4b68;p=tools%2Fsat_salome.git spns #24377: openturns + ParaView --- diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index 245bb72..3e58f30 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -37,6 +37,7 @@ 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' @@ -45,6 +46,7 @@ APPLICATION : doxygen : '1.8.14' eigen : '3.3.4' embree : '3.12.2' + FMILibrary : '2.0.3' freeimage : '3.16.0' freetype : '2.9.1' gmsh : '4.1.4' @@ -79,6 +81,7 @@ APPLICATION : 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' diff --git a/products/compil_scripts/openturns-1.16.sh b/products/compil_scripts/openturns-1.16.sh new file mode 100755 index 0000000..65e81fb --- /dev/null +++ b/products/compil_scripts/openturns-1.16.sh @@ -0,0 +1,179 @@ +#!/bin/bash + +echo "##########################################################################" +echo "openturns" $VERSION +echo "##########################################################################" + +COPY_OPENTURNS=0 + +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 + +if [ $COPY_OPENTURNS -ne 1 ]; then + 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/openturns-1.16 + 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.16/python/test/t_features.py + ${SOURCE_DIR}/openturns-1.16/python/test/t_features.py + if [ $? -ne 0 ] + then + echo "ERROR testing Openturns features...." + exit 4 + fi +else + mkdir -p $PRODUCT_INSTALL + cp -r /volatile/salome/support/SPNS-24377/SALOME-master-CO7/INSTALL/openturns-1.16/* $PRODUCT_INSTALL/ +fi +exit 0 + +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" +CMAKE_OPTIONS+=" -DTBB_ROOT_DIR=${TBB_ROOT_DIR}" + +LD_LIBRARY_PATH_REF=${LD_LIBRARY_PATH} +if [[ -d "$SOURCE_DIR/otfftw-0.10" ]]; then + CMAKE_OPTIONS+=" -DCMINPACK_INCLUDE_DIR=${CMINPACK_ROOT_DIR}/include/cminpack-1" + CMAKE_OPTIONS+=" -DCMINPACK_LIBRARIES=${CMINPACK_ROOT_DIR}/lib64" + CMAKE_OPTIONS+=" -DCMINPACK_LIBRARY=${CMINPACK_ROOT_DIR}/lib64/libcminpack_s.a" + CMAKE_OPTIONS+=" -DHDF5_ROOT=${HDF5_ROOT_DIR}" + + declare -A OTC + OTC["otagrum"]="0.3" + OTC["otfftw"]="0.10" + OTC["otmixmod"]="0.11" + OTC["otmorris"]="0.9" + OTC["otpmml"]="1.10" + OTC["otrobopt"]="0.8" + OTC["otsubsetinverse"]="1.7" + OTC["otsvm"]="0.9" + + for k in ${!OTC[@]}; + do + cd $BUILD_DIR + mkdir ${BUILD_DIR}/$k + cd ${BUILD_DIR}/$k + echo + echo "*** C O M P O N E N T : $SOURCE_DIR/$k-${OTC[$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" + fi + if [[ $k == "otmixmod" ]]; then + LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BUILD_DIR}/$k/lib/src + else + LD_LIBRARY_PATH=${LD_LIBRARY_PATH_REF} + 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.7" + OTP["otpod"]="0.6.6" + OTP["otwrapy"]="0.9" + for k in ${!OTP[@]}; + do + cd $BUILD_DIR + mkdir ${BUILD_DIR}/$k + cd ${BUILD_DIR}/$k + ${PYTHONBIN} setup.py install --prefix==${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages + done +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.16/python/test/t_features.py +${SOURCE_DIR}/openturns-1.16/python/test/t_features.py +if [ $? -ne 0 ] +then + echo "ERROR testing Openturns features...." + exit 4 +fi + +echo +echo "########## END" diff --git a/products/openturns.pyconf b/products/openturns.pyconf index 7b50d65..83cc503 100644 --- a/products/openturns.pyconf +++ b/products/openturns.pyconf @@ -37,6 +37,8 @@ default_win : version_1_16 : { + compil_script : "openturns-1.16" + $VARS.scriptExtension + archive_info : {archive_name : "openturns-1.16-all.tar.gz"} patches : ['openturns-1.16.0001.patch','openturns-1.16.0002.patch'] } diff --git a/products/patches/openturns-1.16.0001.patch b/products/patches/openturns-1.16.0001.patch index adfba8f..6f866b1 100644 --- a/products/patches/openturns-1.16.0001.patch +++ b/products/patches/openturns-1.16.0001.patch @@ -1,7 +1,7 @@ -diff -Naur openturns_ref openturns_new -diff -Naur openturns_ref/cmake/FindNLopt.cmake openturns_new/cmake/FindNLopt.cmake ---- openturns_ref/cmake/FindNLopt.cmake 2020-11-09 14:06:44.000000000 +0100 -+++ openturns_new/cmake/FindNLopt.cmake 2021-06-01 10:23:26.144409150 +0200 +diff -Naur openturns_ref/openturns-1.16 openturns_new/openturns-1.16 +diff -Naur openturns_ref/openturns-1.16/cmake/FindNLopt.cmake openturns_new/openturns-1.16/cmake/FindNLopt.cmake +--- openturns_ref/openturns-1.16/cmake/FindNLopt.cmake 2020-11-09 14:06:44.000000000 +0100 ++++ openturns_new/openturns-1.16/cmake/FindNLopt.cmake 2021-06-01 10:23:26.144409150 +0200 @@ -11,10 +11,21 @@ # NLOPT_ROOT_DIR - root dir (ex. /usr/local) @@ -38,9 +38,9 @@ diff -Naur openturns_ref/cmake/FindNLopt.cmake openturns_new/cmake/FindNLopt.cma ) # set NLOPT_LIBRARIES -diff -Naur openturns_ref/cmake/FindTBB.cmake openturns_new/cmake/FindTBB.cmake ---- openturns_ref/cmake/FindTBB.cmake 2020-11-10 13:21:21.000000000 +0100 -+++ openturns_new/cmake/FindTBB.cmake 2021-06-01 10:23:26.144409150 +0200 +diff -Naur openturns_ref/openturns-1.16/cmake/FindTBB.cmake openturns_new/openturns-1.16/cmake/FindTBB.cmake +--- openturns_ref/openturns-1.16/cmake/FindTBB.cmake 2020-11-10 13:21:21.000000000 +0100 ++++ openturns_new/openturns-1.16/cmake/FindTBB.cmake 2021-06-01 10:23:26.144409150 +0200 @@ -27,6 +27,11 @@ # (To distributed this file outside of CMake, substitute the full # License text for the above reference.) @@ -53,9 +53,9 @@ diff -Naur openturns_ref/cmake/FindTBB.cmake openturns_new/cmake/FindTBB.cmake find_path (TBB_INCLUDE_DIR NAMES tbb/tbb.h DOC "TBB include directory") set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR}) -diff -Naur openturns_ref/CMakeLists.txt openturns_new/CMakeLists.txt ---- openturns_ref/CMakeLists.txt 2020-11-18 16:33:36.000000000 +0100 -+++ openturns_new/CMakeLists.txt 2021-06-01 10:26:34.647699757 +0200 +diff -Naur openturns_ref/openturns-1.16/CMakeLists.txt openturns_new/openturns-1.16/CMakeLists.txt +--- openturns_ref/openturns-1.16/CMakeLists.txt 2020-11-18 16:33:36.000000000 +0100 ++++ openturns_new/openturns-1.16/CMakeLists.txt 2021-06-01 10:26:34.647699757 +0200 @@ -125,6 +125,10 @@ set (TEMPDIR ${OPENTURNS_TEMPDIR}) @@ -129,9 +129,9 @@ diff -Naur openturns_ref/CMakeLists.txt openturns_new/CMakeLists.txt if (NLopt_FOUND) message(STATUS "Found NLopt: ${NLopt_DIR}") else () -diff -Naur openturns_ref/lib/src/Base/Common/openturns/TBB.hxx openturns_new/lib/src/Base/Common/openturns/TBB.hxx ---- openturns_ref/lib/src/Base/Common/openturns/TBB.hxx 2020-11-10 13:21:21.000000000 +0100 -+++ openturns_new/lib/src/Base/Common/openturns/TBB.hxx 2021-06-01 10:23:26.145409141 +0200 +diff -Naur openturns_ref/openturns-1.16/lib/src/Base/Common/openturns/TBB.hxx openturns_new/openturns-1.16/lib/src/Base/Common/openturns/TBB.hxx +--- openturns_ref/openturns-1.16/lib/src/Base/Common/openturns/TBB.hxx 2020-11-10 13:21:21.000000000 +0100 ++++ openturns_new/openturns-1.16/lib/src/Base/Common/openturns/TBB.hxx 2021-06-01 10:23:26.145409141 +0200 @@ -35,6 +35,7 @@ # define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1 # endif @@ -140,9 +140,9 @@ diff -Naur openturns_ref/lib/src/Base/Common/openturns/TBB.hxx openturns_new/lib #include #include #include -diff -Naur openturns_ref/lib/src/CMakeLists.txt openturns_new/lib/src/CMakeLists.txt ---- openturns_ref/lib/src/CMakeLists.txt 2020-11-10 13:21:21.000000000 +0100 -+++ openturns_new/lib/src/CMakeLists.txt 2021-06-01 10:23:26.144409150 +0200 +diff -Naur openturns_ref/openturns-1.16//lib/src/CMakeLists.txt openturns_new/openturns-1.16//lib/src/CMakeLists.txt +--- openturns_ref/openturns-1.16/lib/src/CMakeLists.txt 2020-11-10 13:21:21.000000000 +0100 ++++ openturns_new/openturns-1.16//lib/src/CMakeLists.txt 2021-06-01 10:23:26.144409150 +0200 @@ -80,15 +80,15 @@ add_dependencies (OT generate_csv_parser) endif () diff --git a/products/patches/openturns-1.16.0002.patch b/products/patches/openturns-1.16.0002.patch index 4a95719..e3da06a 100644 --- a/products/patches/openturns-1.16.0002.patch +++ b/products/patches/openturns-1.16.0002.patch @@ -1,6 +1,6 @@ -diff -Naur openturns_ref/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx openturns_new/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx ---- openturns_ref/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2020-11-10 13:21:21.000000000 +0100 -+++ openturns_new/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2021-05-21 11:08:48.206212694 +0200 +diff -Naur openturns_ref/openturns-1.16/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx openturns_new/openturns-1.16/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx +--- openturns_ref/openturns-1.16/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2020-11-10 13:21:21.000000000 +0100 ++++ openturns_new/openturns-1.16/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2021-05-21 11:08:48.206212694 +0200 @@ -24,6 +24,12 @@ #include "openturns/PersistentObject.hxx" #include "openturns/CovarianceModel.hxx"