CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OF 1.6.x installation, Suse 11.2, ParaView Segementation fault (http://www.cfd-online.com/Forums/openfoam-installation/75331-1-6-x-installation-suse-11-2-paraview-segementation-fault.html)

peterwy April 22, 2010 06:05

OF 1.6.x installation, Suse 11.2, ParaView Segementation fault
 
Hello all,

perhaps somebody is able to help me.

Everything works fine ... at least I think so ... but starting paraview always results in a segmentation fault.

My distribution is Suse 11.2.

Has anybody an idea, how I can go on to find out the problem?
I looked already a lot around, but I didn't found anything usefull.

Best Regards,
Peter

wyldckat April 22, 2010 10:28

Greetings Peter,

In Ubuntu 10.04 (comes out at the end of this month) I've had to rebuild both Paraview and PV3FoamReader, so that Paraview wouldn't simply result in a "core dumped".

The actual reason was associated with the fact that when the OpenFOAM environment is set, Paraview searches for plugins to load, and PV3FoamReader depends on something that clashes with something else that Paraview has loaded.

To confirm if the problem you have is the same as I had, edit your $HOME/.bashrc file and comment out OpenFOAM's bashrc. Then start a new terminal and go to the folder where Paraview's binary is and run paraview:
Code:

cd $HOME/OpenFOAM/ThirdParty-1.6.x/paraview-3.6.1/platforms/linux/bin
./paraview

NOTE: you didn't state what architecture your Suse is running, if it's i?86 or x86_64. If it's x86_64, then the folder before bin is linux64 and not linux.


Additionally, if you had written the steps you took or what guide you followed to installed OpenFOAM on your machine, it would have helped to isolate the issue ;) So, I can only assume that you unpacked the ThirdParty binary package and only built OpenFOAM's code, thus the "segmentation fault" problem.

Best regards,
Bruno

peterwy April 22, 2010 11:38

Hi,

yeah ... thank you very much, that is it. I initialiase my OF environment always with an alias so it was quite easy for me to reproduce what you wrote .... just let out he initializing before starting paraview ... ;-)

Can you tell me what you exactly mean with a complete rebuild?

I didn't used the binaries but compiled my OF version incl. paraview from scratch ...

Thx & best Regards,
Peter

wyldckat April 22, 2010 11:54

Hello again,
Quote:

Originally Posted by peterwy (Post 255913)
Can you tell me what you exactly mean with a complete rebuild?

I didn't used the binaries but compiled my OF version incl. paraview from scratch ...

That actually means that you have already built the whole thing! Did you build PV3FoamReader too?

If you did, the other possibility that comes to mind is that your Linux box (Suse) isn't in english. If it isn't, then that's the problem!
With OpenFOAM's environment active, edit the file "$WM_PROJECT_DIR/bin/paraFoam" and insert somewhere before it calls paraview, the following line:
Code:

export LC_ALL=C
This will force the english standard language settings to be used by Paraview and it's plugins. It will only affect them and not the whole system.

I hope this solves the problem!

Best regards,
Bruno

peterwy April 22, 2010 12:14

Hi,

you're right my Suse distribution is german.
But what you write would mean, that paraview should run properly isn't it? But paraview and of course paraFoam make the problem.

At the end I tried it with you proposal as well as I made an export LC... before starting paraview as well as I made an export LANGUAGE="en_US.UTF8" before starting paraview but nothing worked.

Do you have further ideas? Should I change the whole language of my system for that and try out?

Best Regards,
Peter

wyldckat April 22, 2010 12:34

Hi,

OK, three other possibilities:
  1. you didn't (re)build PV3FoamReader, in other words, didn't run:
    Code:

    cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
    ./Allwclean
    ./Allwmake

  2. your graphics card isn't properly installed (although I'm not sure about this one)
  3. the qt version you have installed has some weird problem with Paraview. Did you install the libqt4-dev package (I'm not sure what it's name is in Suse)?
If none of these work, and if you don't want to spend more time searching for the solution, then I suggest that:
  • you should install Suse's version of Paraview
  • use foamToVTK to export the OpenFOAM results to VTK
  • in a terminal window without OpenFOAM's environment active, go to the case folder, run paraview and open the ".vtk" files that are in the new VTK folder, created by foamToVTK.
Type "foamToVTK -help" for more information on what additional options you have for it.


If none of these work, but you still want to figure out why it won't work properly, we'll need to know:
  • what steps/guide did you take/follow to install OpenFOAM and Paraview;
  • what graphics card do you have, or are you running Suse in a virtual machine;
  • what architecture of Suse are you running? i386, i686 or x86_64.
  • what gcc version are you using? The one that comes with Suse or the one that comes with OpenFOAM. If it's the one that comes with OpenFOAM, did you build it or use the precompiled version?

Best regards,
Bruno

peterwy April 22, 2010 14:24

Hello,

I recompiled paraview right now, because I figurend out that I hadn't installed qt4-dev. Didn't helped, so next step will be deleting and recompiling qt4 as well, perhaps the missing qt4 dep. is already here a problem.

Next steps will follow on Monday. Have a nice weekend & thx, Peter

peterwy April 26, 2010 04:50

Hello,
hope everybody is fine directly after the weekend ;-) ...but now to my threat from last week.

