Re: forrtl: severe (174): SIGSEGV due to output file.
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Mon, 04 Aug 2008 14:14:09 -0800
fj wrote:
(snip)
I doubt that a too large initial time step could lead to a
segmentation fault. In changing the initial time step, you have
changed the behavior of the program and avoided the bug by chance.
In a properly written program it shouldn't happen, but there
are always ways for things to go wrong.
One that I haven't seen happen in C, but have wondered about
relates to C's internal I/O and the way formatting works.
In C, the width of a formatted output item expands as needed.
char str[400];
sprintf(str,"%f",x);
400 characters should be big enough for any floating
point output conversion, right? I could even believe
a bug in the Fortran library related to output conversion.
A numerical instability is usually very fast and leads to floating
underflow or overflow messages, not to a segmentation fault.
It might lead to negative values in a place that was unexpected.
The program might test for it, and then find an otherwise
hidden bug in code that was never tested.
It would be best to find the real cause. It might cause
wrong answers even when it seems like it works.
-- glen
.
- Follow-Ups:
- Re: forrtl: severe (174): SIGSEGV due to output file.
- From: John Harper
- Re: forrtl: severe (174): SIGSEGV due to output file.
- From: habzone2007
- Re: forrtl: severe (174): SIGSEGV due to output file.
- References:
- forrtl: severe (174): SIGSEGV due to output file.
- From: habzone2007
- Re: forrtl: severe (174): SIGSEGV due to output file.
- From: Gordon Sande
- Re: forrtl: severe (174): SIGSEGV due to output file.
- From: habzone2007
- Re: forrtl: severe (174): SIGSEGV due to output file.
- From: habzone2007
- Re: forrtl: severe (174): SIGSEGV due to output file.
- From: dpb
- Re: forrtl: severe (174): SIGSEGV due to output file.
- From: glen herrmannsfeldt
- Re: forrtl: severe (174): SIGSEGV due to output file.
- From: habzone2007
- Re: forrtl: severe (174): SIGSEGV due to output file.
- From: habzone2007
- Re: forrtl: severe (174): SIGSEGV due to output file.
- From: dpb
- Re: forrtl: severe (174): SIGSEGV due to output file.
- From: fj
- forrtl: severe (174): SIGSEGV due to output file.
- Prev by Date: Anybody remember this compiler option?
- Next by Date: Re: forrtl: severe (174): SIGSEGV due to output file.
- Previous by thread: Re: forrtl: severe (174): SIGSEGV due to output file.
- Next by thread: Re: forrtl: severe (174): SIGSEGV due to output file.
- Index(es):
Relevant Pages
|