CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Paraview version update errors (

Dan Pearce December 19, 2013 12:40

Paraview version update errors
Hi Foamers,
This is one of my first posts so please be gentle :). I have been using openfoam V2.1.1 with paraview 3.12 for a while on ubuntu 12.04 without any problems. Recently I started experiencing severe memory leaks with paraview, each time I changed the timestep and re-rendered the graph the memory use would increase but it would never be released again. After some digging around I thought the problem may have been related to a known issue in paraview 3.12 so I attempted to update to 3.98.1 and this turned out to be a tricky job.
Initially I tried to install the binary packs and just add a comment to the bashrc file to update the location but this gave a bunch of errors so I downloaded the source and attempted to build myself. After a bit of fumbling, I managed to build 3.98.1 and added the following to the bashrc file as per the message at the end of the build script:

export ParaView_MAJOR=3.98
export ParaView_VERSION=3.98.1
export ParaView_DIR=/opt/ThirdParty-2.1.1/platforms/linux64Gcc/paraview-3.98.1
export PATH=$ParaView_DIR/bin:$PATH
export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-3.98

Trying to run paraFoam from the terminal gives

FATAL ERROR: ParaView reader module libraries do not exist

Please build the reader module before continuing:
cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers

Running ./Allwclean runs fine but ./Allwmake throws errors trying to create a folder:

dp1212@dp1212-T5500:/opt/openfoam211/applications/utilities/postProcessing/graphics/PV3Readers$ ./Allwmake
+ [ -d /opt/ThirdParty-2.1.1/platforms/linux64Gcc/paraview-3.98.1 -a -r /opt/ThirdParty-2.1.1/platforms/linux64Gcc/paraview-3.98.1 ]
+ [ -n /opt/openfoam211/platforms/linux64GccDPOpt/lib/paraview-3.98 ]
+ [ -n g++ ]
+ export CXX=g++
+ wmake libso vtkPV3Readers
mkdir: cannot create directory `linux64GccDPOpt': Permission denied
/bin/sh: 1: cannot create linux64GccDPOpt/options: Directory nonexistent
make: *** [linux64GccDPOpt/options] Error 2
/opt/openfoam211/wmake/MakefileFiles:40: linux64GccDPOpt/options: No such file or directory
make: *** No rule to make target `linux64GccDPOpt/options'. Stop.

(the errors continue as above)

To test if paraview is actually working, I run 'paraview' from the terminal and it appears to start up ok but throws an error when loading a .foam file as below (the example below is for loading gamma from a multiphase problem but the same occurs for k, rho files etc):


ERROR: In /opt/ThirdParty-2.1.1/ParaView-3.98.1/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6478
 vtkOpenFOAMReaderPrivate (0x3d6a4b0): Error reading line 17 of /home/dp1212/OpenFOAM/dp1212-2.1.1/run/tutorials/multiphase/cavitatingFoam/les/Mexus2phasecav2/0/gamma: Expected a number, found a non-digit character ]

I am now at a bit of a loss as to how to proceed, ideally I would like some instruction on the best method to install and build a number of different versions of paraview as they are needed. I also couldn't figure out if the paraFoam script would actually run the later versions of paraview or if I would need to manually generate the .foam file instead of the .Openfoam file and then use paraview to open it.


wyldckat December 25, 2013 06:32

Greetings Dan,

Nice! You've managed to build ParaView 3.98 from source code! That is quite a feat, specially if you haven't found some of the posts here on the forum explaining how that can be done ;)

Let me address the missing details in a bullet point list:
Best regards,

Dan Pearce December 27, 2013 10:44

Hi Bruno,
Thanks for getting back to me so quickly. I went through the links you supplied and tried to understand what was happening with the following results:
- tried to build the Pv3readers after editing the vtkPV3FoamReader.h, vtkPV3blockMeshReader.h and vtkPV3FoamReader.cxx files. This seemed fine as it is using the new export class rather than the IO_Export class and removing the empty array pass through since the new pipeline does not use it any more. I couldn't find out where the option to turn on the paraview install development files was though. From the opt/ThirdParty-2.1.1 directory I then did ./Allclean and ./makeParaview version 3.98.1. Everything seemed to compile ok.
- Next went and edited the bashrc file in the $WM_Project_dir and /bin paraFoam scripts as per #8 and #9. Trying to run paraFoam from the terminal still gives me the classic error

dp1212@dp1212-T5500:~/OpenFOAM/dp1212-2.1.1/run/tutorials/multiphase/cavitatingFoam/les/Mexus2phaseLP$ paraFoam -builtin
/opt/openfoam211/bin/paraFoam: 38: /opt/openfoam211/bin/paraFoam: source: not found

FATAL ERROR: ParaView reader module libraries do not exist

Please build the reader module before continuing:
cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers

- attempt to build the PV3 readers again and no reported errors on the build but ParaFoam still gives the same error. To test is paraview itself was working anyway, opened it using paraview and sure enough I get 3.98.1 but as soon as I try and load a dataset I still get

dp1212@dp1212-T5500:~/OpenFOAM/dp1212-2.1.1/run/tutorials/multiphase/cavitatingFoam/les/Mexus2phaseLP$ paraview
ERROR: In /opt/ThirdParty-2.1.1/ParaView-3.98.1/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6478
vtkOpenFOAMReaderPrivate (0x328c070): Error reading line 17 of /home/dp1212/OpenFOAM/dp1212-2.1.1/run/tutorials/multiphase/cavitatingFoam/les/Mexus2phasecav2/0/gamma: Expected a number, found a non-digit character ]

