Contrib Parallelized Native OpenFOAM Reader for ParaView

From OpenFOAMWiki
Revision as of 04:57, 31 August 2008 by 7islands (Talk | contribs)

1 Short description

This is a development snapshot of OpenFOAM native reader for ParaView 3.3-CVS and its experimental parallelization extension for decomposePar-ed cases.

I repeart, this a development snapshot. This is not made to be as robust as the past serial versions have been.

2 Features

  • Fast. For a rough performance indication, the serial reader loads an ascii-gzipped mesh with 3.5 million hexahedral cells in 9 seconds on my 3.0 GHz Mac Pro.
  • Memory efficient. The readers typically requires less memory than PV3FoamReader. The above mentioned case crashes a 32-bit version of ParaView due to out of memory if loaded by PV3FoamReader, while the reader does not.
  • Portable. The readers works under Linux, Mac OS X and Windows without any porting works.
  • Too many to write now, more to come later

3 Installation

For now the installation configuration of the readers is a bit irregular: the installation of serial reader will be done by overwriting the existing reader in the ParaView source tree, while the parallelized reader and the additional reader UIs will be built as plugins.

First install the serial reader as noted by BSD/ReleaseNotes, then proceed to install the parallel reader following GPL/ReleaseNotes. Note that in order to install the parallelized reader, the serial reader must have been installed.

3.1 Installation: serial reader

1. Only required for ThirdParty ParaView3.3-cvs: Setup your OF environment.
. ~/OpenFOAM/OpenFOAM-1.5/etc/bashrc
2. Untar the package at the parent directory of ParaView3 source tree.
tar zxf <packageName>-<releaseDate>.tar.gz
3. Run the preInstall script.
<packageDirectory>/BSD/preInstall.sh

4. Build ParaView3.

  • For general ParaView 3.3-CVS: Build ParaView3 as usual. You would want to turn on compiler optimization (set CMAKE_BUILD_TYPE to Release). Without it the reader is dead slow. For a rough performance indication, the reader loads an ascii-gzipped mesh with 3.5 million hexahedral cells in 9 seconds on my 3.0 GHz Mac Pro.
  • For ThirdParty ParaView3.3-cvs:
    • If you have built your own binary of ParaView,
      buildParaView3.3-cvs 1             # should finish in a minute or two! 
      
 
    • If you have not,
      buildParaView3.3-cvs               # wait for a while until it finishes 
      
 

3.2 Installation: parallelized reader

The package can be installed with the usual installation procedure of ParaView plugins. For details you would want to refer to Section 19.2 of The ParaView Guide. In brief, it goes as follows.

0. [IMPORTANT]

  • Installation of vtkOpenFOAMReader (the serial version of the reader) is required before installation of the parallel reader.
  • Obviously, you need to build ParaView with parallelization support (PARAVIEW_USE_MPI=ON).

1. Create a build directory.

2. Run ccmake from within the build directory. Set ParaView_DIR to your ParaView build directory (not the source directory) at the command line.
cd <buildDirectory>
ccmake <packageDirectory>/GPL -DParaView_DIR=<path to your paraview build>

3. Configure the build. Note that CMAKE_BUILD_TYPE must be same as the one for the ParaView build (otherwise the plugin will not load).

4. Run make.
make
5. Copy the following produced libraries to your plugin directory.
libOpenFOAMPanel.*
libPOpenFOAMPanel.*
libPOpenFOAMReaderGUIPlugin.*
libPOpenFOAMReaderSMPlugin.*
where * is the extension given to shared libraries on your platform(so, dylib or dll).

4 Usage

4.1 Serial reader

  • To load an OpenFOAM case, you either have to
    • create an empty stub file <caseName>.foam right under the case directory, where <caseName> is an arbitrary string other than strings that starts with "controlDict," and open <caseName>.foam or
    • create a symbolic link from controlDict to controlDict.foam and open controlDict.foam.

4.2 Parallelized reader

  • [IMPORTANT] The POpenFOAMReaderSM plugin must be loaded as a remote plugin before loading a parallel case when ParaView is run in client/server mode. Otherwise ParaView will crash.
  • The stub file extension assigned to the reader is ".pfoam". Create a stub file like in the case of serial reader and open it.
  • You can use the reader either in client/server mode or in builtin server mode. In the latter case the reader works as a serial reader that can read a decomposePar-ed case directly.

5 Notes

  • See the ReleaseNotes in the package for now. [To be added later]

6 Downloads

Development snapshot:


Past serial versions:

7 History

7islands 06:57, 31 August 2008 (CEST) (Takuya OSHIMA): moved to Contrib section. Initial upload of the parallelized version.

7islands 02:58, 28 April 2008 (CEST) (Takuya OSHIMA): update for the 20080324 version.

7islands 09:18, 29 Dec 2007 (CET): some addenda.

7islands 04:36, 16 Dec 2007 (CET) (Takuya OSHIMA): Created this page.