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

Segmentation fault

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2005, 16:54
Default Hello, I installed OpenFOAM
  #1
Senior Member
 
Billy
Join Date: Mar 2009
Posts: 167
Rep Power: 17
billy is on a distinguished road
Hello,

I installed OpenFOAM 1.0.2 on two similiar systems. On the first everyhting went quite smoothly. However, during the second installation everything seemed to go fine until I tried to run FoamX or paraFoam. The error given was "segmentation fault" and both systems have the exact same software installed: Suse 9.2. Alhtough, I cannot start paraview or FoamX, the cases can be run from the terminal.

Does anyone know what is wrong?

Thanks in advance.
billy is offline   Reply With Quote

Old   April 11, 2005, 05:23
Default Your Open-GL set up is incorre
  #2
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Your Open-GL set up is incorrect. Wrong driver? Get a simple GL program (glxinfo, glxgears) and see if it runs. Check the X-server log files.
mattijs is offline   Reply With Quote

Old   April 12, 2005, 09:30
Default The only difference between th
  #3
Senior Member
 
Billy
Join Date: Mar 2009
Posts: 167
Rep Power: 17
billy is on a distinguished road
The only difference between the 2 systems is that on one (the one that produces the segmentation fault)there is a problem with starting PCMCIA which can be related with the wireless card.

I have seen that both paraFoam and FoamX seem to run on networks. Can this be the problem?

I do not think it is related with OpenGL drivers but I will check this better.
billy is offline   Reply With Quote

Old   April 14, 2005, 18:14
Default When I enter runFoamX, I recie
  #4
Senior Member
 
Billy
Join Date: Mar 2009
Posts: 167
Rep Power: 17
billy is on a distinguished road
When I enter runFoamX, I recieve the following error (line 131: Segmentation fault):

Jobs overview (from $FOAM_JOB_DIR):
Running : 0
Finished : 0

Some of the jobs reported as running might actually no longer be running.
You can these remove old jobInfo using the FoamX ProcessEditor or with the
foamCheckJobs script.

Starting NameServer with inet:linux:1234 ...
Starting FoamX Host Browser with inet:linux:1234 ...
/home/billy/OpenFOAM/OpenFOAM-1.0.2/applications/utilities/preProcessing/FoamX/b in/runFoamXHB: line 131: 11655 Segmentation fault FoamXHostBrowser -ORBNamingAddr $myIOP
runFoamXHB : cleanup
runFoamXHB: Killing name server nsd(pid 11651).
/home/billy/OpenFOAM/OpenFOAM-1.0.2/applications/utilities/preProcessing/FoamX/b in/runFoamXHB: line 66: 11651 Killed nsd -ORBIIOPAddr $myIOP --ior $FOAMX_USER_CONFIG/ns.ref </dev/null
billy is offline   Reply With Quote

Old   April 15, 2005, 06:46
Default Your FoamXHostBrowser has cras
  #5
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Your FoamXHostBrowser has crashed. You probably don't have networking setup or you don't have 'localhost' and the machine name in the /etc/hosts. There is a section in the toplevel README file about this.
mattijs is offline   Reply With Quote

Old   April 24, 2005, 14:37
Default First of all, I would like to
  #6
Senior Member
 
Billy
Join Date: Mar 2009
Posts: 167
Rep Power: 17
billy is on a distinguished road
First of all, I would like to congratulate the OpenFOAM team for this execellent software. I have run worked on some examples and I am very impressed.

In relation to this problem, I have checked the OpenGL drivers and they are OK. I also checked the file /etc/hosts and the localhost is defined with address 127.0.0.1. When I check the installation with foamInstallationTest, everything seems OK. It can ping the localhost and no problem seems to be present in the list.

Further suggestions are very welcome.

Thank you,

Billy.
billy is offline   Reply With Quote

Old   April 24, 2005, 17:24
Default Can you do ssh linux or
  #7
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Can you do

ssh linux

or

rsh linux?

Do you have permission to open port 1234 on your machine (linux)?
mattijs is offline   Reply With Quote

Old   April 25, 2005, 05:49
Default rsh does not work. ssh lin
  #8
