Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28579 ディスカッション

Help: write file in EM64T mode

Zhanghong_T_
初心者
403件の閲覧回数

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 件の賞賛
7 返答(返信)
Steven_L_Intel1
従業員
403件の閲覧回数
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.
jparsly
新規コントリビューター I
403件の閲覧回数
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.
Zhanghong_T_
初心者
403件の閲覧回数
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
Zhanghong_T_
初心者
403件の閲覧回数
Forget to say, suggest I would not check the box jparsly said before.
Thanks,
Zhanghong Tang
Steven_L_Intel1
従業員
403件の閲覧回数
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.)
Steven_L_Intel1
従業員
403件の閲覧回数
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.
Zhanghong_T_
初心者
403件の閲覧回数
Hi Steve,
Thank you very much! I will report it soon.
Sincerely,
Zhanghong Tang
返信