CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Post-Processing

How to install ParaView 5 with OpenFOAM-dev or -3.x.x

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 3 Post By zordiack

LinkBack Thread Tools Display Modes
Old   February 3, 2016, 07:38
Default How to install ParaView 5 with OpenFOAM-dev or -3.x.x
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 77
Rep Power: 6
zordiack is on a distinguished road
Hi, I just finished installing ParaView 5 for OpenFOAM, so I thought I'd share the installation steps with you (OS is Xubuntu 14.04).

1. cd into $WM_THIRD_PARTY_DIR and get the sources from (ParaView-v5.0.0-source.tar.gz)

2. Unpack and rename the directory to ParaView-5.0.0

3. Edit file ParaView-5.0.0/CMake/ParaViewDetermineVersion.cmake and comment out lines 41-50 (otherwise source version detection fails, this is also a bug in 4.4.0):

#    if (EXISTS ${git_command})
#      execute_process(
#        COMMAND ${git_command} describe
#        WORKING_DIRECTORY ${source_dir}
#        RESULT_VARIABLE result
#        OUTPUT_VARIABLE output
#        ERROR_QUIET
#    endif()
4. Edit file $WM_PROJECT_DIR/etc/config/ line 58 to following:

export ParaView_VERSION=5.0.0
5. Source $WM_PROJECT_DIR/etc/basrc

6. Now let's compile ParaView 5. For this you can use the existing makeParaView4 script, because it has an option to select custom version. Your taste in ParaView options may be different, so adjust the following command accordingly (mpi and python are optional, run in $WM_THIRD_PARTY_DIR):

./makeParaView4 -version 5.0.0 -mpi -python -python-lib /usr/lib/x86_64-linux-gnu/
7. After compiling, export the new environmental settings and remember to use your home directory, ParaView compilation should output the correct lines for you once it's finished (you should also add/update these to your $HOME/.bashrc):

export ParaView_DIR=/home/YOURUSERNAME/OpenFOAM/ThirdParty-dev/platforms/linux64Gcc/ParaView-5.0.0
export PATH=$ParaView_DIR/bin:$PATH
export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-5.0
8. Copy the attached pv5readers.tar.gz into $FOAM_UTILITIES/postProcessing/graphics/, cd into that directory and unpack the archive.

9. Compile the PV5Readers (it will output some warnings, but it compiles at least with gcc-4.8.4):

cd PV5Readers
That's it, you should now have ParaView 5 compiled with OpenFOAM readers
Attached Files
File Type: gz pv5readers.tar.gz (48.3 KB, 37 views)
jherb, yanxiang and davibarreira like this.

Last edited by zordiack; February 3, 2016 at 16:32.
zordiack is offline   Reply With Quote

Old   February 8, 2016, 07:00
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 77
Rep Power: 6
zordiack is on a distinguished road
There is now an official commit for -dev by Henry to compile the OpenFOAM readers. This means that steps 8-9 above are not needed anymore and I think one should prefer the official method. Here is the commit:

It doesn't duplicate code, it just updates the PV4Readers to compile with ParaView 5 source.
zordiack is offline   Reply With Quote

Old   February 10, 2016, 20:26
Davi Barreira
Join Date: Apr 2014
Location: Fortaleza
Posts: 76
Rep Power: 4
davibarreira is on a distinguished road
I'm trying to follow your tips for setting Paraview 5 to OpenFOAM v3+.

I'm getting an error in the final step (./allwmake for Paraview), that the is not compiling. Here is the full error:

 Linking CXX shared library /home/davi/OpenFOAM/OpenFOAM-plus/platforms/linux64GccDPInt32Opt/lib/paraview-5.0/
/usr/bin/ld: cannot find -lvtkPV5Foam
collect2: error: ld returned 1 exit status
CMakeFiles/PV5FoamReader_SM.dir/build.make:457: recipe for target '/home/davi/OpenFOAM/OpenFOAM-plus/platforms/linux64GccDPInt32Opt/lib/paraview-5.0/' failed
make[2]: *** [/home/davi/OpenFOAM/OpenFOAM-plus/platforms/linux64GccDPInt32Opt/lib/paraview-5.0/] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/PV5FoamReader_SM.dir/all' failed
make[1]: *** [CMakeFiles/PV5FoamReader_SM.dir/all] Error 2
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2
Any ideas?

Actually manage to fix it by copying the to the /home/davi/OpenFOAM/OpenFOAM-plus/platforms/linux64GccDPInt32Opt/lib/ and renaming it as It compiled and the paraFOAM command now works (kinda), but paraview says that "it cannot find the reader" for the case.OpenFOAM file.

I got it to work using the command paraFoam -builtin ... not the ideal, but it's working.

Last edited by davibarreira; February 12, 2016 at 06:48.
davibarreira is offline   Reply With Quote

Old   June 21, 2016, 06:33
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 77
Rep Power: 6
zordiack is on a distinguished road
Just an update to this thread in case someone stumbles here. Compiling ParaView 5 series has been really easy for a while. First make sure you have the latest ThirdParty-dev by running "git pull" in ThirdParty dir, it should pull ParaView-5.0.1 source tree. Then just run

./makeParaView -version 5.0.1 -mpi -python -python-lib /usr/lib/x86_64-linux-gnu/ VTK_RENDERING_BACKEND=OpenGL2
Please note that mpi and python and the new rendering backend are totally optional
zordiack is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation ParaView for Windows version of openFOAM kasra karimi OpenFOAM Paraview & paraFoam 4 February 4, 2016 18:56
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 OpenFOAM Announcements from Other Sources 2 August 31, 2015 13:36
Install openFOAM from with proxy server Dhruval OpenFOAM Installation 3 October 18, 2014 15:38
Questions about OpenFOAM, ParaView and DSMC dark lancer OpenFOAM 2 October 1, 2012 10:58
Newbie: Install ParaView 3.81 on OF-1.6-ext/OpenSuse 11.2? lentschi OpenFOAM Installation 1 March 9, 2011 03:32

All times are GMT -4. The time now is 13:57.