Observed issues › harvest/nvhpc2511-target-nowait-in-parallel-for-ice
Appears to behave incorrectlyCompiler crash · C · OpenMP · Fixed in 26.9
nvc 25.11 crashes compiling a target nowait region in the worksharing loop of a parallel region
Legality: independently confirmed. 2 independent readings find the program legal and the result required. How this is checked
Affected variants
| Compiler | MI300A gfx942 unified memory (XNACK 1) | MI300A gfx942 copy (XNACK 0) | MI250X gfx90a copy (XNACK 0) | MI300X gfx942 copy (XNACK 0) | MI350X gfx950 copy (XNACK 0) | A100 sm_80 separate memory | A100 sm_80 managed memory |
|---|---|---|---|---|---|---|---|
| AFAR 24.3.0 | correct | correct | unknown not run | correct | correct | n/a | n/a |
| CCE 19.0.0 | correct | correct | unknown not run | unknown not run | unknown not run | n/a | n/a |
| CCE 20.0.2 | correct | correct | unknown not run | unknown not run | unknown not run | n/a | n/a |
| CCE 21.0.3 | correct | correct | unknown not run | unknown not run | unknown not run | n/a | n/a |
| CCE 21.0.4 | correct | unknown varies between environments | unknown not run | unknown not run | unknown not run | n/a | n/a |
| NVHPC 25.11 | n/a | n/a | n/a | n/a | n/a | behaves incorrectly | behaves incorrectly |
| NVHPC 26.9 | n/a | n/a | n/a | n/a | n/a | correct | correct |
| GCC 16.2.0 | fails another way | fails another way | fails another way | fails another way | fails another way | fails another way | n/a |
"behaves incorrectly" / "not supported": this issue, confirmed in up to four environments (another build directory, another node, a repeat). "fails another way": a different failure, not counted as this issue. "unknown": not run there, or the runs disagree.
Messages
| Result | Compiler and GPU | Message |
|---|---|---|
| behaves incorrectly | NVHPC 25.11, A100 separate NVHPC 25.11, A100 managed | showNVC++-F-0000-Internal compiler error. targetinfo symbol not found in uplevel struct 1209 (site-harvest--nvhpc2511-target-nowait-in-parallel-for-ice.c: 42) NVC++/x86-64 Linux 25.11-0: compilation aborted |
| fails another way | GCC 16.2.0, MI300A unified | showlibgomp: libgomp: libgomp: libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found libgomp: libgomp: libgomp: |
| fails another way | GCC 16.2.0, MI300A copy | showlibgomp: libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found libgomp: libgomp: libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found libgomp: libgomp: libgomp: |
| fails another way | GCC 16.2.0, MI250X | showlibgomp: libgomp: libgomp: libgomp: libgomp: libgomp: libgomp: libgomp: |
| fails another way | GCC 16.2.0, MI300X | showlibgomp: libgomp: libgomp: libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not foundOMP_TARGET_OFFLOAD is set to MANDATORY, but device not found libgomp: libgomp: libgomp: |
| fails another way | GCC 16.2.0, MI350X | showlibgomp: libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found libgomp: libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found libgomp: |
| fails another way | GCC 16.2.0, A100 separate | showlibgomp: libgomp: libgomp: libgomp: libgomp: libgomp: libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found libgomp: |
Reproduce
NVHPC 25.11, A100 separate
export LD_LIBRARY_PATH=$NVHPC_25_11/compilers/lib nvc -mp=gpu -gpu=cc80 -gpu=mem:separate -O2 repro.c -o repro OMP_TARGET_OFFLOAD=mandatory ./repro
AFAR 24.3.0, MI300A unified (runs correctly)
$AFAR/bin/amdclang -fopenmp --offload-arch=gfx942 -O2 repro.c -o repro HSA_XNACK=1 OMP_TARGET_OFFLOAD=mandatory ./repro
Program (56 lines)
// # Finding (known-issues harvest): NVHPC 25.11 crashes compiling a target nowait
// region in the worksharing loop of a parallel region
//
// - source: the NVIDIA forum topic 251225 (NVHPC 23.3, "Internal compiler error. targetinfo
// symbol not found in uplevel struct"; TPR 33521, "fixed in our 25.7 release" per the vendor);
// data/bench/harvest-known hk-030 (trip count num_iterations, the posted form); this file has a
// constant trip count (data/reports/harvest-known/c030-const-trip.c), which fails the same way
// - compilers: NVHPC nvc 25.11, -mp=gpu -gpu=cc80; NVHPC 26.9 compiles and runs it
// - expected: the program compiles and prints bad = 0, RESULT ... check=pass: each target task
// writes one element of a[i:1]; the deferred target tasks complete at the implicit barrier
// that ends the parallel region
// - actual: "NVC++-F-0000-Internal compiler error. targetinfo symbol not found in uplevel struct
// 1209", both memory-mode builds
// - control (same compiler): without nowait the program compiles and runs
// (data/reports/harvest-known/c030-no-nowait.c); NVHPC 26.9 compiles and runs this file
// - other families: AFAR compiles and runs it (bad = 0) on gfx90a and gfx942; CCE 19/20/21
// compile it. CCE 19 and 21 at HSA_XNACK=0 lost one target task's element of the posted form
// (hk-030) in the loaded matrix run (bad = 1, then 2; gate: nondeterministic; 20 repeats on an
// idle node pass, as do its controls); not claimed
// - legality: "The target construct generates a target task ... If the nowait clause is
// present, execution of the target task may be deferred" (OpenMP 5.2 §13.8 p.284 l.14-17).
// Ruled legal by hand (fix; the confirmer's scope rule does not vet host parallel and
// for, R04): a is shared in the parallel region, i is private to the worksharing loop and
// firstprivate in the target; each target task maps a disjoint one-element section a[i:1], so
// no storage is mapped twice; the deferred target tasks complete by the worksharing loop's
// implicit barrier, and the host code that reads a runs after the region. An internal compiler
// error is a defect on any input. The pre-run check accepts the program
// - evidence: results/harvest-known/main.wingtip (hk-030, gate: confirmed), results/harvest-known/probes.wingtip.jsonl
#include <omp.h>
#include <stdio.h>
int main(void)
{
int num_iterations = 100;
int a[100];
for (int i = 0; i < 100; ++i) a[i] = -1;
#pragma omp parallel
{
#pragma omp for
for (int i = 0; i < 100; ++i) {
#pragma omp target nowait map(tofrom: a[i:1])
{
a[i] = 2 * i + 1;
}
}
}
int bad = 0;
for (int i = 0; i < num_iterations; ++i)
if (a[i] != 2 * i + 1) ++bad;
printf("bad = %d\n", bad);
int hk_host = 1;
#pragma omp target map(tofrom: hk_host)
hk_host = omp_is_initial_device();
printf("RESULT ran_on_host=%d check=%s\n", hk_host, bad == 0 ? "pass" : "fail");
return 0;
}
Something to add? Dispute its legality · Report it fixed in a newer release · Report a mistake on this page
Expected and observed
Expected
check=pass
Observed where it behaves incorrectly
NVC++-F-0000-Internal compiler error. targetinfo symbol not found in uplevel struct 1209 (site-harvest--nvhpc2511-target-nowait-in-parallel-for-ice.c: 42) NVC++/x86-64 Linux 25.11-0: compilation aborted
What the specification requires
The specification text this program relies on and the compiler is expected to support.
OpenMP 5.2 §13.8 p.284 l.14-17
The target construct generates a target task ... If the nowait clause is present, execution of the target task may be deferred
Evidence
Other compilers run it correctly
AFAR 24.3.0, CCE 19.0.0, CCE 20.0.2, CCE 21.0.3, CCE 21.0.4