Skip to content

fix(rocprofiler-sdk): add openmpi to BUILD_DEPS - #6776

Merged
araravik-psd merged 3 commits into
mainfrom
users/arravikum/rocprofiler-sdk-add-openmpi-build-dep
Jul 22, 2026
Merged

araravik-psd merged 3 commits into
mainfrom
users/arravikum/rocprofiler-sdk-add-openmpi-build-dep

Conversation

@araravik-psd

@araravik-psd araravik-psd commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem

When openmpi was added as a super-project component in TheRock, the dep provider (therock_subproject_dep_provider.cmake:68) began intercepting find_package(MPI) calls from
subprojects. rocprofiler-sdk calls find_package(MPI) in cmake/rocprofiler_config_interfaces.cmake:408 — this was added as part of rocshmem tracing support (AIPROFSDK-886) because
rocshmem's installed CMake config references MPI::MPI_CXX in its link interface and must be located before find_package(rocshmem) can succeed.

Since openmpi was not declared in rocprofiler-sdk's therock_cmake_subproject_declare, the dep provider hard-errors with:

CMake Error at cmake/therock_subproject_dep_provider.cmake:68 (message):
Project contains find_package(MPI) for a package available in the
super-project but not declared: Add a BUILD_DEPS or RUNTIME_DEPS
appropriately

Commit in therock causing this: f1a8031

After this commit: The package registry is disabled inside all subprojects. Now when rocprofiler-sdk calls find_package(MPI), the dep provider enforces that MPI must be declared in BUILD_DEPS or RUNTIME_DEPS. Since the RCCL CI build passes -DTHEROCK_ENABLE_MPI=ON (via THEROCK_ENABLE_COMM_LIBS=ON), MPI is in THEROCK_STRICT_PROVIDED_PACKAGES — but rocprofiler-sdk's declaration in TheRock/profiler/CMakeLists.txt lists no MPI dependency → FATAL_ERROR.

This caused rocprofiler-sdk configure to fail, which in turn caused the RCCL CI build to fail in rocm-systems after the TheRock hash bump to 22004a6 (2026-07-20).

Fix

Add openmpi to BUILD_DEPS in the therock_cmake_subproject_declare(rocprofiler-sdk ...) block in profiler/CMakeLists.txt. This tells the dep provider the find_package(MPI)
call is intentional and allows configure to proceed normally.

Testing

  • rocprofiler-sdk configure should complete without error
  • RCCL CI build in rocm-systems should pass after bumping to a TheRock hash that includes this fix

Test rocm-systems run with pinned TheRock commit: https://github.com/ROCm/rocm-systems/actions/runs/29940406058/job/88993031854?pr=9029

…cmake_subproject_declare(rocprofiler-sdk ...)
@therock-pr-bot

