Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
looking for a strategy with segmentation fault
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
yairsuari  
View profile  
 More options Dec 19 2008, 2:03 am
Newsgroups: comp.lang.fortran
From: yairsuari <yairsu...@gmail.com>
Date: Thu, 18 Dec 2008 23:03:42 -0800 (PST)
Local: Fri, Dec 19 2008 2:03 am
Subject: looking for a strategy with segmentation fault
my program crashes after some 30 min running with a segmentation
fault.
the line it flies in is definately not an array over bounds i also
check this by the compiler with ifort "-check  "all.
it took me ages to find out what the problem was because i could not
use a debugger and when i tried print debugging the line where it
happened seemed to be moving around currently the program crashes
here:
      write(6,*)'line 939 size dum',size(dum)
my question is:
is there a known way to find out the cause of this problem and more
specifically who owns this memory adress, if it exists and who was the
last process to write there? (i have to use the intel debugger since
this is a module)
thanks for any help

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arjen Markus  
View profile  
 More options Dec 19 2008, 3:03 am
Newsgroups: comp.lang.fortran
From: Arjen Markus <arjen.mar...@wldelft.nl>
Date: Fri, 19 Dec 2008 00:03:36 -0800 (PST)
Local: Fri, Dec 19 2008 3:03 am
Subject: Re: looking for a strategy with segmentation fault
On 19 dec, 08:03, yairsuari <yairsu...@gmail.com> wrote:

> my program crashes after some 30 min running with a segmentation
> fault.
> the line it flies in is definately not an array over bounds i also
> check this by the compiler with ifort "-check  "all.
> it took me ages to find out what the problem was because i could not
> use a debugger and when i tried print debugging the line where it
> happened seemed to be moving around currently the program crashes
> here:
>       write(6,*)'line 939 size dum',size(dum)
> my question is:
> is there a known way to find out the cause of this problem and more
> specifically who owns this memory adress, if it exists and who was the
> last process to write there? (i have to use the intel debugger since
> this is a module)
> thanks for any help

There are no foolproof receipes for situations like this. But I would
advise you to try it with another compiler. Chances are the program
will crash in a different way and that may help pinpoint the
underlying
cause.

Other things you can try (if you do not already) is:
- Use "implicit none" in every module and separate subprogram
- Put everything in a module to make sure the interfaces can be
checked
- Tools like valgrind or strace may help to tackle the problem

As the problem moves around when you introduce write statements, it is
likely to be an array bound violation or a pointer problem. Are you
using pointers in your program? That is one thing to watch out for:
deallocated memory that you still refer to.

Regards,

Arjen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian Bush  
View profile  
 More options Dec 19 2008, 3:43 am
Newsgroups: comp.lang.fortran
From: Ian Bush <ianbush.throwaway.acco...@googlemail.com>
Date: Fri, 19 Dec 2008 00:43:08 -0800 (PST)
Local: Fri, Dec 19 2008 3:43 am
Subject: Re: looking for a strategy with segmentation fault
On 19 Dec, 08:03, Arjen Markus <arjen.mar...@wldelft.nl> wrote:

I want to second Arjen's recommendations ( an argument mismatch
would be my bet, possibly caused by implicit typing ) , but would
also like to add that if all possible you should get a debugger
on any system that you develop on. I realize it might not be your
decision, but really the amount of effort that can be save by having
one makes it well worthwhile,

Ian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Craig Powers  
View profile  
 More options Dec 19 2008, 2:09 pm
Newsgroups: comp.lang.fortran
From: Craig Powers <craig.pow...@invalid.invalid>
Date: Fri, 19 Dec 2008 14:09:50 -0500
Local: Fri, Dec 19 2008 2:09 pm
Subject: Re: looking for a strategy with segmentation fault

I would strongly recommend double-checking procedure interfaces.  The
ifort -check all option takes care of bounds checks (and, depending on
the compiler version, uninitialized variable access), but it does not do
checking on implicit interfaces.  That's the most likely source of
trashing memory that wouldn't be caught by the bounds checks.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
yairsuari  
View profile  
 More options Dec 20 2008, 12:52 am
Newsgroups: comp.lang.fortran
From: yairsuari <yairsu...@gmail.com>
Date: Fri, 19 Dec 2008 21:52:42 -0800 (PST)
Local: Sat, Dec 20 2008 12:52 am
Subject: Re: looking for a strategy with segmentation fault
On Dec 19, 12:43 am, Ian Bush

I do have a debugger, it just took me more then a month to use it on a
module(sorry for being unclear).
just a small question what is an implicit typing?
thanks for the help
yair

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
user1  
View profile  
 More options Dec 21 2008, 7:48 pm
Newsgroups: comp.lang.fortran
From: user1 <u...@example.net>
Date: Sun, 21 Dec 2008 19:48:16 -0500
Local: Sun, Dec 21 2008 7:48 pm
Subject: Re: looking for a strategy with segmentation fault

yairsuari wrote:

[snip]

> just a small question what is an implicit typing?
> thanks for the help
> yair

It's based on first letter of variable name. A-H and O-Z default to real, I-N
are integer.

Therefore, God is real, unless declared integer, logical, character ;-)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
robin  
View profile  
 More options Dec 28 2008, 7:26 pm
Newsgroups: comp.lang.fortran
From: "robin" <robi...@bigpond.com>
Date: Mon, 29 Dec 2008 00:26:08 GMT
Local: Sun, Dec 28 2008 7:26 pm
Subject: Re: looking for a strategy with segmentation fault
"yairsuari" <yairsu...@gmail.com> wrote in message

news:b29757de-5e61-47c6-a32a-c1d760c8617a@f40g2000pri.googlegroups.com...

> my program crashes after some 30 min running with a segmentation
> fault.
> the line it flies in is definately not an array over bounds i also
> check this by the compiler with ifort "-check  "all.
> it took me ages to find out what the problem was because i could not
> use a debugger and when i tried print debugging the line where it
> happened seemed to be moving around currently the program crashes
> here:
>       write(6,*)'line 939 size dum',size(dum)
> my question is:
> is there a known way to find out the cause of this problem and more
> specifically who owns this memory adress, if it exists and who was the
> last process to write there? (i have to use the intel debugger since
> this is a module)

Your query is like "My car won't start; what's wrong with it?"

You need to post at least one subroutine,
and to tell us how you have interfaced it.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »