Repository navigation
Fix the NVHPC 26.9 link, and work around its any() miscompile #2111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ python_src: &python_src | |
|
|
||
| cmakelist: &cmakelist | ||
| - 'CMakeLists.txt' | ||
| - 'cmake/**' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line is also in #2019; one of the two PRs should drop it. Related:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since #2019 was closed without merging, I've kept I've also added |
||
| - 'toolchain/cmake/**' | ||
|
|
||
| tests: &tests | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,6 +117,8 @@ jobs: | |
| - { nvhpc: '26.1', target: gpu } | ||
| - { nvhpc: '26.3', target: cpu } | ||
| - { nvhpc: '26.3', target: gpu } | ||
| - { nvhpc: '26.9', target: cpu } | ||
| - { nvhpc: '26.9', target: gpu } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Two notes on this job:
Also, the 26.9 testing in the description used the tarball, not
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| fail-fast: false | ||
| continue-on-error: true | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -345,8 +345,10 @@ exit 0 | |
| if (TARGET CUDA::nvToolsExt) # CUDA <= 12.8 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This branch is chosen by what FindCUDAToolkit finds (
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I checked whether the branch could be removed. NVHPC 21.7, 21.11, 22.2 and 22.3 reject -cudalib=nvtx3. Versions 22.11, 23.11 and 24.5 accept it but leave the NVTX calls unresolved when it is used alone. Those releases still need the CUDA::nvToolsExt path. I also forced all four pairings of CMake's CUDA and nvfortran's CUDA on each of two releases: 25.5 with CUDA 11.8/12.9, and 26.9 with CUDA 12.9/13.3. With this PR, the NVTX test calls link and run in all eight combinations. In the case you described on 25.5—CMake finding 11.8 while nvfortran uses 12.9—the build links 11.8's libnvToolsExt, which resolves the calls. That branch is unchanged. The reverse pairing also works with -cudalib=nvtx3 alone. On 26.9, all four pairings use the changed branch and pass; master fails all four because it explicitly requests the old wrapper name. These are checks of the NVTX calls, rather than full CFD regression runs for every pairing. |
||
| target_link_libraries(${a_target} PRIVATE CUDA::nvToolsExt) | ||
| else() # CUDA >= 12.9 | ||
| target_link_libraries(${a_target} PRIVATE nvhpcwrapnvtx) | ||
| # -cudalib=nvtx3 lets the NVHPC driver link its NVTX wrapper, whose name changes between releases. | ||
| # Only nvfortran understands the flag, so it must drive the link. | ||
| target_link_options(${a_target} PRIVATE "-cudalib=nvtx3") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is my main concern. With the explicit Could you run the same Related:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Checked on 25.5, 25.7, 25.9, 25.11, 26.1, 26.3 and 26.9. MFC's actual m_nvtx.f90, with calls to nvtxRangePushA, nvtxRangePushEx and nvtxRangePop, links and runs with only -cudalib=nvtx3 under both -acc and -mp=gpu. Using the environment settings from the CI images, FindCUDAToolkit finds CUDA 12.9 or newer and reports no CUDA::nvToolsExt, so these configurations exercise the changed branch. For MFC itself, syscheck and pre_process build with both --gpu acc and --gpu mp on 25.5, 25.7, 25.11 and 26.1. All four targets build with both on 26.3 and 26.9. The release-by-release results are in the description.
Added LINKER_LANGUAGE Fortran to the targets in the -cudalib=nvtx3 branch, so nvfortran continues to drive the link if C or C++ sources are added later. |
||
| set_target_properties(${a_target} PROPERTIES LINKER_LANGUAGE Fortran) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once this lands, NVHPC 26.9 builds succeed, but per the PR description 26.9 at
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've included the workaround in this PR as a separate commit, before the link fix.
With the workaround, the hypoelasticity tests pass on the current code with NVHPC 26.9: 61 of 61 on CPU with the CI job's flags, and 62 of 62 on an H100 with both Without the workaround, 13 of the first 23 tests fail on the H100 in each GPU mode before the run aborts. Failures were also reproduced on CPU. The compiler bug and a reproducer are documented in the description. |
||
| endif() | ||
| endif() | ||
| endforeach() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.