ParaView/VRPN with MS-MPI
From KitwarePublic
Jump to navigationJump to search
ParaView with MS-MPI and VRPN
- Download and install the following support packages:
- MS Visual C++ 2017 Express Edition:
- MS-MPI 2008
- Git for Windows:
- https://git-scm.com/download/win
- Default installation options are fine.
- Make sure to add git to system PATH.
- CMake (v3.12.0):
- https://cmake.org/download/
- Install for current user or all users. Will be added to system PATH automatically.
- Qt 5.9 (msvc2015_64)
- Python 2.7.3, x64
- Ninja build system.
- You can download the exe, or build from source
- Exe: https://github.com/ninja-build/ninja/releases
- Build from Source
- Install MSVC++ (link above)
- Download and install Python 2.7 (link above)
- Download and install Git for Windows (link above)
- Open “Git Bash” and run the following to checkout ninja’s source code:
- mkdir /c/src # (creates C:\src\)
- cd /c/src
- git clone https://github.com/ninja-build/ninja.git
- Open “Visual Studio 2017 Command Prompt (x64)” from the start menu and run the following:
- cd \src\ninja
- C:\Python27\python.exe bootstrap.py
- (if this doesn't work, try C:\Python27\python.exe configure.py --bootstrap)
- This should generate ninja.exe
- The note about Windows file locking can be safely ignored.
- Add C:\src\ninja to the system PATH:
- Open Start menu
- Right click on “My Computer”, select “Properties”
- “Advanced System Settings”
- “Environment Variables”
- Select “Path” in “System variables”
- Add “;C:\src\ninja” to the variable value string.
- Close and reopen any open command prompts for this to take effect.
- VRPN
- In Git Bash, do:
- cd /c/src
- git clone https://github.com/vrpn/vrpn.git
- Then in the MSVC 2017 (x64) command prompt, do
- cd \src\vrpn
- cmake-gui .
- Note: CMake must be launched from the MSVC shell for cmake to detect the compilers correctly.
- In the CMake GUI:
- Set source dir to C:/src/vrpn
- Set binary dir to C:/src/vrpn-bin
- Click “Configure”, use ninja and default compiler
- Make to set the CMAKE_BUILD_TYPE appropriately (Release)
- “Configure” again if needed, then “Generate”. You can close CMake GUI after it is done generating
- In the MSVC 2017 (x64) command prompt, do
- cd \src\vrpn-bin
- ninja
- If any errors about python27_d.lib appear, re-run cmake-gui, check the “advanced” option, filter to variables containing “python”, and uncheck all python variables. configure, generate, and build again.
- In Git Bash, do:
- Checkout ParaView source code
- Open git bash
- Enter the following:
- cd /c/src
- git clone https://github.com/Kitware/ParaView.git
- cd ParaView
- git submodule init
- git submodule update --init --recursive
- Configure ParaView
- Run “cmake-gui” from a (MSVC 2017 x64) command prompt
- Click “Browse source”, select “C:/src/ParaView”
- Click “Browse build”, create and select “C:/src/ParaView-build”
- Click “Configure”
- Use the “Ninja” generator
- Use the default compilers
- Make sure it finds your Qt5
- C:\Qt\5.9\msvc2015_64\lib\cmake\Qt5
- Check the “Advanced” box and set the following options:
PARAVIEW_ENABLE_PYTHON | True |
PARAVIEW_USE_MPI | True |
PARAVIEW_BUILD_QT_GUI | True |
PARAVIEW_BUILD_PLUGIN_VRPlugin | True |
VTK_Python_VERSION | 2.7 |
- Click “Configure” again. The MPI_* and VR options should now appear. Any *MPI* variables that are not listed below can be left blank. Set the following:
MPI_C_INCLUDE_PATH | C:/Program Files/Microsoft HPC Pack 2008 R2/Inc |
MPI_CXX_INCLUDE_PATH | C:/Program Files/Microsoft HPC Pack 2008 R2/Inc |
MPIEXEC | C:/Program Files/Microsoft HPC Pack 2008 R2/Bin/mpiexec.exe |
VTK_MPIRUN_EXE | C:/Program Files/Microsoft HPC Pack 2008 R2/Bin/mpiexec.exe |
MPI_C_LIBRARIES | C:/Program Files/Microsoft HPC Pack 2008 R2/lib/i386/msmpi.lib |
MPI_CXX_LIBRARIES | C:/Program Files/Microsoft HPC Pack 2008 R2/lib/i386/msmpi.lib |
MPI_LIBRARY | C:/Program Files/Microsoft HPC Pack 2008 R2/lib/i386/msmpi.lib |
PARAVIEW_USE_VRPN | True |
- Click “Configure” again. The VRPN options are now available. Set the following options:
VRPN_INCLUDE_DIR | C:/src/vrpn-bin/ |
VRPN_LIBRARY | C:/src/vrpn-bin/vrpn.lib;C:/src/vrpn-bin/quat/quatd.lib |
- Click “Configure”
- Click “Generate”
- Build ParaView
- Open Visual Studio Command Prompt x64 2017
- Enter the following:
- cd \src\ParaView-build
- ninja
- Running ParaView with MS-MPI
- At this point, you should be able to run ParaView in parallel using the MS mpiexec executable:
"C:\Program Files\Microsoft HPC Pack 2008 R2\Bin\mpiexec.exe" -np 2 C:\src\ParaView-build\bin\pvserver.exe
Distributing the exe
To run the exe on slave computers for rendering:
- Install Microsoft Visual C redistributable pack (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.14.26405\vc_redist_x64.exe) onto each cluster slave
- Install MS-MPI 2008 onto each computer. http://www.microsoft.com/en-us/download/details.aspx?id=14737
- Copy the /bin/ folder to each slave computer, at the same location (C:/paraview-build/bin)
- You can now run pvserver on all slaves/clients
- Run smpd.exe on all render computers
- Use mpiexec <relevant args> pvserver.exe <relevant-pvx>.pvx to main computer to run pvserver
- Run the built Paraview.exe from main computer. Connect to pvserver instance.
To run the exe (with gui) on another computer:
- Install *** QT5.9 onto computer
- Copy all QT dll's into the bin folder (C:\Qt\5.9\msvc2015_64\bin)
- Copy Python27.dll into bin folder. On Windows7x64, it resides in C:/Windows/System32 (even if you did a 64 bit installation)
- Copy /bin/ folder.
- Run Paraview.exe