1 // RUN: %libomp-compile-and-run | FileCheck %s
11 // Expected to fail; omp_pause_stop_tool must not be specified
12 ret
= omp_pause_resource(omp_pause_stop_tool
, omp_get_initial_device());
13 printf("omp_pause_resource %s\n", ret
? "failed" : "succeeded");
17 // Expected to succeed
18 ret
= omp_pause_resource_all(omp_pause_stop_tool
);
19 printf("omp_pause_resource_all %s\n", ret
? "failed" : "succeeded");
23 printf("x = %d\n", x
);
27 // -- omp_pause_resource/resource_all returns expected code
28 // -- OMPT interface is shut down as expected
30 // CHECK-NOT: {{^}}0: Could not register callback
31 // CHECK: 0: NULL_POINTER=[[NULL:.*$]]
33 // CHECK: ompt_event_parallel_begin
34 // CHECK: ompt_event_parallel_end
36 // CHECK: omp_pause_resource failed
38 // CHECK: ompt_event_parallel_begin
39 // CHECK: ompt_event_parallel_end
41 // CHECK: omp_pause_resource_all succeeded
43 // CHECK-NOT: ompt_event