Quantcast
Channel: Intel® Software - Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2746

fortran sequential access

$
0
0

I uses the intel compiler v18.

I'm faced with a problem reading data of unformatted sequential access type.

It seems that intel compiler regards separated records as a one record.

for instance, I attached two sample files.

one of them is a "write.f90" which is a file to write a sample data through unformatted sequential access.

and the other is a "read.f90" that is a file to read the data and write those on screen.

I tried to read separated two records as a one record once. But, this try may make a error message.

Actually, "gnu fortran compiler" produces following error message.

At line 10 of file read.f90 (unit = 11, file = './output.bin')

Fortran runtime error: I/O past end of record on unformatted file

And, other compiler "pgi compiler" also produces following message.

PGFIO-F-219/unformatted read/unit=11/attempt to read/write past end of record.

File name = ./output.bin    unformatted, sequential access   record = 1

In source file read.f90, at line number 10

similarly, "intel compiler" of other version produces error message.

forrtl: severe (67): input statement requires too much data, unit 11, file /home/./output.bin

Image              PC                Routine            Line        Source             

a.out              00000000004674FE  Unknown               Unknown  Unknown

a.out              0000000000465F96  Unknown               Unknown  Unknown

a.out              0000000000440B52  Unknown               Unknown  Unknown

a.out              000000000042BE5B  Unknown               Unknown  Unknown

a.out              000000000042B3C2  Unknown               Unknown  Unknown

a.out              000000000040EE92  Unknown               Unknown  Unknown

a.out              000000000040CA59  Unknown               Unknown  Unknown

a.out              0000000000402B86  Unknown               Unknown  Unknown

a.out              0000000000402A7C  Unknown               Unknown  Unknown

libc.so.6          0000003AADC1ED1D  Unknown               Unknown  Unknown

a.out              0000000000402979  Unknown               Unknown  Unknown

However, intel compiler v18 does not produce "error message" and print the values. 

   1.00000000000000        1.00000000000000        1.00000000000000     

   1.00000000000000        1.00000000000000        1.00000000000000     

   1.00000000000000        1.00000000000000        1.00000000000000     

   1.00000000000000        2.00000000000000        2.00000000000000     

   2.00000000000000        2.00000000000000        2.00000000000000     

   2.00000000000000        2.00000000000000        2.00000000000000     

   2.00000000000000        2.00000000000000

 

I think "that do not print error message" is a problem.    

Because, i usually access data through unformatted sequential access, this error makes me very confused. 

What should i do? Please, help me.

AttachmentSize
Downloadapplication/octet-streamwrite.f90265 bytes
Downloadapplication/octet-streamread.f90267 bytes

Viewing all articles
Browse latest Browse all 2746

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>