I could reduce the problem on one file now.
After a simple solution would be difficult in my opinion and your proposals were quite good but for nearly every proposals at the end I had a reason why that couldn't be the reason I searched myself.

In the OF lib directory is a file called libOpenFOAM.so.

I know, it's one of the essential OF libraries. I have no idea what paraview has to do with this file, but, if I rename this file paraview works, and if the file is there, paraview gives a segmentation fault.

I can't delete it because OF would complain when the file is missing.

Has anybody an idea, what the reason for this paraview behaviour can be?

Thanks and best Regards,
Peter

wyldckat April 26, 2010 07:29

Greetings Peter,

As far as I know, the reason for that happening is that OpenFOAM+PV3FoamReader were built with one gcc version, and Paraview was built with another gcc version, thus each depend on one or more C/C++ libraries of different versions!

So, what gcc version are you using? The one that comes with openSUSE or the one that comes with OpenFOAM?

The best bet right now would be to use only the openSUSE's version. In $WM_PROJECT_DIR/etc/settings.sh, edit it and search and change to be like this:
Code:

# Select compiler installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# compilerInstall = OpenFOAM | System
compilerInstall=System

Source the bashrc script or start a new terminal and source it. Then rebuild everything again :( Paraview, OpenFOAM and PV3FoamReader.

My advice would be to rename your current $HOME/OpenFOAM folder (just in case keep it) and make a new $HOME/OpenFOAM folder and unpack only the source package ThirdParty, git clone again OpenFOAM 1.6.x and build everything with the system compiler!!

Best regards,
Bruno

peterwy April 26, 2010 07:37

Hi,

you were right ... I used the OF compiler to build the OF environment.

Now I will follow your suggest not to use the OF compiler but build the complete environment with the system compiler. Hope that works.

I will report as I know more.

Thx & best Regards,
Peter

wyldckat April 26, 2010 07:47

I forgot to not forget setting WM_NCOMPPROCS to the number of processors. This way it'll build way faster!

You can add this to the end of OpenFOAM's bashrc script:
Code:

#
# Set the number of cores to build on
#
WM_NCOMPPROCS=1

if [ -r /proc/cpuinfo ]
then
    WM_NCOMPPROCS=$(egrep "^processor" /proc/cpuinfo | wc -l)
    [ $WM_NCOMPPROCS -le 8 ] || WM_NCOMPPROCS=8
fi

echo "Building on " $WM_NCOMPPROCS " cores"
export WM_NCOMPPROCS

It's from the makeGcc script in the ThirdParty folder and I think it should have been put in the bashrc script too, but apparently not always do we want to build at full power...

Good luck,
Bruno

peterwy April 27, 2010 07:24

Hello Bruno,

first the bad point ... recompile with the system compiler wasn't successful, I've the same problem as before.

Give paraview the link to the libOpenFOAM.so library and starting up paraview results in a segmentation fault.

Four your information:
The gcc version that I used:gcc-Version 4.4.1 [gcc-4_4-branch revision 150839] (SUSE Linux)

You've any other ideas?

Best regards,
Peter

wyldckat April 27, 2010 08:50

Hello Peter,

Just in case, try running this again now:
Code:

cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
./Allwclean
./Allwmake

It will force the plugin to be rebuilt.

Then do not forget to add the:
Code:

export LC_ALL=C
To the paraFoam script, at the beginning of the file, or just after the first block of comments.


After all of this, if it still seg faults, then.... well, then it's reaaaally weird what's going on! The only other thing that comes to mind is that you might have some other program folder added to the environment LD_LIBRARY_PATH variable that has some particular library that get's mixed up somehow in the middle of the look up of libraries.

So, you could try:
  1. before starting the OpenFOAM environment, run:
    Code:

    export LD_LIBRARY_PATH=
  2. If it still doesn't work, and in case your system is 64bit (x86_64), then install the package ia32libs (not 100% sure what's it's name in openSUSE).
  3. make sure you have installed properly the graphics card... although if you can use Paraview to open vtk files, without OpenFOAM library in the way, then it shouldn't be a graphics card problem.
And for now, I'm all out of ideas :(

Best regards,
Bruno

peterwy June 8, 2010 03:36

Hello,

to close this thread:
I tried nearly everything, but without any great success.

At the end, I got last week the updated source files over git. Now paraView starts but when using paraFoam the mesh is corrupted in most cases. Convert the mesh to vtk and read it in with the same reader works, so probably there's a bug and this will be fixed hopefully with the next release ...

Best Regards,
Peter

wyldckat June 8, 2010 19:22

Greetings Peter,
Quote:

Originally Posted by peterwy (Post 262039)
At the end, I got last week the updated source files over git.

Do you mean ParaView from git, or OpenFOAM from git?

If you mean ParaView, edit the $WM_PROJECT_DIR/bin/paraFoam script and change where it says ".OpenFOAM" to ".foam", because the plugin available starting from ParaView 3.8.0 can open properly the OpenFOAM cases... or at least it should ;) And last I saw, the git version of ParaView was already in version 3.9.0!

If you only mean OpenFOAM's git version, there is a thread that has a tweaked script for using foamToVTK+ParaView: http://www.cfd-online.com/Forums/ope...-parafoam.html

Best regards,
Bruno


All times are GMT -4. The time now is 09:50.