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

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

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 22, 2010, 05:05
Default OF 1.6.x installation, Suse 11.2, ParaView Segementation fault
  #1
New Member
 
Peter Wiemeyer
Join Date: Sep 2009
Location: Germany, Munich
Posts: 22
Rep Power: 16
peterwy is on a distinguished road
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
peterwy is offline   Reply With Quote

Old   April 22, 2010, 09:28
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   April 22, 2010, 10:38
Default
  #3
New Member
 
Peter Wiemeyer
Join Date: Sep 2009
Location: Germany, Munich
Posts: 22
Rep Power: 16
peterwy is on a distinguished road
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
peterwy is offline   Reply With Quote

Old   April 22, 2010, 10:54
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hello again,
Quote:
Originally Posted by peterwy View Post
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
__________________
wyldckat is offline   Reply With Quote

Old   April 22, 2010, 11:14
Default
  #5
New Member
 
Peter Wiemeyer
Join Date: Sep 2009
Location: Germany, Munich
Posts: 22
Rep Power: 16
peterwy is on a distinguished road
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
peterwy is offline   Reply With Quote

Old   April 22, 2010, 11:34
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   April 22, 2010, 13:24
Default
  #7
New Member
 
Peter Wiemeyer
Join Date: Sep 2009
Location: Germany, Munich
Posts: 22
Rep Power: 16
peterwy is on a distinguished road
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 is offline   Reply With Quote

Old   April 26, 2010, 03:50
Default
  #8
New Member
 
Peter Wiemeyer
Join Date: Sep 2009
Location: Germany, Munich
Posts: 22
Rep Power: 16
peterwy is on a distinguished road
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
peterwy is offline   Reply With Quote

Old   April 26, 2010, 06:29
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   April 26, 2010, 06:37
Default
  #10
New Member
 
Peter Wiemeyer
Join Date: Sep 2009
Location: Germany, Munich
Posts: 22
Rep Power: 16
peterwy is on a distinguished road
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
peterwy is offline   Reply With Quote

Old   April 26, 2010, 06:47
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________

Last edited by wyldckat; April 26, 2010 at 06:49. Reason: typo and bad phrasing fixed
wyldckat is offline   Reply With Quote

Old   April 27, 2010, 06:24
Default
  #12
New Member
 
Peter Wiemeyer
Join Date: Sep 2009
Location: Germany, Munich
Posts: 22
Rep Power: 16
peterwy is on a distinguished road
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
peterwy is offline   Reply With Quote

Old   April 27, 2010, 07:50
Default
  #13
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   June 8, 2010, 02:36
Default
  #14
New Member
 
Peter Wiemeyer
Join Date: Sep 2009
Location: Germany, Munich
Posts: 22
Rep Power: 16
peterwy is on a distinguished road
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
peterwy is offline   Reply With Quote

Old   June 8, 2010, 18:22
Default
  #15
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Peter,
Quote:
Originally Posted by peterwy View Post
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
__________________
wyldckat is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
OF 1.6 installation on SUSE 11.2 jonya OpenFOAM Installation 15 May 3, 2010 05:05
ParaView segmentation fault only for multiphase gwierink OpenFOAM 9 March 25, 2010 07:23
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 21:41
[OpenFOAM] Segmentation fault with paraFoam and paraview 3.6.1 on Fedora 11 32 and 64 bit nanes ParaView 2 September 11, 2009 09:12
Paraview installation troubles jjhall OpenFOAM Installation 3 April 17, 2008 12:59


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