Senior Member
 
Billy
Join Date: Mar 2009
Posts: 167
Rep Power: 17
billy is on a distinguished road
rsh does not work.

ssh linux gives output:

The autenticity of host 'linux (192.168.205.76)' can't be established.
...
Are you sure you want to continue connecting (yes/no)?

I entered yes and then when I run ssh linux again it asks for a password.

Note: I installed OpenFOAM on 2 laptops, which are not connected to a network at this time.

Since I am a newbie to linux, I don't know how to check if I have permission on port 1234. BTW, I ran the same command on the other laptop on which OpenFOAM is working fine and the output is the same. Is it possible that it has to do with the network card configuration?
billy is offline   Reply With Quote

Old   April 25, 2005, 06:27
Default To enable password-less ssh ty
  #9
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
To enable password-less ssh type "man ssh-keygen" which will give you instructions on how to enable this feature.

Getting rsh to work on the more recent linux distros is more tricky and involves activating the various rsh deamons and utilities. This is done in Suse via Yast in the "network services"->"network services(initd)" interface.
eugene is offline   Reply With Quote

Old   April 25, 2005, 07:24
Default Thank you very much for all yo
  #10
Senior Member
 
Billy
Join Date: Mar 2009
Posts: 167
Rep Power: 17
billy is on a distinguished road
Thank you very much for all your help. I have solved the problem with the installation. The problem was that I always compiled the sources. By not compiling from the sources the programs worked OK. (Please remember I am a total nob using linux. The only reason I changed to linux was to use OpenFOAM but now I like it much more than any other OS.)

As I mentioned I made two OpenFOAM installations on two laptop systems running Suse 9.2. I think I mixed up the gcc versions (Suse version and OpenFOAM version) when I compiled the sources and on one of them this worked and on the other it did not work.

The funny thing is that I am almost sure I ran Allwmake with the environment variables defined correctly and linked to the gcc version supplied with OpenFOAM and afterwards I had the segmentation fault errors.

On the other I had compiled the sources with gcc which came with Suse and it worked fine.

Since I am a newbie to linux, this is very confusing for me. Can there be some option that is activated in the Suse's version and not on the other version?
billy is offline   Reply With Quote

Old   April 25, 2005, 13:16
Default Don't know about the option. D
  #11
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Don't know about the option. Do 'gcc -v' to see the configuration options.

The gcc we ship is the exact one we created the binaries with and works fine for us so I don't really know what and how.
mattijs is offline   Reply With Quote

Old   March 27, 2007, 22:43
Default i have the same problem as Bil
  #12
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
i have the same problem as Billy, and i'm really frustrated. i have tried ssh VM, and passwordless is okay, and when i installFoamtest all OKAY, and when i telnet 127.0.0.1:1234,
[Daniel@VM ~]$ telnet VM 1234
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host: Connection refused
but still:
[Daniel@VM ~]$ FoamX
Starting NameServer with inet:VM:1234 ...
Starting FoamX Host Browser with inet:VM:1234 ...
/home/Daniel/OpenFOAM/OpenFOAM-1.3/bin/runFoamXHB: line 131: 19267 Segmentation fault FoamXHostBrowser -ORBNamingAddr $myIOP
runFoamXHB : cleanup
runFoamXHB: Killing name server nsd(pid 19261).
/home/Daniel/OpenFOAM/OpenFOAM-1.3/bin/runFoamXHB: line 66: 19261 Killed nsd -ORBIIOPAddr $myIOP --ior $FOAMX_CONFIG/ns.ref </dev/null
Can anyone help me, thanks in advance!
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email
lakeat is offline   Reply With Quote

Old   March 28, 2007, 03:48
Default If I do telnet 127.0.0.1:1234
  #13
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
If I do telnet 127.0.0.1:1234 I get

telnet: 127.0.0.1:1234: Name or service not known
127.0.0.1:1234: Unknown host

Looks like you have some protection issue. Is this the SElinux issue (search this board)?
mattijs is offline   Reply With Quote

