You've already forked linux-packaging-mono
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
bdwgc
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm-project
clang
clang-tools-extra
compiler-rt
eng
libcxx
libcxxabi
libunwind
lld
lldb
llvm
nuget
openmp
cmake
libomptarget
offload
runtime
cmake
doc
src
test
api
atomic
barrier
critical
env
flush
lock
master
misc_bugs
ompt
cancel
loadtool
misc
parallel
synchronization
barrier
critical.c
flush.c
lock.c
master.c
nest_lock.c
ordered.c
taskgroup.c
taskwait.c
test_lock.c
test_nest_lock.c
test_nest_lock_parallel.c
tasks
worksharing
callback.h
ompt-signal.h
parallel
tasking
threadprivate
worksharing
CMakeLists.txt
lit.cfg
lit.site.cfg.in
omp_my_sleep.h
omp_testsuite.h
tools
.clang-format
CMakeLists.txt
README.txt
www
.arcconfig
.gitignore
CMakeLists.txt
CREDITS.txt
LICENSE.txt
README.rst
polly
Directory.Build.props
Directory.Build.targets
NuGet.config
azure-pipelines.yml
build.cmd
build.sh
dir.common.props
global.json
llvm.proj
mxe-Win64.cmake.in
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
llvm
m4
man
mcs
mono
msvc
netcore
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
50 lines
1.8 KiB
C
50 lines
1.8 KiB
C
![]() |
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
|
||
|
// REQUIRES: ompt
|
||
|
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7
|
||
|
|
||
|
#include "callback.h"
|
||
|
#include <unistd.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
int condition=0;
|
||
|
int x=0;
|
||
|
#pragma omp parallel num_threads(2)
|
||
|
{
|
||
|
#pragma omp master
|
||
|
{
|
||
|
#pragma omp taskgroup
|
||
|
{
|
||
|
print_current_address(1);
|
||
|
#pragma omp task
|
||
|
{
|
||
|
#pragma omp atomic
|
||
|
x++;
|
||
|
}
|
||
|
}
|
||
|
print_current_address(2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
// Check if libomp supports the callbacks for this test.
|
||
|
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_master'
|
||
|
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_task_create'
|
||
|
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_task_schedule'
|
||
|
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_cancel'
|
||
|
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_thread_begin'
|
||
|
|
||
|
|
||
|
// CHECK: {{^}}0: NULL_POINTER=[[NULL:.*$]]
|
||
|
|
||
|
// CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_taskgroup_begin: parallel_id=[[PARALLEL_ID:[0-9]+]], task_id=[[TASK_ID:[0-9]+]], codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]
|
||
|
// CHECK-NEXT: {{^}}[[MASTER_ID]]: current_address={{.*}}[[RETURN_ADDRESS]]
|
||
|
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_wait_taskgroup_begin: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID]], codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]
|
||
|
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_wait_taskgroup_end: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID]], codeptr_ra=[[RETURN_ADDRESS]]
|
||
|
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_taskgroup_end: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID]], codeptr_ra=[[RETURN_ADDRESS]]
|
||
|
// CHECK-NEXT: {{^}}[[MASTER_ID]]: current_address={{.*}}[[RETURN_ADDRESS]]
|
||
|
|
||
|
return 0;
|
||
|
}
|