[libgomp] In OpenACC offloading testing, be more explicit in what is supported, and...
authorThomas Schwinge <thomas@codesourcery.com>
Fri, 22 Feb 2019 10:50:49 +0000 (11:50 +0100)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Fri, 22 Feb 2019 10:50:49 +0000 (11:50 +0100)
libgomp/
* testsuite/lib/libgomp.exp: Error out for unknown offload target.
* testsuite/libgomp.oacc-c++/c++.exp: Likewise.  Report if
"offloading: supported, but hardware not accessible".
* testsuite/libgomp.oacc-c/c.exp: Likewise.
* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.

From-SVN: r269106

libgomp/ChangeLog
libgomp/testsuite/lib/libgomp.exp
libgomp/testsuite/libgomp.oacc-c++/c++.exp
libgomp/testsuite/libgomp.oacc-c/c.exp
libgomp/testsuite/libgomp.oacc-fortran/fortran.exp

index f310c2f6c2490a595b0113bd533ebe7797fd13b8..32bc21f50fda77bbe87ca9fccda5b11c06682252 100644 (file)
@@ -1,3 +1,11 @@
+2019-02-22  Thomas Schwinge  <thomas@codesourcery.com>
+
+       * testsuite/lib/libgomp.exp: Error out for unknown offload target.
+       * testsuite/libgomp.oacc-c++/c++.exp: Likewise.  Report if
+       "offloading: supported, but hardware not accessible".
+       * testsuite/libgomp.oacc-c/c.exp: Likewise.
+       * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
+
 2019-02-19  Chung-Lin Tang <cltang@codesourcery.com>
 
        PR c/87924
index 04738a9ce82668d1ce947b3fd303c9ff2acabfeb..2392642c7d6379c9b049be4dedf03296847f4ec3 100644 (file)
@@ -58,6 +58,9 @@ foreach offload_target_openacc $offload_targets_s {
        hsa {
            continue
        }
+       default {
+           error "Unknown offload target: $offload_target_openacc"
+       }
     }
     lappend offload_targets_s_openacc "$offload_target_openacc"
 }
@@ -375,7 +378,7 @@ proc check_effective_target_openacc_nvidia_accel_configured { } {
     return [is-effective-target lp64]
 }
 
-# Return 1 if at least one nvidia board is present.
+# Return 1 if at least one Nvidia GPU is accessible.
 
 proc check_effective_target_openacc_nvidia_accel_present { } {
     return [check_runtime openacc_nvidia_accel_present {
@@ -386,7 +389,7 @@ proc check_effective_target_openacc_nvidia_accel_present { } {
     } "" ]
 }
 
-# Return 1 if at least one nvidia board is present, and the nvidia device type
+# Return 1 if at least one Nvidia GPU is accessible, and the nvidia device type
 # is selected by default by means of setting the environment variable
 # ACC_DEVICE_TYPE.
 
index 9beadd6fc1ebd09a94efb81f6385e62f8cafdb75..d0e5f42b88bdcd4394935e3babe1c2cba1611009 100644 (file)
@@ -88,7 +88,7 @@ if { $lang_test_file_found } {
            nvidia {
                if { ![check_effective_target_openacc_nvidia_accel_present] } {
                    # Don't bother; execution testing is going to FAIL.
-                   untested "$subdir $offload_target_openacc offloading"
+                   untested "$subdir $offload_target_openacc offloading: supported, but hardware not accessible"
                    continue
                }
 
@@ -101,7 +101,7 @@ if { $lang_test_file_found } {
                set acc_mem_shared 0
            }
            default {
-               set acc_mem_shared 0
+               error "Unknown OpenACC device type: $offload_target_openacc"
            }
        }
        set tagopt "$tagopt -DACC_MEM_SHARED=$acc_mem_shared"
index 4475bf5341fa3438ccd045aa4cfaf7341893416b..77e852efaef7be2ff64715f479429fe2173529e9 100644 (file)
@@ -51,7 +51,7 @@ foreach offload_target_openacc $offload_targets_s_openacc {
        nvidia {
            if { ![check_effective_target_openacc_nvidia_accel_present] } {
                # Don't bother; execution testing is going to FAIL.
-               untested "$subdir $offload_target_openacc offloading"
+               untested "$subdir $offload_target_openacc offloading: supported, but hardware not accessible"
                continue
            }
 
@@ -64,7 +64,7 @@ foreach offload_target_openacc $offload_targets_s_openacc {
            set acc_mem_shared 0
        }
        default {
-           set acc_mem_shared 0
+           error "Unknown OpenACC device type: $offload_target_openacc"
        }
     }
     set tagopt "$tagopt -DACC_MEM_SHARED=$acc_mem_shared"
index 663c9323b727b28248e6701e5e6a0da5b5cf7845..a262a8a2c9703a7d9a81392daa64de33c4267ce7 100644 (file)
@@ -76,14 +76,14 @@ if { $lang_test_file_found } {
            nvidia {
                if { ![check_effective_target_openacc_nvidia_accel_present] } {
                    # Don't bother; execution testing is going to FAIL.
-                   untested "$subdir $offload_target_openacc offloading"
+                   untested "$subdir $offload_target_openacc offloading: supported, but hardware not accessible"
                    continue
                }
 
                set acc_mem_shared 0
            }
            default {
-               set acc_mem_shared 0
+               error "Unknown OpenACC device type: $offload_target_openacc"
            }
        }
        set tagopt "$tagopt -DACC_MEM_SHARED=$acc_mem_shared"