[PATCH] [OG10] Fix warning messages in privatized-ref-[23].C testcases

Kwok Cheung Yeung kcy@codesourcery.com
Wed Sep 16 10:33:01 GMT 2020


Hello

The libgomp.oacc-c++/privatized-ref-[23].C testcases request 64 workers in a 
parallel section, but Nvidia only supports a maximum of 32 workers, and GCN a 
maximum of 16. The worker numbers are overridden by the compiler with a warning 
message printed, which causes test failures on Nvidia. On GCN, the warning 
message is not printed by default (enabled by -foffload=-Wopenacc-dims).

This patch fixes this by requesting 16 workers, which is acceptable on both 
Nvidia and AMD GCN. Committed on the OG10 branch as obvious.

Kwok
-------------- next part --------------
commit 15967a2016248eb04ef493af4e4889ceef9890b3
Author: Kwok Cheung Yeung <kcy@codesourcery.com>
Date:   Wed Sep 16 03:18:54 2020 -0700

    Fix warning messages in libgomp.oacc-c++/privatized-ref-[23].C testcases
    
    More workers are requested than are supported, resulting in warning messages
    as the number of workers is overridden.
    
    2020-09-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
    
    	libgomp/
    	* testsuite/libgomp.oacc-c++/privatized-ref-2.C (workers, vectors):
    	Reduce number of workers to 16.
    	* testsuite/libgomp.oacc-c++/privatized-ref-3.C (workers, vectors):
    	Likewise.

diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index 4f56f55..6e313aa 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,10 @@
+2020-09-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
+
+	* testsuite/libgomp.oacc-c++/privatized-ref-2.C (workers, vectors):
+	Reduce number of workers to 16.
+	* testsuite/libgomp.oacc-c++/privatized-ref-3.C (workers, vectors):
+	Likewise.
+
 2020-09-15  Tobias Burnus  <tobias@codesourcery.com>
 
 	Backport from mainline
diff --git a/libgomp/testsuite/libgomp.oacc-c++/privatized-ref-2.C b/libgomp/testsuite/libgomp.oacc-c++/privatized-ref-2.C
index 3884f16..052ccc5 100644
--- a/libgomp/testsuite/libgomp.oacc-c++/privatized-ref-2.C
+++ b/libgomp/testsuite/libgomp.oacc-c++/privatized-ref-2.C
@@ -7,7 +7,7 @@ void workers (void)
   double res[65536];
   int i;
 
-#pragma acc parallel copyout(res) num_gangs(64) num_workers(64)
+#pragma acc parallel copyout(res) num_gangs(64) num_workers(16)
   {
     int i, j;
 #pragma acc loop gang
@@ -34,7 +34,7 @@ void vectors (void)
   double res[65536];
   int i;
 
-#pragma acc parallel copyout(res) num_gangs(64) num_workers(64)
+#pragma acc parallel copyout(res) num_gangs(64) num_workers(16)
   {
     int i, j;
 #pragma acc loop gang worker
diff --git a/libgomp/testsuite/libgomp.oacc-c++/privatized-ref-3.C b/libgomp/testsuite/libgomp.oacc-c++/privatized-ref-3.C
index c1a10cb..d887178 100644
--- a/libgomp/testsuite/libgomp.oacc-c++/privatized-ref-3.C
+++ b/libgomp/testsuite/libgomp.oacc-c++/privatized-ref-3.C
@@ -7,7 +7,7 @@ void workers (void)
   double res[65536];
   int i;
 
-#pragma acc parallel copyout(res) num_gangs(64) num_workers(64)
+#pragma acc parallel copyout(res) num_gangs(64) num_workers(16)
   {
     int i, j;
     int tmpvar;
@@ -34,7 +34,7 @@ void vectors (void)
   double res[65536];
   int i;
 
-#pragma acc parallel copyout(res) num_gangs(64) num_workers(64)
+#pragma acc parallel copyout(res) num_gangs(64) num_workers(16)
   {
     int i, j;
     int tmpvar;


More information about the Gcc-patches mailing list