Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28381 Discussions

Input statement requires too much data

J__Emiliano_Deustua
2,448 Views

I get the following error message:

forrtl: severe (67): input statement requires too much data

when running a program that reads a sequential unformatted file (see below) compiled with ifort 16.0.3.

The interesting fact is that this error disappears if I compile with ifort 12.1.0 or if I compile with ifort 16.0.3 using the -qopenmp flag (which is very weird because I don't write the file using this flag).

This is the program that produces the error,

      program read
      integer n0,n1,n2,n3,m1,m2,m3,m4
      integer itol, ifr 
      integer i, j, k, l
      logical ifrhf
      real*8 eref, erepul, shift, shift1
      real*8, allocatable :: fockr(:,:), fockb(:,:)
      real*8, allocatable :: intr(:,:,:,:),intb(:,:,:,:),intm(:,:,:,:)

      open(unit=33,file='h8.inf',form='unformatted',
     &     status='old',access='sequential')
      rewind(33)
      read(33) n0,n1,n2,n3,ifrhf,itol,ifr,idiis,eref,erepul,shift,
     &     shift1,m1,m2,m3,m4
      print *, n0,n1,n2,n3,ifrhf,itol,ifr,idiis,eref,erepul,shift,
     &     shift1,m1,m2,m3,m4
      allocate(FockR(N3,N3))
      allocate(FockB(N3,N3))
      allocate(IntR(N0+1:N3,N0+1:N3,N0+1:N3,N0+1:N3))
      allocate(IntB(N0+1:N3,N0+1:N3,N0+1:N3,N0+1:N3))
      allocate(IntM(N0+1:N3,N0+1:N3,N0+1:N3,N0+1:N3))
      read(33) ((FockR(i,j),i=1,N3),j=1,N3)
      read(33) ((FockB(i,j),i=1,N3),j=1,N3)
      read(33) ((((IntR(i,j,k,l),i=N0+1,N3),j=N0+1,N3),
     &     k=N0+1,N3),l=N0+1,N3) 
      read(33) ((((IntM(i,j,k,l),i=N0+1,N3),j=N0+1,N3),
     &     k=N0+1,N3),l=N0+1,N3) 
      read(33) ((((IntB(i,j,k,l),i=N0+1,N3),j=N0+1,N3),
     &     k=N0+1,N3),l=N0+1,N3) 
      deallocate(FockR)
      deallocate(FockB)
      deallocate(IntR)
      deallocate(IntB)
      deallocate(IntM)
      close(33)
      end

Thank you in advance for any advice.

0 Kudos
1 Solution
Kevin_D_Intel
Employee
2,448 Views

It appears that you are hitting the known issue in PSXE 2016 Update 3 (16.0.3), https://software.intel.com/en-us/articles/read-failure-unformatted-file-io-psxe-16-update-3

If you happen to have PSXE 2016 Update 2 (16.0.2) available that's the best work around. The fix will be available in PSXE 2016 Update 4 in just a few weeks.

View solution in original post

0 Kudos
6 Replies
mecej4
Honored Contributor III
2,448 Views

Please provide the input file 'h8.inf'.

0 Kudos
J__Emiliano_Deustua
2,448 Views

Here it is.

Thank you!

0 Kudos
mecej4
Honored Contributor III
2,448 Views

I think that your program is not suitable for reading the file. On what kind of system was the unformatted file written? Do you know what the file is supposed to contain?

It does appear to have little-endian format, but the numbers do not make sense. For example, the value of N3 read from the file is 0. Since N3 is used to size several allocated arrays, the rest of the read statements make no sense.

0 Kudos
J__Emiliano_Deustua
2,448 Views

Here is the output of that program using ifort 12.1.0 on Linux:

                     0                     4                     4
                     8 T                     7                   222
                     8  -11.5796701333000        7.33682455890000     
  0.000000000000000E+000  0.000000000000000E+000                     3
                     5                     0                     0

And this is the output using ifort 16.0.3:

                     0                     4                     4
                     8 T                     7                   222
                     8  -11.5796701333000        7.33682455890000     
  0.000000000000000E+000  0.000000000000000E+000                     3
                     5                     0                     0
forrtl: severe (67): input statement requires too much data, unit 33, file /home/scratch/stoch-test/h8-stoch-as11-test/h8.inf
Image              PC                Routine            Line        Source             
a.out              00000000004061F9  Unknown               Unknown  Unknown
a.out              000000000041DAA6  Unknown               Unknown  Unknown
a.out              000000000041B663  Unknown               Unknown  Unknown
a.out              00000000004033DD  MAIN__                     26  test.f
a.out              000000000040252E  Unknown               Unknown  Unknown
libc.so.6          00007FD16373E291  Unknown               Unknown  Unknown
a.out              000000000040242A  Unknown               Unknown  Unknown

I tried to find a document explaining how the fortran compiler encodes the unformatted sequential files but I didn't find it. I'm right now trying to understand if the binary structure makes sense using od -A x -t x8, but again, I'm not sure how the files are codified.

What draws my attention is the fact that the older ifort is doing fine, and the fact that adding the openmp flag fixes things.

Thank you again for your help!

0 Kudos
Kevin_D_Intel
Employee
2,449 Views

It appears that you are hitting the known issue in PSXE 2016 Update 3 (16.0.3), https://software.intel.com/en-us/articles/read-failure-unformatted-file-io-psxe-16-update-3

If you happen to have PSXE 2016 Update 2 (16.0.2) available that's the best work around. The fix will be available in PSXE 2016 Update 4 in just a few weeks.

0 Kudos
J__Emiliano_Deustua
2,448 Views

Kevin D. (Intel) wrote:

It appears that you are hitting the known issue in PSXE 2016 Update 3 (16.0.3), https://software.intel.com/en-us/articles/read-failure-unformatted-file-io-psxe-16-update-3

If you happen to have PSXE 2016 Update 2 (16.0.2) available that's the best work around. The fix will be available in PSXE 2016 Update 4 in just a few weeks.

Thank you Kevin. I will wait for the update 4 and work with the old compiler in the meanwhile.

Best.

0 Kudos
Reply