Hints specified via info (see Chapter The Info Object) allow a user to provide information to direct optimization. Providing hints may enable an implementation to deliver increased performance or minimize use of system resources. As described in Section The Info Object, an implementation is free to ignore all hints; however, applications must comply with any info hints they provide that are used by the MPI implementation (i.e., are returned by a call to MPI_COMM_GET_INFO) and that place a restriction on the behavior of the application. Hints are specified on a per communicator basis, in MPI_COMM_DUP_WITH_INFO, MPI_COMM_IDUP_WITH_INFO, MPI_COMM_SET_INFO, MPI_COMM_SPLIT_TYPE, MPI_DIST_GRAPH_CREATE, and MPI_DIST_GRAPH_CREATE_ADJACENT, via the opaque info object. When an info object that specifies a subset of valid hints is passed to MPI_COMM_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.)
Advice to users.
Some optimizations may only be possible when all processes in the group of the
communicator provide a given info key with the same value.
( End of advice to users.)
Info hints are not propagated by MPI from one communicator to another.
The following info keys are valid for all communicators.
Advice to users.
Some optimizations may only be possible when all MPI processes in the group of the
communicator provide a given info key with the same value.
( End of advice to users.)
Advice to users.
Use of the mpi_assert_allow_overtaking info key can result in
nondeterminism in the message matching order.
( End of advice to users.)
Advice to users.
Use of the mpi_assert_strict_persistent_collective_ordering may
be needed because some optimizations may only be possible on certain
systems when strict collective ordering is asserted for the
underlying communicator of a persistent collective operation.
( End of advice to users.)
MPI_COMM_SET_INFO(comm, info) | |
INOUT comm | communicator (handle) |
IN info | info object (handle) |
MPI_COMM_SET_INFO updates the hints of the communicator associated with comm using the hints provided in info. This operation has no effect on previously set or defaulted hints that are not specified by info. It also has no effect on previously set or defaulted hints that are specified by info, but are ignored by the MPI implementation in this call to MPI_COMM_SET_INFO. MPI_COMM_SET_INFO is a collective routine. The info object may be different on each MPI process, but any info entries that an implementation requires to be the same on all MPI processes must appear with the same value in each MPI process's info object.
Advice to users.
Some info items that an implementation can use when it creates a
communicator cannot easily be changed once the communicator has been
created. Thus, an implementation may ignore hints issued in this call
that it would have accepted in a creation call.
An implementation may also be unable to update certain info hints in a call to MPI_COMM_SET_INFO.
MPI_COMM_GET_INFO can be used to determine whether updates
to existing info hints were ignored by the implementation.
( End of advice to users.)
Advice to users.
Setting info hints on the predefined communicators MPI_COMM_WORLD
and MPI_COMM_SELF may have unintended effects, as changes to these
global objects may affect all components of the application, including
libraries and tools.
Users must ensure that all components of the application that use a given
communicator, including libraries and tools, can comply with any info hints
associated with that communicator.
( End of advice to users.)
MPI_COMM_GET_INFO(comm, info_used) | |
IN comm | communicator object (handle) |
OUT info_used | new info object (handle) |
MPI_COMM_GET_INFO returns a new info object containing the hints of the communicator associated with comm. The current setting of all hints related to this communicator is returned in info_used. An MPI implementation is required to return all hints that are supported by the implementation and have default values specified; any user-supplied hints that were not ignored by the implementation; and any additional hints that were set by the implementation. 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.