1 // RUN: %gdb-compile 2>&1 | tee %t.compile
2 // RUN: %gdb-test -x %S/ompd_bt.cmd %t 2>&1 | tee %t.out | FileCheck %s
4 // REQUIRES: determinism
8 void subdomain(float *x
, int istart
, int ipoints
) {
11 for (i
= 0; i
< ipoints
; i
++)
12 x
[istart
+ i
] = 123.456;
15 void sub(float *x
, int npoints
) {
16 int iam
, nt
, ipoints
, istart
;
18 #pragma omp parallel default(shared) private(iam, nt, ipoints, istart)
20 iam
= omp_get_thread_num();
21 nt
= omp_get_num_threads();
22 ipoints
= npoints
/ nt
; /* size of partition */
23 istart
= iam
* ipoints
; /* starting array index */
24 if (iam
== nt
- 1) /* last thread may do more */
25 ipoints
= npoints
- istart
;
26 subdomain(x
, istart
, ipoints
);
32 omp_set_num_threads(5);
40 // CHECK: Loaded OMPD lib successfully!
42 // CHECK: Enabled filter for "bt" output successfully.
43 // CHECK-NOT: {{__kmp.*}}
45 // CHECK: Disabled filter for "bt" output successfully
48 // CHECK-NOT: Python Exception
49 // CHECK-NOT: The program is not being run.
50 // CHECK-NOT: No such file or directory