ParaView/VRPN with MS-MPI: Difference between revisions
From KitwarePublic
< ParaView
Jump to navigationJump to search
(Initial conversion from google doc.) |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
* '''Download and install the following support packages:''' | * '''Download and install the following support packages:''' | ||
** MS Visual C++ | ** MS Visual C++ 2017 Express Edition: | ||
*** [ | *** [https://visualstudio.microsoft.com/downloads/ https://visualstudio.microsoft.com/downloads/] | ||
** MS-MPI 2008 | ** MS-MPI 2008 | ||
*** [http://www.microsoft.com/en-us/download/details.aspx?id=14737 http://www.microsoft.com/en-us/download/details.aspx?id=14737] | *** [http://www.microsoft.com/en-us/download/details.aspx?id=14737 http://www.microsoft.com/en-us/download/details.aspx?id=14737] | ||
** Git for Windows: | ** Git for Windows: | ||
*** [ | *** [https://git-scm.com/download/win https://git-scm.com/download/win] | ||
*** Default installation options are fine. | *** Default installation options are fine. | ||
** CMake: | *** Make sure to add git to system PATH. | ||
*** [ | ** CMake (v3.12.0): | ||
*** Install for current user or all users | *** [https://cmake.org/download/ https://cmake.org/download/] | ||
** Qt | *** Install for current user or all users. Will be added to system PATH automatically. | ||
*** [ | ** Qt 5.9 (msvc2015_64) | ||
** Python 2.7 | *** [https://download.qt.io/official_releases/qt/5.9/5.9.0/ Direct installer for 5.9] | ||
*** [ | *** Alternatively, [https://www.qt.io/download-thank-you Use this generic installer and choose your version] | ||
** Python 2.7.3, x64 | |||
*** [https://www.python.org/ftp/python/2.7.3/python-2.7.3.amd64.msi https://www.python.org/ftp/python/2.7.3/python-2.7.3.amd64.msi] | |||
** Ninja build system. | ** Ninja build system. | ||
*** | *** You can download the exe, or build from source | ||
*** Install MSVC++ (link above) | *** Exe: https://github.com/ninja-build/ninja/releases | ||
*** Download and install Python 2.7 (link above) | *** Build from Source | ||
*** Download and install Git for Windows (link above) | **** Install MSVC++ (link above) | ||
*** Open “Git Bash” and run the following to checkout ninja’s source code: | **** Download and install Python 2.7 (link above) | ||
**** mkdir /c/src # (creates C:\src\) | **** Download and install Git for Windows (link above) | ||
**** cd /c/src | **** Open “Git Bash” and run the following to checkout ninja’s source code: | ||
**** git clone | ***** mkdir /c/src # (creates C:\src\) | ||
*** Open “Visual Studio | ***** cd /c/src | ||
**** cd \src\ninja | ***** git clone https://github.com/ninja-build/ninja.git | ||
**** \Python27\python.exe bootstrap.py | **** Open “Visual Studio 2017 Command Prompt (x64)” from the start menu and run the following: | ||
**** The note about Windows file locking can be safely ignored. | ***** 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: | *** Add C:\src\ninja to the system PATH: | ||
**** Open Start menu | **** Open Start menu | ||
Line 41: | Line 46: | ||
**** In Git Bash, do: | **** In Git Bash, do: | ||
***** cd /c/src | ***** cd /c/src | ||
***** git clone | ***** git clone https://github.com/vrpn/vrpn.git | ||
**** Then in the MSVC command prompt, do | **** Then in the '''MSVC 2017 (x64)''' command prompt, do | ||
***** cd \src\vrpn | ***** cd \src\vrpn | ||
***** cmake-gui . | ***** cmake-gui . | ||
Line 50: | Line 55: | ||
***** Set binary dir to C:/src/vrpn-bin | ***** Set binary dir to C:/src/vrpn-bin | ||
***** Click “Configure”, use ninja and default compiler | ***** Click “Configure”, use ninja and default compiler | ||
***** Make to set the CMAKE_BUILD_TYPE appropriately | ***** Make to set the CMAKE_BUILD_TYPE appropriately (Release) | ||
***** “Configure” again if needed, then “Generate” | ***** “Configure” again if needed, then “Generate”. You can close CMake GUI after it is done '''generating''' | ||
**** In the MSVC command prompt, do | **** In the '''MSVC 2017 (x64)''' command prompt, do | ||
***** cd \src\vrpn-bin | ***** cd \src\vrpn-bin | ||
***** ninja | ***** ninja | ||
Line 60: | Line 65: | ||
** Enter the following: | ** Enter the following: | ||
*** cd /c/src | *** cd /c/src | ||
*** git clone | *** git clone https://github.com/Kitware/ParaView.git | ||
*** cd ParaView | *** cd ParaView | ||
*** git submodule init | *** git submodule init | ||
*** git submodule update | *** git submodule update --init --recursive | ||
* '''Configure ParaView''' | * '''Configure ParaView''' | ||
** Run “cmake-gui” from a MSVC | ** Run “cmake-gui” from a '''(MSVC 2017 x64)''' command prompt | ||
** Click “Browse source”, select “C:/src/ParaView” | ** Click “Browse source”, select “C:/src/ParaView” | ||
** Click “Browse build”, create and select “C:/src/ParaView-build” | ** Click “Browse build”, create and select “C:/src/ParaView-build” | ||
Line 71: | Line 76: | ||
*** Use the “Ninja” generator | *** Use the “Ninja” generator | ||
*** Use the default compilers | *** 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: | ** Check the “Advanced” box and set the following options: | ||
Line 88: | Line 95: | ||
| style="border:1pt solid #000000;padding:0.0694in;"| PARAVIEW_BUILD_PLUGIN_VRPlugin | | style="border:1pt solid #000000;padding:0.0694in;"| PARAVIEW_BUILD_PLUGIN_VRPlugin | ||
| style="border:1pt solid #000000;padding:0.0694in;"| True | | style="border:1pt solid #000000;padding:0.0694in;"| True | ||
|- | |||
| style="border:1pt solid #000000;padding:0.0694in;"| VTK_Python_VERSION | |||
| style="border:1pt solid #000000;padding:0.0694in;"| 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: | ** 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: | ||
Line 126: | Line 137: | ||
|} | |} | ||
** Click “Configure” again. The VRPN options are now available. Set the following options: | ** Click “Configure” again. The VRPN options are now available. Set the following options: | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
| style="border:1pt solid #000000;padding:0.0694in;"| VRPN_INCLUDE_DIR | | style="border:1pt solid #000000;padding:0.0694in;"| VRPN_INCLUDE_DIR | ||
| style="border:1pt solid #000000;padding:0.0694in;"| C:/src/vrpn-bin/ | | style="border:1pt solid #000000;padding:0.0694in;"| C:/src/vrpn-bin/ | ||
|- | |- | ||
| style="border:1pt solid #000000;padding:0.0694in;"| VRPN_LIBRARY | | style="border:1pt solid #000000;padding:0.0694in;"| VRPN_LIBRARY | ||
| style="border:1pt solid #000000;padding:0.0694in;"| C:/src/vrpn-bin/vrpn.lib | | style="border:1pt solid #000000;padding:0.0694in;"| C:/src/vrpn-bin/vrpn.lib;C:/src/vrpn-bin/quat/quatd.lib | ||
|} | |} | ||
Line 142: | Line 154: | ||
** Click “Generate” | ** Click “Generate” | ||
* '''Build ParaView''' | * '''Build ParaView''' | ||
** Open Visual Studio Command Prompt | ** Open '''Visual Studio Command Prompt x64 2017''' | ||
** Enter the following: | ** Enter the following: | ||
*** cd \src\ParaView-build | *** cd \src\ParaView-build | ||
Line 150: | Line 162: | ||
"C:\Program Files\Microsoft HPC Pack 2008 R2\Bin\mpiexec.exe" -np 2 C:\src\ParaView-build\bin\pvserver.exe | "C:\Program Files\Microsoft HPC Pack 2008 R2\Bin\mpiexec.exe" -np 2 C:\src\ParaView-build\bin\pvserver.exe | ||
== Distributing the exe == | |||
Unfortunately, the [https://gitlab.kitware.com/paraview/paraview-superbuild/ super-build] does not currently build a Paraview/VRPN/MS-MPI version for distribution. | |||
Use this dirty-hack to distribute to other computers on your cluster for rendering. | |||
'''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 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:''' | |||
* 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 to target computer | |||
* 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) from computer that built Paraview. | |||
* Install [http://www.microsoft.com/en-us/download/details.aspx?id=14737 MS-MPI 2008] | |||
* Install [https://download.qt.io/official_releases/qt/5.9/5.9.0/ QT5.9] onto computer | |||
* Run Paraview.exe |
Latest revision as of 22:27, 10 August 2018
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
Unfortunately, the super-build does not currently build a Paraview/VRPN/MS-MPI version for distribution. Use this dirty-hack to distribute to other computers on your cluster for rendering.
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:
- 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 to target computer
- 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) from computer that built Paraview.
- Install MS-MPI 2008
- Install QT5.9 onto computer
- Run Paraview.exe