Old   March 28, 2007, 05:15
Default Hi, Mattijs, thank you for you
  #14
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Hi, Mattijs, thank you for your reply.
My SElinux has been disabled many days before since i found some in this board suggesting about that, and i also turned off firewall and reboot many times...
I'm a newbie to linux world, according to many board' posts, i found my /etc/hosts or hosts.conf is not bad.
I use Fedora core 6, and openFoam-1.3, so far I found blockMesh or paraFoam or icoFoam or icoStructFoam and so on works, but I just want to have my FoamX work (yes, It worked two days before for one time, just one time). I have kept being entangled on this issue for 3 weeks.
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email
lakeat is offline   Reply With Quote

Old   March 28, 2007, 17:07
Default Try not mapping your 'VM' to l
  #15
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Try not mapping your 'VM' to localhost (127.0.0.1) but instead to its real ip address.

As some kind of security measure Corba does not seem to like to connect to localhost.
mattijs is offline   Reply With Quote

Old   March 28, 2007, 23:03
Default Do you mean to change VM 's IP
  #16
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Do you mean to change VM 's IP address to real IP address?
After mapping 'VM' to real IP address, I get
"uncought mico exception..." as some posts have mentioned, and i have tried to figure it out, but
What can i do?
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email
lakeat is offline   Reply With Quote

Old   March 29, 2007, 04:34
Default From your post: Daniel@VM ~
  #17
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
From your post:

[Daniel@VM ~]$ telnet VM 1234
Trying 127.0.0.1...

So either VM is not in /etc/hosts or it is given the 127.0.0.1 address.

If I do the same on my machine I get 'Trying : 10.0.0.250' which is my ip address.

telnet hunt 1234
Trying 10.0.0.250...
telnet: connect to address 10.0.0.250: Connection refused
mattijs is offline   Reply With Quote

Old   March 29, 2007, 23:53
Default Check your host alias in the h
  #18
Senior Member
 
Billy
Join Date: Mar 2009
Posts: 167
Rep Power: 17
billy is on a distinguished road
Check your host alias in the host configuration.

IP: 127.0.0.1 Alias: VM

If you are using Suse, goto to yast to set it. I found that if the alias is not set up FoamX won't start.


Billy
billy is offline   Reply With Quote

Old   March 31, 2007, 22:08
Default Hello, now i continue getting
  #19
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Hello, now i continue getting only when sentence "Segmentation faults", when i type "icoFoam . cavity", which used to work very well before! I'm not sure where i changed?
therefore, firstly, I recompiled the source codes by type ./Allwmake, and after a long time, it finished, and I still got "Segmentation faults", then according to the wiki instruction, I swiched WM_COMPILE_OPTION set to Debug, and after a long long time I got some messages below, what's the problem, can anybody help me, much appreciated!



------------------------------------------------
SOURCE_DIR=.
SOURCE=chemkinToFoam.C ; g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-30 -I/home/Daniel/OpenFOAM/OpenFOAM-1.3/src/thermophysicalModels/specie/lnInclude -I/home/Daniel/OpenFOAM/OpenFOAM-1.3/src/thermophysicalModels/combustion/lnInclu de -I/home/Daniel/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread -c $SOURCE -o Make/linuxGcc4DPDebug/chemkinToFoam.o
/home/Daniel/OpenFOAM/OpenFOAM-1.3/wmake/bashScripts/mkObjectDir /home/Daniel/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPDebug/chemkinToFo am
g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-30 -I/home/Daniel/OpenFOAM/OpenFOAM-1.3/src/thermophysicalModels/specie/lnInclude -I/home/Daniel/OpenFOAM/OpenFOAM-1.3/src/thermophysicalModels/combustion/lnInclu de -I/home/Daniel/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread Make/linuxGcc4DPDebug/chemkinToFoam.o -L/home/Daniel/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPDebug \
-lcombustionThermophysicalModels -lbasicThermophysicalModels -lspecie -lOpenFOAM -ggdb3 -DFULLDEBUG -liberty -o /home/Daniel/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPDebug/chemkinToFo am
/usr/bin/ld: cannot find -lOpenFOAM
collect2: ld returned 1 exit status
make: *** [/home/Daniel/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPDebug/chemkinToF oam] Error 1
+ cd miscellaneous
+ ./Allwmake
+ wmake foamDebugSwitches

