ifc 8, segfaults during write

ifc 8, segfaults during write

arturodigioia's picture

I posted time ago a little code which showed a bug in I/O with large files.
Now that problem is solved.

I slightly modified the code in the following version

-----------------------------------
program prova

implicit none
real(8),dimension(10000) :: vettore=1.d0
integer :: max_value=5000
integer :: i,j

do j=1,5
write(*,*) 10000*10**j/1024./1024.*8,'MB'
open(unit=10,file="prova.bin",form="unformatted",action="write")
do i=1,10**j
write(10) vettore(1:max_value)
end do
close(10)
open(unit=10,file="prova.bin",form="unformatted",action="read")
do i=1,10**j
read(10) vettore(1:max_value)
end do
close(10)
end do
end program prova
-----------------------------

Apparently it segfaults at line

write(10) vettore(1:max_value)

and it appears to me that the problem is related to the use of parts of arrays in the write statements (simply writing the whole vector is ok).
ifc 8 with latest patch (Intel Fortran Compiler for 32-bit applications, Version 8.0 Build 20040211Z Package ID: l_fc_pc_8.0.039_pe042) on RedHat 9.
Can anyone check this code?
Thanks.

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.