From 7e5dc9839fe76b8ed99a564ca6085e81f7950804 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Thu, 25 May 2023 13:43:09 +0200 Subject: [PATCH] bos #33720: persalys: 1/ fftw, openblas, cminpack, fmilibrary, pyfmi, pandas, statsmodels, patsy prerequisites are implemented 2/ improve openturns 1.20.1 compilation script and compile modules (scikit-learn prerequisite is compiled using sources embedded in openturns-1.20.1 archive) 3/ otagrum will be implemented post 9.11 (requires the compilation of agrum) 4/ support py2cpp, ydefx on windows 5/ compile persalys 14.0.1 6/ openturns_salome --- applications/SALOME-9.11.0-windows.pyconf | 17 +- applications/SALOME-master-windows.pyconf | 19 +- products/FMILibrary.pyconf | 11 +- products/OPENTURNS_SALOME.pyconf | 24 +- products/PERSALYS.pyconf | 9 +- products/PY2CPP.pyconf | 3 +- products/PyFMI.pyconf | 14 + products/YACS.pyconf | 6 + products/YDEFX.pyconf | 7 + products/cminpack.pyconf | 11 +- products/compil_scripts/FMILibrary-2.0.3.bat | 70 +++++ products/compil_scripts/OPENTURNS_SALOME.bat | 160 ++++++++++ products/compil_scripts/PERSALYS-v14.0.1.bat | 42 ++- products/compil_scripts/ParaView-5.11.0.bat | 11 +- products/compil_scripts/PyFMI-2.6.bat | 59 ++++ products/compil_scripts/YDEFX.bat | 1 + products/compil_scripts/fftw-3.3.9.bat | 67 +++++ products/compil_scripts/openturns-1.20.1.bat | 274 +++++++++++++++--- products/env_scripts/FMILibrary.py | 5 +- products/env_scripts/PERSALYS.py | 15 +- products/env_scripts/cminpack.py | 5 +- products/env_scripts/fftw.py | 5 +- products/env_scripts/openblas.py | 2 + products/env_scripts/openturns.py | 1 + products/fftw.pyconf | 10 +- products/openblas.pyconf | 2 +- products/openturns.pyconf | 13 +- products/patches/PERSALYS-v14.0.1-001.patch | 85 ++++++ .../patches/cminpack-1.3.6-openblas.patch | 27 ++ products/patches/openturns-1.20.1.0004.patch | 31 ++ products/patches/openturns-1.20.1.0005.patch | 12 + 31 files changed, 933 insertions(+), 85 deletions(-) create mode 100644 products/compil_scripts/FMILibrary-2.0.3.bat create mode 100644 products/compil_scripts/OPENTURNS_SALOME.bat create mode 100644 products/compil_scripts/PyFMI-2.6.bat create mode 100644 products/compil_scripts/fftw-3.3.9.bat create mode 100644 products/patches/PERSALYS-v14.0.1-001.patch create mode 100644 products/patches/cminpack-1.3.6-openblas.patch create mode 100644 products/patches/openturns-1.20.1.0004.patch create mode 100644 products/patches/openturns-1.20.1.0005.patch diff --git a/applications/SALOME-9.11.0-windows.pyconf b/applications/SALOME-9.11.0-windows.pyconf index ea477d8..83973ea 100644 --- a/applications/SALOME-9.11.0-windows.pyconf +++ b/applications/SALOME-9.11.0-windows.pyconf @@ -59,6 +59,8 @@ APPLICATION : embree : '3.12.2' expat : '2.0.1' f2c : '1.0.0' + fftw: '3.3.9' + FMILibrary : '2.0.3' freeimage : '3.18.0' freetype : '2.9.1' gmsh : '4.10.3' @@ -94,13 +96,16 @@ APPLICATION : openturns: '1.20.1' ospray : '2.4.0' packaging : '19.0' + pandas : '0.25.2' + patsy : '0.5.2' ParaView : {tag:'5.11.0', base: 'no', section: 'version_5_11_0'} - #PERSALYS: 'v14.0.1' + PERSALYS: 'v14.0.1' perl : '5.28.1.1' Pillow : '7.1.1' planegcs : '0.18-3cb6890' psutil : '5.7.2' pthreads : '2.9.1' + PyFMI : '2.6' Pygments : '2.4.2' pyparsing : '2.4.0' PyQt : '5.15.3' @@ -127,7 +132,7 @@ APPLICATION : sphinxcontrib_websupport : '1.1.2' sphinx_rtd_theme : '0.4.3' sphinxintl: '2.0.0' - StaticMeshPlugin: '5.11.0' + statsmodels: '0.9.0' swig : '4.0.2' tbb : '2019_U8_win' toml : '0.10.2' @@ -172,9 +177,9 @@ APPLICATION : 'EFICAS_TOOLS' : 'master' #FIXME 'ADAO' : 'master' #FIXME 'PARAVISADDONS' : 'master' #FIXME - 'PY2CPP' : 'master' #FIXME - #'OPENTURNS_SALOME' - #'YDEFX' + 'PY2CPP' : 'bos/33720' + 'OPENTURNS_SALOME' : 'bos/33720' + 'YDEFX' : 'bos/33720' 'pmml' #'TESTBASE' 'CEATESTBASE' : 'SalomeV9' @@ -202,7 +207,7 @@ __overwrite__ : [ { __condition__ : "APPLICATION.debug == 'yes'" - 'APPLICATION.rm_products' : ['matplotlib', 'openturns', 'scipy', 'Pillow'] + 'APPLICATION.rm_products' : ['matplotlib', 'openturns', 'scipy', 'Pillow', 'PERSALYS', 'OPENTURNS_SALOME', 'cminpack', 'openblas', 'FMILibrary', 'PyFMI', 'fftw', 'statsmodel'] # TODO: cmake 3.24 screws things up by adding _d suffix to debug libraries to KERNEL 'APPLICATION.products.cmake' : {tag: '3.12.1', base: 'no', section : 'version_3_12_1' } 'APPLICATION.products.numpy' : {tag: '1.16.4', base: 'no', section : 'version_1_16_4_win_dbg' } diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index 207404a..ac40f09 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -59,6 +59,8 @@ APPLICATION : embree : '3.12.2' expat : '2.0.1' f2c : '1.0.0' + fftw: '3.3.9' + FMILibrary : '2.0.3' freeimage : '3.18.0' freetype : '2.9.1' gmsh : '4.10.3' @@ -94,13 +96,16 @@ APPLICATION : openturns: '1.20.1' ospray : '2.4.0' packaging : '19.0' + pandas : '0.25.2' + patsy : '0.5.2' ParaView : {tag:'5.11.0', base: 'no', section: 'version_5_11_0'} - #PERSALYS: 'v14.0.1' + PERSALYS: 'v14.0.1' perl : '5.28.1.1' Pillow : '7.1.1' planegcs : '0.18-3cb6890' psutil : '5.7.2' pthreads : '2.9.1' + PyFMI : '2.6' Pygments : '2.4.2' pyparsing : '2.4.0' PyQt : '5.15.3' @@ -127,7 +132,7 @@ APPLICATION : sphinxcontrib_websupport : '1.1.2' sphinx_rtd_theme : '0.4.3' sphinxintl: '2.0.0' - StaticMeshPlugin: '5.11.0' + statsmodels: '0.9.0' swig : '4.0.2' tbb : '2019_U8_win' toml : '0.10.2' @@ -159,7 +164,7 @@ APPLICATION : 'FIELDS' 'PARAVIS' 'JOBMANAGER' - 'YACS' + 'YACS' : 'V9_11_BR' # FIXME 'YACSGEN' 'DOCUMENTATION' 'SAMPLES' @@ -172,9 +177,9 @@ APPLICATION : 'EFICAS_TOOLS' 'ADAO' 'PARAVISADDONS' - 'PY2CPP' - #'OPENTURNS_SALOME' - #'YDEFX' + 'PY2CPP' : 'bos/33720' + 'OPENTURNS_SALOME' : 'bos/33720' + 'YDEFX' : 'bos/33720' 'pmml' 'TESTBASE' 'CEATESTBASE' : 'SalomeV9' @@ -202,7 +207,7 @@ __overwrite__ : [ { __condition__ : "APPLICATION.debug == 'yes'" - 'APPLICATION.rm_products' : ['matplotlib', 'openturns', 'scipy', 'Pillow'] + 'APPLICATION.rm_products' : ['matplotlib', 'openturns', 'scipy', 'Pillow', 'PERSALYS', 'OPENTURNS_SALOME', 'cminpack', 'openblas', 'FMILibrary', 'PyFMI', 'fftw', 'statsmodel'] # TODO: cmake 3.24 screws things up by adding _d suffix to debug libraries to KERNEL 'APPLICATION.products.cmake' : {tag: '3.12.1', base: 'no', section : 'version_3_12_1' } 'APPLICATION.products.numpy' : {tag: '1.16.4', base: 'no', section : 'version_1_16_4_win_dbg' } diff --git a/products/FMILibrary.pyconf b/products/FMILibrary.pyconf index 1ac79b5..6c35782 100644 --- a/products/FMILibrary.pyconf +++ b/products/FMILibrary.pyconf @@ -24,12 +24,10 @@ default : default_win : { - compil_script : 'pip_install' + $VARS.scriptExtension properties : { single_install_dir : "yes" incremental : "yes" - pip : "yes" } depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'pthreads'] opt_depend : [] @@ -38,4 +36,11 @@ default_win : version_2_0_3 : { patches : ['FMILibrary-2.0.3-installdir.patch'] -} \ No newline at end of file +} + +version_2_0_3_win : +{ + build_source : "script" + compil_script : 'FMILibrary-2.0.3.bat' + patches : ['FMILibrary-2.0.3-installdir.patch'] +} diff --git a/products/OPENTURNS_SALOME.pyconf b/products/OPENTURNS_SALOME.pyconf index 770d393..2eca4e4 100644 --- a/products/OPENTURNS_SALOME.pyconf +++ b/products/OPENTURNS_SALOME.pyconf @@ -21,9 +21,9 @@ default : depend : [ 'KERNEL', 'GUI', - 'PERSALYS', - 'gdal', - 'YACS' + 'PERSALYS', + 'gdal', + 'YACS' ] build_depend : ["cmake", "swig", "doxygen"] source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name @@ -35,4 +35,22 @@ default : incremental : "yes" has_unit_tests : "yes" } + patches : [] +} + +default_win : +{ + name : "OPENTURNS" + build_source : "script" + compil_script : "OPENTURNS_SALOME.bat" + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + "OPENTURNS_SALOME" + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + depend : [ + 'KERNEL', + 'GUI', + 'PERSALYS', + 'YACS', + 'openturns' + ] + patches : [] } diff --git a/products/PERSALYS.pyconf b/products/PERSALYS.pyconf index 9a937cf..114a203 100644 --- a/products/PERSALYS.pyconf +++ b/products/PERSALYS.pyconf @@ -83,12 +83,17 @@ version_v14_0_1_win : 'qt', 'ParaView', 'openturns', + 'FMILibrary', + 'PyFMI', 'YACS', - #'YDEFX', + 'YDEFX', + 'PY2CPP', 'CAS', 'CONFIGURATION', - 'openblas' + 'openblas', + 'pthreads' ] + patches : ["PERSALYS-v14.0.1-001.patch"] } version_v13_0 : diff --git a/products/PY2CPP.pyconf b/products/PY2CPP.pyconf index 01ad41e..3ac054b 100644 --- a/products/PY2CPP.pyconf +++ b/products/PY2CPP.pyconf @@ -30,10 +30,11 @@ default : default_win : { + cmake_options : " -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON " properties: { incremental : "yes" single_install_dir : "no" # aimed to solve sat #18914 } - patches : ['py2cpp-9.11.0-lib.patch'] + patches : [] } diff --git a/products/PyFMI.pyconf b/products/PyFMI.pyconf index 47d5874..e7261fe 100644 --- a/products/PyFMI.pyconf +++ b/products/PyFMI.pyconf @@ -37,6 +37,20 @@ version_2_6_no_pip : } } +version_2_6 : +{ +} + +version_2_6_win : +{ + compil_script : "PyFMI-2.6.bat" + properties: + { + incremental : "yes" + pip : "no" + } +} + version_2_6_UB22_04: { patches: ['pyfmi-2.6-python-3.1x.01.patch'] diff --git a/products/YACS.pyconf b/products/YACS.pyconf index ec4d021..a2c7915 100644 --- a/products/YACS.pyconf +++ b/products/YACS.pyconf @@ -44,8 +44,14 @@ default : has_unit_tests incremental : "yes" } + patches : [] } +default_win : +{ + patches : [] +} + version_9_2_0_to_9_8_0 : { cmake_options : "" diff --git a/products/YDEFX.pyconf b/products/YDEFX.pyconf index d79bd5c..42a9ae0 100644 --- a/products/YDEFX.pyconf +++ b/products/YDEFX.pyconf @@ -33,6 +33,13 @@ default : patches : [] } +default_win : +{ + build_source : "script" + cmake_options : " -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON " + patches : [] +} + version_V9_10_0 : { # prescription de EDF ne fonctionne pas en dehors de YAMS diff --git a/products/cminpack.pyconf b/products/cminpack.pyconf index aee72df..880057b 100644 --- a/products/cminpack.pyconf +++ b/products/cminpack.pyconf @@ -30,6 +30,15 @@ default : } } +default_win : +{ + properties : + { + single_install_dir : "yes" + incremental : "yes" + } +} + version_1_3_6 : { build_source : "script" @@ -43,5 +52,5 @@ version_1_3_6_win: build_depend : ["cmake", "swig"] opt_depend : ['openmpi'] compil_script: 'cminpack-1.3.6.bat' - patches : [] + patches : ["cminpack-1.3.6-openblas.patch"] } diff --git a/products/compil_scripts/FMILibrary-2.0.3.bat b/products/compil_scripts/FMILibrary-2.0.3.bat new file mode 100644 index 0000000..39a9299 --- /dev/null +++ b/products/compil_scripts/FMILibrary-2.0.3.bat @@ -0,0 +1,70 @@ +@echo off + +echo ########################################################################## +echo FMILibrary %VERSION% +echo ########################################################################## + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +SET PRODUCT_BUILD_TYPE=Release + +REM TODO: NGH: not Tested yet +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% + +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% -DOpenBLAS_DIR=%OpenBLAS_DIR:\=/% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DFMILIB_GENERATE_DOXYGEN_DOC=OFF +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="Visual Studio 15 2017 Win64" + +cd %BUILD_DIR% + +echo. +echo -------------------------------------------------------------------------- +echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% +echo -------------------------------------------------------------------------- + +%CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on FMILibrary + exit 1 +) + +REM Strangely fails on node if latest Windows SDK +sed -i 's/Shlwapi.lib/ /g' fmilib.vcxproj + +echo. +echo -------------------------------------------------------------------------- +echo *** msbuild %MAKE_OPTIONS% /p:Configuration=Release 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 +) + +echo. +echo ########## END diff --git a/products/compil_scripts/OPENTURNS_SALOME.bat b/products/compil_scripts/OPENTURNS_SALOME.bat new file mode 100644 index 0000000..a0d21b1 --- /dev/null +++ b/products/compil_scripts/OPENTURNS_SALOME.bat @@ -0,0 +1,160 @@ +@echo off + +echo ########################################################################## +echo OPENTURNS_SALOME %VERSION% +echo ########################################################################## + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +SET PRODUCT_BUILD_TYPE=Release +if %SAT_DEBUG% == 1 ( + set PRODUCT_BUILD_TYPE=Debug +) + +IF NOT DEFINED CMAKE_GENERATOR ( + SET CMAKE_GENERATOR="Visual Studio 15 2017 Win64" +) + +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% + +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR% + +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.exe +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_LIBRARY:STRING=%LIBXML2_ROOT_DIR:\=/%/lib/libxml2.lib +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DLIBXML2_XMLLINT_EXECUTABLE=%LIBXML2_ROOT_DIR:\=/%/bin/xmllint.exe + + +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_ROOT_DIR=%PTHREAD_ROOT_DIR:\=/% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_INCLUDE_DIR=%PTHREAD_ROOT_DIR:\=/%/include +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_DLL_LIBRARY=%PTHREAD_ROOT_DIR:\=/%/lib/pthreadVC2.dll +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_LIBRARY=%PTHREAD_ROOT_DIR:\=/%/lib/pthreadVCE2.lib + +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 +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DQWT_INCLUDE_DIR=%QWT_ROOT_DIR:\=/%/include +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_SHARED_LIBS:BOOL=ON +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DADAO_ROOT_DIR=%ADAO_ROOT_DIR:\=/% + +REM Boost settings +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBOOST_ROOT:PATH=%BOOST_ROOT_DIR:\=/% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBoost_ADDITIONAL_VERSIONS="1.67.0 1.67" +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBOOST_INCLUDEDIR=%BOOST_ROOT_DIR:\=/%/include/boost-1_67 +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBoost_INCLUDE_DIR=%BOOST_ROOT_DIR:\=/%/include/boost-1_67 +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBoost_NO_BOOST_CMAKE:BOOL=ON +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBoost_NO_SYSTEM_PATHS:BOOL=ON + +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DGUI_ROOT_DIR=%GUI_ROOT_DIR:\=/% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DSalomeGUI_DIR=%GUI_ROOT_DIR:\=/%/adm_local/cmake_files +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DKERNEL_ROOT_DIR=%KERNEL_ROOT_DIR:\=/% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DSalomeKERNEL_DIR=%KERNEL_ROOT_DIR:\=/%/salome_adm/cmake_files +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DOpenTURNS_DIR=%OT_ROOT_DIR:\=/%/lib/cmake/openturns +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dotmorris_DIR==%OT_ROOT_DIR:\=/%/lib/cmake/otmorris +rem SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPy2cpp_DIR=%PY2CPP_ROOT_DIR:\=/%/lib/cmake/py2cpp + +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DQWT_INCLUDE_DIR=%QWT_ROOT_DIR:\=/%/include +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DQWT_LIBRARY=%QWT_ROOT_DIR:\=/%/lib/qwt.lib + +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_SPHINX=OFF +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DSPHINX_ROOT_DIR=%SPHINX_ROOT_DIR:\=/% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DYACS_ROOT_DIR=%YACS_ROOT_DIR:\=/% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DSalomeYACS_DIR=%YACS_ROOT_DIR:\=/%/adm/cmake +rem SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dydefx_DIR=%YDEFX_ROOT_DIR:\=/%/salome_adm/cmake_files +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DAdaoCppLayer_INCLUDE_DIR=%ADAO_INTERFACE_ROOT_DIR:\=/%/include +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DAdaoCppLayer_ROOT_DIR=%ADAO_INTERFACE_ROOT_DIR:\=/% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_SALOME=ON +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DTBB_ROOT=%TBB_ROOT_DIR:\=/% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DTBB_INCLUDE_DIR=%TBB_ROOT_DIR:\=/%/include +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPYTHON_EXECUTABLE=%PYTHONBIN:\=/% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPYTHON_INCLUDE_DIR=%PYTHON_INCLUDE:\=/% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_FIND_ROOT_PATH=ON + +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCGNS_INCLUDE_DIR:PATH=%CGNS_ROOT_DIR:\=/%/include +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCGNS_LIBRARY:STRING=%CGNS_ROOT_DIR:\=/%/lib/cgnsdll.lib +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCGNS_INCLUDE_DIR:PATH=%CGNS_ROOT_DIR:\=/%/include + +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPersalys_DIR=%PERSALYS_ROOT_DIR:\=/% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DOPENTURNS_HOME=%OPENTURNS_HOME:\=/% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON +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 MSBUILDDISABLENODEREUSE=1 + +echo. +echo ********************************************************************* +echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% +echo ********************************************************************* +echo. + +%CMAKE_ROOT%\bin\cmake -G "Visual Studio 15 2017 Win64" %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=x64 /p:CharacterSet=Unicode ALL_BUILD.vcxproj + +echo ********************************************************************* +echo. + +msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 /p:CharacterSet=Unicode ALL_BUILD.vcxproj +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on msbuild ALL_BUILD.vcxproj, please check! + REM exit 2 +) + +echo. +echo ********************************************************************* +echo *** installation... +echo ********************************************************************* +echo. + +msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 /p:CharacterSet=Unicode INSTALL.vcxproj +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on msbuild INSTALL.vcxproj + exit 3 +) + +echo +echo "########## END" diff --git a/products/compil_scripts/PERSALYS-v14.0.1.bat b/products/compil_scripts/PERSALYS-v14.0.1.bat index ce69e38..eedaab8 100644 --- a/products/compil_scripts/PERSALYS-v14.0.1.bat +++ b/products/compil_scripts/PERSALYS-v14.0.1.bat @@ -28,7 +28,7 @@ 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% -DSWIG_EXECUTABLE=%SWIG_ROOT_DIR:\=/%/bin/swig.exe 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 @@ -39,17 +39,27 @@ set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DLIBXML2_LIBRARIES:STRING=%LIBXML2_ROOT_DIR:\ set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DLIBXML2_LIBRARY:STRING=%LIBXML2_ROOT_DIR:\=/%/lib/libxml2.lib set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DLIBXML2_XMLLINT_EXECUTABLE=%LIBXML2_ROOT_DIR:\=/%/bin/xmllint.exe + +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_ROOT_DIR=%PTHREAD_ROOT_DIR:\=/% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_INCLUDE_DIR=%PTHREAD_ROOT_DIR:\=/%/include +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_DLL_LIBRARY=%PTHREAD_ROOT_DIR:\=/%/lib/pthreadVC2.dll +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_LIBRARY=%PTHREAD_ROOT_DIR:\=/%/lib/pthreadVCE2.lib + 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 @@ -59,19 +69,31 @@ set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_SPHINX=OFF SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DQWT_INCLUDE_DIR=%QWT_ROOT_DIR:\=/%/include SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_SHARED_LIBS:BOOL=ON SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DADAO_ROOT_DIR=%ADAO_ROOT_DIR:\=/% -SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBOOST_ROOT:PATH=%BOOST_ROOT_DIR:\=/% + +REM Boost settings +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBOOST_ROOT:PATH=%BOOST_ROOT_DIR:\=/% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBoost_ADDITIONAL_VERSIONS="1.67.0 1.67" +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBOOST_INCLUDEDIR=%BOOST_ROOT_DIR:\=/%/include/boost-1_67 +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBoost_INCLUDE_DIR=%BOOST_ROOT_DIR:\=/%/include/boost-1_67 +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBoost_NO_BOOST_CMAKE:BOOL=ON +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBoost_NO_SYSTEM_PATHS:BOOL=ON + SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DGUI_ROOT_DIR=%GUI_ROOT_DIR:\=/% SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DSalomeGUI_DIR=%GUI_ROOT_DIR:\=/%/adm_local/cmake_files SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DKERNEL_ROOT_DIR=%KERNEL_ROOT_DIR:\=/% SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DSalomeKERNEL_DIR=%KERNEL_ROOT_DIR:\=/%/salome_adm/cmake_files -REM SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DOpenTURNS_DIR=$OT_ROOT_DIR/lib/cmake/openturns -rem SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPy2cpp_DIR=%PY2CPP_ROOT_DIR:\=/%/lib/cmake/py2cpp +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DOpenTURNS_DIR=%OT_ROOT_DIR:\=/%/lib/cmake/openturns +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dotmorris_DIR==%OT_ROOT_DIR:\=/%/lib/cmake/otmorris +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPy2cpp_DIR=%PY2CPP_ROOT_DIR:\=/%/lib/cmake/py2cpp + SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DQWT_INCLUDE_DIR=%QWT_ROOT_DIR:\=/%/include +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DQWT_LIBRARY=%QWT_ROOT_DIR:\=/%/lib/qwt.lib + SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_SPHINX=OFF SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DSPHINX_ROOT_DIR=%SPHINX_ROOT_DIR:\=/% SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DYACS_ROOT_DIR=%YACS_ROOT_DIR:\=/% SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DSalomeYACS_DIR=%YACS_ROOT_DIR:\=/%/adm/cmake -rem SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dydefx_DIR=%YDEFX_ROOT_DIR:\=/%/salome_adm/cmake_files +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dydefx_DIR=%YDEFX_ROOT_DIR:\=/%/salome_adm/cmake_files SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DAdaoCppLayer_INCLUDE_DIR=%ADAO_INTERFACE_ROOT_DIR:\=/%/include SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DAdaoCppLayer_ROOT_DIR=%ADAO_INTERFACE_ROOT_DIR:\=/% SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_SALOME=ON @@ -80,7 +102,9 @@ SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DTBB_INCLUDE_DIR=%TBB_ROOT_DIR:\=/%/include SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPYTHON_EXECUTABLE=%PYTHONBIN:\=/% SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPYTHON_INCLUDE_DIR=%PYTHON_INCLUDE:\=/% SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_FIND_ROOT_PATH=ON -REM CMAKE_OPTIONS+=" -DSWIG_EXECUTABLE:PATH=$(which swig)" + +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCGNS_INCLUDE_DIR:PATH=%CGNS_ROOT_DIR:\=/%/include +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCGNS_LIBRARY:STRING=%CGNS_ROOT_DIR:\=/%/lib/cgnsdll.lib SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCGNS_INCLUDE_DIR:PATH=%CGNS_ROOT_DIR:\=/%/include @@ -107,12 +131,12 @@ if NOT %ERRORLEVEL% == 0 ( 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 /p:CharacterSet=Unicode ALL_BUILD.vcxproj echo ********************************************************************* echo. -msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 ALL_BUILD.vcxproj +msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 /p:CharacterSet=Unicode ALL_BUILD.vcxproj if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild ALL_BUILD.vcxproj, please check! REM exit 2 @@ -124,7 +148,7 @@ echo *** installation... echo ********************************************************************* echo. -msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 INSTALL.vcxproj +msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 /p:CharacterSet=Unicode INSTALL.vcxproj if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild INSTALL.vcxproj exit 3 diff --git a/products/compil_scripts/ParaView-5.11.0.bat b/products/compil_scripts/ParaView-5.11.0.bat index 424734c..21c26f3 100644 --- a/products/compil_scripts/ParaView-5.11.0.bat +++ b/products/compil_scripts/ParaView-5.11.0.bat @@ -8,6 +8,9 @@ IF NOT DEFINED SAT_DEBUG ( SET SAT_DEBUG=0 ) +IF NOT DEFINED CMAKE_GENERATOR ( + SET CMAKE_GENERATOR="Visual Studio 15 2017 Win64" +) if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% REM clean BUILD directory if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% @@ -204,8 +207,14 @@ set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPARAVIEW_PLUGIN_AUTOLOAD_VTKmFilters=ON set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DVTK_SMP_IMPLEMENTATION_TYPE=TBB set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DVTK_SMP_ENABLE_OPENMP:BOOL=OFF -DVTK_SMP_ENABLE_STDTHREAD:BOOL=ON -DVTK_SMP_ENABLE_SEQUENTIAL:BOOL=ON set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DVTKm_ENABLE_TBB:BOOL=ON -DVTKm_ENABLE_OPENMP:BOOL=OFF -set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="Visual Studio 15 2017 Win64" + +IF DEFINED OT_VERSION ( + set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPARAVIEW_ENABLE_OPENTURNS=ON -DOpenTURNS_DIR=%OT_ROOT_DIR:\=/%/lib/cmake/openturns +) + +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR=%CMAKE_GENERATOR% cd %BUILD_DIR% + echo. echo INFO: running command: %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% diff --git a/products/compil_scripts/PyFMI-2.6.bat b/products/compil_scripts/PyFMI-2.6.bat new file mode 100644 index 0000000..fff8441 --- /dev/null +++ b/products/compil_scripts/PyFMI-2.6.bat @@ -0,0 +1,59 @@ +@echo off + +echo ########################################################################## +echo PyFMI %VERSION% +echo ########################################################################## + +SET INSTALL_CENTRALLY=1 +REM retrieve the PRODUCT name... +for %%i in (%PRODUCT_INSTALL%) do set "PRODUCT_NAME=%%~nxi" +echo ########################################################################## +echo *** Installing %PRODUCT_NAME% version: %VERSION% +echo ########################################################################## + +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 %SOURCE_DIR% + +set INSTALL_LIB=%PRODUCT_INSTALL%\lib\python%PYTHON_VERSION%\site-packages +if NOT exist "%INSTALL_LIB%" mkdir %INSTALL_LIB% +set PYTHONPATH=%INSTALL_LIB%;%PYTHONPATH% + +echo. +echo ########################################################################## +echo *** Launching "python.exe setup.py build" +echo ########################################################################## + +%PYTHON_ROOT_DIR%\python.exe setup.py build --build-base %BUILD_DIR% --build-temp %BUILD_DIR% +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on setup.py build + exit 1 +) + +echo. +echo ########################################################################## +echo *** Launching "python.exe setup.py install" +echo ########################################################################## + +if %INSTALL_CENTRALLY% == 1 ( + %PYTHON_ROOT_DIR%\python.exe setup.py install +) else ( + %PYTHON_ROOT_DIR%\python.exe setup.py install --prefix=%PRODUCT_INSTALL% --install-lib=%INSTALL_LIB% +) + +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on setup.py install + exit 2 +) +if %INSTALL_CENTRALLY% == 1 ( + @echo off + @echo Product %PRODUCT_NAME% version: %VERSION%> %PRODUCT_INSTALL%\README.txt + @echo Installation folder: %PYTHON_ROOT_DIR%>> %PRODUCT_INSTALL%\README.txt +) + +echo. +echo ########## END + diff --git a/products/compil_scripts/YDEFX.bat b/products/compil_scripts/YDEFX.bat index 44347d8..45c5671 100644 --- a/products/compil_scripts/YDEFX.bat +++ b/products/compil_scripts/YDEFX.bat @@ -24,6 +24,7 @@ mkdir %BUILD_DIR% 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_WINDOWS_EXPORT_ALL_SYMBOLS=ON set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="Visual Studio 15 2017 Win64" diff --git a/products/compil_scripts/fftw-3.3.9.bat b/products/compil_scripts/fftw-3.3.9.bat new file mode 100644 index 0000000..3e306f4 --- /dev/null +++ b/products/compil_scripts/fftw-3.3.9.bat @@ -0,0 +1,67 @@ +@echo off + +echo ########################################################################## +echo fftw %VERSION% +echo ########################################################################## + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +SET PRODUCT_BUILD_TYPE=Release + +REM TODO: NGH: not Tested yet +if %SAT_DEBUG% == 1 ( + set PRODUCT_BUILD_TYPE=Debug +) +IF NOT DEFINED CMAKE_GENERATOR ( + SET CMAKE_GENERATOR="Visual Studio 15 2017 Win64" +) +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% +set INCLUDE= +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR% +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_GENERATOR=%CMAKE_GENERATOR% + +cd %BUILD_DIR% +set PATH=%BUILD_DIR%\bin;%PATH% + +echo. +echo -------------------------------------------------------------------------- +echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% +echo -------------------------------------------------------------------------- + +%CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on fftw + exit 1 +) + +echo. +echo -------------------------------------------------------------------------- +echo *** msbuild %MAKE_OPTIONS% /p:Configuration=Release /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 +) + +echo. +echo ########## END diff --git a/products/compil_scripts/openturns-1.20.1.bat b/products/compil_scripts/openturns-1.20.1.bat index 710ef25..455659d 100644 --- a/products/compil_scripts/openturns-1.20.1.bat +++ b/products/compil_scripts/openturns-1.20.1.bat @@ -8,16 +8,20 @@ IF NOT DEFINED SAT_DEBUG ( SET SAT_DEBUG=0 ) +IF NOT DEFINED CMAKE_GENERATOR ( + SET CMAKE_GENERATOR="Visual Studio 15 2017 Win64" +) SET PRODUCT_BUILD_TYPE=Release + +REM TODO: NGH: not Tested yet if %SAT_DEBUG% == 1 ( set PRODUCT_BUILD_TYPE=Debug ) -IF NOT DEFINED CMAKE_GENERATOR ( - SET CMAKE_GENERATOR="Visual Studio 15 2017 Win64" -) - 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 clean BUILD directory if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% @@ -29,6 +33,60 @@ 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% + REM TODO: NGH: not Tested yet + 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% %MODULE_CMAKE_OPTIONS% %MODULE_SOURCE_DIR% + echo -------------------------------------------------------------------------- + %CMAKE_ROOT%\bin\cmake -G %CMAKE_GENERATOR% %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 + + +: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% @@ -56,10 +114,10 @@ set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCBLAS_DIR=%OPENBLAS_ROOT_DIR:\=/%/share/cmak 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_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% -DSWIG_COMPILE_FLAGS='/bigobj' set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_SPHINX=OFF if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% @@ -68,49 +126,199 @@ if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% mkdir %BUILD_DIR% cd %BUILD_DIR% -mkdir openturns mkdir cache mkdir cache\pip -cd %BUILD_DIR%\openturns +echo ########################################################################## +echo openturns 1.20.1 +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% +CALL:MODULE_BUILDER openturns "%SOURCE_DIR%\openturns-1.20.1" "%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.6 [SKIPPED] +echo ########################################################################## +REM SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_DOC=OFF +REM CALL:MODULE_BUILDER otagrum "%SOURCE_DIR%\otagrum-0.6" "%BUILD_DIR%\otagrum" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" + +echo ########################################################################## +echo otmorris 0.13 +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% +CALL:MODULE_BUILDER otmorris "%SOURCE_DIR%\otmorris-0.13" "%BUILD_DIR%\otmorris" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" + +echo ########################################################################## +echo otfftw 0.12 +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% +CALL:MODULE_BUILDER otfftw "%SOURCE_DIR%\otfftw-0.12" "%BUILD_DIR%\otfftw" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" + +echo ########################################################################## +echo otmixmod 0.13 [SKIPPED] +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% +REM CALL:MODULE_BUILDER otmixmod "%SOURCE_DIR%\otmixmod-0.13" "%BUILD_DIR%\otmixmod" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" -set MSBUILDDISABLENODEREUSE=1 +echo ########################################################################## +echo otpmml 1.12 +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_DOC=OFF +CALL:MODULE_BUILDER otpmml "%SOURCE_DIR%\otpmml-1.12" "%BUILD_DIR%\otpmml" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" -echo. -echo ********************************************************************* -echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%\openturns-1.20.1 -echo ********************************************************************* -echo. +echo ########################################################################## +echo otrobopt 0.11 +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_DOC=OFF +CALL:MODULE_BUILDER otrobopt "%SOURCE_DIR%\otrobopt-0.11" "%BUILD_DIR%\otrobopt" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" + +echo ########################################################################## +echo otsubsetinverse 1.9 +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_DOC=OFF +CALL:MODULE_BUILDER otsubsetinverse "%SOURCE_DIR%\otsubsetinverse-1.9" "%BUILD_DIR%\otsubsetinverse" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" + +echo ########################################################################## +echo otsvm 0.11 +echo ########################################################################## +SET CMAKE_MODULE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_DOC=OFF +CALL:MODULE_BUILDER otsvm "%SOURCE_DIR%\otsvm-0.11" "%BUILD_DIR%\otsvm" "%PRODUCT_INSTALL%" "%CMAKE_MODULE_OPTIONS%" -%CMAKE_ROOT%\bin\cmake -G "Visual Studio 15 2017 Win64" %CMAKE_OPTIONS% %SOURCE_DIR%\openturns-1.20.1 +echo ########################################################################## +echo otfmi 0.15 +echo ########################################################################## +cd %BUILD_DIR% +mkdir otfmi + +set CMAKE_OPTIONS_EXT=%CMAKE_OPTIONS% +cd %BUILD_DIR%\otfmi +xcopy %SOURCE_DIR%\otfmi-0.15\* %BUILD_DIR%\otfmi /E /I /Q if NOT %ERRORLEVEL% == 0 ( - echo "ERROR on cmake" - exit 1 + echo ERROR on xcopy + exit 3 ) -echo. -echo ********************************************************************* -echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 ALL_BUILD.vcxproj +%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 +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 +) -REM ON PURPOSE, we CONTINUE if fails since the error are about porting some NR to Windows native build (openturns team uses mingw) -msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 ALL_BUILD.vcxproj +%PYTHON_ROOT_DIR%\python.exe -m pip install --cache-dir=%BUILD_DIR%\cache\pip --prefix=%PRODUCT_INSTALL% scikit-learn-0.24.2.tar.gz --no-deps if NOT %ERRORLEVEL% == 0 ( - echo ERROR on msbuild ALL_BUILD.vcxproj, please check! - REM exit 2 + echo ERROR on python setup.py + exit 3 ) -echo. -echo ********************************************************************* -echo *** installation... -echo ********************************************************************* -echo. +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 +) + +%PYTHON_ROOT_DIR%\python.exe -m pip install --cache-dir=%BUILD_DIR%\cache\pip --prefix=%PRODUCT_INSTALL% decorator-5.1.0-py3-none-any.whl --no-deps +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python setup.py + exit 3 +) + +echo +echo ########################################################################## +echo threadpoolctl 3.0.0 +echo ########################################################################## +cd %BUILD_DIR% +mkdir threadpoolctl +cd %BUILD_DIR%\threadpoolctl +xcopy %SOURCE_DIR%\threadpoolctl-3.0.0\* %BUILD_DIR%\threadpoolctl /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +%PYTHON_ROOT_DIR%\python.exe -m pip install --cache-dir=%BUILD_DIR%\cache\pip --prefix=%PRODUCT_INSTALL% threadpoolctl-3.0.0-py3-none-any.whl --no-deps +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python setup.py + exit 3 +) + +echo +echo ########################################################################## +echo joblib 1.1.0 +echo ########################################################################## +cd %BUILD_DIR% +mkdir joblib +cd %BUILD_DIR%\joblib +xcopy %SOURCE_DIR%\joblib-1.1.0\* %BUILD_DIR%\joblib /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) + +%PYTHON_ROOT_DIR%\python.exe -m pip install --cache-dir=%BUILD_DIR%\cache\pip --prefix=%PRODUCT_INSTALL% joblib-1.1.0-py2.py3-none-any.whl --no-deps +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on python setup.py + exit 3 +) + +echo ########################################################################## +echo otpod 0.6.9 +echo ########################################################################## +cd %BUILD_DIR% +mkdir otpod + +set CMAKE_OPTIONS_EXT=%CMAKE_OPTIONS% +cd %BUILD_DIR%\otpod +xcopy %SOURCE_DIR%\otpod-0.6.9\* %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.11 +echo ########################################################################## +cd %BUILD_DIR% +mkdir otwrapy + +set CMAKE_OPTIONS_EXT=%CMAKE_OPTIONS% +cd %BUILD_DIR%\otwrapy +xcopy %SOURCE_DIR%\otwrapy-0.11\* %BUILD_DIR%\otwrapy /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 3 +) -msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 INSTALL.vcxproj +%PYTHON_ROOT_DIR%\python.exe setup.py install --prefix=%PRODUCT_INSTALL% if NOT %ERRORLEVEL% == 0 ( - echo ERROR on msbuild INSTALL.vcxproj + echo ERROR on python setup.py exit 3 ) diff --git a/products/env_scripts/FMILibrary.py b/products/env_scripts/FMILibrary.py index a999de9..61d4541 100644 --- a/products/env_scripts/FMILibrary.py +++ b/products/env_scripts/FMILibrary.py @@ -1,11 +1,12 @@ #!/usr/bin/env python import os.path - +import platform def set_env(env, prereq_dir, version): env.set('FMILIBRARY_ROOT_DIR', prereq_dir) env.set('FMIL_HOME',prereq_dir) env.prepend('PATH', os.path.join(prereq_dir,'bin')) - env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib')) + if not platform.system() == "Windows" : + env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib')) def set_nativ_env(env): pass diff --git a/products/env_scripts/PERSALYS.py b/products/env_scripts/PERSALYS.py index 3d46788..fc49fd2 100644 --- a/products/env_scripts/PERSALYS.py +++ b/products/env_scripts/PERSALYS.py @@ -1,16 +1,21 @@ #!/usr/bin/env python import os.path - +import platform def set_env(env, prereq_dir, version): pvversion='paraview-' + env.get('PARAVIEW_VERSION') env.set('PERSALYS_ROOT_DIR', prereq_dir) env.set('PERSALYS_VERSION',version) env.set('OTGUI_DIR', prereq_dir) + env.set('OTGUI_ROOT_DIR', prereq_dir) env.prepend('PATH', os.path.join(prereq_dir,'bin')) - env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir, 'lib')) - env.prepend('PV_PLUGIN_PATH', os.path.join(prereq_dir, 'lib', pvversion, 'plugins')) - pyver = 'python' + env.get('PYTHON_VERSION') - env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages')) + if platform.system() == "Windows" : + env.prepend('PV_PLUGIN_PATH', os.path.join(prereq_dir, 'bin', pvversion, 'plugins')) + env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib','site-packages')) + else: + env.prepend('PV_PLUGIN_PATH', os.path.join(prereq_dir, 'lib', pvversion, 'plugins')) + 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')) env.set('OTGUI_HTML_DOCUMENTATION_PATH',os.path.join(prereq_dir,'share','otgui','doc','html/')) env.set('PERSALYS_HTML_DOCUMENTATION_PATH', os.path.join(prereq_dir,'share','persalys','doc','html/')) diff --git a/products/env_scripts/cminpack.py b/products/env_scripts/cminpack.py index 45a5378..c85826b 100644 --- a/products/env_scripts/cminpack.py +++ b/products/env_scripts/cminpack.py @@ -1,11 +1,12 @@ #!/usr/bin/env python import os.path - +import platform 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')) + if not platform.system() == "Windows" : + env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib')) def set_nativ_env(env): env.set('CMINPACK_ROOT_DIR', '/usr') diff --git a/products/env_scripts/fftw.py b/products/env_scripts/fftw.py index b1458a9..e985216 100644 --- a/products/env_scripts/fftw.py +++ b/products/env_scripts/fftw.py @@ -7,12 +7,9 @@ import platform def set_env(env, prereq_dir, version): env.set('FFTW_DIR', prereq_dir) env.set('FFTW_ROOT_DIR', prereq_dir) - - env.prepend('INCLUDE', os.path.join(prereq_dir, 'include')) env.prepend('PATH', os.path.join(prereq_dir, 'bin')) - if not platform.system() == "Windows" : - pyver = 'python' + env.get('PYTHON_VERSION') + env.prepend('INCLUDE', os.path.join(prereq_dir, 'include')) env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir, 'lib')) def set_nativ_env(env): diff --git a/products/env_scripts/openblas.py b/products/env_scripts/openblas.py index 94c0a77..4c5ab42 100644 --- a/products/env_scripts/openblas.py +++ b/products/env_scripts/openblas.py @@ -7,6 +7,8 @@ import platform def set_env(env, prereq_dir, version): env.set('OPENBLASHOME', prereq_dir) env.set('OPENBLAS_ROOT_DIR', prereq_dir) + env.set('OpenBLAS_DIR', prereq_dir) + env.set('BLAS_ROOT_DIR', prereq_dir) env.set('OPENBLAS_SRC', os.path.join(prereq_dir,'SRC')) env.set('BLAS_SRC', os.path.join(prereq_dir,'BLAS','SRC')) diff --git a/products/env_scripts/openturns.py b/products/env_scripts/openturns.py index c1f6ad0..988da40 100644 --- a/products/env_scripts/openturns.py +++ b/products/env_scripts/openturns.py @@ -3,6 +3,7 @@ import os.path import platform def set_env(env, prereq_dir, version): env.set('OT_ROOT_DIR', prereq_dir) + env.set('OPENTURNS_HOME', prereq_dir) env.set('OT_HOME', prereq_dir) env.set('OT_VERSION',version) env.prepend('PATH', os.path.join(prereq_dir,'bin')) diff --git a/products/fftw.pyconf b/products/fftw.pyconf index 999b786..6b9f294 100644 --- a/products/fftw.pyconf +++ b/products/fftw.pyconf @@ -18,7 +18,7 @@ default : { env_script : $name + ".py" } - depend : ['Python' ] + depend : ['Python', 'cmake'] source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name install_dir : 'base' @@ -36,3 +36,11 @@ default_win : single_install_dir : "yes" } } + +version_3_3_9 : +{} + +version_3_3_9_win: +{ + compil_script: "fftw-3.3.9.bat" +} diff --git a/products/openblas.pyconf b/products/openblas.pyconf index 8d718ee..ac9eef4 100644 --- a/products/openblas.pyconf +++ b/products/openblas.pyconf @@ -29,7 +29,7 @@ default_win: properties : { incremental : "yes" - single_install_dir : "no" + single_install_dir : "yes" } } diff --git a/products/openturns.pyconf b/products/openturns.pyconf index 54ca69c..7c40269 100644 --- a/products/openturns.pyconf +++ b/products/openturns.pyconf @@ -24,6 +24,7 @@ default : default_win : { + name : "openturns" compil_script : 'pip_install' + $VARS.scriptExtension properties : { @@ -40,15 +41,19 @@ version_1_20_1 : compil_script : "openturns-1.20.1" + $VARS.scriptExtension patches : [] depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI'] - opt_depend : ['pandas', 'statsmodels'] + opt_depend : ['pandas', 'statsmodels', 'patsy'] } version_1_20_1_win : { + name : "OT" compil_script : "openturns-1.20.1.bat" - depend : ['Python', 'openblas', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib'] - opt_depend : [] - patches : ["openturns-1.20.1.004.patch"] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + 'openturns' + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + depend : ['Python', 'openblas', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'fftw'] + opt_depend : ['pandas', 'statsmodels', 'patsy'] + patches : ["openturns-1.20.1.0004.patch", "openturns-1.20.1.0005.patch"] properties : { single_install_dir : "no" diff --git a/products/patches/PERSALYS-v14.0.1-001.patch b/products/patches/PERSALYS-v14.0.1-001.patch new file mode 100644 index 0000000..13fb3f0 --- /dev/null +++ b/products/patches/PERSALYS-v14.0.1-001.patch @@ -0,0 +1,85 @@ +diff -Naur persalys_v14.0.1_ref/CMakeLists.txt persalys_v14.0.1_dev/CMakeLists.txt +--- persalys_v14.0.1_ref/CMakeLists.txt 2023-03-31 08:59:27.000000000 +0200 ++++ persalys_v14.0.1_dev/CMakeLists.txt 2023-05-23 12:46:41.640288727 +0200 +@@ -43,8 +43,16 @@ + list (APPEND PERSALYS_DEFINITIONS "-DPERSALYS_STATIC -DPYINTERP_STATIC -DPYCONSOLE_STATIC") + endif () + ++SET(BOOST_ROOT_DIR $ENV{BOOST_ROOT_DIR} CACHE PATH "Path to the Boost") ++if(EXISTS "${BOOST_ROOT_DIR}") ++ set(BOOST_ROOT "${BOOST_ROOT_DIR}" CACHE PATH "Boost root directory" FORCE) ++endif() ++set(Boost_USE_DEBUG_LIBS OFF) # ignore debug libs and ++set(Boost_USE_RELEASE_LIBS ON) # only find release libs + find_package (Boost COMPONENTS filesystem locale REQUIRED) +-list (APPEND PERSALYS_PRIVATE_LIBRARIES ${Boost_LIBRARIES}) ++if (TARGET Boost::filesystem) ++ set (Boost_LIBRARIES Boost::filesystem Boost::locale) ++ENDIF() + + find_package (Python 3.5 COMPONENTS Interpreter Development REQUIRED) + list (APPEND PERSALYS_PUBLIC_LIBRARIES ${Python_LIBRARIES}) +diff -Naur persalys_v14.0.1_ref/lib/src/base/CMakeLists.txt persalys_v14.0.1_dev/lib/src/base/CMakeLists.txt +--- persalys_v14.0.1_ref/lib/src/base/CMakeLists.txt 2023-03-31 08:59:27.000000000 +0200 ++++ persalys_v14.0.1_dev/lib/src/base/CMakeLists.txt 2023-05-22 09:13:05.971858911 +0200 +@@ -203,6 +203,7 @@ + else () + target_compile_definitions (persalysbase PUBLIC PERSALYS_BASE_STATIC) + endif () ++target_compile_options(persalysbase PUBLIC -DBOOST_ALL_DYN_LINK) + + target_include_directories (persalysbase PRIVATE ${Boost_INCLUDE_DIRS}) + target_include_directories (persalysbase PRIVATE ${Python_INCLUDE_DIRS}) +@@ -220,8 +221,8 @@ + set_target_properties (persalysbase PROPERTIES VERSION ${LIB_VERSION}) + set_target_properties (persalysbase PROPERTIES SOVERSION ${LIB_SOVERSION}) + +-target_link_libraries (persalysbase PUBLIC ${PERSALYS_PUBLIC_LIBRARIES}) +-target_link_libraries (persalysbase PRIVATE ${PERSALYS_PRIVATE_LIBRARIES}) ++target_link_libraries (persalysbase PUBLIC "${PERSALYS_PUBLIC_LIBRARIES};${Boost_LIBRARIES};${Boost_FILESYSTEM_LIBRARY_RELEASE}") ++target_link_libraries (persalysbase PRIVATE "${PERSALYS_PRIVATE_LIBRARIES};${Boost_LIBRARIES};${Boost_FILESYSTEM_LIBRARY_RELEASE}") + + install (TARGETS persalysbase + RUNTIME DESTINATION bin +diff -Naur persalys_v14.0.1_ref/lib/src/view/plot/CMakeLists.txt persalys_v14.0.1_dev/lib/src/view/plot/CMakeLists.txt +--- persalys_v14.0.1_ref/lib/src/view/plot/CMakeLists.txt 2023-03-31 08:59:27.000000000 +0200 ++++ persalys_v14.0.1_dev/lib/src/view/plot/CMakeLists.txt 2023-05-20 15:45:57.000000000 +0200 +@@ -47,9 +47,9 @@ + if (BUILD_SHARED_LIBS) + target_compile_definitions (persalysplot PRIVATE PERSALYS_PLOT_DLL_EXPORTS) + else () +- target_compile_definitions (persalysplot PUBLIC PERSALYS_PLOT_STATIC) ++ target_compile_definitions (persalysplot PUBLIC PERSALYS_PLOT_STATIC ) + endif () +- ++target_compile_options(persalysplot PUBLIC -DQWT_DLL) + if ( NOT DEFINED LIB_VERSION ) + set ( LIB_VERSION 0.0.0 ) + endif () +diff -Naur persalys_v14.0.1_ref/lib/src/view/utils/persalys/TimeLineEdit.hxx persalys_v14.0.1_dev/lib/src/view/utils/persalys/TimeLineEdit.hxx +--- persalys_v14.0.1_ref/lib/src/view/utils/persalys/TimeLineEdit.hxx 2023-03-31 08:59:27.000000000 +0200 ++++ persalys_v14.0.1_dev/lib/src/view/utils/persalys/TimeLineEdit.hxx 2023-05-20 14:53:23.000000000 +0200 +@@ -32,9 +32,9 @@ + + public: + // constructor with text +- TimeLineEdit(const QString text = "", QWidget *parent = 0); ++ TimeLineEdit(const QString &text, QWidget *parent = nullptr); + // constructor with seconds +- TimeLineEdit(const unsigned int seconds = 0, QWidget *parent = 0); ++ TimeLineEdit(const unsigned int seconds = 0, QWidget *parent = nullptr); + + int getSeconds() const; + void setSeconds(const int seconds); +diff -Naur persalys_v14.0.1_ref/lib/src/view/utils/TimeLineEdit.cxx persalys_v14.0.1_dev/lib/src/view/utils/TimeLineEdit.cxx +--- persalys_v14.0.1_ref/lib/src/view/utils/TimeLineEdit.cxx 2023-03-31 08:59:27.000000000 +0200 ++++ persalys_v14.0.1_dev/lib/src/view/utils/TimeLineEdit.cxx 2023-05-20 14:53:33.000000000 +0200 +@@ -26,7 +26,7 @@ + namespace PERSALYS + { + +-TimeLineEdit::TimeLineEdit(const QString text, QWidget *parent) ++TimeLineEdit::TimeLineEdit(const QString& text, QWidget *parent) + : QLineEdit(parent) + { + setInputMask("999\\d\\ 99\\h\\ 99\\m\\ 99\\s"); diff --git a/products/patches/cminpack-1.3.6-openblas.patch b/products/patches/cminpack-1.3.6-openblas.patch new file mode 100644 index 0000000..1128b55 --- /dev/null +++ b/products/patches/cminpack-1.3.6-openblas.patch @@ -0,0 +1,27 @@ +diff -Naur cminpack-1.3.6_ref/CMakeLists.txt cminpack-1.3.6_dev/CMakeLists.txt +--- cminpack-1.3.6_ref/CMakeLists.txt 2017-02-24 16:09:31.000000000 +0100 ++++ cminpack-1.3.6_dev/CMakeLists.txt 2023-05-22 09:19:37.416506078 +0200 +@@ -69,6 +69,8 @@ + + # Link with a BLAS library if requested + if (USE_BLAS) ++ SET(BLAS_ROOT_DIR $ENV{BLAS_ROOT_DIR} CACHE PATH "Path to the BLAS.") ++ SET(BLAS_INCLUDE_DIRS "${BLAS_ROOT_DIR}/include/openblas") + if (NOT BUILD_SHARED_LIBS) + set(BLA_STATIC True) + endif() +@@ -77,6 +79,7 @@ + target_link_libraries(cminpack PUBLIC ${BLAS_LIBRARIES}) + set_target_properties(cminpack PROPERTIES LINK_FLAGS "${BLAS_LINKER_FLAGS}") + target_compile_definitions(cminpack PUBLIC -DUSE_CBLAS) ++ include_directories(${BLAS_ROOT_DIR}/include/openblas) + endif() + endif() + +@@ -94,4 +97,4 @@ + set_target_properties(cminpack PROPERTIES VERSION ${CMINPACK_VERSION} SOVERSION ${CMINPACK_SOVERSION}) + + add_subdirectory (cmake) +-add_subdirectory (examples) +\ Pas de fin de ligne à la fin du fichier ++add_subdirectory (examples) diff --git a/products/patches/openturns-1.20.1.0004.patch b/products/patches/openturns-1.20.1.0004.patch new file mode 100644 index 0000000..1689f7d --- /dev/null +++ b/products/patches/openturns-1.20.1.0004.patch @@ -0,0 +1,31 @@ +diff -Naur openturns-1.20.1_ref/openturns-1.20.1/CMakeLists.txt openturns-1.20.1_dev/openturns-1.20.1/CMakeLists.txt +--- openturns-1.20.1_ref/openturns-1.20.1/CMakeLists.txt 2023-04-07 09:47:43.000000000 +0200 ++++ openturns-1.20.1_dev/openturns-1.20.1/CMakeLists.txt 2023-05-17 10:52:58.551422902 +0200 +@@ -40,6 +40,15 @@ + option (BUILD_PYTHON "Build the python module for the library" ON) + option (BUILD_SHARED_LIBS "Build shared libraries" ON) + ++ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) # To disable windows warnings for strcpy, fopen, ... ++ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS) # To disable windows warnings generated by checked iterators(e.g. std::copy, std::transform, ...) ++ADD_DEFINITIONS(-DWNT -DWIN32) ++ADD_DEFINITIONS(-D_WIN32_WINNT=0x0500) # Windows 2000 or later API is required ++ADD_DEFINITIONS(-DPPRO_NT) ++ADD_DEFINITIONS(-DNOMINMAX) ++ ++SET(SWIG_ROOT_DIR $ENV{SWIG_ROOT_DIR} CACHE PATH "Path to the SWIG.") ++ + # Defines our own module path + list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) + +diff -Naur openturns-1.20.1_ref/openturns-1.20.1/python/src/CMakeLists.txt openturns-1.20.1_dev/openturns-1.20.1/python/src/CMakeLists.txt +--- openturns-1.20.1_ref/openturns-1.20.1/python/src/CMakeLists.txt 2023-04-07 09:47:43.000000000 +0200 ++++ openturns-1.20.1_dev/openturns-1.20.1/python/src/CMakeLists.txt 2023-05-17 10:49:29.386285353 +0200 +@@ -16,7 +16,7 @@ + execute_process (COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/openturns) + add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/openturns/swigpyrun.h + COMMAND ${SWIG_EXECUTABLE} +- ARGS -python -external-runtime ${CMAKE_CURRENT_BINARY_DIR}/openturns/swigpyrun.h ++ ARGS -I${SWIG_ROOT_DIR}/Lib -I${SWIG_ROOT_DIR}/Lib/python -python -external-runtime ${CMAKE_CURRENT_BINARY_DIR}/openturns/swigpyrun.h + COMMENT "Swig runtime header") + add_custom_target (generate_swig_runtime DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/openturns/swigpyrun.h) + add_custom_target (generate_docstrings) diff --git a/products/patches/openturns-1.20.1.0005.patch b/products/patches/openturns-1.20.1.0005.patch new file mode 100644 index 0000000..86bd26f --- /dev/null +++ b/products/patches/openturns-1.20.1.0005.patch @@ -0,0 +1,12 @@ +diff -Naur openturns-1.20.1_ref/openturns-1.20.1/lib/include/pthread_win32/pthread.h openturns-1.20.1_dev/openturns-1.20.1/lib/include/pthread_win32/pthread.h +--- openturns-1.20.1_ref/openturns-1.20.1/lib/include/pthread_win32/pthread.h 2023-04-07 09:47:43.000000000 +0200 ++++ openturns-1.20.1_dev/openturns-1.20.1/lib/include/pthread_win32/pthread.h 2023-05-21 18:06:49.000000000 +0200 +@@ -199,7 +199,7 @@ + static __inline int __pthread_mutex_alloc_concurrently (pthread_mutex_t *mutex) { + HANDLE mutex_init_mutex; + /* Get access to one global named mutex to serialize mutex initialization */ +- winPthreadAssertWindows((mutex_init_mutex = CreateMutex(NULL, FALSE, "StarPU mutex init"))); ++ winPthreadAssertWindows((mutex_init_mutex = CreateMutex(NULL, FALSE, NULL))); + winPthreadAssertPthread(pthread_mutex_lock(&mutex_init_mutex)); + /* Now we are the one that can initialize it */ + if (!*mutex) -- 2.39.2