Specify MPI database communicator¶
saf_setProps_DbComm
is a function defined in dbprops.c.
Synopsis:
-
int
saf_setProps_DbComm
(SAF_DbProps *properties, MPI_Comm communicator)¶
Formal Arguments:
properties
: The database property list which will be modified by this function (See *Properties*).communicator
: The MPI communicator.
Description: When a database is opened it uses the library communicator by default. However, this function can be called to set up a different MPI communicator to open a database. However, that communicator must be a subset of the communicator used to initialize the library.
Preconditions:
properties
must not be null. (high-cost)
Return Value: The constant SAF__SUCCESS
is returned when this function is successful. Otherwise this function either returns
an error number or throws an exception, depending on the value of the library’s error handling property.
Parallel Notes: This function can be called independently. It is not defined in serial installations of the library.
This function does not duplicate the communicator. It simply copies it to the properties. When these properties
are used in a saf_open_database call, the communicator will at that time be duplicated. So, don’t free the
MPI communicator between the time this property is set in a given SAF__DbProps
structure and the time that
SAF__DbProps
structure is used in a saf_open_database call.
Issues: If the client is going to override the MPI communicator that would ordinarily be associated with the database handle, we have a minor problem with calls to set other properties whose behavior might require special action for parallel: which communicator should they use?
See Also:
- saf_open_database: 7.3: Open a database
- Database Properties: Introduction for current chapter