SOURCE_DIR=.
SOURCE=foamDebugSwitches.C ; g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-30 -I/home/Daniel/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread -c $SOURCE -o Make/linuxGcc4DPDebug/foamDebugSwitches.o
/home/Daniel/OpenFOAM/OpenFOAM-1.3/wmake/bashScripts/mkObjectDir /home/Daniel/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPDebug/foamDebugSw itches
g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-30 -I/home/Daniel/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread Make/linuxGcc4DPDebug/foamDebugSwitches.o -L/home/Daniel/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPDebug \
-lFoamX -lFoamXServer -L/home/Daniel/OpenFOAM/OpenFOAM-1.3/src/mico-2.3.11/platforms/linuxGcc4DPDebug/ lib -lmicocoss2.3.11 -lmico2.3.11 -ldl -lGstream -lGL -lLESfilters -lODE -lcompressibleLESmodels -lfoamUtil -lbasicThermophysicalModels -lfiniteVolume -lcombustionThermophysicalModels -lcompressibleTurbulenceModels -ldieselSpray -ledgeMesh -lengine -lerrorEstimation -ldynamicMesh -lfaceDecompFiniteElement -lfiniteArea -lincompressibleTransportModels -lincompressibleTurbulenceModels -lincompressibleLESmodels -llagrangian -llaminarFlameSpeedModels -lliquids -lrandomProcesses -lsampling -lspecie -lthermophysicalFunctions -ltriSurface -lOpenFOAM -ggdb3 -DFULLDEBUG -liberty -o /home/Daniel/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPDebug/foamDebugSw itches
/usr/bin/ld: cannot find -lOpenFOAM
collect2: ld returned 1 exit status
make: *** [/home/Daniel/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPDebug/foamDebugS witches] Error 1
+ wmake foamInfoExec

SOURCE_DIR=.
SOURCE=foamInfoExec.C ; g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-30 -I/home/Daniel/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread -c $SOURCE -o Make/linuxGcc4DPDebug/foamInfoExec.o
/home/Daniel/OpenFOAM/OpenFOAM-1.3/wmake/bashScripts/mkObjectDir /home/Daniel/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPDebug/foamInfoExe c
g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-30 -I/home/Daniel/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread Make/linuxGcc4DPDebug/foamInfoExec.o -L/home/Daniel/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPDebug \
-lOpenFOAM -ggdb3 -DFULLDEBUG -liberty -o /home/Daniel/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPDebug/foamInfoExe c
/usr/bin/ld: cannot find -lOpenFOAM
collect2: ld returned 1 exit status
make: *** [/home/Daniel/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPDebug/foamInfoEx ec] Error 1
-------------------------------------------------
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email
lakeat is offline   Reply With Quote

Old   April 1, 2007, 04:08
Default Hi Daniel, From your posts +
  #20
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Hi Daniel,
From your posts
[16]+ Stopped ping VM
I get the impression that you are using Ctrl+Z to stop your processes. If this is the case then it might be a problem for FoamX since, the above mentioned sequence stops the process, but that in the linux terminology means: not running but still in memory. That also means: all the resources allocated for the process are still allocated, including different files on the harddisk.
Bottomline, when you want to kill a process in linux, use Ctrl+C not Ctrl+Z!
Your last post says the compilation did not go well. Remember, it is allways a good discipline to clean the previous compilation, using wcleanAll, before you start a completely new one.

I hope my long post will be helpful,
Dragos
dmoroian 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
[Technical] Segmentation fault in map msg30 OpenFOAM Meshing & Mesh Conversion 6 March 27, 2008 10:49
segmentation fault tipakorn Siemens 6 July 31, 2006 07:56
segmentation fault natesan Siemens 4 January 12, 2004 08:51
Segmentation fault Veebs Siemens 3 June 4, 2002 22:17
Segmentation fault Jose Sanchez Siemens 1 December 16, 2001 08:13


All times are GMT -4. The time now is 19:06.