From: Arjan on
Hi!

Today I found out that my otherwise nicely running utility to
make .bmp-files from 2D data malfunctioned. Using g95 and Portland
there is no problem, but with ifort (version 11.0) the resulting .bmp-
files are suddenly exactly 4 times larger than before! The bitmap
files are now unusable.

The RGB data are stored in a structure declared as:

INTEGER (KIND=1),dimension(:,:,:), ALLOCATABLE :: bmp_data

The routine that generates the .bmp-file opens its destination as
follows:

OPEN(ScratchFile,FILE=FName,ACCESS='DIRECT', RECL=1,
STATUS='replace')

I thought that RECL would specify the number of BYTES in a record.
Apparently, ifort uses it to count the number of "words", or something
else. Maybe there is a minimum record length?

--> How can I tell ifort to use my RECL as BYTES and not as 4-BYTE
units?

Regards,


Arjan
From: Arjan on
Hmm. This was an RTFM. Sorry!

"-assume byterecl"

A.
From: JB on
On 2010-02-18, Arjan <arjan.van.dijk(a)rivm.nl> wrote:
> I thought that RECL would specify the number of BYTES in a record.

No, it specifies the record length in processor-specific units. Though
in F2003 there is a recommendation that implementations use an octet
as the unit.

> Apparently, ifort uses it to count the number of "words", or something
> else. Maybe there is a minimum record length?

Presumably it cannot be less than one bit.

> --> How can I tell ifort to use my RECL as BYTES and not as 4-BYTE
> units?

"-assume byterecl" or somesuch, IIRC.

--
JB