I\'m having a runtime error when I run a code that works without problems using a different computer.
I\'m wondering if the problem is the Fortran compiler of this machi
You are probably writing a string to sceneclass(i)
that is longer then the 30 chars you specified.
I can reproduce this with
program test
implicit none
character(10),allocatable :: sceneclass(:)
integer :: i
allocate( sceneclass(10) )
do i=1,10
write(sceneclass(i),*) 10**i
enddo
print *, ( trim(sceneclass(i)), i=1,10 )
end program
gfortran
fails with
Fortran runtime error: End of record
while ifort
reports the error correctly:
output statement overflows record, unit -5, file Internal List-Directed Write
Increasing the string length to 12 solves the issue in this case. You can (and should) use iostat
within the write
statement to capture this.