Re: variable content lost
- From: "Beliavsky" <beliavsky@xxxxxxx>
- Date: 30 Mar 2007 16:17:35 -0700
On Mar 30, 6:47 pm, "Listad" <lis...@xxxxxxxxx> wrote:
When you are using one compiler and getting stuck, its a good idea to
try another one. G95 is free and available on Mac OSX.
Ok, I'll try that on the weekend. But I am just so happy that I setup
my IDE, Makefile and ddd to work together hand in hand ... :)
Are you sure that that all the arrays passed to segment_distance have
dimension 3?
Yes, confirmed that by putting 'print *, fib%r(m,:)' above the
problematic section.
Is the subroutine in a MODULE (which I recommend)?
Yes. All the code quoted here is in the same module which is the only
module in the file.
Can you change the subroutine above to use assumed-shape array arguments
so that it looks like
Done. check says the size is 3.
This might be completely unrelated, but I had trouble earlier with the
values of these arrays. Whenever I tried 'print *, fib%r(m,:)' in my
code the first element of the array changed to sth like 2.932434E-310.
In addition to that I either got 'segmentation fault' or a 'malloc-
exception'. After I changed the print statements to write statements
with explicit format the problem dissapeared ...
A common symptom of a program bug is that changing the program gives
"completely unrelated" changes in output. Have you turned debugging
options in gfortran? You could use
-W -Wall -pedantic-errors -std=f95 -fbounds-check
You can check your code online for compile-time warnings:
Lahey http://www.lahey.com/check.htm
NAG http://cpc.cs.qub.ac.uk/SyntaxChecker.html
.
- References:
- variable content lost
- From: listad
- Re: variable content lost
- From: Beliavsky
- Re: variable content lost
- From: Listad
- variable content lost
- Prev by Date: Re: variable content lost
- Next by Date: Re: Sample polling program code?
- Previous by thread: Re: variable content lost
- Next by thread: Re: variable content lost
- Index(es):