]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgomp: Add openacc_{cuda,cublas,cudart} effective targets and use them in openacc...
authorJakub Jelinek <jakub@redhat.com>
Fri, 28 May 2021 08:08:56 +0000 (10:08 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Fri, 28 May 2021 08:10:14 +0000 (10:10 +0200)
When gcc is configured for nvptx offloading with --without-cuda-driver
and full CUDA isn't installed, many libgomp.oacc-*/* tests fail,
some of them because cuda.h header can't be found, others because
the tests can't be linked against -lcuda, -lcudart or -lcublas.
I usually only have akmod-nvidia and xorg-x11-drv-nvidia-cuda rpms
installed, so libcuda.so.1 can be dlopened and the offloading works,
but linking against those libraries isn't possible nor are the
headers around (for the plugin itself there is the fallback
libgomp/plugin/cuda/cuda.h).

The following patch adds 3 new effective targets and uses them in tests that
needs those.

2021-05-27  Jakub Jelinek  <jakub@redhat.com>

* testsuite/lib/libgomp.exp (check_effective_target_openacc_cuda,
check_effective_target_openacc_cublas,
check_effective_target_openacc_cudart): New.
* testsuite/libgomp.oacc-fortran/host_data-4.f90: Require effective
target openacc_cublas.
* testsuite/libgomp.oacc-fortran/host_data-2.f90: Likewise.
* testsuite/libgomp.oacc-fortran/host_data-3.f: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-91.c: Require effective
target openacc_cuda.
* testsuite/libgomp.oacc-c-c++-common/lib-70.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-90.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-75.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-69.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-74.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-81.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-72.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/pr87835.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-73.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-78.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-76.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-84.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/host_data-1.c: Require effective
targets openacc_cublas and openacc_cudart.
* testsuite/libgomp.oacc-c-c++-common/context-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/context-2.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/context-3.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/context-4.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/acc_get_property-nvptx.c:
Require effective target openacc_cudart.
* testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Add -DUSE_CUDA_H
for effective target openacc_cuda and add && defined USE_CUDA_H to
preprocessor conditionals.  Guard -lcuda also on openacc_cuda
effective target.

(cherry picked from commit 79e3f7d54bc4e34b096082d3b90042d9f0fbaf1a)

29 files changed:
libgomp/ChangeLog.omp
libgomp/testsuite/lib/libgomp.exp
libgomp/testsuite/libgomp.oacc-c-c++-common/acc_get_property-nvptx.c
libgomp/testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c
libgomp/testsuite/libgomp.oacc-c-c++-common/context-1.c
libgomp/testsuite/libgomp.oacc-c-c++-common/context-2.c
libgomp/testsuite/libgomp.oacc-c-c++-common/context-3.c
libgomp/testsuite/libgomp.oacc-c-c++-common/context-4.c
libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-1.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-69.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-70.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-72.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-73.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-74.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-75.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-76.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-78.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-79.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-81.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-82.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-83.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-84.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-85.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-90.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-91.c
libgomp/testsuite/libgomp.oacc-c-c++-common/pr87835.c
libgomp/testsuite/libgomp.oacc-fortran/host_data-2.f90
libgomp/testsuite/libgomp.oacc-fortran/host_data-3.f
libgomp/testsuite/libgomp.oacc-fortran/host_data-4.f90

index 87b2e27f39cdd47c3f1283a21c65e421b527be25..07feb3dc582e29df2fa8b9d0c6cbde1d0de871a0 100644 (file)
@@ -1,3 +1,46 @@
+2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
+
+       Backported from master:
+       2021-05-27  Jakub Jelinek  <jakub@redhat.com>
+
+       * testsuite/lib/libgomp.exp (check_effective_target_openacc_cuda,
+       check_effective_target_openacc_cublas,
+       check_effective_target_openacc_cudart): New.
+       * testsuite/libgomp.oacc-fortran/host_data-4.f90: Require effective
+       target openacc_cublas.
+       * testsuite/libgomp.oacc-fortran/host_data-2.f90: Likewise.
+       * testsuite/libgomp.oacc-fortran/host_data-3.f: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-91.c: Require effective
+       target openacc_cuda.
+       * testsuite/libgomp.oacc-c-c++-common/lib-70.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-90.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-75.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-69.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-74.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-81.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-72.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/pr87835.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-73.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-78.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-76.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-84.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/host_data-1.c: Require effective
+       targets openacc_cublas and openacc_cudart.
+       * testsuite/libgomp.oacc-c-c++-common/context-1.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/context-2.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/context-3.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/context-4.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/acc_get_property-nvptx.c:
+       Require effective target openacc_cudart.
+       * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Add -DUSE_CUDA_H
+       for effective target openacc_cuda and add && defined USE_CUDA_H to
+       preprocessor conditionals.  Guard -lcuda also on openacc_cuda
+       effective target.
+
 2021-05-26  Tobias Burnus  <tobias@codesourcery.com>
 
        Backported from master:
index 46cce9b8445e5760c850e4cabc888f162fd353ad..15ce33b760011dd03b17a2b3d663f981f4a0fb1b 100644 (file)
@@ -479,3 +479,56 @@ proc check_effective_target_openacc_radeon_accel_selected { } {
     return 0;
 }
 
+# Return 1 if cuda.h and -lcuda are available.
+
+proc check_effective_target_openacc_cuda { } {
+    return [check_no_compiler_messages openacc_cuda executable {
+#include <cuda.h>
+int main() {
+    CUdevice dev;
+    CUresult r = cuDeviceGet (&dev, 0);
+    if (r != CUDA_SUCCESS)
+       return 1;
+    return 0;
+} } "-lcuda" ]
+}
+
+# Return 1 if cublas_v2.h and -lcublas are available.
+
+proc check_effective_target_openacc_cublas { } {
+    return [check_no_compiler_messages openacc_cublas executable {
+#include <cuda.h>
+#include <cublas_v2.h>
+int main() {
+    cublasStatus_t s;
+    cublasHandle_t h;
+    CUdevice dev;
+    CUresult r = cuDeviceGet (&dev, 0);
+    if (r != CUDA_SUCCESS)
+       return 1;
+    s = cublasCreate (&h);
+    if (s != CUBLAS_STATUS_SUCCESS)
+       return 1;
+    return 0;
+} } "-lcuda -lcublas" ]
+}
+
+# Return 1 if cuda_runtime_api.h and -lcudart are available.
+
+proc check_effective_target_openacc_cudart { } {
+    return [check_no_compiler_messages openacc_cudart executable {
+#include <cuda.h>
+#include <cuda_runtime_api.h>
+int main() {
+    cudaError_t e;
+    int devn;
+    CUdevice dev;
+    CUresult r = cuDeviceGet (&dev, 0);
+    if (r != CUDA_SUCCESS)
+       return 1;
+    e = cudaGetDevice (&devn);
+    if (e != cudaSuccess)
+       return 1;
+    return 0;
+} } "-lcuda -lcudart" ]
+}
index 6334cfdd2f7310e0c813da9077900fb4b0388ac5..82239010d0f5e5ed436c7a95bda50ac43f788562 100644 (file)
@@ -4,6 +4,7 @@
 /* { dg-additional-sources acc_get_property-aux.c } */
 /* { dg-additional-options "-lcuda -lcudart" } */
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
+/* { dg-require-effective-target openacc_cudart } */
 
 #include <openacc.h>
 #include <cuda.h>
index e780845a79300087df689df0e84a5085baa3817f..e91642c162e80b6b277da63dbfe2985ad026cc20 100644 (file)
@@ -1,9 +1,10 @@
 /* { dg-do run } */
-/* { dg-additional-options "-lcuda" { target openacc_nvidia_accel_selected } } */
+/* { dg-additional-options "-DUSE_CUDA_H" { target openacc_cuda } } */
+/* { dg-additional-options "-lcuda" { target { openacc_nvidia_accel_selected && openacc_cuda } } } */
 
 #include <openacc.h>
 #include <stdlib.h>
-#if defined ACC_DEVICE_TYPE_nvidia
+#if defined ACC_DEVICE_TYPE_nvidia && defined USE_CUDA_H
 #include "cuda.h"
 #endif
 
@@ -13,7 +14,7 @@
 int
 main (int argc, char **argv)
 {
-#if defined ACC_DEVICE_TYPE_nvidia
+#if defined ACC_DEVICE_TYPE_nvidia && defined USE_CUDA_H
     CUresult r;
     CUstream stream1;
 #endif
@@ -22,7 +23,7 @@ main (int argc, char **argv)
     int i;
     int nbytes;
 
-#if defined ACC_DEVICE_TYPE_nvidia
+#if defined ACC_DEVICE_TYPE_nvidia && defined USE_CUDA_H
     acc_init (acc_device_nvidia);
 #endif
 
@@ -216,7 +217,7 @@ main (int argc, char **argv)
     }
 
 
-#if defined ACC_DEVICE_TYPE_nvidia
+#if defined ACC_DEVICE_TYPE_nvidia && defined USE_CUDA_H
     r = cuStreamCreate (&stream1, CU_STREAM_NON_BLOCKING);
     if (r != CUDA_SUCCESS)
     {
@@ -650,7 +651,7 @@ main (int argc, char **argv)
     }
 
 
-#if defined ACC_DEVICE_TYPE_nvidia
+#if defined ACC_DEVICE_TYPE_nvidia && defined USE_CUDA_H
     r = cuStreamCreate (&stream1, CU_STREAM_NON_BLOCKING);
     if (r != CUDA_SUCCESS)
     {
@@ -902,7 +903,7 @@ main (int argc, char **argv)
             abort ();
     }
 
-#if defined ACC_DEVICE_TYPE_nvidia
+#if defined ACC_DEVICE_TYPE_nvidia && defined USE_CUDA_H
     acc_shutdown (acc_device_nvidia);
 #endif
 
index 2e3b62ebbd26934b18a7f6ff942a99e2765344ba..3479fc7e549ac0e764fe9003824ab4f4c37da9a7 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda -lcublas -lcudart" } */
+/* { dg-require-effective-target openacc_cublas } */
+/* { dg-require-effective-target openacc_cudart } */
 
 #include <stdio.h>
 #include <stdlib.h>
index 6bdcfe7d42924e7c66ae7ef5cddb77700cada34b..db82b9097f6f1a8f6027e867173a2065cf6f0bfa 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda -lcublas -lcudart" } */
+/* { dg-require-effective-target openacc_cublas } */
+/* { dg-require-effective-target openacc_cudart } */
 
 #include <stdio.h>
 #include <stdlib.h>
index 8f14560ea8bcec77d03eada2f9b018828675ee95..b96f661cb7ca2d638a54eb02a3a872fb7fae2625 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda -lcublas -lcudart" } */
+/* { dg-require-effective-target openacc_cublas } */
+/* { dg-require-effective-target openacc_cudart } */
 
 #include <stdio.h>
 #include <stdlib.h>
index b403a5cf5cb48d9096fe5fba249a6d0f0ce12f49..7bfd216136b6bbe1f6427c570f27faa1bd16523f 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda -lcublas -lcudart" } */
+/* { dg-require-effective-target openacc_cublas } */
+/* { dg-require-effective-target openacc_cudart } */
 
 #include <stdio.h>
 #include <stdlib.h>
index 21d2139af272cb0e4428a1bc698eeedb2fda5caa..20f7f049dcc426898b04d644be199be27800a0f1 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lm -lcuda -lcublas -lcudart -Wall -Wextra" } */
+/* { dg-require-effective-target openacc_cublas } */
+/* { dg-require-effective-target openacc_cudart } */
 
 #include <stdlib.h>
 #include <math.h>
index 455ca5b4527883c1cd4a2a010d49b49759e33555..0c46f955f1e1b70cf2243d6aa0046d928443b31a 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <stdio.h>
 #include <unistd.h>
index ee06898af791728d9e598a18fdd3e83bedce3735..b28d1152cc39e836e0a4066f4ddbe0d21ca4b2ee 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <sys/time.h>
 #include <stdio.h>
index 920ff5f27ffb2f7fde8e6001d38d6c5c63078dfd..025cd8a481628af2f4c694516bd99c67de84c936 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <stdio.h>
 #include <unistd.h>
index 4fa9d5a6c28948f43c0b0641b9aab5df0773c0fb..21e0f8c4484c2335229ee6b1805fcfa68f37d7b7 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <sys/time.h>
 #include <stdio.h>
index e25d8944622eb522150be246a09609d57f926112..13953df65b91e5e33a83e9d126ed0b21f9fb875a 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <stdio.h>
 #include <stdlib.h>
index 53e285f38399d3c89b9a881cd0712a53498347da..96c36758a3dfa409554d2468e78f0da300ff0e71 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <stdio.h>
 #include <unistd.h>
index 787dcb886ef798eee480841b53990e1c31fff25f..0ec97dd364b8db758348ddcbc720cd1d55aa328e 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <stdio.h>
 #include <stdlib.h>
index 0bed15fa7b353ae5e5789cb2f97d0115df249e33..fb191c6625b0c71705e2902cc91436929041b59f 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <stdio.h>
 #include <stdlib.h>
index 16eb446acd4c9974b55b87193990962d4f9a2bfe..af8aa119f7499ea02ace3bcb064143880400856a 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <stdio.h>
 #include <stdlib.h>
index 77de9ba2904436a300b09013439e568ae6fe0ac5..902d2574b459f8c28e0bb206c57d706611090661 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <stdio.h>
 #include <stdlib.h>
index 592158f789eb2bb32c1cde751da3f11abd18c596..054ffbf18aeabec6831fe1776f72e48051c07e7f 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <stdio.h>
 #include <stdlib.h>
index 51b7ee73b9cec71080653751a9ba08912dddf9d2..44ef1dbdc1760b82aad0b3288f2107c15aa37346 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <stdio.h>
 #include <stdlib.h>
index e2d86dee61c8fe9d11267ca26d80fe046badd7db..674e09a251dcabdb2d804b675aa7599035fa6704 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <stdlib.h>
 #include <unistd.h>
index 22982415d459b6140b2513db408bf31baa5b9e01..4e5c7b1b9057b869645efde5c4b319a00f275e8b 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <stdlib.h>
 #include <unistd.h>
index d17755bf3eb36e6f4d686681b89fc3916ba77084..5ca550585e9aff5c078c3dee4d3e188d7ea8e311 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <pthread.h>
 #include <stdio.h>
index 36fff089b83d856febf3f7f0cc638877d18f2e6a..d14226c026e433d4de8668eb4910d7de455fde89 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <stdlib.h>
 #include <unistd.h>
index 88c2c7763ccdef4e82a56ed11b52ae34b0dc31e8..e48f3074d58f0eac4913e359ce34c5506a0ad2aa 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run { target openacc_nvidia_accel_selected } } */
 /* { dg-additional-options "-lcuda" } */
