libgomp C++ testsuite: Use 'lang_include_flags' instead of 'libstdcxx_includes'
With nvptx offloading configured, and supported, and CUDA available:
$ make check-target-libgomp RUNTESTFLAGS="--all c.exp=context-1.c c++.exp=context-1.c"
[...]
Running [...]/libgomp.oacc-c/c.exp ...
PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/context-1.c -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O0 (test for excess errors)
PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/context-1.c -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O0 execution test
PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/context-1.c -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O2 (test for excess errors)
PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/context-1.c -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O2 execution test
UNSUPPORTED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/context-1.c -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O2
Running [...]/libgomp.oacc-c++/c++.exp ...
PASS: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/context-1.c -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O0 (test for excess errors)
PASS: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/context-1.c -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O0 execution test
PASS: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/context-1.c -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O2 (test for excess errors)
PASS: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/context-1.c -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O2 execution test
UNSUPPORTED: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/context-1.c -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O2
[...]
..., but for 'c++.exp=context-1.c' alone, we currently get all-UNSUPPORTED:
$ make check-target-libgomp RUNTESTFLAGS_="--all c++.exp=context-1.c"
[...]
Running [...]/libgomp.oacc-c++/c++.exp ...
UNSUPPORTED: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/context-1.c -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O0
UNSUPPORTED: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/context-1.c -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O2
UNSUPPORTED: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/context-1.c -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O2
[...]
That is, if 'c.exp' executes first, it does successfully evaluate
'dg-require-effective-target openacc_cublas' -- and does cache this result (so
it isn't reevaluated for 'c++.exp'). However, for 'c++.exp' alone (that is,
without the 'c.exp' result cached), we run into:
spawn -ignore SIGHUP [xgcc] [...] -x c++ openacc_cublas2311907.c [...]
In file included from /usr/include/cuda_fp16.h:3673,
from /usr/include/cublas_api.h:75,
from /usr/include/cublas_v2.h:65,
from openacc_cublas2311907.c:3:
/usr/include/cuda_fp16.hpp:67:10: fatal error: utility: No such file or directory
We're missing include paths to C++/libstdc++ build-tree headers.
Fix this by using the mechanism introduced for Fortran in
r212268 (commit f707da16f7
) re
"libgomp.fortran/fortran.exp - add -fintrinsic-modules-path ${blddir}".
libgomp/
* testsuite/libgomp.c++/c++.exp: Use 'lang_include_flags' instead
of 'libstdcxx_includes'.
* testsuite/libgomp.oacc-c++/c++.exp: Likewise.
This commit is contained in:
parent
d6654a4be3
commit
1b93b9191d
2 changed files with 6 additions and 8 deletions
|
@ -66,13 +66,12 @@ if { $lang_test_file_found } {
|
|||
|
||||
set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags"
|
||||
if { [file exists $flags_file] } {
|
||||
set libstdcxx_includes [exec sh $flags_file --build-includes]
|
||||
} else {
|
||||
set libstdcxx_includes ""
|
||||
set lang_source_re {^.*\.[cC]$}
|
||||
set lang_include_flags [exec sh $flags_file --build-includes]
|
||||
}
|
||||
|
||||
# Main loop.
|
||||
dg-runtest $tests "" "$libstdcxx_includes $DEFAULT_CFLAGS"
|
||||
dg-runtest $tests "" $DEFAULT_CFLAGS
|
||||
}
|
||||
|
||||
# See above.
|
||||
|
|
|
@ -72,9 +72,8 @@ if { $lang_test_file_found } {
|
|||
|
||||
set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags"
|
||||
if { [file exists $flags_file] } {
|
||||
set libstdcxx_includes [exec sh $flags_file --build-includes]
|
||||
} else {
|
||||
set libstdcxx_includes ""
|
||||
set lang_source_re {^.*\.[cC]$}
|
||||
set lang_include_flags [exec sh $flags_file --build-includes]
|
||||
}
|
||||
|
||||
# Test with all available offload targets, and with offloading disabled.
|
||||
|
@ -147,7 +146,7 @@ if { $lang_test_file_found } {
|
|||
}
|
||||
}
|
||||
|
||||
gcc-dg-runtest $tests "$tagopt" "$libstdcxx_includes"
|
||||
gcc-dg-runtest $tests "$tagopt" ""
|
||||
}
|
||||
unset offload_target
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue