2024-07-29 17:23:36 -04:00
.. meta ::
2024-10-17 15:19:19 -04:00
:description: ROCm Systems Profiler installation documentation and reference
:keywords: rocprof-sys, rocprofiler-systems, Omnitrace, ROCm, installation, installer, profiler, tracking, visualization, tool, Instinct, accelerator, AMD
2024-07-29 17:23:36 -04:00
*************************************
2024-10-17 15:19:19 -04:00
ROCm Systems Profiler installation
2024-07-29 17:23:36 -04:00
*************************************
2024-10-17 15:19:19 -04:00
If you have problems using ROCm Systems Profiler after installation,
2024-07-29 17:23:36 -04:00
consult the :ref: `post-installation-troubleshooting` section.
Operating system support
========================================
2025-10-15 23:11:46 -04:00
ROCm Systems Profiler is only supported on Linux. See
`Supported operating systems <https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html#supported-operating-systems> `_
for ROCm supported operating systems.
2024-07-29 17:23:36 -04:00
Identifying the operating system
-----------------------------------
2025-10-15 23:11:46 -04:00
If you are unsure of the Linux distribution and version, the `` /etc/os-release `` and
`` /usr/lib/os-release `` files contain this information.
2024-07-29 17:23:36 -04:00
.. code-block :: shell
$ cat /etc/os-release
NAME = "Ubuntu"
2025-10-15 23:11:46 -04:00
VERSION_ID = "24.04"
VERSION = "24.04.3 LTS (Noble Numbat)"
VERSION_CODENAME = noble
2024-07-29 17:23:36 -04:00
ID = ubuntu
The relevant fields are `` ID `` and the `` VERSION_ID `` .
2025-10-15 23:11:46 -04:00
Install via package manager
============================
2024-07-29 17:23:36 -04:00
2025-10-15 23:11:46 -04:00
If you have ROCm version 6.3 or higher installed, you can use the
package manager to install a pre-built copy of ROCm Systems Profiler.
2024-07-29 17:23:36 -04:00
2025-10-15 23:11:46 -04:00
.. tab-set ::
2024-07-29 17:23:36 -04:00
2025-10-15 23:11:46 -04:00
.. tab-item :: Ubuntu
2024-07-29 17:23:36 -04:00
2025-10-15 23:11:46 -04:00
.. code-block :: shell
2024-07-29 17:23:36 -04:00
2025-10-15 23:11:46 -04:00
$ sudo apt install rocprofiler-systems
2024-07-29 17:23:36 -04:00
2025-10-15 23:11:46 -04:00
.. tab-item :: Red Hat Enterprise Linux
2024-07-29 17:23:36 -04:00
2025-10-15 23:11:46 -04:00
.. code-block :: shell
2024-07-29 17:23:36 -04:00
2025-10-15 23:11:46 -04:00
$ sudo dnf install rocprofiler-systems
2024-07-29 17:23:36 -04:00
2025-10-15 23:11:46 -04:00
.. tab-item :: SUSE Linux Enterprise Server
2024-07-29 17:23:36 -04:00
2025-10-15 23:11:46 -04:00
.. code-block :: shell
2024-07-29 17:23:36 -04:00
2025-10-15 23:11:46 -04:00
$ sudo zypper install rocprofiler-systems
2024-07-29 17:23:36 -04:00
2024-12-16 16:29:15 -05:00
Building ROCm Systems Profiler from source
==========================================
2024-07-29 17:23:36 -04:00
2025-10-15 23:11:46 -04:00
ROCm Systems Profiler needs a GCC compiler with full support for C++17 and CMake v3.21 or higher.
2024-12-16 16:29:15 -05:00
The Clang compiler may be used instead of the GCC compiler if `Dyninst <https://github.com/dyninst/dyninst> `_
2024-07-29 17:23:36 -04:00
is already installed.
Build requirements
-----------------------------------
* GCC compiler v7+
2024-09-25 22:34:46 -04:00
2024-07-29 17:23:36 -04:00
* Older GCC compilers may be supported but are not tested
2024-10-17 15:19:19 -04:00
* Clang compilers are generally supported for ROCm Systems Profiler but not Dyninst
2024-09-25 22:34:46 -04:00
2025-10-15 23:11:46 -04:00
* `CMake <https://cmake.org/> `_ v3.21 or later
2024-07-29 17:23:36 -04:00
.. note::
2025-10-15 23:11:46 -04:00
If the `` CMake `` installed on the system is too old, you can install a new
version using various methods. One of the easiest options is to use PyPi (Python's pip).
2024-07-29 17:23:36 -04:00
.. code-block :: shell
2025-10-15 23:11:46 -04:00
pip install --user 'cmake==3.21.0'
2024-07-29 17:23:36 -04:00
export PATH = ${ HOME } /.local/bin:${ PATH }
Required third-party packages
-----------------------------------
2024-09-25 22:34:46 -04:00
* `Dyninst <https://github.com/dyninst/dyninst> `_ for dynamic or static instrumentation.
2024-07-29 17:23:36 -04:00
Dyninst uses the following required and optional components.
* `TBB <https://github.com/oneapi-src/oneTBB> `_ (required)
* `Elfutils <https://sourceware.org/elfutils/> `_ (required)
* `Libiberty <https://github.com/gcc-mirror/gcc/tree/master/libiberty> `_ (required)
* `Boost <https://www.boost.org/> `_ (required)
* `OpenMP <https://www.openmp.org/> `_ (optional)
* `libunwind <https://www.nongnu.org/libunwind/> `_ for call-stack sampling
2025-10-15 23:11:46 -04:00
* `SQLite <https://github.com/sqlite/sqlite> `_ for database output
2026-01-14 21:27:51 +01:00
* `spdlog <https://github.com/gabime/spdlog> `_ for logging
2024-07-29 17:23:36 -04:00
Any of the third-party packages required by Dyninst, along with Dyninst itself, can be built and installed
2024-10-17 15:19:19 -04:00
during the ROCm Systems Profiler build. The following list indicates the package, the version,
the application that requires the package (for example, ROCm Systems Profiler requires Dyninst
while Dyninst requires TBB), and the CMake option to build the package alongside ROCm Systems Profiler:
2024-07-29 17:23:36 -04:00
2024-09-25 22:34:46 -04:00
.. csv-table ::
2024-07-29 17:23:36 -04:00
:header: "Third-Party Library", "Minimum Version", "Required By", "CMake Option"
2025-10-15 23:11:46 -04:00
"Dyninst", "13.0", "ROCm Systems Profiler", "`` ROCPROFSYS_BUILD_DYNINST `` (default: OFF)"
2024-10-17 15:19:19 -04:00
"Libunwind", "", "ROCm Systems Profiler", "`` ROCPROFSYS_BUILD_LIBUNWIND `` (default: ON)"
2025-11-20 04:48:53 +05:30
"Nlohmann/JSON", "", "ROCm Systems Profiler", "`` ROCPROFSYS_BUILD_NLOHMANN_JSON `` (default: ON)"
2026-01-14 21:27:51 +01:00
"spdlog", "", "ROCm Systems Profiler", "`` ROCPROFSYS_BUILD_SPDLOG `` (default: ON)"
2025-10-15 23:11:46 -04:00
"SQLite", "", "ROCm Systems Profiler", "`` ROCPROFSYS_BUILD_SQLITE `` (default: OFF)"
2025-06-06 22:52:23 -04:00
"TBB", "2018.6", "Dyninst", "`` ROCPROFSYS_BUILD_TBB `` (default: OFF)"
"ElfUtils", "0.178", "Dyninst", "`` ROCPROFSYS_BUILD_ELFUTILS `` (default: OFF)"
"LibIberty", "", "Dyninst", "`` ROCPROFSYS_BUILD_LIBIBERTY `` (default: OFF)"
"Boost", "1.67.0", "Dyninst", "`` ROCPROFSYS_BUILD_BOOST `` (default: OFF)"
2024-07-29 17:23:36 -04:00
"OpenMP", "4.x", "Dyninst", ""
Optional third-party packages
-----------------------------------
* `ROCm <https://rocm.docs.amd.com/projects/install-on-linux/en/latest> `_
2025-03-31 11:07:50 -04:00
* AMD SMI Lib for GPU monitoring
2024-12-16 16:29:15 -05:00
* ROCprofiler SDK for GPU hardware counters and ROCm tracing
2024-07-29 17:23:36 -04:00
2025-11-20 04:48:53 +05:30
* Python
* `` ROCPROFSYS_USE_PYTHON `` enables Python support.
2024-07-29 17:23:36 -04:00
* `PAPI <https://icl.utk.edu/papi/> `_
* MPI
2024-10-17 15:19:19 -04:00
* `` ROCPROFSYS_USE_MPI `` enables full MPI support
* `` ROCPROFSYS_USE_MPI_HEADERS `` enables wrapping of the dynamically-linked MPI C function calls.
(By default, if ROCm Systems Profiler cannot find an OpenMPI MPI distribution, it uses a local copy
2024-07-29 17:23:36 -04:00
of the OpenMPI `` mpi.h `` .)
2026-01-27 23:48:27 -05:00
* UCX
* `` ROCPROFSYS_USE_UCX `` enables UCX (Unified Communication X) support for tracing UCX communication functions
used as a transport layer for MPI and other communication libraries
2024-09-25 22:34:46 -04:00
.. csv-table ::
2025-10-15 23:11:46 -04:00
:header: "Third-Party Library", "CMake Enable Option"
:widths: 15, 45
2024-07-29 17:23:36 -04:00
2025-10-15 23:11:46 -04:00
"ROCm", "`` ROCPROFSYS_USE_ROCM `` (default: ON)"
"PAPI", "`` ROCPROFSYS_USE_PAPI `` (default: ON)"
"MPI", "`` ROCPROFSYS_USE_MPI `` (default: OFF)"
"MPI (header-only)", "`` ROCPROFSYS_USE_MPI_HEADERS `` (default: ON)"
2026-01-27 23:48:27 -05:00
"UCX", "`` ROCPROFSYS_USE_UCX `` (default: ON)"
2024-07-29 17:23:36 -04:00
Installing Dyninst
-----------------------------------
2024-10-17 15:19:19 -04:00
The easiest way to install Dyninst is alongside ROCm Systems Profiler, but it can also be installed using Spack.
2024-07-29 17:23:36 -04:00
2024-10-17 15:19:19 -04:00
Building Dyninst alongside ROCm Systems Profiler
2024-07-29 17:23:36 -04:00
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-17 15:19:19 -04:00
To install Dyninst alongside ROCm Systems Profiler, configure ROCm Systems Profiler with `` ROCPROFSYS_BUILD_DYNINST=ON `` .
2024-07-29 17:23:36 -04:00
Depending on the version of Ubuntu, the `` apt `` package manager might have current enough
2024-09-25 22:34:46 -04:00
versions of the Dyninst Boost, TBB, and LibIberty dependencies
(use `` apt-get install libtbb-dev libiberty-dev libboost-dev `` ).
2025-10-15 23:11:46 -04:00
However, it is possible to also build and install the Dyninst dependencies
via `` ROCPROFSYS_BUILD_<DEP>=ON `` , as follows:
2024-07-29 17:23:36 -04:00
.. code-block :: shell
2025-10-15 23:11:46 -04:00
git clone https://github.com/ROCm/rocm-systems.git
cmake -B rocprof-sys-build -DROCPROFSYS_BUILD_DYNINST= ON \
-DROCPROFSYS_BUILD_{ TBB,ELFUTILS,BOOST,LIBIBERTY} = ON \
-S rocm-systems/projects/rocprofiler-systems
2024-07-29 17:23:36 -04:00
2025-06-06 22:52:23 -04:00
where `` -DROCPROFSYS_BUILD_{TBB,BOOST,ELFUTILS,LIBIBERTY}=ON `` is expanded by
the shell to `` -DROCPROFSYS_BUILD_TBB=ON -DROCPROFSYS_BUILD_BOOST=ON ... ``
2024-07-29 17:23:36 -04:00
Installing Dyninst via Spack
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`Spack <https://github.com/spack/spack> `_ is another option to install Dyninst and its dependencies:
.. code-block :: shell
git clone https://github.com/spack/spack.git
source ./spack/share/spack/setup-env.sh
spack compiler find
spack external find --all --not-buildable
spack spec -I --reuse dyninst
spack install --reuse dyninst
spack load -r dyninst
2024-12-16 16:29:15 -05:00
.. _cmake-options:
Building and installing ROCm Systems Profiler
---------------------------------------------
2024-07-29 17:23:36 -04:00
2024-10-17 15:19:19 -04:00
ROCm Systems Profiler has CMake configuration options for MPI support (`` ROCPROFSYS_USE_MPI `` or
2025-10-15 23:11:46 -04:00
`` ROCPROFSYS_USE_MPI_HEADERS `` ), ROCm tracing and sampling (`` ROCPROFSYS_USE_ROCM `` ),
OpenMP-Tools (`` ROCPROFSYS_USE_OMPT `` ), hardware counters via PAPI (`` ROCPROFSYS_USE_PAPI `` ),
among other features.
2024-09-25 22:34:46 -04:00
Various additional features can be enabled via the
2024-07-29 17:23:36 -04:00
`` TIMEMORY_USE_* `` `CMake options <https://timemory.readthedocs.io/en/develop/installation.html#cmake-options> `_ .
2024-10-17 15:19:19 -04:00
Any `` ROCPROFSYS_USE_<VAL> `` option which has a corresponding `` TIMEMORY_USE_<VAL> ``
2024-07-29 17:23:36 -04:00
option means that the Timemory support for this feature has been integrated
2024-10-17 15:19:19 -04:00
into Perfetto support for ROCm Systems Profiler, for example, `` ROCPROFSYS_USE_PAPI=<VAL> `` also configures
2024-07-29 17:23:36 -04:00
`` TIMEMORY_USE_PAPI=<VAL> `` . This means the data that Timemory is able to collect via this package
2024-09-25 22:34:46 -04:00
is passed along to Perfetto and is displayed when the `` .proto `` file is visualized
2024-07-29 17:23:36 -04:00
in `the Perfetto UI <https://ui.perfetto.dev> `_ .
.. code-block :: shell
2025-10-15 23:11:46 -04:00
git clone https://github.com/ROCm/rocm-systems.git
2024-12-13 18:48:39 -05:00
cmake \
-B rocprof-sys-build \
2024-10-17 15:19:19 -04:00
-D CMAKE_INSTALL_PREFIX = /opt/rocprofiler-systems \
2024-12-13 18:48:39 -05:00
-D ROCPROFSYS_USE_ROCM = ON \
-D ROCPROFSYS_USE_PYTHON = ON \
-D ROCPROFSYS_USE_OMPT = ON \
-D ROCPROFSYS_USE_MPI_HEADERS = ON \
-D ROCPROFSYS_BUILD_PAPI = ON \
-D ROCPROFSYS_BUILD_LIBUNWIND = ON \
-D ROCPROFSYS_BUILD_DYNINST = ON \
2025-06-06 22:52:23 -04:00
-D ROCPROFSYS_BUILD_TBB = ON \
-D ROCPROFSYS_BUILD_BOOST = ON \
-D ROCPROFSYS_BUILD_ELFUTILS = ON \
-D ROCPROFSYS_BUILD_LIBIBERTY = ON \
2025-10-15 23:11:46 -04:00
-S rocm-systems/projects/rocprofiler-systems
2024-10-17 15:19:19 -04:00
cmake --build rocprof-sys-build --target all --parallel 8
cmake --build rocprof-sys-build --target install
source /opt/rocprofiler-systems/share/rocprofiler-systems/setup-env.sh
2024-07-29 17:23:36 -04:00
2024-12-16 16:29:15 -05:00
.. _build-script:
Using the build script
^^^^^^^^^^^^^^^^^^^^^^
This method automates the CMake process with a script that wraps the CMake
commands and handles build logic, environment variables, and packaging. Run
`` ./scripts/build-release.sh `` with your desired options to generate packages.
Use `` ./scripts/build-release.sh --help `` for more information.
.. code-block :: shell-session
./scripts/build-release.sh --help
Options:
--core [+nopython] [+python] Core (Use '+nopython' to build w/o python, use '+python' to python build with python)
--mpi [+nopython] [+python] MPI (Use '+nopython' to build w/o python, use '+python' to python build with python)
--rocm [+nopython] [+python] ROCm (Use '+nopython' to build w/o python, use '+python' to python build with python)
--rocm-mpi [+nopython] [+python] ROCm + MPI (Use '+nopython' to build w/o python, use '+python' to python build with python)
--mpi-impl [openmpi|mpich] MPI implementation
--lto [on|off] Enable LTO (default: off)
--strip [on|off] Strip libraries (default: off)
--perfetto-tools [on|off] Install perfetto tools (default: on)
--static-libgcc [on|off] Build with static libgcc (default: on)
--static-libstdcxx [on|off] Build with static libstdc++ (default: on)
--hidden-visibility [on|off] Build with hidden visibility (default: on)
--max-threads N Max number of threads supported (default: 2048)
--parallel N Number of parallel build jobs (default: 12)
--generators [STGZ][DEB][RPM][+others] CPack generators (default: stgz deb rpm)
2024-10-17 15:19:19 -04:00
.. _mpi-support-rocprof-sys:
2024-07-29 17:23:36 -04:00
2024-10-17 15:19:19 -04:00
MPI support within ROCm Systems Profiler
2024-07-29 17:23:36 -04:00
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-17 15:19:19 -04:00
ROCm Systems Profiler can have full (`` ROCPROFSYS_USE_MPI=ON `` ) or partial (`` ROCPROFSYS_USE_MPI_HEADERS=ON `` ) MPI support.
2024-09-25 22:34:46 -04:00
The only difference between these two modes is whether or not the results collected
2024-07-29 17:23:36 -04:00
via Timemory and/or Perfetto can be aggregated into a single
2024-09-25 22:34:46 -04:00
output file during finalization. When full MPI support is enabled, combining the
2024-07-29 17:23:36 -04:00
Timemory results always occurs, whereas combining the Perfetto
2024-10-17 15:19:19 -04:00
results is configurable via the `` ROCPROFSYS_PERFETTO_COMBINE_TRACES `` setting.
2024-07-29 17:23:36 -04:00
2024-09-25 22:34:46 -04:00
The primary benefits of partial or full MPI support are the automatic wrapping
2024-07-29 17:23:36 -04:00
of MPI functions and the ability
2024-09-25 22:34:46 -04:00
to label output with suffixes which correspond to the `` MPI_COMM_WORLD `` rank ID
2024-07-29 17:23:36 -04:00
instead of having to use the system process identifier (i.e. `` PID `` ).
2024-09-25 22:34:46 -04:00
In general, it's recommended to use partial MPI support with the OpenMPI
2024-07-29 17:23:36 -04:00
headers as this is the most portable configuration.
2024-09-25 22:34:46 -04:00
If full MPI support is selected, make sure your target application is built
2024-10-17 15:19:19 -04:00
against the same MPI distribution as ROCm Systems Profiler.
For example, do not build ROCm Systems Profiler with MPICH and use it on a target application built against OpenMPI.
2024-07-29 17:23:36 -04:00
If partial support is selected, the reason the OpenMPI headers are recommended instead of the MPICH headers is
2024-09-25 22:34:46 -04:00
because the `` MPI_COMM_WORLD `` in OpenMPI is a pointer to `` ompi_communicator_t `` (8 bytes),
2024-10-17 15:19:19 -04:00
whereas `` MPI_COMM_WORLD `` in MPICH is an `` int `` (4 bytes). Building ROCm Systems Profiler with partial MPI support
2024-07-29 17:23:36 -04:00
and the MPICH headers and then using
2024-10-17 15:19:19 -04:00
ROCm Systems Profiler on an application built against OpenMPI causes a segmentation fault.
2024-07-29 17:23:36 -04:00
This happens because the value of the `` MPI_COMM_WORLD `` is truncated
during the function wrapping before being passed along to the underlying MPI function.
2026-01-27 23:48:27 -05:00
UCX support within ROCm Systems Profiler
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ROCm Systems Profiler supports tracing UCX (Unified Communication X) communication functions
when `` ROCPROFSYS_USE_UCX `` is enabled (default: ON). UCX is a high-performance communication
framework that serves as a transport layer for MPI and other communication libraries, providing
optimized point-to-point and collective communication operations.
When UCX support is enabled, ROCm Systems Profiler can automatically intercept and trace UCX
communication functions such as `` ucp_tag_send `` , `` ucp_tag_recv `` , and other UCP (Unified
Communication Protocol) and UCT (Unified Communication Transport) layer operations. This allows
for detailed analysis of communication patterns and performance in applications using UCX as
their underlying transport mechanism.
2025-11-20 04:48:53 +05:30
Python support within ROCm Systems Profiler
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ROCm Systems Profiler supports profiling Python code via the `` ROCPROFSYS_USE_PYTHON `` CMake option.
Python support is enabled via the `` ROCPROFSYS_USE_PYTHON `` and the
`` ROCPROFSYS_PYTHON_VERSIONS="<MAJOR>.<MINOR> `` CMake options.
Alternatively, to build multiple Python versions, use
`` ROCPROFSYS_PYTHON_VERSIONS="<MAJOR>.<MINOR>;[<MAJOR>.<MINOR>]" `` ,
and `` ROCPROFSYS_PYTHON_ROOT_DIRS="/path/to/version;[/path/to/version]" `` instead of just `` ROCPROFSYS_PYTHON_VERSIONS `` .
When building multiple Python versions, the length of the `` ROCPROFSYS_PYTHON_VERSIONS ``
and `` ROCPROFSYS_PYTHON_ROOT_DIRS `` lists must
be the same size.
.. code-block :: shell
cmake --preset release -D ROCPROFSYS_PYTHON_ROOT_DIRS="/usr/bin;/usr/bin" -D ROCPROFSYS_PYTHON_VERSIONS="3.10;3.12"
2024-12-16 16:29:15 -05:00
ROCm Systems Profiler without ROCm
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To build ROCm Systems Profiler for use on systems without a GPU or the ROCm runtime, disable ROCm
support using the CMake configuration option `` ROCPROFSYS_USE_ROCM=OFF `` . See :ref: `cmake-options`
for more information.
Alternatively, use the provided build script with the appropriate options. See :ref: `build-script` .
For example, to build without ROCm support and create a STGZ installer, use the following command:
.. code-block :: shell
./scripts/build-release.sh --core +python --generators STGZ
2024-07-29 17:23:36 -04:00
.. _post-installation-steps:
Post-installation steps
========================================
2024-10-17 15:19:19 -04:00
After installation, you can optionally configure the ROCm Systems Profiler environment.
You should also test the executables to confirm ROCm Systems Profiler is correctly installed.
2024-07-29 17:23:36 -04:00
Configure the environment
-----------------------------------
2025-10-15 23:11:46 -04:00
If environment modules are available and preferred, then add them using these commands,
replacing `` 1.0.0 `` with the desired version number to load:
2024-07-29 17:23:36 -04:00
.. code-block :: shell
2024-10-17 15:19:19 -04:00
module use /opt/rocprofiler-systems/share/modulefiles
module load rocprofiler-systems/1.0.0
2024-07-29 17:23:36 -04:00
Alternatively, you can directly source the `` setup-env.sh `` script:
.. code-block :: shell
2024-10-17 15:19:19 -04:00
source /opt/rocprofiler-systems/share/rocprofiler-systems/setup-env.sh
2024-07-29 17:23:36 -04:00
Test the executables
-----------------------------------
2024-09-25 22:34:46 -04:00
Successful execution of these commands confirms that the installation does not have any
2024-07-29 17:23:36 -04:00
issues locating the installed libraries:
.. code-block :: shell
2024-10-17 15:19:19 -04:00
rocprof-sys-instrument --help
rocprof-sys-avail --help
2024-07-29 17:23:36 -04:00
.. note ::
If ROCm support is enabled, you might have to add the path to the ROCm libraries to `` LD_LIBRARY_PATH `` ,
for example, `` export LD_LIBRARY_PATH=/opt/rocm/lib:${LD_LIBRARY_PATH} `` .
.. _post-installation-troubleshooting:
Post-installation troubleshooting
========================================
2024-10-17 15:19:19 -04:00
This section explains how to resolve certain issues that might happen when you first use ROCm Systems Profiler.
2024-07-29 17:23:36 -04:00
Issues with RHEL and SELinux
----------------------------------------------------
2024-09-25 22:34:46 -04:00
RHEL (Red Hat Enterprise Linux) and related distributions of Linux automatically enable a security feature
2024-10-17 15:19:19 -04:00
named SELinux (Security-Enhanced Linux) that prevents ROCm Systems Profiler from running.
2025-11-06 16:06:28 -05:00
This issue applies to any Linux distribution with SELinux installed, including RHEL and Rocky Linux.
The problem can happen with any GPU, or even without a GPU.
2024-07-29 17:23:36 -04:00
The problem occurs after you instrument a program and try to
2024-10-17 15:19:19 -04:00
run `` rocprof-sys-run `` with the instrumented program.
2024-07-29 17:23:36 -04:00
.. code-block :: shell
g++ hello.cpp -o hello
2024-10-17 15:19:19 -04:00
rocprof-sys-instrument -M sampling -o hello.instr -- ./hello
rocprof-sys-run -- ./hello.instr
2024-07-29 17:23:36 -04:00
2024-09-25 22:34:46 -04:00
Instead of successfully running the binary with call-stack sampling,
2024-10-17 15:19:19 -04:00
ROCm Systems Profiler crashes with a segmentation fault.
2024-07-29 17:23:36 -04:00
.. note ::
If you are physically logged in on the system (not using SSH or a remote connection),
the operating system might display an SELinux pop-up warning in the notifications.
2024-09-25 22:34:46 -04:00
To workaround this problem, either disable SELinux or configure it to use a more
2024-07-29 17:23:36 -04:00
permissive setting.
2024-09-25 22:34:46 -04:00
To avoid this problem for the duration of the current session, run this command
2024-07-29 17:23:36 -04:00
from the shell:
.. code-block :: shell
sudo setenforce 0
For a permanent workaround, edit the SELinux configuration file using the command
2024-09-25 22:34:46 -04:00
`` sudo vim /etc/sysconfig/selinux `` and change the `` SELINUX `` setting to
2024-07-29 17:23:36 -04:00
either `` Permissive `` or `` Disabled `` .
.. note ::
2024-09-25 22:34:46 -04:00
Permanently changing the SELinux settings can have security implications.
2024-07-29 17:23:36 -04:00
Ensure you review your system security settings before making any changes.
Modifying RPATH details
----------------------------------------------------
2024-09-25 22:34:46 -04:00
If you're experiencing problems loading your application with an instrumented library,
then you might have to check and modify the RPATH specified in your application.
2024-07-29 17:23:36 -04:00
See the section on `troubleshooting RPATHs <../how-to/instrumenting-rewriting-binary-application.html#rpath-troubleshooting> `_
for further details.
Configuring PAPI to collect hardware counters
----------------------------------------------------
2024-09-25 22:34:46 -04:00
To use PAPI to collect the majority of hardware counters, ensure
the `` /proc/sys/kernel/perf_event_paranoid `` setting has a value less than or equal to `` 2 `` .
2024-12-16 16:29:15 -05:00
For more information, see the :ref: `rocprof-sys_papi_events` section.