CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

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

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 4 Post By zordiack

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 3, 2016, 06:38
Default How to install ParaView 5 with OpenFOAM-dev or -3.x.x
  #1
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
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 http://www.paraview.org/download/ (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):

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

Code:
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):

Code:
./makeParaView4 -version 5.0.0 -mpi -python -python-lib /usr/lib/x86_64-linux-gnu/libpython2.7.so
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):

Code:
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):

Code:
cd PV5Readers
wmSET
./Allwclean
./Allwmake
That's it, you should now have ParaView 5 compiled with OpenFOAM readers
Attached Files
File Type: gz pv5readers.tar.gz (48.3 KB, 74 views)

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

Old   February 8, 2016, 06:00
Default
  #2
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
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:

https://github.com/OpenFOAM/OpenFOAM...800233078d8263

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, 19:26
Default
  #3
Member
 
Davi Barreira
Join Date: Apr 2014
Location: Fortaleza
Posts: 76
Rep Power: 12
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 libPV5FoamReader_SM.so is not compiling. Here is the full error:

Code:
 Linking CXX shared library /home/davi/OpenFOAM/OpenFOAM-plus/platforms/linux64GccDPInt32Opt/lib/paraview-5.0/libPV5FoamReader_SM.so
/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/libPV5FoamReader_SM.so' failed
make[2]: *** [/home/davi/OpenFOAM/OpenFOAM-plus/platforms/linux64GccDPInt32Opt/lib/paraview-5.0/libPV5FoamReader_SM.so] 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 lvtkPV4Foam.so to the /home/davi/OpenFOAM/OpenFOAM-plus/platforms/linux64GccDPInt32Opt/lib/ and renaming it as lvtkPV5Foam.so. 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 05:48.
davibarreira is offline   Reply With Quote

Old   June 21, 2016, 06:33
Default
  #4
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
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

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

Old   September 13, 2018, 16:47
Default
  #5
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 225
Rep Power: 10
gu1 is on a distinguished road
Hello,

I have a doubt, I have installed on my computer the OF5.0 (Ubuntu 16.04) and recently compiled the OF3.0.x (however, without the paraview). When I want to access the paraview of simulations performed in the older version of OpenFOAM, I use the version of OF5.0 for this (paraFoam). Is it possible to enable paraFoam of OF3.0.x to access the paraview already installed by the latest version (5.0)?

Quote:
cae@cae:~/OpenFOAM/case$ of3x
cae@cae:~/OpenFOAM/case$ paraFoam

FATAL ERROR: ParaView reader module libraries do not exist

Please build the reader module before continuing:
cd $FOAM_UTILITIES/postProcessing/graphics/PV4Readers
./Allwclean
./Allwmake
gu1 is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 08:51
[OpenFOAM] Installation ParaView for Windows version of openFOAM kasra karimi ParaView 14 September 8, 2018 14:06
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 5, 2016 03:18
Install openFOAM from with proxy server Dhruval OpenFOAM Installation 3 October 18, 2014 15:38
Newbie: Install ParaView 3.81 on OF-1.6-ext/OpenSuse 11.2? lentschi OpenFOAM Installation 1 March 9, 2011 02:32


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