HDFql Reference Manual v2.6.0

6.8.13SET MPI ROOT

Syntax

SET MPI ROOT {root_rank | DEFAULT}

Description

Set the MPI root process rank52 for gathering processed (HDF5) data by other MPI processes. In other words, after each MPI process finishes processing a subset of the data (i.e. a chunk), it sends it to the specified MPI root process rank (please refer to the section PROCESSING for additional information). If using an HDFql non MPI-based distribution, an error is raised. In case the keyword DEFAULT is specified, the MPI root process rank for gathering processed data is set to zero.

Parameter(s)

root_rank – optional integer that specifies the MPI process rank to use as root for gathering processed (HDF5) data by other MPI processes. If root_rank is specified, it must be between 0 and the value returned by SHOW MPI SIZE - 1 (otherwise an error is raised).

Return

Nothing

Example(s)

# set the MPI root process rank (to use when gathering processed (HDF5) data by other MPI processes) to 3
SET MPI ROOT 3

# select (i.e. read) an HDF5 dataset named "my_dataset" in parallel, where each MPI process sends the local maximum value stored in the dataset to the MPI root process (i.e. rank 3), which in turn returns the global maximum value stored in the dataset
SELECT FROM MAX(my_dataset) IN PARALLEL

# set the MPI root process rank (to use when gathering processed (HDF5) data by other MPI processes) to the default value (i.e. 0)
SET MPI ROOT DEFAULT

# select (i.e. read) an HDF5 dataset named "my_dataset" in parallel, where each MPI process sends the local maximum value stored in the dataset to the MPI root process (i.e. rank 0), which in turn returns the global maximum value stored in the dataset
SELECT FROM MAX(my_dataset) IN PARALLEL

Notes

  1. By default (i.e. upon initialization of the HDFql library), the MPI root process rank is set to zero. ↩