This function returns the rank of a process within the specified communicator. The general syntax for its use is
y = mpicommrank(comm)
where comm is the communicator to use. If no communicator
is provided, then MPI_COMM_WORLD is used. The returned value
y is the rank of the current process in the communicator.
Here is a simple example of using mpicommrank to obtain the
process rank. It defaults to 0, because the process is the root
of the group (which contains only itself).
--> mpiinit
--> mpicommrank
ans =
<int32> - size: [1 1]
0