Re: MPI_UNIQUE_OPEN

Albert Cheng (acheng@ncsa.uiuc.edu)
Fri, 18 Apr 1997 19:36:26 -0500

At 06:04 PM 4/9/97 -0500, Rajeev Thakur wrote:
>The MPI_UNIQUE_OPEN amode allows a user to specify that
>the file will not be concurrently opened by another different
>collective open call anywhere or by some other application. This
>knowledge allows the implementation to optimize accesses to the
>file. For example, file caching and maintaining consistency among
>caches become much easier if the implementation is assured that no
>other processes other than the ones involved in this collective open
>will be accessing the file. It can also eliminate the need for file
>locking.

How can MPIO do anything extra if it knows the file maybe opened by
"something" else too? Say, MPIO knows another
independent application may be accessing the same file. What can
MPIO do about this extra information? It can't lock the file, it
can't sync the file for all steps. Basically, nothing can be guranteed.

For the other case, if MPIO knows the file is opened multiple times
within this MPI application, it *maybe* able to do some coordinations.
But it is not easy to recognize two opens are accessing the same file.
Having the same filenames does not necessarily mean the same file.
One could open one file, "datafile", then Change-directory,
open another file, "datafile", again. Definitely two files. On the
other side, Unix symbolic pointers will lead to the same physical with
different filenames. For Unix, the software would have to dig down to
major/minor device numbers and i-node numbers. I don't think we can
require all MPIO to support that.