From ad3dc69d08b72b915e5a3ebba94ab8c9e88a33d7 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Mon, 31 Jan 2022 17:21:20 +0100 Subject: [PATCH] spns #24419 --- applications/SALOME-master-native.pyconf | 15 +++++++------- applications/SALOME-master.pyconf | 23 +++++++++++++++++++--- products/GUI.pyconf | 15 ++++++++++---- products/MEDCOUPLING.pyconf | 2 +- products/compil_scripts/ParaView-5.9.0.sh | 1 + products/env_scripts/openmpi.py | 21 +++++++++++++++----- products/salome_system.pyconf | 24 +++++++++++------------ 7 files changed, 69 insertions(+), 32 deletions(-) diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index f343f6f..58e178f 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -78,12 +78,13 @@ APPLICATION : omniORB : '4.2.3' omniORBpy : '4.2.3' opencv : 'native' + openmpi: 'native' openVKL : '0.11.0' openturns: '1.17' ospray : '2.4.0' packaging : 'native' pandas : 'native' - ParaView : '5.9.0' + ParaView : {tag:'5.9.0', base: 'no', section: 'version_5_9_0_MPI', hpc: 'yes'} petsc : {tag : '3.16.0', section: 'version_3_16_0'} Pillow : 'native' # 'native' not exists : freeCAD part but not delivered with it from package handler @@ -130,10 +131,10 @@ APPLICATION : 'RESTRICTED' 'LIBBATCH' : {tag : 'V2_4_5'} 'KERNEL' - 'MEDCOUPLING' + 'MEDCOUPLING' : {tag:'master', base: 'no', section: 'default_MPI', hpc: 'yes'} 'GUI' 'GEOM' - 'SMESH': {tag: 'master', base: 'no', section: 'version_topo2volmesh'} + 'SMESH' : {tag: 'master', base: 'no', section: 'version_topo2volmesh'} 'NETGENPLUGIN' 'BLSURFPLUGIN' 'GHS3DPLUGIN' @@ -145,7 +146,7 @@ APPLICATION : 'HEXABLOCKPLUGIN' 'HOMARD' 'FIELDS' - 'PARAVIS' + 'PARAVIS': {tag:'master', base: 'no', section: 'default_MPI', hpc: 'yes'} 'JOBMANAGER' 'YACS' 'YACSGEN' @@ -202,7 +203,7 @@ __overwrite__ : { # __condition__ : "VARS.dist in ['UB20.04', 'CO8', 'FD32']" - 'APPLICATION.products.ParaView' : {tag: '5.9.0', base: 'no', section: 'version_5_9_0_CO8_FD32_UB20_0_4'} + 'APPLICATION.products.ParaView' : {tag: '5.9.0', base: 'no', section: 'version_5_9_0_CO8_FD32_UB20_0_4', hpc: 'yes'} } { # On DB10, ParaView fails to find xmlpatterns executable : ParaViewClient.cmake try to find it @@ -211,11 +212,11 @@ __overwrite__ : # What is more, ParaView 5.9 CMake procedure requires Qt 5.12 as minimum version (5.11 here). # As this version is compliant too, let's force it as the new minimum needed version. __condition__ : "VARS.dist in ['DB10']" - 'APPLICATION.products.ParaView' : {tag: '5.9.0', base : 'no', section: 'version_5_9_0_DB10'} + 'APPLICATION.products.ParaView' : {tag: '5.9.0', base : 'no', section: 'version_5_9_0_DB10', hpc: 'yes'} } { __condition__ : "VARS.dist in ['DB11']" - 'APPLICATION.products.ParaView' : {tag: '5.9.0', base : 'no', section: 'version_5_9_0_DB11'} + 'APPLICATION.products.ParaView' : {tag: '5.9.0', base : 'no', section: 'version_5_9_0_DB11', hpc: 'yes'} } { # CentOS 8 repositories don't include sphinxintl package which must be installed through pip. diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index fb38e38..7abca22 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -51,6 +51,7 @@ APPLICATION : freetype : '2.9.1' gcc : '8.5.0' mpc : 'native' + mpi4py: '3.0.3' gmp : 'native' mpfr : 'native' gmsh : '4.8.4' @@ -76,6 +77,7 @@ APPLICATION : omniORB : '4.2.2' omniORBpy : '4.2.2' opencv : '3.2.0' + openmpi : '3.1.6' openturns: '1.17' openVKL: '0.11.0' ospray : '2.4.0' @@ -194,14 +196,29 @@ __overwrite__ : __condition__ : "VARS.dist in ['FD32']" # https://github.com/scipy/scipy/issues/11611 'APPLICATION.products.scipy' : '1.5.2' + 'APPLICATION.rm_products' : ['gcc', 'gmp', 'mpc', 'mpfr', 'openmpi', 'mpi4py'] } { __condition__ : "VARS.dist in ['FD30']" - # https://github.com/scipy/scipy/issues/11611 'APPLICATION.products.gcc' : '9.3.0' + 'APPLICATION.rm_products' : ['openmpi', 'mpi4py'] + } + { + __condition__ : "VARS.dist in ['DB09']" + 'APPLICATION.products.ParaView' : {tag:'5.9.0', base: 'no', section: 'version_5_9_0_MPI', hpc: 'yes'} + 'APPLICATION.products.PARAVIS' : {tag:'master', base: 'no', section: 'default_MPI', hpc: 'yes'} + 'APPLICATION.products.MEDCOUPLING' : {tag:'master', base: 'no', section: 'default_MPI', hpc: 'yes'} + } + { + __condition__ : "VARS.dist in ['CO7']" + 'APPLICATION.rm_products' : ['openmpi', 'mpi4py', 'gcc', 'gmp', 'mpc', 'mpfr'] + } + { + __condition__ : "VARS.dist in ['CO8']" + 'APPLICATION.rm_products' : ['openmpi', 'mpi4py', 'gcc', 'gmp', 'mpc', 'mpfr'] } { - __condition__ : "VARS.dist not in ['DB08','DB09', 'FD30']" - 'APPLICATION.rm_products' : ['gcc', 'gmp', 'mpc', 'mpfr'] + __condition__ : "VARS.dist in ['DB10']" + 'APPLICATION.rm_products' : ['openmpi', 'mpi4py', 'gcc', 'gmp', 'mpc', 'mpfr'] } ] diff --git a/products/GUI.pyconf b/products/GUI.pyconf index 64e370c..ba7e7ac 100644 --- a/products/GUI.pyconf +++ b/products/GUI.pyconf @@ -2,7 +2,7 @@ default : { name : "GUI" build_source : "cmake" - cmake_options : "-DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig" + cmake_options : "-DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig -DMPI_C_FOUND=${MPI_C_FOUND}" get_source : "git" git_info: { @@ -30,7 +30,7 @@ default : "libxml2", "sphinxintl" ] - opt_depend : ["sphinx_rtd_theme"] + opt_depend : ["sphinx_rtd_theme", "openmpi"] build_depend : ["cmake", "swig", "doxygen", "cppunit"] source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name @@ -72,13 +72,20 @@ default_win : } +version_9_6_0_to_9_8_0: +{ + cmake_options : "-DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig" +} + version_V9_5_0: { - patches: ['gui-SVTK-VTKView.patch'] # backporting bos #19139 + cmake_options : "-DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig" + patches: ['gui-SVTK-VTKView.patch'] # backporting bos #19139 } version_8_5_0_to_9_4_0 : { + cmake_options : "-DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig" depend : ["KERNEL", "Python", "qt", @@ -161,7 +168,7 @@ version_7_8_0_to_8_4_0 : { name : "GUI" build_source : "cmake" - cmake_options : "-DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig" + cmake_options : "-DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig " get_source : "git" git_info: { diff --git a/products/MEDCOUPLING.pyconf b/products/MEDCOUPLING.pyconf index f1ca604..f669928 100644 --- a/products/MEDCOUPLING.pyconf +++ b/products/MEDCOUPLING.pyconf @@ -75,7 +75,6 @@ default_MPI : "hdf5", "medfile", "scotch", - "ParMetis", "docutils", "libxml2", "Sphinx", @@ -89,6 +88,7 @@ default_MPI : "CONFIGURATION", "openmpi" ] + opt_depend : ["ParMetis"] } default_32BIT_IDS: diff --git a/products/compil_scripts/ParaView-5.9.0.sh b/products/compil_scripts/ParaView-5.9.0.sh index f782c2d..bbea36a 100755 --- a/products/compil_scripts/ParaView-5.9.0.sh +++ b/products/compil_scripts/ParaView-5.9.0.sh @@ -118,6 +118,7 @@ then CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_USE_MPI:BOOL=ON" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc" + CMAKE_OPTIONS="${CMAKE_OPTIONS} -DMPI_C_FOUND=${MPI_ROOT_DIR}/lib/libmpi.so" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_SMP_IMPLEMENTATION_TYPE=OpenMP -DVTKm_ENABLE_OPENMP=ON" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_ENABLE_VTK_FiltersParallelMPI=YES" CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_ENABLE_VTK_ParallelMPI=YES" diff --git a/products/env_scripts/openmpi.py b/products/env_scripts/openmpi.py index 38872b1..7e26a0a 100644 --- a/products/env_scripts/openmpi.py +++ b/products/env_scripts/openmpi.py @@ -8,6 +8,7 @@ def set_env(env, prereq_dir, version): env.set('OPAL_PREFIX', prereq_dir) # be able to move openmpi install (packages) env.set('MPI_ROOT_DIR', prereq_dir) # update for cmake env.set('MPI_ROOT', prereq_dir) + env.set('MPI_C_FOUND', os.path.join(prereq_dir,'lib','libmpi.so')) root = env.get('OPENMPIDIR') env.prepend('PATH', os.path.join(root, 'bin')) @@ -16,8 +17,18 @@ def set_env(env, prereq_dir, version): env.prepend('C_INCLUDE_PATH', os.path.join(root, 'include')) # needed for parallel h5py def set_nativ_env(env): - env.set('MPI_ROOT_DIR', "/usr") # update for cmake - env.set('OPENMPIDIR', "/usr") - env.set('MPI_ROOT', "/usr") - - + prereq_dir='/usr' + try: + import distro + if any(distribution in distro.name().lower() for distribution in ["centos", "fedora"]) : + prereq_dir='/usr/lib64/openmpi' + except: + import platform + if any(distribution in platform.linux_distribution()[0].lower() for distribution in ["centos", "fedora"]) : + prereq_dir='/usr/lib64/openmpi' + env.set('MPI_ROOT_DIR', prereq_dir) + env.set('OPENMPIDIR', prereq_dir) + env.set('MPI_ROOT', prereq_dir) + env.set('MPI_C_FOUND', os.path.join(prereq_dir,'lib','libmpi.so')) + env.prepend('PATH', os.path.join(prereq_dir, 'bin')) + env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir,'lib')) diff --git a/products/salome_system.pyconf b/products/salome_system.pyconf index 3e16ef4..cb5601c 100644 --- a/products/salome_system.pyconf +++ b/products/salome_system.pyconf @@ -40,8 +40,8 @@ default : } "CO8" : { - rpm : ["lz4"] - rpm_dev : ["perl-interpreter", "qt5-devel"] + rpm : ["lz4", "openmpi"] + rpm_dev : ["perl-interpreter", "qt5-devel", "openmpi-devel"] } "FD30" : { @@ -50,13 +50,13 @@ default : } "FD32" : { - rpm : ["lz4", "gsl"] - rpm_dev : ["perl-interpreter", "qt5-devel", "gsl-devel"] + rpm : ["lz4", "gsl", "openmpi"] + rpm_dev : ["perl-interpreter", "qt5-devel", "gsl-devel", "openmpi-devel"] } "FD34" : { - rpm : ["lz4-libs", "gsl"] - rpm_dev : ["lz4-devel", "qt5-qtbase-devel", "gsl-devel"] + rpm : ["lz4-libs", "gsl", "openmpi"] + rpm_dev : ["lz4-devel", "qt5-qtbase-devel", "gsl-devel", "openmpi-devel"] } "DB08" : { @@ -72,17 +72,17 @@ default : "DB10" : { apt : ["libopenexr23", "libwebp6", "libgfortran5", "libilmbase23", "libevent-2.1-6", "libpng16-16", "libgcc-8-dev", - "libffi6", "libtinfo6", "libgphoto2-port12", "libglx0", "libopengl0", "libzstd1", "libglvnd0", "libjsoncpp1", "libopenblas-base", "libscotch-6.0"] + "libffi6", "libtinfo6", "libgphoto2-port12", "libglx0", "libopengl0", "libzstd1", "libglvnd0", "libjsoncpp1", "libopenblas-base", "libscotch-6.0", "openmpi-bin"] apt_dev : ["libtbb-dev", "cython3", "libfftw3-dev", "libopenblas-dev", - "qttools5-dev", "libqt5svg5-dev", "libqt5x11extras5-dev", "qtxmlpatterns5-dev-tools"] + "qttools5-dev", "libqt5svg5-dev", "libqt5x11extras5-dev", "qtxmlpatterns5-dev-tools", "libopenmpi-dev"] } "DB11" : { apt : ["libopenexr25", "libwebp6", "libgfortran5", "libilmbase25", "libevent-2.1-7", "libpng16-16", "libgcc-10-dev", - "libffi7", "libtinfo6", "libgphoto2-port12", "libglx0", "libopengl0", "libzstd1", "libglvnd0", "libjsoncpp24"] + "libffi7", "libtinfo6", "libgphoto2-port12", "libglx0", "libopengl0", "libzstd1", "libglvnd0", "libjsoncpp24", "openmpi-bin"] apt_dev : ["libtbb-dev", "cython3", "libfftw3-dev", "libopenblas-dev", - "qttools5-dev", "libqt5svg5-dev", "libqt5x11extras5-dev", "qtxmlpatterns5-dev-tools"] + "qttools5-dev", "libqt5svg5-dev", "libqt5x11extras5-dev", "qtxmlpatterns5-dev-tools", "libopenmpi-dev"] } "UB16.04" : @@ -100,9 +100,9 @@ default : "UB20.04" : { apt : ["libopenexr24", "libwebp6", "libgfortran5", "libilmbase24", "libevent-2.1-7", "libpng16-16", "libgcc-9-dev", - "libffi7", "libtinfo6", "libgphoto2-port12", "libglx0", "libopengl0", "libzstd1", "libglvnd0"] + "libffi7", "libtinfo6", "libgphoto2-port12", "libglx0", "libopengl0", "libzstd1", "libglvnd0", "openmpi-bin"] apt_dev : ["libtbb-dev", "cython3", "libfftw3-dev", "libopenblas-dev", - "qttools5-dev", "libqt5svg5-dev", "libqt5x11extras5-dev", "qtxmlpatterns5-dev-tools"] + "qttools5-dev", "libqt5svg5-dev", "libqt5x11extras5-dev", "qtxmlpatterns5-dev-tools", "libopenmpi-dev"] } } -- 2.39.2