From 6e0c9f9d8b09f963343487eb6023a0187d953302 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 4 Dec 2018 21:59:27 +0100 Subject: [PATCH] ENH: makeVTK -mpi also define VTK_Group_MPI=ON - this pulls in the other bits (Module_vtkParallelMPI, Module_vtkRenderingParallel, ...) --- etc/tools/ParaViewFunctions | 8 ++++---- etc/tools/vtkFunctions | 24 +++++++++++++++++++++++- makeVTK | 2 +- makeVTK.example | 15 ++++----------- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/etc/tools/ParaViewFunctions b/etc/tools/ParaViewFunctions index 08f4288..bebfe4a 100644 --- a/etc/tools/ParaViewFunctions +++ b/etc/tools/ParaViewFunctions @@ -137,7 +137,7 @@ addVerbosity() # -# Define options for mpi support +# MPI support for PARAVIEW # addMpiSupport() { @@ -146,7 +146,7 @@ addMpiSupport() return fi - addCMakeVariable "PARAVIEW_USE_MPI=ON" "VTK_USE_MPI=ON" + addCMakeVariable "PARAVIEW_USE_MPI=ON" if [ "${MPI_MAX_PROCS:=0}" -gt 1 ] then addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS" @@ -469,11 +469,11 @@ INFO # Non-system installation of QT? case "$qtLib" in (/usr/lib | /usr/lib64) unset qtLib ;; esac - if [ "$qmake" != /usr/bin/qmake -a -d "$qtLib" ] + if [ "${qmake%/*}" != /usr/bin -a -d "$qtLib" ] then /bin/cat</dev/null +addMpiSupport() +{ + if [ "${withMPI:=false}" != true ] + then + return + fi + + addCMakeVariable "VTK_Group_MPI=ON" + addCMakeVariable "Module_vtkRenderingParallel=ON" + addCMakeVariable "Module_vtkParallelMPI=ON" + + if [ "${MPI_MAX_PROCS:=0}" -gt 1 ] + then + addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS" + fi +} + + # # Invoke make # also link bin/ to lib/paraview-* for development without installation diff --git a/makeVTK b/makeVTK index bb9300d..e3e5907 100755 --- a/makeVTK +++ b/makeVTK @@ -71,7 +71,7 @@ options: -mesa-include DIR location of mesa headers (current: ${MESA_INCLUDE:-none}) -mesa-lib PATH path to mesa library (current: ${MESA_LIBRARY:-none}) -osmesa with off-screen mesa only - -mpi with mpi + -mpi with mpi (VTK_Group_MPI=ON) -mpi=N with max 'N' mpi processes. N=0 for no upper-limit. -cmake PATH with cmake from the path given -verbose verbose output in Makefiles diff --git a/makeVTK.example b/makeVTK.example index e7b5181..ab0a542 100755 --- a/makeVTK.example +++ b/makeVTK.example @@ -7,24 +7,17 @@ vtk=VTK-9.0.0 # mesa=mesa-13.0.3 mesa=mesa-17.1.1 -# Request building MPI modules -# VTK_Group_MPI=ON +# Module_vtkAcceleratorsVTKm : Request building vtkAcceleratorsVTKm # -# Request building vtkAcceleratorsVTKm -# Module_vtkAcceleratorsVTKm=OFF -# -# Request building vtkParallelMPI -# Module_vtkParallelMPI=ON +# -mpi implies VTK_Group_MPI : Request building MPI modules set -x ./makeVTK \ - -mpi=0 \ + -mpi \ -osmesa \ -mesa-prefix $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa \ $vtk "$@" \ - VTK_Group_MPI=ON \ - Module_vtkAcceleratorsVTKm=ON \ - Module_vtkParallelMPI=ON + Module_vtkAcceleratorsVTKm=ON #------------------------------------------------------------------------------