On 16.06.23 22:42, Thomas Schwinge wrote:
I see the new tests PASS, but with offloading enabled (nvptx) also see:PASS: libgomp.c/target-51.c (test for excess errors) PASS: libgomp.c/target-51.c execution test [-PASS:-]{+FAIL:+} libgomp.c/target-51.c output pattern test ... due to: Output was: libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device cannot be used for offloading Should match: .*libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found.*
Thanks for the report. I can offer yet another wording for the same program – and also with nvptx enabled: libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device cannot be used for offloading And I can also offer (which is already in the testcase with "! offload_device"): libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but only the host device is available I think I will just match "..., but .*" without distinguishing check_effective_target_* ... ... which I now did in commit r14-1926-g01fe115ba7eafe (see also attached patch). * * * With offloading, there are simply too many possibilities: * Not compiled with offloading support - vs. with (ENABLE_OFFLOADING) * Support compiled in but either compiler or library support not installed (requires configuring with --enable-offload-defaulted) * Offloading libgomp plugins there but no CUDA or hsa runtime libraries * The latter being installed but no device available Plus -foffload=disable or only enabling an (at runtime) unavailable or unsupported device type or other issues like CUDA and device present but an issue with the kernel driver (or similar half-broken states) or ... [And with remote testing issues related to dg-set-target-env-var and only few systems supporting offloading, a full test coverage is even harder.] Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
commit 01fe115ba7eafebcf97bbac9e157038a003d0c85 Author: Tobias Burnus <[email protected]> Date: Mon Jun 19 09:52:10 2023 +0200 libgomp.c/target-51.c: Accept more error-msg variants in dg-output Depending on the details, the testcase can fail with different but related messages; all of the following all could be observed for this testcase: libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device cannot be used for offloading libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but only the host device is available Before, the last two were tested for with 'target offload_device' and '! offload_device', respectively. Now, all three are accepted by matching '.*' already after 'but' and without distinguishing whether the effective target is an offload_device or not. (For completeness, there is a fourth error that follows this pattern: 'OMP_TARGET_OFFLOAD is set to MANDATORY, but device is finalized'.) libgomp/ * testsuite/libgomp.c/target-51.c: Accept more error msg variants as expected dg-output. --- libgomp/testsuite/libgomp.c/target-51.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libgomp/testsuite/libgomp.c/target-51.c b/libgomp/testsuite/libgomp.c/target-51.c index bbe9ade6e24..db0363bfc14 100644 --- a/libgomp/testsuite/libgomp.c/target-51.c +++ b/libgomp/testsuite/libgomp.c/target-51.c @@ -9,8 +9,7 @@ /* See comment in target-50.c/target-50.c for why the output differs. */ -/* { dg-output ".*libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but only the host device is available.*" { target { ! offload_device } } } */ -/* { dg-output ".*libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found.*" { target offload_device } } */ +/* { dg-output ".*libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but .*" } } */ int main ()
