Re: reading more data than the record size (RECL)
- From: "Kurt Kallblad" <kurt.kallblad@xxxxxxxx>
- Date: Sat, 12 Apr 2008 00:04:58 +0200
"ssheriff" <ssheriff3@xxxxxxxxx> wrote in message news:10ce0b89-bfea-4147-b9bf-41bc37eb685c@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am trying to recompile some old .for code with g95. The binary runs
fine, but I need to make the arrays larger. When I compile (g95 -o
a.exe b.for) the program runs until it gags on reading an
'unformatted' file:
here's the code:
open(unit=12, file=zbot_file, form='unformatted', status='old')
call read_write(0, 12, id, ny, nx, y0, dy, x0, dx, zbot)
***
subroutine read_write(mode, lun, id, ncol, nrow, col1, delcol,
&row1, delrow, array)
dimension array(1), work(1000)
character id*56
character pgm*8
read(unit=lun) id, pgm, ncol, nrow, nz, col1, delcol, row1,
delrow
The last line above is the one for which it says:
UNIT 12 "100USGS.grd " Fortran runtime error: Reading more data
than the record size (RECL)
The record length, in another program that transforms files, appears
to be 128, and I tried that with recl=128, but get the same messages.
Any tips on how to get around this?
TIA
I'm not familiar with g95 but as you say "old code" the statement
"dimension array(1),.." might be the problem. It was an old way to
handle assumed size arrays. A change to "array(*) ..." may be worth
to try.
Kurt
.
- Follow-Ups:
- Re: reading more data than the record size (RECL)
- From: glen herrmannsfeldt
- Re: reading more data than the record size (RECL)
- References:
- g95: reading more data than the record size (RECL)
- From: ssheriff
- g95: reading more data than the record size (RECL)
- Prev by Date: Re: Passing Array-valued functions TO procedures
- Next by Date: Re: reading more data than the record size (RECL)
- Previous by thread: Re: g95: reading more data than the record size (RECL)
- Next by thread: Re: reading more data than the record size (RECL)
- Index(es):
Relevant Pages
|
Loading