]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
bos #43318: update embedded nlopt version from 2.5.0 to 2.7.0 and fix cmake options
authorGuytri KASTANE <guytri.kastane@cea.fr>
Thu, 24 Oct 2024 10:16:37 +0000 (12:16 +0200)
committerGuytri KASTANE <guytri.kastane@cea.fr>
Thu, 24 Oct 2024 10:16:37 +0000 (12:16 +0200)
applications/SALOME-master-native.pyconf
applications/SALOME-master.pyconf
products/compil_scripts/nlopt-2.7.0.sh [new file with mode: 0755]
products/compil_scripts/openturns-1.23.sh
products/nlopt.pyconf

index 490a1a3737df8de27e860ca46ac45ea3b948de0b..39d544991ce04216c69f1688fd287aeab76fd065 100644 (file)
@@ -234,6 +234,7 @@ __overwrite__ :
         'APPLICATION.products.opencv'           : '3.2.0'
         'APPLICATION.products.cminpack'         : 'native'
         'APPLICATION.products.netcdf'           : '4.6.2'
+        'APPLICATION.products.nlopt'            : '2.7.0'
         'APPLICATION.products.qt'               : '5.15.2'
         'APPLICATION.products.qwt'              : '6.1.6'
         'APPLICATION.products.poetry'           : {tag: '1.5.1', base: 'no', section: 'version_1_5_1_x86_64' }
@@ -299,7 +300,7 @@ __overwrite__ :
         #   - xmlpatterns executable
         __condition__ : "VARS.dist in ['DB10']"
         'APPLICATION.rm_products'       : ['nose_py3','assimulo', 'irmb', 'mcut']
-        'APPLICATION.products.nlopt'    : '2.4.2'
+        'APPLICATION.products.nlopt'    : '2.7.0'
         'APPLICATION.products.opencv'   : '3.2.0'
         'APPLICATION.products.cminpack' : 'native'
         'APPLICATION.products.hdf5'     : 'native'
@@ -363,7 +364,7 @@ __overwrite__ :
         'APPLICATION.rm_products'               : ['nose_py3','assimulo', 'poetry', 'poetry_core', 'BasicIterativeStatistics'] #
         'APPLICATION.products.sphinxintl'       : {tag: '0.9.10', base: 'no', section: 'version_0_9_10_no_pip'  }
         'APPLICATION.products.cminpack'         : '1.3.6'
-        'APPLICATION.products.nlopt'            : '2.4.2'
+        'APPLICATION.products.nlopt'            : '2.7.0'
         'APPLICATION.products.openturns'        : {tag: '1.22',   base: 'no', section: 'version_1_22_CO8'       }
         'APPLICATION.products.PyFMI'            : {tag: '2.6',    base: 'no', section: 'version_2_6_no_pip'     }
         'APPLICATION.products.statsmodels'      : {tag: '0.6.1',  base: 'no', section: 'version_0_6_1_no_pip'   }
@@ -380,7 +381,7 @@ __overwrite__ :
          __condition__ : "VARS.dist in ['CO9']"
          'APPLICATION.rm_products'               : ['nose_py3','assimulo'] #
          'APPLICATION.products.lapack'           : '3.8.0'
-         'APPLICATION.products.nlopt'            : '2.4.2'
+         'APPLICATION.products.nlopt'            : '2.7.0'
          'APPLICATION.products.cminpack'         : '1.3.6'
          'APPLICATION.products.qwt'              : '6.1.6'
          'APPLICATION.products.PyQt'             : '5.15.3'
index c7d5b85e1adf9f752b03fb76368433849842c19f..3803fd90b5ff0fed0676689e460c6f828b128d78 100644 (file)
@@ -101,7 +101,7 @@ APPLICATION :
         netgen : '5.3.1_with_CAS_7.8'
         netcdf : '4.6.2'
         netCDF4 : '1.6.5'
-        nlopt : '2.5.0'
+        nlopt : '2.7.0'
         nose: '1.3.7'
         numpy : '1.21.1'
         numpydoc : '1.6.0'
diff --git a/products/compil_scripts/nlopt-2.7.0.sh b/products/compil_scripts/nlopt-2.7.0.sh
new file mode 100755 (executable)
index 0000000..856bbd1
--- /dev/null
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+echo "##########################################################################"
+echo "nlopt" $VERSION
+echo "##########################################################################"
+
+CMAKE_OPTIONS=""
+
+### common compiler and install settings
+CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}"
+CMAKE_OPTIONS+=" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
+if [ -n "$SAT_DEBUG" ]; then
+    CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Debug"
+else
+    CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release"
+fi
+
+if [ -n "$SWIG_ROOT_DIR" ] && [ "$SAT_swig_IS_NATIVE" != "1" ]; then
+    CMAKE_OPTIONS+=" -DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig"
+fi
+CMAKE_OPTIONS+=" -DBUILD_SHARED_LIBS:BOOL=ON"
+CMAKE_OPTIONS+=" -DNLOPT_MATLAB:BOOL=OFF"
+CMAKE_OPTIONS+=" -DNLOPT_OCTAVE:BOOL=OFF"
+CMAKE_OPTIONS+=" -DNLOPT_GUILE:BOOL=OFF"
+CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
+
+echo
+echo "*** cmake" $CMAKE_OPTIONS
+
+rm -rf $BUILD_DIR
+mkdir -p $BUILD_DIR
+cd  $BUILD_DIR
+
+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 "########## END"
+
index 3e151b950135359b6748f2752f76bce4551773e3..2132b956799a02d406c0899254c5efa37b7a5cac 100755 (executable)
@@ -46,6 +46,10 @@ case $LINUX_DISTRIBUTION in
 esac
 
 # Blas/Lapack
+if [[ "$LINUX_DISTRIBUTION" == "CO8" && "$SAT_lapack_IS_NATIVE" == "1"  &&  -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
 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"
@@ -81,16 +85,13 @@ else
     CMAKE_OPTIONS+=" -DCMINPACK_INCLUDE_DIR=${CMINPACK_ROOT_DIR}/include/cminpack-1"
 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
 
 ## nlopt
 if [ -n "$NLOPT_ROOT_DIR" ] && [ "$SAT_nlopt_IS_NATIVE" != "1" ]; then
-    CMAKE_OPTIONS+=" -DNLOPT_INCLUDE_DIR:STRING=${NLOPT_ROOT_DIR}/include"
+    CMAKE_OPTIONS+=" -DNLOPT_ROOT_DIR:PATH=${NLOPT_ROOT_DIR}"
+    CMAKE_OPTIONS+=" -DNLOPT_INCLUDE_DIR:PATH=${NLOPT_ROOT_DIR}/include"
     CMAKE_OPTIONS+=" -DNLOPT_LIBRARY:STRING=${NLOPT_ROOT_DIR}/lib/libnlopt.so"
-    CMAKE_OPTIONS+=" -DNLOPT_DIR:STRING=${NLOPT_ROOT_DIR}"
+    CMAKE_OPTIONS+=" -DNLopt_DIR:PATH=${NLOPT_ROOT_DIR}/lib/cmake/nlopt"
 fi
 
 # Boost
index 9f22871e288cda99e8eb0ca48183a9aba52bb0c7..eb3689125c008fa8697e726f861573f7b1d1723f 100644 (file)
@@ -46,3 +46,8 @@ version_2_6_0:
 {
     compil_script :  "nlopt-2.6.0" + $VARS.scriptExtension
 }
+
+version_2_7_0:
+{
+    compil_script :  "nlopt-2.7.0" + $VARS.scriptExtension
+}