brintos

brintos / llvm-project-archived public Read only

0
0
Text · 683 B · 27007e3 Raw
36 lines · c
1// RUN: %gdb-compile 2>&1 | tee %t.compile2// RUN: env OMP_SCHEDULE=static %gdb-run 2>&1 | tee %t.out | FileCheck %s3 4#include "../ompt_plugin.h"5#include <omp.h>6#include <stdio.h>7#include <unistd.h>8 9void bar() {10  int i;11#pragma omp parallel for num_threads(2)12  for (i = 0; i < 10; i++)13    ompd_tool_test(0);14}15 16void foo() {17  omp_set_max_active_levels(10);18#pragma omp parallel num_threads(2)19  {20    if (omp_get_thread_num() == 0)21      ompd_tool_test(0);22    else23      bar();24  }25}26 27int main() {28  printf("Process %d started.\n", getpid());29  foo();30  return 0;31}32 33// CHECK-NOT: OMPT-OMPD mismatch34// CHECK-NOT: Python Exception35// CHECK-NOT: The program is not being run.36