[PATCH 6/7, OpenACC, libgomp, v5, stage1] Async re-work, testsuite changes

Thomas Schwinge thomas@codesourcery.com
Wed Feb 20 11:08:00 GMT 2019


Hi Chung-Lin!

On Tue, 22 Jan 2019 22:53:47 +0800, Chung-Lin Tang <chunglin_tang@mentor.com> wrote:
> These are the testsuite changes. After the last review round, the amount of
> additional changes have been greatly reduced.

Yes.  And I think should be further reduced:

>      * testsuite/libgomp.oacc-c-c++-common/asyncwait-2.c: New testcase.

This is a (rather minimal...) test case for 'acc_set_default_async', so
not to be included in this "async re-work".


> --- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-81.c	(revision 268142)
> +++ libgomp/testsuite/libgomp.oacc-c-c++-common/lib-81.c	(working copy)

|   for (i = 0; i < N; i++)
|     {
|       r = cuLaunchKernel (delay, 1, 1, 1, 1, 1, 1, 0, streams[i], kargs, 0);
|       if (r != CUDA_SUCCESS)
| 	{
| 	  fprintf (stderr, "cuLaunchKernel failed: %d\n", r);
| 	  abort ();
| 	}
|     }
| 
|   acc_wait_all_async (N);
>  
>    for (i = 0; i <= N; i++)
>      {
> -      if (acc_async_test (i) != 0)
> +      if (acc_async_test (i) == 0)
>  	abort ();
>      }

That change I don't agree with.  The idea of this test case -- in my
understanding, but please correct me if I'm wrong -- is that after the
'acc_wait_all_async', all these async queues are still "busy" , and then:

|   acc_wait (N);
| 
|   for (i = 0; i <= N; i++)
|     {
|       if (acc_async_test (i) != 1)
| 	abort ();
|     }

... after this 'acc_wait', they're all "idle".  Your "async re-work"
shouldn't be changing this behavior, so no change required here?

(That this test cases sometimes PASSes, sometimes FAILs is true before as
well as after your changes, but that's an issue with this and other test
cases, to be addressed separately.)

> --- libgomp/testsuite/libgomp.oacc-fortran/lib-12.f90	(revision 268142)
> +++ libgomp/testsuite/libgomp.oacc-fortran/lib-12.f90	(working copy)
> @@ -1,4 +1,5 @@
>  ! { dg-do run }
> +! { dg-xfail-run-if "n/a" { openacc_host_selected } }
>  
>  program main
>    use openacc

That I don't understand, it's not FAILing for me.  What kind of problem
are you seeing here?


Grüße
 Thomas



More information about the Gcc-patches mailing list