Hints specified via info
(see Section The Info Object
, page The Info Object
)
allow a user to provide information
such as
file access patterns and file system specifics
to direct optimization.
Providing hints may enable an implementation to deliver
increased I/O performance or minimize the use of system resources.
However, hints do not change the semantics of any of the I/O interfaces.
In other words, an implementation is free to ignore all hints.
Hints are specified on a per file basis,
in MPI_FILE_OPEN, MPI_FILE_DELETE,
MPI_FILE_SET_VIEW, and MPI_FILE_SET_INFO,
via the opaque info object.
When an info object that specifies a subset of valid hints is passed to
MPI_FILE_SET_VIEW or MPI_FILE_SET_INFO,
there will be no effect on
previously set or defaulted hints that the info does not specify.
Advice
to implementors.
It may happen that a program is coded with hints for one system, and
later executes on another system that does not support these hints.
In general, unsupported hints should simply be ignored.
Needless to say, no hint can be mandatory.
However, for each hint used by a specific implementation,
a default value must be provided
when the user does not specify a value for this hint.
( End of advice to implementors.)
MPI_FILE_SET_INFO(fh, info) | |
INOUT fh | file handle (handle) |
IN info | info object (handle) |
int MPI_File_set_info(MPI_File fh, MPI_Info info)
MPI_FILE_SET_INFO(FH, INFO, IERROR)
INTEGER FH, INFO, IERROR
void MPI::File::Set_info(const MPI::Info& info)
MPI_FILE_SET_INFO sets new values for the hints of the file associated with fh. MPI_FILE_SET_INFO is a collective routine. The info object may be different on each process, but any info entries that an implementation requires to be the same on all processes must appear with the same value in each process's info object.
Advice to users.
Many info items that an implementation can use when it
creates or opens a file cannot easily be changed
once the file has been created or opened.
Thus, an implementation may
ignore hints issued in this call that it would have
accepted in an open call.
( End of advice to users.)
MPI_FILE_GET_INFO(fh, info_used) | |
IN fh | file handle (handle) |
OUT info_used | new info object (handle) |
int MPI_File_get_info(MPI_File fh, MPI_Info *info_used)
MPI_FILE_GET_INFO(FH, INFO_USED, IERROR)
INTEGER FH, INFO_USED, IERROR
MPI::Info MPI::File::Get_info() const
MPI_FILE_GET_INFO returns a new info object containing the hints of the file associated with fh. The current setting of all hints actually used by the system related to this open file is returned in info_used. If no such hints exist, a handle to a newly created info object is returned that contains no key/value pair. The user is responsible for freeing info_used via MPI_INFO_FREE.
Advice to users.
The info object returned in info_used will contain all
hints currently active for this file.
This set of hints may be greater or smaller than the set of hints passed
in to MPI_FILE_OPEN,
MPI_FILE_SET_VIEW, and MPI_FILE_SET_INFO,
as the system may not recognize some hints set by the user,
and may recognize other hints that the user has not set.
( End of advice to users.)
Some potentially useful hints (info key values) are outlined below. The following key values are reserved. An implementation is not required to interpret these key values, but if it does interpret the key value, it must provide the functionality described. (For more details on ``info,'' see Section The Info Object , page The Info Object .)
These hints mainly affect access patterns and the layout of data on parallel I/O devices. For each hint name introduced, we describe the purpose of the hint, and the type of the hint value. The `` [SAME]'' annotation specifies that the hint values provided by all participating processes must be identical; otherwise the program is erroneous. In addition, some hints are context dependent, and are only used by an implementation at specific times (e.g., file_perm is only useful during file creation).