* [gomp4] Skip nvidia accelerator if not present
@ 2014-11-04 22:41 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2014-11-04 22:41 UTC (permalink / raw)
To: Thomas Schwinge; +Cc: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 152 bytes --]
Thomas,
this patch skips the nvidia accelerator in testing libgomp, if the nvidia
accelerator is not present.
OK for gomp-4_0-branch?
Thanks,
- Tom
[-- Attachment #2: 0003-Only-use-nvidia-accelerator-if-present.patch --]
[-- Type: text/x-patch, Size: 2771 bytes --]
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.
diff --git a/libgomp/testsuite/libgomp.oacc-c++/c++.exp b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
index da81deb..19104ca 100644
--- a/libgomp/testsuite/libgomp.oacc-c++/c++.exp
+++ b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
@@ -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"
diff --git a/libgomp/testsuite/libgomp.oacc-c/c.exp b/libgomp/testsuite/libgomp.oacc-c/c.exp
index feb57fd..a98dcf6 100644
--- a/libgomp/testsuite/libgomp.oacc-c/c.exp
+++ b/libgomp/testsuite/libgomp.oacc-c/c.exp
@@ -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"
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
index 156ae56..8d341c8 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
@@ -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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-11-04 22:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-04 22:41 [gomp4] Skip nvidia accelerator if not present Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).