Open mikaoP opened 1 week ago
#include <stdio.h> #define MAX_N 25000 int main(int argc, char *argv[]) { for (int n = 0; n < 2; ++n) { for (int tms = 1 ; tms <= 2 ; tms *= 2) { for (int ths = 1 ; ths <= 1; ths *= 2) { fprintf(stderr, "n %d tms %d ths %d\n", n, tms, ths); #pragma omp teams num_teams(tms) { #pragma omp distribute parallel for num_threads(ths) for (int i = 0; i < MAX_N; ++i) { #pragma omp task {} } fprintf(stderr, "BARRIER\n"); #pragma omp distribute parallel for num_threads(ths) for (int i = 0; i < MAX_N; ++i) { #pragma omp task {} } } // loop over 'ths' } // loop over 'tms' } } return 0; }
clang -fopenmp t1.c -o t1 && ./t1 KMP_DEBUG_ASSERT(task->td_incomplete_child_tasks == 0);
clang -fopenmp t1.c -o t1 && ./t1
KMP_DEBUG_ASSERT(task->td_incomplete_child_tasks == 0);
I simplified this test from back2back_distribute.c in omptarget :)
back2back_distribute.c
@llvm/issue-subscribers-openmp
Author: None (mikaoP)
clang -fopenmp t1.c -o t1 && ./t1
KMP_DEBUG_ASSERT(task->td_incomplete_child_tasks == 0);
I simplified this test from
back2back_distribute.c
in omptarget :)