hanchenye-llvm-project/openmp
Hal Finkel 2bc3449d22 Make test/parallel/omp_nested.c not use so many threads
I've found it very difficult to get test/parallel/omp_nested.c to pass
consistently across my build environments. The problem is that it creates N^2
threads (it is testing nested parallel regions), and that often exceeds the
thread limits on systems with many cores. We do raise the process limits in
lit, and that often helps, but if running lit with a smaller number of threads
or on a system where we're otherwise resource constrained, this particular test
tends to fail (because the runtime cannot create a sufficient number of
threads).

This seems to work: if the maximum number of threads is more than some small
number, then cap the number of threads used for the parallel region. The choice
of 4 here is somewhat arbitrary.

Differential Revision: https://reviews.llvm.org/D32033

llvm-svn: 306357
2017-06-27 03:04:25 +00:00
..
libomptarget Only use libdl when it is available 2017-06-26 19:16:49 +00:00
offload
runtime Make test/parallel/omp_nested.c not use so many threads 2017-06-27 03:04:25 +00:00
testsuite
www Support of mips & mips64 for openmprtl 2016-12-08 09:22:24 +00:00
.gitignore Create a git ignore file for openmp runtime. 2017-03-11 13:05:08 +00:00
CMakeLists.txt [OpenMP] libomptarget: Disable on MacOS X 2017-03-21 18:19:09 +00:00
CREDITS.txt Fork performance improvements 2016-05-23 18:01:19 +00:00
LICENSE.txt Update copyright year in LICENSE.txt 2016-05-17 20:11:26 +00:00