-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OpenMP] Use half of available logical processors for collapse tests #88319
Conversation
The test should not use more than 128 threads on your system (default value returned by - unsigned num_threads = omp_get_max_threads();
+ unsigned num_threads = omp_get_max_threads()/2;
if (num_threads > MAX_THREADS)
num_threads = MAX_THREADS;
omp_set_num_threads(num_threads); Furthermore, I suggest to move the #pragma omp parallel num_threads(num_threads)
{
+ unsigned gtid = omp_get_thread_num();
#pragma omp for collapse(3) private(i, j, k)
LOOP {
unsigned count;
- unsigned gtid = omp_get_thread_num(); |
Good point, thanks @jprotze! It makes sense not to use more than half of the available logical processors to avoid over-subscribing, noting there are other libomp test cases run running in parallel, including 2 other collapse test cases using |
Did you push the changes? |
Having a problem pushing the changes. Working on it... |
Changes are pushed. |
* Use half of available threads/logical processors to avoid over-subscribing * Fix the PRINTF macro to get rid of warnings
* add free() * make sure num_threads is not 0
- make chunkSizesOpenmp type 'unsinged long'.
cf52054
to
9b53422
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm now
…lvm#88319) The new collapse test cases define `MAX_THREADS` to be 256 and use all available threads/logical processors on the system. This triples the testing time on an AIX machine that has 128 logical processors. This patch changes to use half of available logical processors to avoid over subscribing because there are other libomp tests running at the same time, including 2 other such collapse tests.
The new collapse test cases define
MAX_THREADS
to be 256 and use all available threads/logical processors on the system. This triples the testing time on an AIX machine that has 128 logical processors. This patch changes to use half of available logical processors to avoid over subscribing because there are other libomp tests running at the same time, including 2 other such collapse tests.