mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
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:
@ -51,10 +51,10 @@ setParaViewDirs()
|
||||
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_DIR=$installBASE/ParaView-$ParaView_VERSION-$OBJ_ADD
|
||||
# ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
|
||||
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION
|
||||
|
||||
export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR
|
||||
|
||||
@ -51,10 +51,10 @@ setParaViewDirs()
|
||||
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_DIR=$installBASE/ParaView-$ParaView_VERSION-$OBJ_ADD
|
||||
# ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
|
||||
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION
|
||||
|
||||
export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR
|
||||
@ -151,7 +151,10 @@ addMpiSupport()
|
||||
OBJ_ADD="$OBJ_ADD-mpi"
|
||||
|
||||
addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON"
|
||||
addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS"
|
||||
if [ "${MPI_MAX_PROCS:=0}" -gt 1 ]
|
||||
then
|
||||
addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -56,6 +56,7 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||
# ~~~~~~~~~~~~~
|
||||
|
||||
# MPI support:
|
||||
# use 0 or unset MPI_MAX_PROCS for no upper-limit
|
||||
withMPI=false
|
||||
MPI_MAX_PROCS=32
|
||||
|
||||
@ -102,6 +103,8 @@ options:
|
||||
-gl2 with new rendering backend (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.
|
||||
-python with python (if not already enabled)
|
||||
-cmake PATH with the cmake version corresponding to the cmake path given
|
||||
-qmake PATH with the Qt version corresponding to the qmake path given
|
||||
@ -255,6 +258,10 @@ do
|
||||
-mpi)
|
||||
withMPI=true
|
||||
;;
|
||||
-mpi=[0-9]*) # mpi and max mpi processes
|
||||
withMPI=true
|
||||
MPI_MAX_PROCS="${1##*=}"
|
||||
;;
|
||||
-no-mpi)
|
||||
withMPI=false
|
||||
;;
|
||||
|
||||
13
makeParaView.example
Executable file
13
makeParaView.example
Executable 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
22
makeVTK
@ -51,6 +51,11 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||
# USER OPTIONS:
|
||||
# ~~~~~~~~~~~~~
|
||||
|
||||
# MPI support:
|
||||
# use 0 or unset MPI_MAX_PROCS for no upper-limit
|
||||
withMPI=false
|
||||
unset MPI_MAX_PROCS
|
||||
|
||||
# MESA graphics support:
|
||||
withMESA=false
|
||||
MESA_INCLUDE="/usr/include/GL"
|
||||
@ -80,6 +85,9 @@ options:
|
||||
-rebuild for repeated builds (-make -install) *use with caution*
|
||||
-gl2 with new rendering backend (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
|
||||
-cmake PATH with the cmake version corresponding to the cmake path given
|
||||
-gcc force g++ instead of the value from \$WM_CXX
|
||||
@ -92,7 +100,7 @@ options:
|
||||
-help
|
||||
|
||||
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 '='.
|
||||
For example,
|
||||
@ -204,6 +212,16 @@ do
|
||||
MESA_LIBRARY="${2%%/}"
|
||||
shift
|
||||
;;
|
||||
-mpi)
|
||||
withMPI=true
|
||||
;;
|
||||
-mpi=[0-9]*) # mpi and max mpi processes
|
||||
withMPI=true
|
||||
MPI_MAX_PROCS="${1##*=}"
|
||||
;;
|
||||
-no-mpi)
|
||||
withMPI=false
|
||||
;;
|
||||
-cmake)
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
CMAKE_PATH="${2%%/}"
|
||||
@ -256,6 +274,7 @@ fi
|
||||
# Set configure options
|
||||
#~~~~~~~~~~~~~~~~~~~~~~
|
||||
addVerbosity # verbose makefiles
|
||||
addMpiSupport # set MPI-specific options
|
||||
addMesaSupport # set MESA-specific options
|
||||
addGL2Support # new rendering backend
|
||||
|
||||
@ -285,6 +304,7 @@ Build stages selected
|
||||
---------------------
|
||||
Features selected
|
||||
mesa ${withMESA:-false}
|
||||
mpi ${withMPI:-false}
|
||||
---------------------
|
||||
Version information
|
||||
version ${VTK_VERSION:-unknown}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#!/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
|
||||
mesa=mesa-11.2.2
|
||||
|
||||
Reference in New Issue
Block a user