# 6.7.38 SHOW MPI RANK

Part of: [6 Language](6-language.md) › [6.7 Data Introspection Language (DIL)](6-7-data-introspection-language-dil.md)

### Syntax

**SHOW** **MPI** **RANK**\
[_post_processing_option_]\
[_output_redirecting_option_]

### Description

Show (i.e. get) the rank of the calling process associated with the default MPI communicator (MPI_COMM_WORLD) or with a user-defined MPI communicator (that may have been set through the function [hdfql_mpi_use_communicator](5-2-60-hdfql-mpi-use-communicator.md)). Of note, the operation is essentially a wrapper for the MPI function “MPI_Comm_rank” (please refer to <https://www.mpich.org/static/docs/v3.4/www3/MPI_Comm_rank.html> or <https://www.open-mpi.org/doc/v3.1/man3/MPI_Comm_rank.3.php> for additional information in case the MPI library used is MPICH or Open MPI, respectively).

### Parameter(s)

_post_processing_option_ – optional option that transforms the result set according to the programmer’s needs, such as ordering or truncating (please refer to the section [PROCESSING](6-2-processing.md) for additional information).

_output_redirecting_option_ – optional option that specifies the cursor in use, an HDF5 object (i.e. dataset or attribute), a (text, binary, or Excel) file, or memory (i.e. user-defined variable) to write the result set into (please refer to the subsection [INTO](6-3-2-into.md) for additional information). If not specified, the cursor in use is populated with the result set instead (please refer to the chapter [CURSOR](4-cursor.md) for additional information).

### Return

The rank of the calling process associated with the default MPI communicator (MPI_COMM_WORLD) or with a user-defined MPI communicator as an [HDFQL_INT](5-1-constants.md#hdfql_int).

### Example(s)

```hdfql
# show (i.e. get) rank of the MPI process (if the program (that employs HDFql) is launched as, e.g., "mpiexec -n 3 ./my_program", it should return 0, 1, and 2 when executed by MPI processes with rank 0, 1, and 2, respectively)
SHOW MPI RANK 
```
