diff --git a/test/rt/openmp/CMakeLists.txt b/test/rt/openmp/CMakeLists.txt index 20f0f78..a647928 100644 --- a/test/rt/openmp/CMakeLists.txt +++ b/test/rt/openmp/CMakeLists.txt @@ -47,6 +47,7 @@ openmp_rt_test(simple-task.c) openmp_rt_test(task.c) openmp_rt_test(taskloop.c) openmp_rt_test(taskwait.c) +openmp_rt_test(task-untied.c) openmp_rt_test(team-distribute.c) openmp_rt_test(worksharing-and-tasks.c) openmp_rt_test(worksharing-mix.c BREAKDOWN) diff --git a/test/rt/openmp/task-untied.c b/test/rt/openmp/task-untied.c new file mode 100644 index 0000000..2c3e1f8 --- /dev/null +++ b/test/rt/openmp/task-untied.c @@ -0,0 +1,22 @@ +/* Copyright (c) 2025 Barcelona Supercomputing Center (BSC) + * SPDX-License-Identifier: GPL-3.0-or-later */ + +/* + * Ensures that we can emit a sequence of PPx, PPe, PPx, PPe events for the same + * OpenMP task to execute it again. + * + * See: https://gitlab.pm.bsc.es/rarias/ovni/-/issues/208 + */ + +int +main(void) +{ + #pragma omp parallel + #pragma omp master + #pragma omp task untied + { + for (int i = 0; i < 10000; i++) { + #pragma omp taskyield + } + } +}