Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

BACKSPACE issue with different Intel Compiler version

$
0
0

Hi all,
I notice a difference between two different version of the same Fortran77  code compiled with 2011 and 2017 Intel Compiler.

The code is quite simple:

  • it opens an ASCII file and read it until a specific line, containing an integer number, N
  • the data from the next N lines are stored into an array
  • now - with the backspace command - we return to the position where data were stored and overwrite data with new values (elaborated somewhere else)

I can't post the full code here, but I prepare a simplified example below.

          open(2,file=filename,status='old')
c
		  read(2,*) N
		  do ii=1,N
		     read(2,*)  X(ii),Y(ii),Z(ii),T(ii)
		  enddo
c
		  do ii=1,N
			backspace(2)
		  enddo
c
		  do ii=1,N
			write(2,*) X(ii),Y(ii),Z(ii),T2(ii)
		  enddo

With a version of the code compiled with Intel 2011 compiler, the output is good, while if I compile with 2017 version, backspace does not work, and data are not overwritten, but stored "under" old data.

Sorry for my English, I hope that someone can help me.

Lorenzo


Viewing all articles
Browse latest Browse all 5691

Trending Articles