- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using ifort 9.1.032 on Fedora core 5.
I have a little program that write data to grads file as below:
!------------t.f90
real*4 out (201,161)
open (1, file='t.dat',form='unformatted', access='direct', &
recl=201*161*4)
! Get the data...
write(1,rec=1) out
! Get the data...
write(1,rec=2) out
!----------------------------
Now, the t.dat size should be: 201*161*4*2=258888 (B)
When I compile the file t.f90 with pgf90, it's OK. But when I compile with ifort
ifort -w90 t.f90
The result file t.dat's size is 4 times bigger: 1035552 (B)
Of course, it will not be displayed correctly in grads. Please tell me how to fix it!
Many Regards
I have a little program that write data to grads file as below:
!------------t.f90
real*4 out (201,161)
open (1, file='t.dat',form='unformatted', access='direct', &
recl=201*161*4)
! Get the data...
write(1,rec=1) out
! Get the data...
write(1,rec=2) out
!----------------------------
Now, the t.dat size should be: 201*161*4*2=258888 (B)
When I compile the file t.f90 with pgf90, it's OK. But when I compile with ifort
ifort -w90 t.f90
The result file t.dat's size is 4 times bigger: 1035552 (B)
Of course, it will not be displayed correctly in grads. Please tell me how to fix it!
Many Regards
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Problem solved!
The RECL unit in IFORT is Longword by default (4 byte)
I need to add this to the compiler option:
-assume byterecl
The RECL unit in IFORT is Longword by default (4 byte)
I need to add this to the compiler option:
-assume byterecl

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