therock-pr-bot Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
🌿 Branch Name ✅ Pass —
📝 PR Title/Description ❌ Fail Error: PR description must reference a JIRA ID, ISSUE ID, or a GitHub closing keyword.
Expected: include a JIRA ID / ISSUE ID line (separator : or -, or omitted; value may be a JIRA key, a number with/without #, or a link), OR a closing keyword + issue reference. Accepted examples:
• JIRA ID : TESTAUTO-6039
• JIRA ID - #330
• JIRA ID #330
• JIRA ID (on separate line)
ROCM-25757
• ISSUE ID : TESTUTO-3334
• ISSUE ID #3334
• ISSUE ID - TESTAUTO-3433
• ISSUE ID (on separate line)
AIRUNTIME-2352
• ISSUE ID : https://github.com/<org_name>/<repo_name>/issues/1234
• Closes #10
• Fixes octo-org/octo-repo#100
• Resolves: #123
• #123
• https://github.com/<org_name>/<repo_name>/issues/123
Current: no valid JIRA/ISSUE/closing-keyword reference found
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🔎 pre-commit ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

⚠️ 1 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ PR Title/Description

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@therock-pr-bot therock-pr-bot Bot added the Not ready to Review PR has unresolved policy failures — reviews blocked label Jul 22, 2026
@therock-pr-bot

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ PR Title/Description

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

@ScottTodd ScottTodd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may also be interested in #6610 and #5627 (cc @minseobshin11). I'm not sure if we want to keep THEROCK_ENABLE_MPI given the packaging/distribution complexity there. If it's just a runtime dep used at test time then we can hopefully satisfy it via the test dockerfile, so long as the projects are at least able to build with dynamic linking MPI support somehow...

Comment thread profiler/CMakeLists.txt Outdated
Comment on lines 133 to 136
BUILD_DEPS
${_openmpi_optional_dep}
RUNTIME_DEPS
aqlprofile

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this _openmpi_optional_dep be a build dep or a runtime dep?

The other uses have it in RUNTIME_DEPS:

  • INSTALL_RPATH_DIRS
    "lib/rocprofiler-compute"
    RUNTIME_DEPS
    rocprofiler-sdk
    aqlprofile
    hip-clr
    rocprofiler-register
    ${THEROCK_BUNDLED_ELFUTILS}
    ${THEROCK_BUNDLED_LIBDRM}
    ${THEROCK_BUNDLED_SQLITE3}
    ${_openmpi_optional_dep}
    TEST_SUBPROJECTS
  • BUILD_DEPS
    therock-spdlog
    therock-fmt
    RUNTIME_DEPS
    amdsmi
    aqlprofile
    hip-clr
    rocprofiler-register
    rocprofiler-sdk
    ${THEROCK_BUNDLED_ELFUTILS}
    ${THEROCK_BUNDLED_LIBDRM}
    ${THEROCK_BUNDLED_SQLITE3}
    ${_openmpi_optional_dep}
    TEST_SUBPROJECTS

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe, It should stay in BUILD_DEPS. The find_package(MPI) in rocprofiler-sdk fires at configure time. the dep provider intercepts it before a single source file is compiled. I feel, the other subprojects that put _openmpi_optional_dep in RUNTIME_DEPS are most likely only using MPI for test execution, not as a compile-time linking dependency.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All RUNTIME_DEPS are also BUILD_DEPS, not all BUILD_DEPS are RUNTIME_DEPS, see

# BUILD_DEPS: Projects which must build and provide their packages prior to this
# one.
# RUNTIME_DEPS: Projects which must build prior to this one and whose install
# files must be distributed with this project's artifacts in order to
# function.

If MPI is only used at build time then BUILD_DEPS is appropriate. If it's also used at run time then it should go in RUNTIME_DEPS.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ScottTodd for linking #6610 and #5627, Keeping BUILD_DEPS, MPI is intentionally not distributed with ROCm artifacts (from #6610 which added the dedicated OpenMPI test image for exactly this reason, and #5627 which wires rocprofiler-sdk tests to use it). libmpi.so is satisfied at test runtime via the container
image, not shipped with release artifacts, so BUILD_DEPS would be accurate here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe? I'd prefer local consistency with a small fix like this.

If we need MPI available at configure time but we don't want to distribute it (leaving it as an optionally dynamically linked runtime dependency), then I think BUILD_DEPS could work, but we'd want to be careful about how we represent that in the build and packaging files. Pretty much all of our other dependencies expect to be vendored and distributed together with the libraries and tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point on local consistency, I'll move it to RUNTIME_DEPS to match rocprofiler-compute and rocprofiler-systems. The proper long-term fix (guarding find_package(MPI) in rocprofiler-sdk's cmake so it's not reached in standard builds at all) will come as a follow-up PR in rocprofiler-sdk, which will make the dep declaration here moot when THEROCK_ENABLE_MPI=OFF. Moving now to unblock RCCL CI.

@araravik-psd
araravik-psd merged commit 2e7c190 into main Jul 22, 2026
13 of 14 checks passed
@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage Jul 22, 2026
@araravik-psd
araravik-psd deleted the users/arravikum/rocprofiler-sdk-add-openmpi-build-dep branch July 22, 2026 22:15

@marbre marbre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Post-review: Adding Open MPI as a runtime dep is indeed correct here.

araravik-psd added a commit to ROCm/rocm-systems that referenced this pull request Jul 23, 2026
Description:
Bumps the pinned TheRock ref from `22004a6bc8a` (2026-07-20) to
`2e7c190b99c` (2026-07-22).

  ## What's in this bump

Includes the fix from ROCm/TheRock#6776 which adds `openmpi` to
rocprofiler-sdk's
`RUNTIME_DEPS` in the TheRock profiler CMakeLists. This resolves the
rocprofiler-sdk
configure failure caused by `find_package(MPI)` being intercepted by
TheRock's dep
  provider after openmpi was added as a super-project component.

  ## Why

Unblocks RCCL CI which has been failing since the previous TheRock bump
to `22004a6`
introduced openmpi as a super-project component without a corresponding
dep declaration
  in rocprofiler-sdk.

  ## Follow-up

A separate PR in rocprofiler-sdk will guard the `find_package(MPI)` call
at the source
level as the longer-term fix, keeping MPI out of standard builds
entirely.

Co-authored-by: Aravind Ravikumar <arravikum@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Not ready to Review PR has unresolved policy failures — reviews blocked

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants