2014-11-03 Tom de Vries <tom@codesourcery.com>
* testsuite/libgomp.oacc-c++/c++.exp: Only use nvidia accelerator if
present.
* testsuite/libgomp.oacc-c/c.exp: Same.
* testsuite/libgomp.oacc-fortran/fortran.exp: Same.
@@ -67,8 +67,16 @@ if { $lang_test_file_found } {
}
puts "Using LIBGOMP_PLUGIN_PATH $env(LIBGOMP_PLUGIN_PATH)"
- # Todo: get list of accelerators from configure options --enable-accelerator.
- set accels { "nvidia" "host_nonshm" }
+ set accels { }
+
+ # Todo: get list of accelerators from configure options
+ # --enable-accelerator.
+ if { [check_effective_target_openacc_nvidia_accel_present] } {
+ lappend accels "nvidia"
+ }
+
+ # Present as plugin in LIBGOMP_PLUGIN_PATH
+ lappend accels "host_nonshm"
# Run on host (or fallback) accelerator.
lappend accels "host"
@@ -38,8 +38,16 @@ if { ![info exists env(LIBGOMP_PLUGIN_PATH)] } {
}
puts "Using LIBGOMP_PLUGIN_PATH $env(LIBGOMP_PLUGIN_PATH)"
-# Todo: get list of accelerators from configure options --enable-accelerator.
-set accels { "nvidia" "host_nonshm" }
+set accels { }
+
+# Todo: get list of accelerators from configure options
+# --enable-accelerator.
+if { [check_effective_target_openacc_nvidia_accel_present] } {
+ lappend accels "nvidia"
+}
+
+# Present as plugin in LIBGOMP_PLUGIN_PATH
+lappend accels "host_nonshm"
# Run on host (or fallback) accelerator.
lappend accels "host"
@@ -71,8 +71,16 @@ if { $lang_test_file_found } {
}
puts "Using LIBGOMP_PLUGIN_PATH $env(LIBGOMP_PLUGIN_PATH)"
- # Todo: get list of accelerators from configure options --enable-accelerator.
- set accels { "nvidia" "host_nonshm" }
+ set accels { }
+
+ # Todo: get list of accelerators from configure options
+ # --enable-accelerator.
+ if { [check_effective_target_openacc_nvidia_accel_present] } {
+ lappend accels "nvidia"
+ }
+
+ # Present as plugin in LIBGOMP_PLUGIN_PATH
+ lappend accels "host_nonshm"
# Run on host (or fallback) accelerator.
lappend accels "host"
--
1.9.1