summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/test/api
diff options
context:
space:
mode:
authorAndrey Churbanov <Andrey.Churbanov@intel.com>2018-12-13 10:04:10 +0000
committerAndrey Churbanov <Andrey.Churbanov@intel.com>2018-12-13 10:04:10 +0000
commit74f98554f92dabb4c1be7db9e1712f060f3cdbca (patch)
tree59bb9e8401d6a669bcb3fa93060833edb24ac7ae /openmp/runtime/test/api
parent76f4ae109266fae1d17cade097a14216bc10822e (diff)
downloadbcm5719-llvm-74f98554f92dabb4c1be7db9e1712f060f3cdbca.tar.gz
bcm5719-llvm-74f98554f92dabb4c1be7db9e1712f060f3cdbca.zip
Fix for bugzilla https://bugs.llvm.org/show_bug.cgi?id=39970
Broken tests fixed Differential Revision: https://reviews.llvm.org/D55598 llvm-svn: 349017
Diffstat (limited to 'openmp/runtime/test/api')
-rw-r--r--openmp/runtime/test/api/omp_in_parallel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/openmp/runtime/test/api/omp_in_parallel.c b/openmp/runtime/test/api/omp_in_parallel.c
index d09313eab15..5e9e635fa15 100644
--- a/openmp/runtime/test/api/omp_in_parallel.c
+++ b/openmp/runtime/test/api/omp_in_parallel.c
@@ -30,6 +30,11 @@ int main()
int i;
int num_failed=0;
+ // the test requires more than 1 thread to pass
+ omp_set_dynamic(0); // disable dynamic adjustment of threads
+ if (omp_get_max_threads() == 1)
+ omp_set_num_threads(2); // set 2 threads if no HW resources available
+
for(i = 0; i < REPETITIONS; i++) {
if(!test_omp_in_parallel()) {
num_failed++;
OpenPOWER on IntegriCloud