Repository navigation
Fix the GPU build with NVHPC 26.9: let -cudalib=nvtx3 pick the NVTX wrapper - #2107
Closed
ruru25254649 wants to merge 3 commits into
Closed
ruru25254649 wants to merge 3 commits into
ruru25254649 wants to merge 3 commits into
Conversation
For CUDA >= 12.9 the targets linked nvhpcwrapnvtx by name in addition
to -cudalib=nvtx3. NVHPC 26.9 renamed that library to libnvhpcnvtx, so
the build stops at its first link (syscheck):
/usr/bin/ld: cannot find -lnvhpcwrapnvtx
-cudalib=nvtx3 already adds the wrapper under the right name for the
installed release (-lnvhpcwrapnvtx on 26.3, -lnvhpcnvtx on 26.9, per
nvfortran -dryrun), so the explicit name is dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WPhkY8p1EHhGY7jScizJmC
file-filter.yml lists CMakeLists.txt and toolchain/cmake/** but not the cmake/ directory added in MFlowCode#1552, so a PR that only changes cmake/*.cmake skips every build. Same line as in MFlowCode#2019. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WPhkY8p1EHhGY7jScizJmC
ruru25254649
requested review from
sbryngelson
and removed request for
a team
October 25, 2026 07:05
|
Claude Code Review Head SHA: aaaf38a Files changed:
Findings:
|
ruru25254649
marked this pull request as draft
October 25, 2026 07:18
Checked with nvfortran -cudalib=nvtx3 -dryrun on 25.9, 26.3 and 26.9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WPhkY8p1EHhGY7jScizJmC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When the CUDA toolkit is 12.9 or newer, so
CUDA::nvToolsExtdoes not exist,MFCTargets.cmakelinks NVHPC's NVTX wrapper twice:NVHPC 26.9 ships the library as
libnvhpcnvtxand no longer shipslibnvhpcwrapnvtx. A--gpu accor--gpu mpbuild with 26.9 therefore stops at its first link:The CI lanes go up to NVHPC 26.3, so none of them hit this.
The library does not need to be named at all. The driver flag
-cudalib=nvtx3already adds the wrapper under whichever name the installed release uses:nvfortran -cudalib=nvtx3 -dryrunlink line... -lnvhpcwrapnvtx ...... -lnvhpcnvtx ...This PR removes the explicit
nvhpcwrapnvtxand keeps-cudalib=nvtx3. The CUDA ≤ 12.8 branch (CUDA::nvToolsExt) is unchanged.The second commit adds
'cmake/**'to thecmakelistfilter in.github/file-filter.yml:CMakeLists.txtandtoolchain/cmake/**, but not thecmake/directory added in Share the global-parameters core across executables; generate MPI broadcasts; build hygiene #1552.cmake/*.cmake, like this one, skips the whole build and test matrix.Verification
On 2× H100 NVL (master
3ef5e1e):--gpu acc--gpu accnsys(./mfc.sh run ... --nsys,2D_riemann_test, 50 steps)TIMESTEP×50,COMPUTE-RHS×150,RHS-RIEMANN-SOLVER×300,RHS-RECONSTRUCTION×300, ...--gpu acctest suite, NVHPC 26.9./mfc.sh precheckpasses.The 47 hypoelasticity failures on NVHPC 26.9 are unrelated to this PR:
34F3999Bgivesabs: 1.56E-02, rel: 1.56E-05on both.--reldebug(-O1) and--debug(-O0 -Mbounds -C) builds pass, with no bounds errors. Dropping-Mfprelaxeddoes not help.They pass on NVHPC 25.9, and we will report them separately.
Re-checked on master
961cde5, RTX 4060 Ti (sm_89):--gpu accld: cannot find -lnvhpcwrapnvtx./mfc.sh test --gpu acc -% 3, NVHPC 26.9nsysNVTX summary, 64² 2D case, 20 stepsTIMESTEP×20,COMPUTE-RHS×60,RHS-RIEMANN-SOLVER×120,RHS-RECONSTRUCTION×120--gpu acc, clean build dirsyscheck,pre_processbuild;lddshowslibnvhpcwrapnvtx.so, as beforeSide effects
CUDA::nvToolsExt): unchanged.-cudalib=nvtx3links the samelibnvhpcwrapnvtxthat was named explicitly before (checked with-dryrunon 25.9 and 26.3, and withlddon a 26.3 build), so the link line is equivalent.file-filter.ymlline makes CI run the build matrix for anycmake/change, which is more CI time for such PRs.Contribution Policy
All contributions are expected to demonstrate:
If these expectations are not met, we would prefer to implement the changes ourselves rather than spend time reviewing low-effort submissions.
Acknowledgement
This PR is from Your Team Name participating in the SC26 Student Cluster Competition.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WPhkY8p1EHhGY7jScizJmC