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

Help: write file in EM64T mode

Zhanghong_T_
Novice
404 Views

Hi all,
I want to write some data to a file, after finished writing, the file is closed. Then I will modify its first data. I have successfully realized this goal in 32-bit mode. However, in 64-bit mode, it display:
forrtl: severe (259): sequential-acces I/0 to unit open for direct access, ...

My code is as follows:
...
integer i, j
...
open(1,file=flename)
write(1,*)i
write(1,*)j
close(1)
open(1,file=filename, form='FORMATTED', recl=16,access='direct')
write(1,*)i
close(1)

Thanks,
Zhanghong Tang

0 Kudos
7 Replies
Steven_L_Intel1
Employee
404 Views
As far as I can tell, this program would not work under IA-32 either. I get the same error either way. You can't do what you're trying to do, at least not this way. At the very least, you have to use direct-access I/O on a file opened for direct access.
0 Kudos
jparsly
New Contributor I
404 Views
Writing to direct access files without using a record number is an
extension allowed by some compilers. CVF allows it if you go to the
Powerstation 4.0 Compatibility Options and check the "Other Run-time
Behavior" box.
0 Kudos
Zhanghong_T_
Novice
404 Views
Oh, jparsly, thank you very much for your remind. I have just checkedthe box you said in 32-bit mode.
Then, dear Steve, would you please tell me how I should do for my wanted in both 32-bit and 64-bit mode?
Thanks,
Zhanghong Tang
0 Kudos
Zhanghong_T_
Novice
404 Views
Forget to say, suggest I would not check the box jparsly said before.
Thanks,
Zhanghong Tang
0 Kudos
Steven_L_Intel1
Employee
404 Views
I will try it out on Monday. I would recommend reporting the problem to Intel Premier Support (it's free as long as you have registered your serial number with us.)
0 Kudos
Steven_L_Intel1
Employee
404 Views
Ok, I can reproduce it om EM64T. Please file the bug with Intel Premier Support. Be sure to indicate that you need /fpscomp:general when compiling.
0 Kudos
Zhanghong_T_
Novice
404 Views
Hi Steve,
Thank you very much! I will report it soon.
Sincerely,
Zhanghong Tang
0 Kudos
Reply