Sorry, this is not really a specifically Beowulf issue (although the problem
program is trying to run on a Beowulf). But I hope that someone here
may be familiar with the idiosyncrasies of Fortran compilers?
I'm trying to read a raw binary file in a Fortran program. Using Gnu
(gfortran) or PGI fortran I can do it with a simple loop as shown in this test
program:
program testread
implicit none
integer icells
character*1 cell
open(unit=19,file='cylinder.raw',status='old', &
access='DIRECT',recl=1, form='unformatted')
do icells=1,4000000
read (19,rec=icells) cell
end do
close(19)
stop
end program testread
I.e. unformatted with direct access and a fixed record length gives me
raw byte access. But someone has now tried my program with the Intel
compiler, and they report an error:
forrtl: severe (36): attempt to access non-existent record, unit 19,
file /some/path/cylinder.raw
The file in question is long enough that the end of file should not
be encountered, so that does not seem to be the problem.
Am I right in guessing that my raw binary read trick does not work
on Intel Fortran? Is there another option I need to pass
(e.g. perhaps form='binary')?
<BR>