Assign MPI ranks

Sometimes the MPI rank for each of your processes cannot be detected. This might be because you are using an experimental MPI version, because you have attached to a running program, or only part of a running program. Whatever the reason, it is easy to define what each process should be called:

  1. Choose a variable that holds the MPI world rank for each process, or an expression that calculates it.

  2. Use Cross-Process Comparison View to evaluate the expression across all the processes. If the variable is valid, Use as MPI Rank will be enabled.

  3. Click Use as MPI Rank. All of its processes will be relabeled with these new values.

The criteria for a variable or an expression to be valid are:

  • It must be an integer.

  • Every process must have a unique number afterwards.

These are the only restrictions. As you can see, there is no need to use the MPI rank if you have an alternate numbering scheme that makes more sense in your application. In fact you can relabel only a few of the processes and not all, if you prefer, so long as afterwards every process still has a unique number.