Re: Stackdump issues
- From: "Bijan Minaee" <bijan.minaee@xxxxxxxxxxxxxx>
- Date: Tue, 13 Jun 2006 15:08:26 +0100
Gentlemen
Many many thanks for your kind responses.
My source file has the following statements which did on previous occasions
funtion quite smoothly.
These are
OPEN(UNIT=50,FILE='LOSS.DAT', STATUS='OLD')
OPEN(UNIT=60, FILE='LOSS.OUT', STATUS='UNKNOWN')
OPEN(UNIT=70,FILE='LOSS.GRF', STATUS='UNKNOWN')
The source file compiles seemlessly under GNU f77 . However when the
executable is run, LOSS.OUT does not receive any output, whilst LOSS.GRF now
prints :
inaccesible number : incomprehensible list input
apparent state: uniot 50 named loss.dat
......(etc.) as before
I might also add that all above files are created under using emacs.
I hope these throw more useful light unto this problem.
Once again many thans for any input.
Having several times tried to run the executable
"Richard E Maine" <nospam@xxxxxxxxxxxxx> wrote in message
news:1hgt6x7.109t7rp1ahopyaN%nospam@xxxxxxxxxxxxxxxx
Tim Prince <timothyprince@xxxxxxxxxxxxx> wrote:
Bijan Minaee wrote:
list in : end of file
apparent state: unit 50 named fort.50
last format :list io
lately reading direct formatted external IO
0
It would appear that the source of problem is the confused EOF
character.
(Is there anything specific on this issue?).
Also reference to formatted external IO is puzzling as this did not
present
any previous obstacle.
The message appears to say this file was being read with ACCESS='DIRECT'
which would account for problems with endfile detection.
Interchangeability of direct and sequential access is probably not a
portable assumption.
Yes. I'm slightly confused by a few things here, but at least we now
have some data to work with. (A lot more data than an iostat= error code
would have told us, I might add).
Note, by the way, that the message isn't saying that there is anything
wrong with doing formatted I/O. That line begining with "lately" is just
telling you some status information about what is going on. It doesn't
say that formatted I/O is a problem - just that you happened to be doing
formatted I/O "lately" (i.e. recently) on the file.
Also note that there is no concept of an "EOF character" in Fortran. I'm
not sure what you are suggesting there.
One puzzling part, as Tim notes, is the reference to direct access and
end-of-file. In the standard, those two concepts don't go together,
although some compilers allow them to. Also, list-directed I/O on a
direct access file is at least slightly unusual. In fact, I find it odd
to have formatted direct access at all, though I have seen it. So I
guess my first question is whether you are actually doing direct access,
intentionally or not? I'm not sure whether you are intentionally doing
direct access, accidentally doing so, or whether the compiler's message
is just misleading on that matter. Other matters...
I note that the file name appears to be fort.50, which suggests to me
that you might not be using an OPEN statement for the file. I must admit
that is slightly odd, though, as you can't do direct access without an
OPEN. It is certainly possible to use an OPEN and have a file name like
that, so this might be a misdirection on my part, but it does catch my
eye. The general question is whether you do have an OPEN statement and
what it looks like?
Speaking of file names, is there a chance that you just got the file
name wrong in any of several ways? If you try to read from the wrong
file (such as one that doesn't exist), you are likely to get an
end-of-file condition or some kind of error.
Finally, I note the combination of list-directed I/O and end-of-file. It
is easy to accidentally hit and end-of-file condition with list-directed
I/O because list-directed reads will read multiple records (lines) if
they don't find the number of expected fields on the first line.
That's about as much as I can usefully comment without seeing source
code.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.
- Follow-Ups:
- Re: Stackdump issues
- From: Richard E Maine
- Re: Stackdump issues
- References:
- Stackdump issues
- From: Bijan Minaee
- Re: Stackdump issues
- From: Dan Nagle
- Re: Stackdump issues
- From: Richard Maine
- Re: Stackdump issues
- From: Bijan Minaee
- Re: Stackdump issues
- From: Tim Prince
- Re: Stackdump issues
- From: Richard E Maine
- Stackdump issues
- Prev by Date: Re: Converting fixed-to-free format
- Next by Date: Re: Converting fixed-to-free format
- Previous by thread: Re: Stackdump issues
- Next by thread: Re: Stackdump issues
- Index(es):
Relevant Pages
|