This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process' (was: [patch, libfortran, committed] Implement stop_numeric for minimal targets)


Hi,

On Thu, Apr 19 2018, Thomas Schwinge wrote:
>
> Per PR85463 '[nvptx] "exit" in offloaded region doesn't terminate
> process' that I just filed, we currently have to use "abort" instead of
> "exit" for nvptx offloading, so I have applied the following in trunk
> r259491, where I completed this by adding and testing stop_string,
> error_stop_string, and error_stop_numeric functions, too.
>
> commit 6bc09e4fa2e5e59dee18f1c03f2d6529b9b0045b
> Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
> Date:   Thu Apr 19 08:53:38 2018 +0000
>
>     PR85463 '[nvptx] "exit" in offloaded region doesn't terminate process'
>     
>             libgomp/
>             PR libfortran/85166
>             * testsuite/libgomp.oacc-fortran/abort-1.f90: Switch back to "call
>             abort".
>             * testsuite/libgomp.oacc-fortran/abort-2.f90: Likewise.
>     
>             libgfortran/
>             PR libfortran/85166
>             PR libgomp/85463
>             * runtime/minimal.c (stop_numeric): Reimplement.
>             (stop_string, error_stop_string, error_stop_numeric): New
>             functions.
>             libgomp/
>             PR libgomp/85463
>             * testsuite/libgomp.oacc-fortran/error_stop-1.f: New file.
>             * 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.
>     

The "output pattern test" part of all of these new testcases fail on my
HSA tester even though no HSAIL is generated for them, only host
fallback is used.  Looking at the first one:

> diff --git libgomp/testsuite/libgomp.oacc-fortran/error_stop-1.f libgomp/testsuite/libgomp.oacc-fortran/error_stop-1.f
> new file mode 100644
> index 0000000..4965e67
> --- /dev/null
> +++ libgomp/testsuite/libgomp.oacc-fortran/error_stop-1.f
> @@ -0,0 +1,20 @@
> +! { dg-do run }
> +
> +      PROGRAM MAIN
> +      IMPLICIT NONE
> +
> +      PRINT *, "CheCKpOInT"
> +!$ACC PARALLEL
> +      ERROR STOP
> +!$ACC END PARALLEL
> +      PRINT *, "WrONg WAy"
> +
> +      END PROGRAM MAIN
> +
> +! { dg-output "CheCKpOInT(\n|\r\n|\r)+" }
> +! { dg-output "ERROR STOP (\n|\r\n|\r)+" }
> +! PR85463.  The "minimal" libgfortran implementation used with nvptx
> +! offloading is a little bit different.
> +! { dg-output "Error termination.*" { target { ! openacc_nvidia_accel_selected } } }
> +! { dg-output "libgomp: cuStreamSynchronize error.*" { target openacc_nvidia_accel_selected } }
> +! { dg-shouldfail "" }

I can tell that checking for "CheCKpOInT" passes but checking for "ERROR
STOP" and "Error termination" do not.  Running the test manually, they
both appear, but in standard error, not standard output (where
CheCKpOInT is printed).  I am not 100% sure whether that is the reason
why they fail but do we have a way of testing std error of the executed
compiled binary?

Thanks,

Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]