You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
help="Specify which MPI ranks should provide profile/trace output using comma-separated ranges and individual ranks (e.g., '0-3,8,10-15'). If not specified, all ranks provide output. The tool runs on all ranks but only selected ranks generate output files.",
help="Specify the environment variable to use for determining the MPI rank (e.g., 'MY_CUSTOM_RANK_VAR'). If not specified, the tool will automatically detect the rank from common MPI environment variables.",
680
+
default=None,
681
+
type=str,
682
+
metavar="ENVIRONMENT_VARIABLE",
683
+
)
684
+
filter_options.add_argument(
685
+
"--mpi-world-size-var",
686
+
help="Specify the environment variable to use for determining the MPI world size (e.g., 'MY_CUSTOM_SIZE_VAR'). If not specified, the tool will automatically detect the world size from common MPI environment variables.",
687
+
default=None,
688
+
type=str,
689
+
metavar="ENVIRONMENT_VARIABLE",
690
+
)
633
691
filter_options.add_argument(
634
692
"--kernel-include-regex",
635
693
help="Include the kernels matching this filter from counter-collection and thread-trace data (non-matching kernels will be excluded)",
Copy file name to clipboardExpand all lines: projects/rocprofiler-sdk/source/docs/how-to/using-rocprofv3-with-mpi.rst
+34-14Lines changed: 34 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -172,26 +172,26 @@ Assuming the hostname as `ubuntu-latest`, the process IDs as 3000020 and 3000019
172
172
Selective rank profiling
173
173
==========================
174
174
175
-
When running large-scale MPI jobs, collecting profiling data from all ranks can generate excessive output and may not be necessary. The ``--mpi-ranks`` option allows you to specify which MPI ranks should provide profile and trace output, while the tool still runs on all ranks to maintain program correctness.
175
+
When running large-scale MPI jobs, collecting profiling data from all ranks can generate excessive output and may not be necessary. The ``--profile-mpi-ranks`` option allows you to specify which MPI ranks should provide profile and trace output, while the tool still runs on all ranks to maintain program correctness.
176
176
177
177
Specifying ranks to profile
178
178
-----------------------------
179
179
180
-
Use the ``--mpi-ranks`` option with a comma-separated list of ranks and ranges:
180
+
Use the ``--profile-mpi-ranks`` option with a comma-separated list of ranks and ranges:
For mixed environments or non-standard MPI configurations (such as interactive SLURM jobs using mpirun), you can specify custom environment variables for rank and world size detection:
232
+
233
+
.. code-block:: bash
234
+
235
+
# Use custom environment variables for rank and world size detection
When ``--mpi-world-rank-var`` and/or ``--mpi-world-size-var`` are specified, they take precedence over automatic detection. These options are useful when:
241
+
242
+
- The MPI implementation uses non-standard environment variable names
243
+
- You want to ensure specific environment variables are used instead of relying on auto-detection
244
+
- Working in mixed MPI environments where multiple MPI-related variables might be present
245
+
246
+
The ``--mpi-world-size-var`` option is particularly useful when using ``--profile-mpi-ranks`` to ensure that the specified rank ranges are validated against the actual MPI world size, preventing out-of-range errors.
0 commit comments