问题
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