+/* { dg-require-effective-target openacc_cuda } */
 
 #include <openacc.h>
 #include <stdlib.h>
index ab70e4e8deae05f6338009653c5de99c84a0a131..fe1ae8ab50a557cc23b7040a4e06b569122deb87 100644 (file)
@@ -3,6 +3,7 @@
 
 ! { dg-do run { target openacc_nvidia_accel_selected } }
 ! { dg-additional-options "-lcublas -Wall -Wextra" }
+! { dg-require-effective-target openacc_cublas }
 
 program test
   implicit none
index 434c18c9889eaa7e788be45b9957a8cd7363665a..912bac68de750b0d8bb18d8a108bd620db196c05 100644 (file)
@@ -2,6 +2,7 @@
 
 ! { dg-do run { target openacc_nvidia_accel_selected } }
 ! { dg-additional-options "-lcublas -Wall -Wextra" }
+! { dg-require-effective-target openacc_cublas }
 
       include "cublas-fixed.h"
 
index e81a8b292c1d24a2ba03aae1c188dcf70f65ea38..0daba8bfcdcbf83ed5bbfa384743a59d71253179 100644 (file)
@@ -2,6 +2,7 @@
 
 ! { dg-do run { target openacc_nvidia_accel_selected } }
 ! { dg-additional-options "-lcublas -Wall -Wextra" }
+! { dg-require-effective-target openacc_cublas }
 
 module cublas
   interface