From: Guytri KASTANE Date: Tue, 22 Oct 2024 09:17:05 +0000 (+0200) Subject: bos #43318: openturns 1.23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5fb53503e914ea45b36707bf0e465cbc552db283;p=tools%2Fsat_salome.git bos #43318: openturns 1.23 --- diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index eed3f42..39d5449 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -107,7 +107,7 @@ APPLICATION : opencv : 'native' openmpi: 'native' openVKL : '0.11.0' - openturns: '1.22' + openturns: '1.23' ospray : '2.4.0' packaging : 'native' packagespy : '74152cd' @@ -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' } @@ -273,6 +274,7 @@ __overwrite__ : 'APPLICATION.products.assimulo' : '3.5.2' 'APPLICATION.products.netcdf' : '4.6.2' 'APPLICATION.products.opencv' : '3.2.0' + 'APPLICATION.products.FMILibrary' : '2.4.1' 'APPLICATION.products.PyFMI' : '2.13.1' 'APPLICATION.products.petsc' : '3.20.5' 'APPLICATION.products.swig' : '4.0.2' @@ -298,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' @@ -362,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' } @@ -379,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' diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index 293c33e..607066a 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -108,7 +108,7 @@ APPLICATION : netcdf : '4.6.2' netCDF4: '1.6.5' netgen : {tag:'5.3.1', base: 'no', section: 'version_5_3_1_with_CAS_7_8_win'} - nlopt : '2.5.0' + nlopt : '2.7.1' numpy : '1.21.6' omniORB : '4.2.3' omniORBpy : '4.2.3' @@ -116,7 +116,7 @@ APPLICATION : opencv : '3.2.0' openssl: '1.1.1n' openVKL: '0.11.0' - openturns: '1.22' + openturns: '1.23' ospray : '2.4.0' packaging : '19.0' pandas : '1.5.3' diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index 148f8de..3803fd9 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -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' @@ -109,7 +109,7 @@ APPLICATION : omniORBpy : '4.2.5' opencv : '3.2.0' openmpi : '4.0.3' - openturns: '1.22' + openturns: '1.23' openVKL: '0.11.0' ospray : '2.4.0' packaging : '23.2' @@ -255,13 +255,13 @@ __overwrite__ : { __condition__ : "VARS.dist in ['CO7']" 'APPLICATION.rm_products' : ['gcc', 'gmp', 'mpc', 'mpfr'] - 'APPLICATION.products.openturns' : {tag:'1.22', base:'no', section:'version_1_22_CO7'} + 'APPLICATION.products.openturns' : {tag:'1.23', base:'no', section:'version_1_23_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.openturns' : {tag:'1.22', base:'no', section:'version_1_22_CO8'} + 'APPLICATION.products.openturns' : {tag:'1.23', base:'no', section:'version_1_23_CO8'} 'APPLICATION.products.ParaView' : {tag: '5.11.0', base: 'no', section: 'version_5_11_0_MPI_CO8', hpc: 'yes'} } { @@ -271,7 +271,7 @@ __overwrite__ : } { __condition__ : "VARS.dist in ['DB09']" - 'APPLICATION.products.openturns' : {tag:'1.22', base:'no', section:'version_1_22_DB09'} + 'APPLICATION.products.openturns' : {tag:'1.23', base:'no', section:'version_1_23_DB09'} } { __condition__ : "VARS.dist in ['UB18.04']" diff --git a/products/compil_scripts/nlopt-2.7.0.sh b/products/compil_scripts/nlopt-2.7.0.sh new file mode 100755 index 0000000..856bbd1 --- /dev/null +++ b/products/compil_scripts/nlopt-2.7.0.sh @@ -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" + diff --git a/products/compil_scripts/nlopt-2.7.1.bat b/products/compil_scripts/nlopt-2.7.1.bat new file mode 100644 index 0000000..318b0dc --- /dev/null +++ b/products/compil_scripts/nlopt-2.7.1.bat @@ -0,0 +1,85 @@ +@echo off + +echo ########################################################################## +echo nlopt %VERSION% +echo ########################################################################## + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +SET PRODUCT_BUILD_TYPE=Release +IF DEFINED SAT_CMAKE_BUILD_TYPE ( + SET PRODUCT_BUILD_TYPE=%SAT_CMAKE_BUILD_TYPE% +) +if %SAT_DEBUG% == 1 ( + set PRODUCT_BUILD_TYPE=Debug +) + +set PLATFORM_TARGET=x64 +if "%SALOME_APPLICATION_NAME%" == "URANIE" ( + set PLATFORM_TARGET=Win32 +) + +set CMAKE_OPTIONS_EXTRA= -G %CMAKE_GENERATOR% -A x64 +if "%SALOME_APPLICATION_NAME%" == "URANIE" ( + set CMAKE_OPTIONS_EXTRA= -A Win32 -Thost=x64 -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -G %CMAKE_GENERATOR% +) + +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR% + +cd %BUILD_DIR% +set CMAKE_OPTIONS= +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE=%PRODUCT_BUILD_TYPE% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_SHARED_LIBS:BOOL=ON +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DNLOPT_MATLAB:BOOL=OFF +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DNLOPT_OCTAVE:BOOL=OFF +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DNLOPT_GUILE:BOOL=OFF +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DSWIG_EXECUTABLE=%SWIG_ROOT_DIR:\=/%/bin/swig.exe +set CMAKE_OPTIONS=%CMAKE_OPTIONS% %CMAKE_OPTIONS_EXTRA% + +set MSBUILDDISABLENODEREUSE=1 + +echo. +echo ********************************************************************* +echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% +echo ********************************************************************* +echo. + +%CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% +if NOT %ERRORLEVEL% == 0 ( + echo "ERROR on cmake" + exit 1 +) + +echo. +echo ********************************************************************* +echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% ALL_BUILD.vcxproj + +echo ********************************************************************* +echo. + +msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% ALL_BUILD.vcxproj +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on msbuild gmsh.vcxproj + exit 2 +) + +echo. +echo ********************************************************************* +echo *** installation... +echo ********************************************************************* +echo. + +msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% INSTALL.vcxproj +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on msbuild INSTALL.vcxproj + exit 3 +) + +echo. +echo ########## END diff --git a/products/compil_scripts/openturns-1.23.bat b/products/compil_scripts/openturns-1.23.bat new file mode 100644 index 0000000..741a5ee --- /dev/null +++ b/products/compil_scripts/openturns-1.23.bat @@ -0,0 +1,411 @@ +@echo off + +echo ########################################################################## +echo openturns %VERSION% +echo ########################################################################## + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +IF NOT DEFINED CMAKE_GENERATOR ( + SET CMAKE_GENERATOR="Visual Studio 15 2017" +) + +SET PRODUCT_BUILD_TYPE=Release +IF DEFINED SAT_CMAKE_BUILD_TYPE ( + SET PRODUCT_BUILD_TYPE=%SAT_CMAKE_BUILD_TYPE% +) +if %SAT_DEBUG% == 1 ( + set PRODUCT_BUILD_TYPE=Debug +) + +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% + +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR% + +REM we don't install in python directory -> modify environment as described in INSTALL file +set PATH=%WINFLEX_ROOT_DIR%;%PATH% +SET PATH=%CWD%\bin;%PATH% +SET PYTHONPATH=%CWD%;%PYTHONPATH% +SET PYTHONPATH=%PRODUCT_INSTALL%\lib\python%PYTHON_VERSION%\site-packages;%PYTHONPATH% + +GOTO:MAIN + +:MODULE_BUILDER + SETLOCAL ENABLEDELAYEDEXPANSION + SET MODULE_NAME=%~1 + SET MODULE_SOURCE_DIR=%~2 + SET MODULE_BUILD_DIR=%~3 + SET MODULE_INSTALL_DIR=%~4 + SET X=%~5 + SET MODULE_CMAKE_OPTIONS=%X:'="% + REM NGH: We replace ' with " - we could of course parse the input. + ECHO call MODULE_BUILDER for %MODULE_NAME% + ECHO command line option: %MODULE_CMAKE_OPTIONS% + if exist "%MODULE_BUILD_DIR%" rmdir /Q /S %MODULE_BUILD_DIR% + mkdir %MODULE_BUILD_DIR% + cd %MODULE_BUILD_DIR% + + echo. + echo -------------------------------------------------------------------------- + echo *** %CMAKE_ROOT%\bin\cmake -G %CMAKE_GENERATOR% -A x64 %MODULE_CMAKE_OPTIONS% %MODULE_SOURCE_DIR% + echo -------------------------------------------------------------------------- + %CMAKE_ROOT%\bin\cmake -G %CMAKE_GENERATOR% -A x64 %MODULE_CMAKE_OPTIONS% %MODULE_SOURCE_DIR% + if NOT %ERRORLEVEL% == 0 ( + echo ERROR on cmake + exit 1 + ) + + echo. + echo -------------------------------------------------------------------------- + echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 ALL_BUILD.vcxproj + echo -------------------------------------------------------------------------- + msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 ALL_BUILD.vcxproj + if NOT %ERRORLEVEL% == 0 ( + echo ERROR on msbuild ALL_BUILD.vcxproj + exit 2 + ) + + echo. + echo -------------------------------------------------------------------------- + echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 INSTALL.vcxproj + echo -------------------------------------------------------------------------- + + msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 INSTALL.vcxproj + if NOT %ERRORLEVEL% == 0 ( + echo ERROR on msbuild INSTALL.vcxproj + exit 3 + ) + ENDLOCAL +EXIT /B 0 + +:WHEEL_INSTALLER + SETLOCAL ENABLEDELAYEDEXPANSION + SET WHEEL_NAME=%~1 + %PYTHON_ROOT_DIR%\python.exe -m pip install --cache-dir=%BUILD_DIR%\cache\pip --prefix=%PRODUCT_INSTALL% %WHEEL_NAME% --no-deps + if NOT %ERRORLEVEL% == 0 ( + echo ERROR on pip install %WHEEL_NAME% + exit 1 + ) + ENDLOCAL +EXIT /B 0 + +:MAIN + +SET CMAKE_OPTIONS= +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE:STRING=%PRODUCT_BUILD_TYPE% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_LIBDIR:STRING=lib +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPYTHON_EXECUTABLE=%PYTHONBIN% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DSWIG_EXECUTABLE=%SWIG_ROOT_DIR:\=/%/bin/swig +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DTBB_ROOT_DIR=%TBB_ROOT_DIR% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dtbb_DIR:PATH=%TBB_ROOT_DIR:\=/% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_TBB=OFF + +REM libxml2 settings +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DVTK_MODULE_USE_EXTERNAL_VTK_libxml2:BOOL=ON +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DLIBXML2_INCLUDE_DIR:STRING=%LIBXML2_ROOT_DIR:\=/%/include +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DLIBXML2_LIBRARIES:STRING=%LIBXML2_ROOT_DIR:\=/%/lib/libxml2.lib +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DLIBXML2_XMLLINT_EXECUTABLE=%LIBXML2_ROOT_DIR:\=/%/bin/xmllint.exe + +REM HDF5 settings +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DVTK_MODULE_USE_EXTERNAL_VTK_hdf5:BOOL=ON +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DHDF5_DIR:PATH=%HDF5_ROOT_DIR:\=/%/cmake/hdf5 +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DHDF5_INCLUDE_DIRS:PATH=%HDF5_ROOT_DIR:\=/%/include +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DHDF5_USE_STATIC_LIBRARIES:BOOL=OFF +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DNLOPT_INCLUDE_DIRS:STRING=%NLOPT_ROOT_DIR:\=/%/include +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DNLOPT_LIBRARIES:STRING=%NLOPT_ROOT_DIR:\=/%/bin +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DNLOPT_DIR:STRING=%NLOPT_ROOT_DIR:\=/% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCBLAS_DIR=%OPENBLAS_ROOT_DIR:\=/%/share/cmake/OpenBLAS +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPython3_EXECUTABLE:FILEPATH=%PYTHON_ROOT_DIR:\=/%/python3.exe +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPython3_INCLUDE_DIR:PATH=%PYTHON_ROOT_DIR:\=/%/include +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DLAPACK_LIBRARIES:FILEPATH=%OPENBLAS_ROOT_DIR:\=/%/lib/openblas.lib +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_SHARED_LINKER_FLAGS_RELEASE='/OPT:NOREF /INCREMENTAL:NO' +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_UNITY_BUILD=ON +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_UNITY_BUILD_BATCH_SIZE=16 +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DSWIG_COMPILE_FLAGS='/bigobj' +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_SPHINX=OFF + +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR% + +cd %BUILD_DIR% +mkdir cache +mkdir cache\pip + +echo ########################################################################## +echo openturns 1.23 +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% +CALL:MODULE_BUILDER openturns "%SOURCE_DIR%\openturns-1.23" "%BUILD_DIR%\openturns" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" + +set PATH=%PRODUCT_INSTALL%\bin;%PRODUCT_INSTALL%\lib;%PATH% +set PYTHONPATH=%PRODUCT_INSTALL%\lib\site-packages;%PYTHONPATH% + +echo ########################################################################## +echo otagrum 0.10 [SKIPPED] +echo ########################################################################## +REM SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_DOC=OFF +REM CALL:MODULE_BUILDER otagrum "%SOURCE_DIR%\otagrum-0.10" "%BUILD_DIR%\otagrum" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" + +echo ########################################################################## +echo otmorris 0.16 +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% +CALL:MODULE_BUILDER otmorris "%SOURCE_DIR%\otmorris-0.16" "%BUILD_DIR%\otmorris" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" + +echo ########################################################################## +echo otfftw 0.15 +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% +CALL:MODULE_BUILDER otfftw "%SOURCE_DIR%\otfftw-0.15" "%BUILD_DIR%\otfftw" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" + +echo ########################################################################## +echo otmixmod 0.17 [SKIPPED] +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% +REM CALL:MODULE_BUILDER otmixmod "%SOURCE_DIR%\otmixmod-0.17" "%BUILD_DIR%\otmixmod" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" + +echo ########################################################################## +echo otrobopt 0.14 +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_DOC=OFF +CALL:MODULE_BUILDER otrobopt "%SOURCE_DIR%\otrobopt-0.14" "%BUILD_DIR%\otrobopt" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" + +echo ########################################################################## +echo otsubsetinverse 1.10 +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_DOC=OFF +CALL:MODULE_BUILDER otsubsetinverse "%SOURCE_DIR%\otsubsetinverse-1.10" "%BUILD_DIR%\otsubsetinverse" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" + +echo ########################################################################## +echo otsvm 0.14 +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_DOC=OFF +CALL:MODULE_BUILDER otsvm "%SOURCE_DIR%\otsvm-0.14" "%BUILD_DIR%\otsvm" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" + +echo +echo ########################################################################## +echo dill 0.3.4 +echo ########################################################################## +cd %BUILD_DIR% +mkdir dill +cd %BUILD_DIR%\dill +xcopy %SOURCE_DIR%\dill-0.3.4\* %BUILD_DIR%\dill /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +call :WHEEL_INSTALLER dill-0.3.4-py2.py3-none-any.whl + +echo +echo ########################################################################## +echo decorator 5.1.0 +echo ########################################################################## +cd %BUILD_DIR% +mkdir decorator +cd %BUILD_DIR%\decorator +xcopy %SOURCE_DIR%\decorator-5.1.0\* %BUILD_DIR%\decorator /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +call :WHEEL_INSTALLER decorator-5.1.0-py3-none-any.whl + +echo +echo ########################################################################## +echo threadpoolctl 3.5.0 +echo ########################################################################## +cd %BUILD_DIR% +mkdir threadpoolctl +cd %BUILD_DIR%\threadpoolctl +xcopy %SOURCE_DIR%\threadpoolctl-3.5.0\* %BUILD_DIR%\threadpoolctl /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +call :WHEEL_INSTALLER threadpoolctl-3.5.0-py3-none-any.whl + +echo +echo ########################################################################## +echo joblib 1.4.2 +echo ########################################################################## +cd %BUILD_DIR% +mkdir joblib +cd %BUILD_DIR%\joblib +xcopy %SOURCE_DIR%\joblib-1.4.2\* %BUILD_DIR%\joblib /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +call :WHEEL_INSTALLER joblib-1.4.2-py3-none-any.whl + +echo +echo ########################################################################## +echo seaborn 0.13.2 +echo ########################################################################## +cd %BUILD_DIR% +mkdir seaborn +cd %BUILD_DIR%\seaborn +xcopy %SOURCE_DIR%\seaborn-0.13.2\* %BUILD_DIR%\seaborn /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +call :WHEEL_INSTALLER seaborn-0.13.2-py3-none-any.whl + +echo ########################################################################## +echo ipython 8.18.1 +echo ########################################################################## +cd %BUILD_DIR% +mkdir ipython +cd %BUILD_DIR%\ipython +xcopy %SOURCE_DIR%\ipython-8.18.1\* %BUILD_DIR%\ipython /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + + +call :WHEEL_INSTALLER typing_extensions-4.12.2-py3-none-any.whl +call :WHEEL_INSTALLER traitlets-5.14.3-py3-none-any.whl +call :WHEEL_INSTALLER stack_data-0.6.3-py3-none-any.whl +call :WHEEL_INSTALLER prompt_toolkit-3.0.48-py3-none-any.whl +call :WHEEL_INSTALLER matplotlib_inline-0.1.7-py3-none-any.whl +call :WHEEL_INSTALLER jedi-0.19.1-py2.py3-none-any.whl +call :WHEEL_INSTALLER pure_eval-0.2.3-py3-none-any.whl +call :WHEEL_INSTALLER asttokens-2.4.1-py2.py3-none-any.whl +call :WHEEL_INSTALLER executing-2.1.0-py2.py3-none-any.whl +call :WHEEL_INSTALLER wcwidth-0.2.13-py2.py3-none-any.whl +call :WHEEL_INSTALLER parso-0.8.4-py2.py3-none-any.whl + +tar zxf ipython-8.18.1.tar.gz +cd ipython-8.18.1 +%PYTHON_ROOT_DIR%\python.exe setup.py install --prefix=%PRODUCT_INSTALL% +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python setup.py + exit 3 +) + +echo ########################################################################## +echo tqdm 4.66.5 +echo ########################################################################## +cd %BUILD_DIR% +mkdir tqdm +cd %BUILD_DIR%\tqdm +xcopy %SOURCE_DIR%\tqdm-4.66.5\* %BUILD_DIR%\tqdm /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +call :WHEEL_INSTALLER tqdm-4.66.5-py3-none-any.whl + +echo +echo ########################################################################## +echo scikit-learn 0.24.2 +echo ########################################################################## +cd %BUILD_DIR% +mkdir scikit-learn +cd %BUILD_DIR%\scikit-learn +xcopy %SOURCE_DIR%\scikit-learn-0.24.2\* %BUILD_DIR%\scikit-learn /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +tar zxf scikit-learn-0.24.2.tar.gz +cd scikit-learn-0.24.2 +%PYTHON_ROOT_DIR%\python.exe setup.py install --prefix=%PRODUCT_INSTALL% +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python setup.py + exit 3 +) + +echo +echo ########################################################################## +echo pythonfmu 0.6.3 +echo ########################################################################## +cd %BUILD_DIR% +mkdir pythonfmu +cd %BUILD_DIR%\pythonfmu +xcopy %SOURCE_DIR%\pythonfmu-0.6.3\* %BUILD_DIR%\pythonfmu /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy of pythonfmu-0.6.3 + exit 3 +) + +call :WHEEL_INSTALLER pythonfmu-0.6.3-py3-none-any.whl + +echo ########################################################################## +echo otfmi 0.16.3 +echo ########################################################################## +cd %BUILD_DIR% +mkdir otfmi + +set CMAKE_OPTIONS_EXT=%CMAKE_OPTIONS% +cd %BUILD_DIR%\otfmi +xcopy %SOURCE_DIR%\otfmi-0.16.3\* %BUILD_DIR%\otfmi /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +%PYTHON_ROOT_DIR%\python.exe setup.py install --prefix=%PRODUCT_INSTALL% +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python setup.py + exit 3 +) + +echo ########################################################################## +echo otpod 0.6.11 +echo ########################################################################## +cd %BUILD_DIR% +mkdir otpod + +set CMAKE_OPTIONS_EXT=%CMAKE_OPTIONS% +cd %BUILD_DIR%\otpod +xcopy %SOURCE_DIR%\otpod-0.6.11\* %BUILD_DIR%\otpod /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +%PYTHON_ROOT_DIR%\python.exe setup.py install --prefix=%PRODUCT_INSTALL% +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python setup.py + exit 3 +) + +echo ########################################################################## +echo otwrapy 0.12.1 +echo ########################################################################## +cd %BUILD_DIR% +mkdir otwrapy + +set CMAKE_OPTIONS_EXT=%CMAKE_OPTIONS% +cd %BUILD_DIR%\otwrapy +xcopy %SOURCE_DIR%\otwrapy-0.12.1\* %BUILD_DIR%\otwrapy /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +%PYTHON_ROOT_DIR%\python.exe setup.py install --prefix=%PRODUCT_INSTALL% +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python setup.py + exit 3 +) + +echo +echo "########## END" diff --git a/products/compil_scripts/openturns-1.23.sh b/products/compil_scripts/openturns-1.23.sh new file mode 100755 index 0000000..2976a2d --- /dev/null +++ b/products/compil_scripts/openturns-1.23.sh @@ -0,0 +1,619 @@ +#!/bin/bash + +echo "##########################################################################" +echo "openturns" $VERSION +echo "##########################################################################" + +LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION" + +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 [ "$SAT_Python_IS_NATIVE" == "1" ] && [ "$LINUX_DISTRIBUTION" == "CO8" ] ; then + CMAKE_OPTIONS+=" -DPython_EXECUTABLE=${PYTHONBIN}" +fi + +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 +case $LINUX_DISTRIBUTION in + UB22*|CO8*|CO9*|FD36|FD37|FD38) + echo "WARNING: switching OFF TBB support" + CMAKE_OPTIONS+=" -DUSE_TBB=OFF" + ;; + *) + ;; +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" + 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 + + +## nlopt +if [ -n "$NLOPT_ROOT_DIR" ] && [ "$SAT_nlopt_IS_NATIVE" != "1" ]; then + 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:PATH=${NLOPT_ROOT_DIR}/lib/cmake/nlopt" +fi + +# Boost +if [ -n "$BOOST_ROOT_DIR" ] && [ "$SAT_boost_IS_NATIVE" != "1" ]; then + CMAKE_OPTIONS+=" -DBOOST_DIR=${BOOST_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.23 +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/ + rm -rf ${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/ + rm -rf ${PRODUCT_INSTALL}/local/lib64 +fi + +if [ -d ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages ]; then + mv ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages +fi + +if [ $? -ne 0 ]; then + echo "ERROR testing Openturns features...." + exit 4 +fi + +cd $BUILD_DIR +mkdir ${BUILD_DIR}/mixmod +cd ${BUILD_DIR}/mixmod + +CMAKE_EXTRA_OPTIONS= +CMAKE_EXTRA_OPTIONS+=" -DMIXMOD_BUILD_EXAMPLES=ON" +CMAKE_EXTRA_OPTIONS+=" -DMIXMOD_BUILD_IOSTREAM=ON" +CMAKE_EXTRA_OPTIONS+=" -DMIXMOD_BUILD_CLI=ON" + +case $LINUX_DISTRIBUTION in + DB9) + echo "WARNING: Skipping MIXMOD - since libxml++ compilation is quite tedious on that platform" + echo "WARNING: You can either target the stretch archives and install libxml++-dev and compile or leave it as it is" + + ;; + *) + echo + echo "*** cmake " $CMAKE_OPTIONS ${CMAKE_EXTRA_OPTIONS} $SOURCE_DIR/mixmod-2.1.11 + cmake $CMAKE_OPTIONS ${CMAKE_EXTRA_OPTIONS} $SOURCE_DIR/mixmod-2.1.11 + 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 + ;; +esac + +LD_LIBRARY_PATH_REF=${LD_LIBRARY_PATH} +if [[ -d "$SOURCE_DIR/otfftw-0.15" ]]; then + declare -A OTC + OTC["otagrum"]="0.10" + OTC["otfftw"]="0.15" + OTC["otmixmod"]="0.17" + OTC["otmorris"]="0.16" + OTC["otrobopt"]="0.14" + OTC["otsubsetinverse"]="1.10" + OTC["otsvm"]="0.14" + + 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]}" + CMAKE_EXTRA_OPTIONS+=" -DMIXMOD_INCLUDE_DIR=$PRODUCT_INSTALL/include" + CMAKE_EXTRA_OPTIONS+=" -DMIXMOD_LIBRARIES=$PRODUCT_INSTALL/lib/libmixmod.so" + if [ ! -f $PRODUCT_INSTALL/lib/libmixmod.so ]; then + echo "WARNING: libmixmod.so is not installed where it is expected to be. Skipping..." + continue + fi + 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 + echo "INFO: check presence of $PRODUCT_INSTALL/local" + if [ -d "$PRODUCT_INSTALL/local" ]; then + echo "INFO: $PRODUCT_INSTALL/local is present - reearrange ..." + if [ -d ${PRODUCT_INSTALL}/local/lib/python${PYTHON_VERSION}/dist-packages ]; then + mv ${PRODUCT_INSTALL}/local/lib/python${PYTHON_VERSION}/dist-packages ${PRODUCT_INSTALL}/local/lib/python${PYTHON_VERSION}/site-packages + fi + for D in $(ls $PRODUCT_INSTALL/local); do + echo "INFO: next subdirectory: $PRODUCT_INSTALL/local/$D" + if [ -d $PRODUCT_INSTALL/$D ]; then + cp -r $PRODUCT_INSTALL/local/$D/* $PRODUCT_INSTALL/$D/ + else + mv $PRODUCT_INSTALL/local/$D $PRODUCT_INSTALL/$D + fi + done + rm -rf $PRODUCT_INSTALL/local + fi + done + + declare -A OTP + OTP["otfmi"]="0.16.3" + OTP["otpod"]="0.6.11" + OTP["otwrapy"]="0.12.1" + 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" + if ! ${PYTHONBIN} -c "import dill"; then + ${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 + else + echo "WARNING: dill is already installed" + fi + echo "INFO: install pythonfmu-0.6.3" + if ! ${PYTOHNBIN} -c "import pythonfmu"; then + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/pythonfmu-0.6.3/pythonfmu-0.6.3-py3-none-any.whl --no-deps --prefix=$PRODUCT_INSTALL + if [ $? -ne 0 ] + then + echo "FATAL: could not install pythonfmu-0.6.3" + exit 6 + fi + else + echo "WARNING: pythonfmu is already innstalled" + fi + elif [ $k == "otpod" ]; then + if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" && $SAT_Cython_IS_NATIVE == "1" ]]; then + echo "*** skipping: since system Cython too old" + continue + fi + echo "INFO: install joblib-1.1.0" + if ! ${PYTHONBIN} -c "import joblib"; then + ${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 + fi + if ! ${PYTHONBIN} -c "import sklearn"; then + if [ "${LINUX_DISTRIBUTION}" != "DB10" ]; then + echo "INFO: install scikit-learn-1.2.2" + if [ "${PYTHON_VERSION}" == "3.12" ]; then + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.2.2/scikit-learn-1.2.2.tar.gz --no-deps --prefix=$PRODUCT_INSTALL --no-build-isolation --no-use-pep517 + if [ $? -ne 0 ] + then + echo "FATAL: could not install scikit-1.2.2" + exit 6 + fi + else + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.2.2/scikit_learn-1.2.2-cp${PYTHON_VERSION//./}-cp${PYTHON_VERSION//./}-manylinux_2_17_x86_64.manylinux2014_x86_64.whl --no-deps --prefix=$PRODUCT_INSTALL + fi + if [ $? -ne 0 ] + then + echo "FATAL: could not install scikit-1.2.2" + exit 6 + fi + else + echo "INFO: install scikit-learn-1.0" + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.0/scikit-learn-1.0.tar.gz --no-deps --prefix=$PRODUCT_INSTALL --no-build-isolation --no-use-pep517 + if [ $? -ne 0 ] + then + echo "FATAL: could not install scikit-1.0" + exit 6 + fi + fi + else + echo "WARNING: sklearn is already installed" + fi + echo "INFO: install threadpoolctl-3.0.0" + if ! ${PPYTHONBIN} -c "import threadpoolctl"; then + ${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 + else + echo "WARNING: threadpoolctl is already installed" + fi + elif [ $k == "otwrapy" ]; then + echo "INFO: install tqdm-4.66.5" + if ! ${PYTHONBIN} -c "import tqdm"; then + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/tqdm-4.66.5/tqdm-4.66.5-py3-none-any.whl --no-deps --prefix=$PRODUCT_INSTALL + if [ $? -ne 0 ] + then + echo "FATAL: could not install tqdm 4.66.5" + exit 6 + fi + else + echo "WARNING: tqdm is already installed" + fi + fi + echo "INFO: check presence of $PRODUCT_INSTALL/local" + if [ -d "$PRODUCT_INSTALL/local" ]; then + echo "INFO: $PRODUCT_INSTALL/local is present - reearrange ..." + if [ -d ${PRODUCT_INSTALL}/local/lib/python${PYTHON_VERSION}/dist-packages ]; then + mv ${PRODUCT_INSTALL}/local/lib/python${PYTHON_VERSION}/dist-packages ${PRODUCT_INSTALL}/local/lib/python${PYTHON_VERSION}/site-packages + fi + for D in $(ls $PRODUCT_INSTALL/local); do + echo "INFO: next subdirectory: $PRODUCT_INSTALL/local/$D" + if [ -d $PRODUCT_INSTALL/$D ]; then + cp -r $PRODUCT_INSTALL/local/$D/* $PRODUCT_INSTALL/$D/ + else + mv $PRODUCT_INSTALL/local/$D $PRODUCT_INSTALL/$D + fi + done + rm -rf $PRODUCT_INSTALL/local + 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 dill-0.3.4" + exit 5 + fi + echo "INFO: install pythonfmu-0.6.3" + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/pythonfmu-0.6.3/pythonfmu-0.6.3-py3-none-any.whl --no-deps + if [ $? -ne 0 ] + then + echo "FATAL: could not install pythonfmu-0.6.3" + exit 6 + 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 threadpoolctl 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 + if [ "${PYTHON_VERSION}" == "3.6" ]; then + 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 + elif [ "${PYTHON_VERSION}" == "3.9" ]; then + echo "INFO: install scikit-learn-1.2.2" + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.2.2/scikit_learn-1.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl --no-deps + if [ $? -ne 0 ] + then + echo "FATAL: could not install scikit-1.2.2" + exit 6 + fi + fi + elif [ $k == "otwrapy" ]; then + echo "INFO: install tqdm-4.66.5" + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/tqdm-4.66.5/tqdm-4.66.5-py3-none-any.whl --no-deps --prefix=$PRODUCT_INSTALL + if [ $? -ne 0 ] + then + echo "FATAL: could not install tqdm 4.66.5" + exit 6 + fi + fi + fi + + cd $BUILD_DIR + mkdir ${BUILD_DIR}/$k + cd ${BUILD_DIR}/$k + cp -R $SOURCE_DIR/$k-${OTP[$k]}/* . + # + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip . --no-deps --prefix=$PRODUCT_INSTALL + if [ $? -ne 0 ]; then + echo "ERROR on ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip . --no-deps --prefix=$PRODUCT_INSTALL" + exit 4 + fi + # + echo "INFO: check presence of $PRODUCT_INSTALL/local" + if [ -d "$PRODUCT_INSTALL/local" ]; then + echo "INFO: $PRODUCT_INSTALL/local is present - reearrange ..." + if [ -d ${PRODUCT_INSTALL}/local/lib/python${PYTHON_VERSION}/dist-packages ]; then + mv ${PRODUCT_INSTALL}/local/lib/python${PYTHON_VERSION}/dist-packages ${PRODUCT_INSTALL}/local/lib/python${PYTHON_VERSION}/site-packages + fi + for D in $(ls $PRODUCT_INSTALL/local); do + echo "INFO: next subdirectory: $PRODUCT_INSTALL/local/$D" + if [ -d $PRODUCT_INSTALL/$D ]; then + cp -r $PRODUCT_INSTALL/local/$D/* $PRODUCT_INSTALL/$D/ + else + mv $PRODUCT_INSTALL/local/$D $PRODUCT_INSTALL/$D + fi + done + rm -rf $PRODUCT_INSTALL/local + fi + if [ -d "${PRODUCT_INSTALL}/lib64" ]; then + echo "WARNING: moving lib64 to lib" + mv $PRODUCT_INSTALL/lib64/python$PYTHON_VERSION/site-packages/* $PRODUCT_INSTALL/lib/python$PYTHON_VERSION/site-packages/ + rm -rf ${PRODUCT_INSTALL}/lib64 + elif [ -d "${PRODUCT_INSTALL}/local/lib64" ]; then + echo "WARNING: moving local/lib64 to lib" + mv $PRODUCT_INSTALL/lib64/python$PYTHON_VERSION/site-packages/* $PRODUCT_INSTALL/lib/python$PYTHON_VERSION/site-packages/ + rm -rf ${PRODUCT_INSTALL}/local/lib64 + 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 + ;; + FD38) + 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 + elif [ -f ${PYTHON_ROOT_DIR}/lib/python${PYTHON_VERSION}/site.py ]; then + cp ${PYTHON_ROOT_DIR}/lib/python${PYTHON_VERSION}/site.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.24.0 libOT.so.0.24 + ln -sf libOT.so.0.24 libOT.so.0 + ln -sf libOT.so.0 libOT.so +fi + +echo +echo "########## END" diff --git a/products/nlopt.pyconf b/products/nlopt.pyconf index 9f22871..30e4c31 100644 --- a/products/nlopt.pyconf +++ b/products/nlopt.pyconf @@ -46,3 +46,13 @@ version_2_6_0: { compil_script : "nlopt-2.6.0" + $VARS.scriptExtension } + +version_2_7_0: +{ + compil_script : "nlopt-2.7.0" + $VARS.scriptExtension +} + +version_2_7_1: +{ + compil_script : "nlopt-2.7.1" + $VARS.scriptExtension +} diff --git a/products/openturns.pyconf b/products/openturns.pyconf index e8705df..d0a23f7 100644 --- a/products/openturns.pyconf +++ b/products/openturns.pyconf @@ -36,6 +36,54 @@ default_win : opt_depend : [] } +version_1_23 : +{ + compil_script : "openturns-1.23.sh" + patches : [] + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI', 'boost'] + opt_depend : ['pandas', 'statsmodels', 'patsy'] +} + +version_1_23_win : +{ + name : "OT" + compil_script : "openturns-1.23.bat" + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + 'openturns' + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + depend : ['Python', 'openblas', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'fftw'] + opt_depend : ['pandas', 'statsmodels', 'patsy'] + patches : [] + properties : + { + single_install_dir : "no" + incremental : "yes" + } +} + +version_1_23_CO7 : +{ + compil_script : "openturns-1.23.sh" + patches : ['openturns-1.23.0001.patch'] + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI', 'boost'] + opt_depend : ['pandas', 'statsmodels', 'patsy'] +} + +version_1_23_CO8 : +{ + compil_script : "openturns-1.23.sh" + patches : ['openturns-1.23.0001.patch'] + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI', 'boost'] + opt_depend : ['pandas', 'statsmodels', 'patsy'] +} + +version_1_23_DB09 : +{ + compil_script : "openturns-1.23.sh" + patches : ['openturns-1.23.0001.patch'] + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI', 'boost'] + opt_depend : ['pandas', 'statsmodels', 'patsy'] +} + version_1_22 : { compil_script : "openturns-1.22.sh" diff --git a/products/patches/openturns-1.23.0001.patch b/products/patches/openturns-1.23.0001.patch new file mode 100644 index 0000000..f2c765a --- /dev/null +++ b/products/patches/openturns-1.23.0001.patch @@ -0,0 +1,14 @@ +diff -Naur -Naur openturns/openturns-1.23/CMakeLists.txt openturns_dev/openturns-1.23/CMakeLists.txt +--- openturns/openturns-1.23/CMakeLists.txt 2024-04-03 11:52:49.000000000 +0000 ++++ openturns_dev/openturns-1.23/CMakeLists.txt 2024-04-05 08:17:28.143471039 +0000 +@@ -129,6 +129,10 @@ + find_package (LAPACK REQUIRED) + 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 1.0 CONFIG)