From b1ee2e7143ea068f02c451da3d5d53f94fa34ef6 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Tue, 27 Jun 2023 10:43:04 +0200 Subject: [PATCH] Add taskloop test in Nanos6 and NODES --- test/rt/nanos6/CMakeLists.txt | 3 ++- test/rt/nanos6/taskloop.c | 16 ++++++++++++++++ test/rt/nodes/CMakeLists.txt | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 test/rt/nanos6/taskloop.c diff --git a/test/rt/nanos6/CMakeLists.txt b/test/rt/nanos6/CMakeLists.txt index a7e4a4f..987a971 100644 --- a/test/rt/nanos6/CMakeLists.txt +++ b/test/rt/nanos6/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Barcelona Supercomputing Center (BSC) +# Copyright (c) 2022-2023 Barcelona Supercomputing Center (BSC) # SPDX-License-Identifier: GPL-3.0-or-later include(CheckOmpSs2Compiler) @@ -46,6 +46,7 @@ nanos6_rt_test(several-tasks.c) nanos6_rt_test(sched-add.c) nanos6_rt_test(if0.c) #nanos6_rt_test(taskfor.c) #Taskfor no longer supported +nanos6_rt_test(taskloop.c) nanos6_rt_test(spawn-task.c) nanos6_rt_test(spawn-task-external.c) nanos6_rt_test(spawn-task-external-bad.c SHOULD_FAIL diff --git a/test/rt/nanos6/taskloop.c b/test/rt/nanos6/taskloop.c new file mode 100644 index 0000000..683a222 --- /dev/null +++ b/test/rt/nanos6/taskloop.c @@ -0,0 +1,16 @@ +/* Copyright (c) 2023 Barcelona Supercomputing Center (BSC) + * SPDX-License-Identifier: GPL-3.0-or-later */ + +#include "compat.h" + +int +main(void) +{ + #pragma oss taskloop label("taskloop") + for (int i = 0; i < 100; i++) { + sleep_us(100); + } + + #pragma oss taskwait + return 0; +} diff --git a/test/rt/nodes/CMakeLists.txt b/test/rt/nodes/CMakeLists.txt index 9d21d2b..053d736 100644 --- a/test/rt/nodes/CMakeLists.txt +++ b/test/rt/nodes/CMakeLists.txt @@ -43,4 +43,5 @@ nodes_rt_test(../nanos6/nested-task.c NAME nested-task SORT) nodes_rt_test(../nanos6/several-tasks.c NAME several-tasks SORT) nodes_rt_test(../nanos6/if0.c NAME if0 SORT) nodes_rt_test(../nanos6/sched-add.c NAME sched-add SORT) +nodes_rt_test(../nanos6/taskloop.c NAME taskloop SORT) nodes_rt_test(taskiter.c SORT)