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

ifort 8.1 read or write big binary arrary errors ?

guoquan
Beginner
749 Views
Software:
ifort 8.1.024
Gentoo linux
kernel 2.6.11
glibc 2.3.5

Box:
HP DL590
4 Itatium-1 800MHz CPUs
32G memory

when I try to I/O some big binary arrays. I caught Segmentation fault
Examples:
1.
-------------------------------------------------
integer, parameter :: nc=416
integer, parameter :: hc=nc/2
integer, parameter :: np=hc**3
integer, parameter:: nn=2
integer :: nploc(nn)
real, dimension(6,np/nn*2,nn) :: xv_out
......
write(12) xv_out(1:6,1:nploc(i),i) !! here cause segmentation fault
------------------------------------------------------------------------------
the size of output file is a few hundred MB

2 or read from the the big file
just like before
----------------------------------------
.....
read(12) xv_out(1:6,nploc(i),i) !! cause segmentation fault
--------------------------------------------
the arrays I want to input or output is just a part of the arrays I defined.

but If dynamic allocate a arrays ,then output the new one , it workslike:

allocate (tmp_xv(6,nploc(i),1))
tmp_xv=xv_out(1:6,nploc(i),i)
write(12) tmp_xv

or

do j=....
do k=....
do i=.....
write(12) xv(i,jk )
enddo
enddo
enddo
although it worked slowly but without problem

I feel really confused about these .
0 Kudos
6 Replies
Steven_L_Intel1
Employee
749 Views
Try a more recent compiler to see if it helps. We made some improvements in the way the stack was used in I/O statements.
0 Kudos
guoquan
Beginner
749 Views
Where Can I get the most recent vesion ifort ?
From Website the most recent version ifort is 8.1.024,
which is just the version I am using.
Thank you
0 Kudos
Steven_L_Intel1
Employee
749 Views
8.1.028 is the most recent. It is available from File Downloads at Intel Premier Support. You need to have registered your serial number in order to get at this, and non-commercial users can't getr updates.

Consider using an implied DO loop as an alternative.
0 Kudos
guoquan
Beginner
749 Views
Will ifort version 8.1.28 be released to no-commercial users ? I hope it will :smileyhappy:.
0 Kudos
Steven_L_Intel1
Employee
749 Views
When you get a non-commercial license, you are licensed for the current version but not updates.
0 Kudos
Intel_C_Intel
Employee
749 Views
guoquan, did you test your cases with flag -O3 / -O2 in the compile to see what willhappen?
0 Kudos
Reply