Should I start again from scratch? I'm pretty confused as still a newcomer to linux as well as C so I don't know what the various versions of Qt are or how bothered I should be about them (several posts mention version compatibility issues). I don't know if it makes a difference but I downloaded the source files from the website and unpacked using archive manager rather than using the git repository. I then moved to the /opt/ThirdPart-2.1.1 directory manually.
Are the two issues related? Ie is the non digit error related to the build process or just the foam reader build error?

For info, here is the output from trying to build the readers:

dp1212@dp1212-T5500:~/OpenFOAM/dp1212-2.1.1/run/tutorials/multiphase/cavitatingFoam/les/Mexus2phaseLP$ sudo su -c "source /opt/openfoam211/etc/bashrc; bash"
[sudo] password for dp1212:
root@dp1212-T5500:/home/dp1212/OpenFOAM/dp1212-2.1.1/run/tutorials/multiphase/cavitatingFoam/les/Mexus2phaseLP# cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers
root@dp1212-T5500:/opt/openfoam211/applications/utilities/postProcessing/graphics/PV3Readers# ./Allwclean
+ wclean libso vtkPV3Readers
wclean vtkPV3Readers
+ PV3blockMeshReader/Allwclean
+ rm -f /opt/openfoam211/platforms/linux64GccDPOpt/lib/libPV3blockMeshReader*
+ rm -rf PV3blockMeshReader/Make
+ wclean libso vtkPV3blockMesh
wclean vtkPV3blockMesh
+ PV3FoamReader/Allwclean
+ rm -f /opt/openfoam211/platforms/linux64GccDPOpt/lib/libPV3FoamReader*
+ rm -rf PV3FoamReader/Make
+ wclean libso vtkPV3Foam
wclean vtkPV3Foam
root@dp1212-T5500:/opt/openfoam211/applications/utilities/postProcessing/graphics/PV3Readers# ./Allwmake
+ [ -d  -a -r  ]


Late addition: I tried to get on with some work and fired up the previously working version of 3.12.0 and now it is broken as well!

p, li { white-space: pre-wrap; }  ERROR: In /home/opencfd/OpenFOAM/ThirdParty-2.1.x/ParaView-3.12.0/VTK/IO/vtkOpenFOAMReader.cxx, line 6481
 vtkOpenFOAMReaderPrivate (0x3fc8020): Error reading line 17 of /home/dp1212/OpenFOAM/dp1212-2.1.1/run/tutorials/multiphase/cavitatingFoam/les/Mexus2phaseLP/0/gamma: Expected a number, found a non-digit character ]

Further addition:
Purged the packages and reinstalled 3.12 and OF211 from apt and got back to a working system under 3.12. Using Brunos blog page from I removed the contents of the $ParaView_DIR folder and replaced it with the downloaded binaries. After some careful testing in some fresh terminals, it turns out that this only works when steps #8 and #9 are omitted. Paraview 3.98.1 now starts happily but is still giving the same error when attempting to load from a gamma file from a multiphase problem:

ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6478
vtkOpenFOAMReaderPrivate (0x2762060): Error reading line 17 of /home/dp1212/OpenFOAM/dp1212-2.1.1/run/tutorials/multiphase/cavitatingFoam/les/Mexus2phaseLP/0/gamma: Expected a number, found a non-digit character ]

Any ideas please? I'm going to try paraview 4.0 as a last ditch attempt...

Dan Pearce January 3, 2014 14:54

Tried paraview 4.0 and similarly to last update, only works when omitting steps #8 and #9 and comes up

ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6478
vtkOpenFOAMReaderPrivate (0x27f0d00): Error reading line 17 of /home/dp1212/OpenFOAM/dp1212-2.1.1/run/tutorials/multiphase/cavitatingFoam/les/Mexus2phaseLP/0/gamma: Expected a number, found a non-digit character ]

as well as a new error

ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/Common/DataModel/vtkDataObjectTree.cxx, line 377
vtkMultiBlockDataSet (0xe1a1430): Structure does not match. You must use CopyStructure before calling this method.

wyldckat January 4, 2014 19:42

Hi Dan,

Sorry, I've been a bit busy and I was thinking about helping you by writing down some instructions to rely on using Ubuntu's own ParaView builds...

But I've ended up reviewing the last two posts and came to the conclusion that the best approach right now would be to diagnose the problem at hand. Therefore:
  1. What does the file "tutorials/multiphase/cavitatingFoam/les/Mexus2phaseLP/0/gamma" contain? I ask this because I don't have access to that case you're working with.
  2. What plug-in are you using for opening the OpenFOAM cases? Is it the internal one or did you build OpenFOAM's own plug-in reader?

edit: Never mind, I've figured it out. The same problem occurs with the "throttle*" tutorials. The dimensions defined most of the field files are incomplete; for e.g. in the file "0/gamma":

dimensions      [0 0 0 0 0];
When the complete entry should be:

dimensions      [0 0 0 0 0 0 0];
Check all field files inside the folders "0" and "" and add 2 zeros to the end of the vector, as I've done for the "gamma" field and the problem should be solved!

edit 2: Reported in the bug tracker:

Best regards,

Dan Pearce January 8, 2014 05:47

Hi Bruno,
Many thanks for sorting this one out, I had not ever thought to look into the dimension specs for gamma and other files. For reference, I still had some consistent warnings come up using paraview 4.0 but 3.98.1 works very well for me, the original memory leak problem from 3.12 seems to have been completely resolved.

All times are GMT -4. The time now is 18:51.