2018-04-19 10:53:38 +02:00
|
|
|
! { dg-do run }
|
|
|
|
|
|
|
|
PROGRAM MAIN
|
|
|
|
IMPLICIT NONE
|
|
|
|
|
'libgomp.oacc-fortran/{error_,}stop-{1,2,3}.f': initialize before the checkpoint
If, for example, GCC is configured such that 'libgomp-plugin-nvptx.so.1'
dynamically links against 'libcuda.so.1', but testing is run on a system where
there is no 'libcuda.so.1', this produces output such as:
PASS: libgomp.oacc-fortran/error_stop-1.f -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O0 (test for excess errors)
PASS: libgomp.oacc-fortran/error_stop-1.f -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O0 execution test
FAIL: libgomp.oacc-fortran/error_stop-1.f -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O0 output pattern test, is CheCKpOInT
libgomp: while loading libgomp-plugin-nvptx.so.1: libcuda.so.1: cannot open shared object file: No such file or directory
ERROR STOP
Error termination. Backtrace: [...]
, should match CheCKpOInT(
|
|^M)+ERROR STOP (
|
|^M)+Error termination.*
..., where after 'CheCKpOInT' we got 'libgomp: while loading [...]' injected
before the expected 'ERROR STOP'.
libgomp/
* testsuite/libgomp.oacc-fortran/error_stop-1.f: Initialize before
the checkpoint.
* testsuite/libgomp.oacc-fortran/error_stop-2.f: Likewise.
* testsuite/libgomp.oacc-fortran/error_stop-3.f: Likewise.
* testsuite/libgomp.oacc-fortran/stop-1.f: Likewise.
* testsuite/libgomp.oacc-fortran/stop-2.f: Likewise.
* testsuite/libgomp.oacc-fortran/stop-3.f: Likewise.
2020-05-06 10:05:49 +02:00
|
|
|
! Initialize before the checkpoint, in case this produces any output.
|
|
|
|
!$ACC PARALLEL
|
|
|
|
!$ACC END PARALLEL
|
|
|
|
|
2018-04-19 10:53:38 +02:00
|
|
|
PRINT *, "CheCKpOInT"
|
|
|
|
!$ACC PARALLEL
|
|
|
|
ERROR STOP
|
|
|
|
!$ACC END PARALLEL
|
|
|
|
PRINT *, "WrONg WAy"
|
|
|
|
|
|
|
|
END PROGRAM MAIN
|
|
|
|
|
|
|
|
! { dg-output "CheCKpOInT(\n|\r\n|\r)+" }
|
2024-06-05 14:34:06 +02:00
|
|
|
|
2018-04-19 10:53:38 +02:00
|
|
|
! { dg-output "ERROR STOP (\n|\r\n|\r)+" }
|
2019-12-05 08:38:53 +00:00
|
|
|
!
|
|
|
|
! In gfortran's main program, libfortran's set_options is called - which sets
|
|
|
|
! compiler_options.backtrace = 1 by default. For an offload libgfortran, this
|
|
|
|
! is never called and, hence, "Error termination." is never printed. Thus:
|
2020-04-21 14:16:24 +02:00
|
|
|
! { dg-output "Error termination.*" { target { ! { openacc_nvidia_accel_selected || openacc_radeon_accel_selected } } } }
|
2024-06-05 14:34:06 +02:00
|
|
|
|
|
|
|
! PR85463. The 'exit' implementation used with nvptx
|
|
|
|
! offloading is a little bit different.
|
2018-04-19 10:53:38 +02:00
|
|
|
! { dg-output "libgomp: cuStreamSynchronize error.*" { target openacc_nvidia_accel_selected } }
|
2024-06-05 14:34:06 +02:00
|
|
|
|
2018-04-19 10:53:38 +02:00
|
|
|
! { dg-shouldfail "" }
|