Ifort can not handle 0-length files
Not sure whether this is a bug or not: https://software.intel.com/en-us/forums/intel-fortran-compiler/topic/856789
This commit is contained in:
parent
79c17ec407
commit
d31417b050
|
@ -130,7 +130,7 @@ function IO_read(fileName) result(fileContent)
|
||||||
status='old', position='rewind', action='read',iostat=myStat)
|
status='old', position='rewind', action='read',iostat=myStat)
|
||||||
if(myStat /= 0) call IO_error(100,ext_msg=trim(fileName))
|
if(myStat /= 0) call IO_error(100,ext_msg=trim(fileName))
|
||||||
allocate(character(len=fileLength)::fileContent)
|
allocate(character(len=fileLength)::fileContent)
|
||||||
read(fileUnit) fileContent
|
if(fileLength>0) read(fileUnit) fileContent
|
||||||
close(fileUnit)
|
close(fileUnit)
|
||||||
|
|
||||||
end function IO_read
|
end function IO_read
|
||||||
|
|
Loading…
Reference in New Issue