5.2.64hdfql_mpi_get_root
Syntax
int hdfql_mpi_get_root(void)
Description
Get the rank of the MPI process specified as the root (for gathering processed (HDF5) data by other MPI processes) that may have been set through the operation SET MPI ROOT.
Parameter(s)
None
Return
int – depending on the success in getting the MPI process rank specified as the root, it can either be equal to or greater than zero (i.e. the rank of the MPI root process) or HDFQL_ERROR_NOT_SUPPORTED (in case MPI itself was not initialized properly or when using an HDFql non MPI-based distribution).
Example(s)
// display rank of the MPI root process (should be "Rank of the MPI process specified as the root is 0")
printf("Rank of the MPI process specified as the root is %d\n", hdfql_mpi_get_root());
// set rank 3 as the MPI root process
hdfql_execute("SET MPI ROOT 3");
// display rank of the MPI root process (should be "Rank of the MPI process specified as the root is 3")
printf("Rank of the MPI process specified as the root is %d\n", hdfql_mpi_get_root());