ParaView/VRPN with MS-MPI: Difference between revisions

From KitwarePublic
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++ 2010 Express Edition:
** MS Visual C++ 2017 Express Edition:
*** [http://go.microsoft.com/?linkid=9709949 http://go.microsoft.com/?linkid=9709949]
*** [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:
*** [http://code.google.com/p/msysgit/downloads/list?q=full+installer+official+git http://code.google.com/p/msysgit/downloads/list?q=full+installer+official+git]
*** [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.
*** [http://www.cmake.org/files/v2.8/cmake-2.8.10.2-win32-x86.exe http://www.cmake.org/files/v2.8/cmake-2.8.10.2-win32-x86.exe]
** CMake (v3.12.0):
*** Install for current user or all users
*** [https://cmake.org/download/ https://cmake.org/download/]
** Qt 4.8 for MSVC 2010
*** Install for current user or all users. Will be added to system PATH automatically.
*** [http://qt-project.org/downloads http://qt-project.org/downloads]
** 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]
*** [http://www.python.org/getit/ http://www.python.org/getit/]
*** Alternatively, [https://www.qt.io/download-thank-you Use this generic installer and choose your version]
*** Be sure to pick the 2.7 branch, not the 3.x!
** 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.
*** [http://martine.github.com/ninja/ http://martine.github.com/ninja/] for full docs. Short version:
*** 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 git://github.com/martine/ninja.git
***** mkdir /c/src # (creates C:\src\)  
*** Open “Visual Studio 2010 Command Prompt” from the start menu and run the following:
***** 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://git.cs.unc.edu/vrpn.git
***** 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://paraview.org/ParaView.git
*** 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 2010 command prompt
** 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/Headers
| 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 2010
** 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:
    • CMake (v3.12.0):
    • 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:
        • 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:
        • 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.
  • Checkout ParaView source code
  • 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