|
[Sponsors] |
March 13, 2005, 21:13 |
Segmentation fault???
|
#1 |
Guest
Posts: n/a
|
I am doing numerical simulation under Red Hat Linux9.0 , but I met error sometime, and " Segmentation fault" is printed to the screen and the program stopped, I do not know why this happens, Help needed.
Thanks in advance! |
|
March 13, 2005, 22:54 |
Re: Segmentation fault???
|
#2 |
Guest
Posts: n/a
|
A segmentation fault generally points to a memory address error - usually caused by overrunning an array, in my experience. Try compiling with a -C option (for most compilers this enables array boundary checking) and see if it gives you any information when the program crashes.
|
|
March 14, 2005, 13:21 |
Re: Segmentation fault???
|
#3 |
Guest
Posts: n/a
|
Yes u r right? It happens to me when I forget to deallocate the arrays at the end of the program.(after allocating them at some point in the program). Hope it helps Bye
|
|
March 18, 2005, 14:25 |
Re: Segmentation fault???
|
#4 |
Guest
Posts: n/a
|
Just compile ur code using -g option eg $gcc -lm -g test.c
and then do $gdb a.out $gdb run Mostly program will crash, then type $gdb where It will show u the location of problem in ur code. Regards Sandip Jadhav -- http://www.aero.iitb.ac.in/userpages/sandipj |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Paraview - Segmentation fault | grjmell | ParaView | 5 | January 9, 2024 14:14 |
Segmentation fault when running dieselFoam or dieselEngineFoam in parallel | francesco | OpenFOAM Bugs | 4 | May 2, 2017 22:59 |
Debugging a segmentation fault? | hansel | OpenFOAM Bugs | 3 | July 31, 2010 14:13 |
ParaView segmentation fault only for multiphase | gwierink | OpenFOAM | 9 | March 25, 2010 08:23 |
KIVA and Segmentation Fault | Felix | Main CFD Forum | 2 | January 18, 2006 02:24 |