old Fortran “shared” feature in open() causing open file failure

六眼飞鱼酱① 提交于 2019-12-13 21:19:21

问题


I am using a code which is written in very old Fortran language. There are some lines using the shared option in the open() routine. E.g.:

 OPEN(UNIT=17,STATUS='OLD',FORM='UNFORMATTED',READONLY,SHARED)

The compilation is ok. When running on one machine, it is ok. But later I moved to another machine, it gives the error:

 forrtl: Function not implemented
 forrtl: severe (30): open failure, unit 17, file

The compiler I use is the Linux version of intel Fortran 14.0.3 on both of the machine. When the shared feature is removed, everything is fine. But, since the code is not written by myself, I would like to keep it if possible. The reason of using this option is that I may the code on many threads at the same time. They may have to access some files at the same time.

  • Do you have any idea of this?
  • Is it safe to just remove shared from the code?

来源:https://stackoverflow.com/questions/31147048/old-fortran-shared-feature-in-open-causing-open-file-failure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!