ENH: provide makeParaView.example (mpi + mesa)

- an example of compiling for pvserver

- make upper-limit on MPI processes command-line configurable for
  makeParaView and add MPI support into makeVTK
This commit is contained in:
mark
2016-09-08 11:28:00 +02:00
parent 8f68d51717
commit f8e0b17acb
6 changed files with 51 additions and 7 deletions

View File

@ -51,10 +51,10 @@ setParaViewDirs()
exit 1 exit 1
} }
# ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION-$OBJ_ADD # ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION
# ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION-$OBJ_ADD # ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION
export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR

View File

@ -51,10 +51,10 @@ setParaViewDirs()
exit 1 exit 1
} }
# ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION-$OBJ_ADD # ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION
# ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION-$OBJ_ADD # ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION
export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR
@ -151,7 +151,10 @@ addMpiSupport()
OBJ_ADD="$OBJ_ADD-mpi" OBJ_ADD="$OBJ_ADD-mpi"
addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON" addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON"
if [ "${MPI_MAX_PROCS:=0}" -gt 1 ]
then
addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS" addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS"
fi
} }

View File

@ -56,6 +56,7 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
# ~~~~~~~~~~~~~ # ~~~~~~~~~~~~~
# MPI support: # MPI support:
# use 0 or unset MPI_MAX_PROCS for no upper-limit
withMPI=false withMPI=false
MPI_MAX_PROCS=32 MPI_MAX_PROCS=32
@ -102,6 +103,8 @@ options:
-gl2 with new rendering backend (if not already enabled) -gl2 with new rendering backend (if not already enabled)
-mesa with mesa (if not already enabled) -mesa with mesa (if not already enabled)
-mpi with mpi (if not already enabled) -mpi with mpi (if not already enabled)
-mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no
upper-limit on processes.
-python with python (if not already enabled) -python with python (if not already enabled)
-cmake PATH with the cmake version corresponding to the cmake path given -cmake PATH with the cmake version corresponding to the cmake path given
-qmake PATH with the Qt version corresponding to the qmake path given -qmake PATH with the Qt version corresponding to the qmake path given
@ -255,6 +258,10 @@ do
-mpi) -mpi)
withMPI=true withMPI=true
;; ;;
-mpi=[0-9]*) # mpi and max mpi processes
withMPI=true
MPI_MAX_PROCS="${1##*=}"
;;
-no-mpi) -no-mpi)
withMPI=false withMPI=false
;; ;;

13
makeParaView.example Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# An example for building particular combinations of ParaView with
# - mpi (0 = no upper-limit on processes)
# - off-screen mesa
mesa=mesa-11.2.2
./makeParaView \
-mpi=0 \
-mesa-prefix $WM_THIRD_PARTY_DIR/platforms/linux64Gcc/$mesa \
"$@"
#------------------------------------------------------------------------------

22
makeVTK
View File

@ -51,6 +51,11 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
# USER OPTIONS: # USER OPTIONS:
# ~~~~~~~~~~~~~ # ~~~~~~~~~~~~~
# MPI support:
# use 0 or unset MPI_MAX_PROCS for no upper-limit
withMPI=false
unset MPI_MAX_PROCS
# MESA graphics support: # MESA graphics support:
withMESA=false withMESA=false
MESA_INCLUDE="/usr/include/GL" MESA_INCLUDE="/usr/include/GL"
@ -80,6 +85,9 @@ options:
-rebuild for repeated builds (-make -install) *use with caution* -rebuild for repeated builds (-make -install) *use with caution*
-gl2 with new rendering backend (if not already enabled) -gl2 with new rendering backend (if not already enabled)
-mesa with mesa (if not already enabled) -mesa with mesa (if not already enabled)
-mpi with mpi (if not already enabled)
-mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no
upper-limit on processes.
-osmesa with off-screen mesa only -osmesa with off-screen mesa only
-cmake PATH with the cmake version corresponding to the cmake path given -cmake PATH with the cmake version corresponding to the cmake path given
-gcc force g++ instead of the value from \$WM_CXX -gcc force g++ instead of the value from \$WM_CXX
@ -92,7 +100,7 @@ options:
-help -help
The -no-FEATURE option can be disable these features (if not already disabled): The -no-FEATURE option can be disable these features (if not already disabled):
mesa mesa mpi
CMake options start with a capital letter and contain an '='. CMake options start with a capital letter and contain an '='.
For example, For example,
@ -204,6 +212,16 @@ do
MESA_LIBRARY="${2%%/}" MESA_LIBRARY="${2%%/}"
shift shift
;; ;;
-mpi)
withMPI=true
;;
-mpi=[0-9]*) # mpi and max mpi processes
withMPI=true
MPI_MAX_PROCS="${1##*=}"
;;
-no-mpi)
withMPI=false
;;
-cmake) -cmake)
[ "$#" -ge 2 ] || die "'$1' option requires an argument" [ "$#" -ge 2 ] || die "'$1' option requires an argument"
CMAKE_PATH="${2%%/}" CMAKE_PATH="${2%%/}"
@ -256,6 +274,7 @@ fi
# Set configure options # Set configure options
#~~~~~~~~~~~~~~~~~~~~~~ #~~~~~~~~~~~~~~~~~~~~~~
addVerbosity # verbose makefiles addVerbosity # verbose makefiles
addMpiSupport # set MPI-specific options
addMesaSupport # set MESA-specific options addMesaSupport # set MESA-specific options
addGL2Support # new rendering backend addGL2Support # new rendering backend
@ -285,6 +304,7 @@ Build stages selected
--------------------- ---------------------
Features selected Features selected
mesa ${withMESA:-false} mesa ${withMESA:-false}
mpi ${withMPI:-false}
--------------------- ---------------------
Version information Version information
version ${VTK_VERSION:-unknown} version ${VTK_VERSION:-unknown}

View File

@ -1,5 +1,6 @@
#!/bin/sh #!/bin/sh
# An example for building a particular combinations of VTK with off-screen mesa # An example for building particular combinations of VTK with
# - off-screen mesa
vtk=vtk-7.1.0 vtk=vtk-7.1.0
mesa=mesa-11.2.2 mesa=mesa-11.2.2