- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Belowis an example. I realize this example is not optimal, but the arrays in my real program must be written out in varying orders and may require writig individual elements. Also, I believe the option -assume buffered_io is only for sequential writing.
Thanks
PROGRAM test
integer,parameter :: imax=500,jmax=500,kmax=50
real,dimension(imax,jmax,kmax) :: var
integer :: i,j,k,irec
open (UNIT=10, file="test.bin", FORM="unformatted", status="replace", access="direct",recl=4)
irec=1
do k=1,kmax
do j=1,jmax
do i=1,imax
var(i,j,k)=i+j+k
write (unit=10,rec=irec) var(i,j,k)
irec=irec+1
enddo
enddo
enddo
close(10)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I will rewrite some of my code to optimize it. I just thought there may be an option that could internally optimize the loops and io like is done with the intrinsic do loop. This may be why the portland compiler is faster for this type of io. Otherwise, for numerical computations I have found ifort to be 20-30% faster than portland group's compiler, nice job intel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page