diff --git a/etc/tools/ParaView3Functions b/etc/tools/ParaView3Functions index 0ce828de8a1f4a45083e759752d0fb2fb5bead49..7a3cd28e631cebd463a126ab1d714ae632f10fdc 100644 --- a/etc/tools/ParaView3Functions +++ b/etc/tools/ParaView3Functions @@ -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 diff --git a/etc/tools/ParaViewFunctions b/etc/tools/ParaViewFunctions index 3150d68a384148a7bce068ae89ddbaf69bdeacf9..37915f046545176dc0357c02860a70888aba4371 100644 --- a/etc/tools/ParaViewFunctions +++ b/etc/tools/ParaViewFunctions @@ -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 } diff --git a/makeParaView b/makeParaView index d571eb31a53731b7195e712774bfcc3da04f1d57..3164fdef47347931b9c57145fb9d45002a2aeb62 100755 --- a/makeParaView +++ b/makeParaView @@ -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 ;; diff --git a/makeParaView.example b/makeParaView.example new file mode 100755 index 0000000000000000000000000000000000000000..e51f2407ee25cf65e4eabc094e3f0bb39e22cb5c --- /dev/null +++ b/makeParaView.example @@ -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 \ + "$@" + +#------------------------------------------------------------------------------ diff --git a/makeVTK b/makeVTK index 27eac17a3185ee99f23cd273b9dee5f52db44518..4e084e670231cfc9a5011370215579f9621e9598 100755 --- a/makeVTK +++ b/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} diff --git a/makeVTK.example b/makeVTK.example index 4de6054237f453b38337c9e17688ae59d69deb4f..ae08225b281457e2851e96d2be0e43a2001cf2e9 100755 --- a/makeVTK.example +++ b/makeVTK.example @@ -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