ovni/test/emu/openmp/nested-ws.c
Raúl Peñacoba Veigas 9826879bcd
Some checks failed
CI / build:rt (push) Failing after 15s
CI / build:debug (push) Successful in 13s
CI / build:asan (push) Failing after 13s
CI / build:nompi (push) Successful in 13s
CI / build:compilers (push) Successful in 13s
CI / build:local (push) Successful in 23s
Add OpenMP support for labels and taskID views
Co-authored-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2024-12-09 16:41:16 +01:00

34 lines
576 B
C

/* Copyright (c) 2024 Barcelona Supercomputing Center (BSC)
* SPDX-License-Identifier: GPL-3.0-or-later */
#include <stdlib.h>
#include "compat.h"
#include "instr.h"
#include "instr_openmp.h"
#define N 30
int
main(void)
{
instr_start(0, 1);
instr_openmp_init();
for (uint32_t type = 1; type <= N; type++)
instr_openmp_type_create(type, "ws");
for (uint32_t type = 1; type <= N; type++) {
instr_openmp_ws_enter(type);
sleep_us(100);
}
for (uint32_t type = N; type > 0; type--) {
instr_openmp_ws_exit(type);
sleep_us(100);
}
instr_end();
return 0;
}