Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OpenMP] [OMPD] Testcases for libompd
This is part of the OMPD Path set started from review. https://reviews.llvm.org/D100181 Reviewed By: @jdoerfert, @dreachem
- Loading branch information
Showing
94 changed files
with
1,704 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
if(LIBOMP_OMPD_SUPPORT) | ||
|
||
if(NOT OPENMP_TEST_COMPILER_ID STREQUAL "Clang") | ||
message(STATUS "LIBOMPD: Can only test with Clang compiler") | ||
message(WARNING "LIBOMPD: The check-libompd target will not be available!") | ||
return() | ||
endif() | ||
|
||
find_package(LLVM REQUIRED CONFIG) | ||
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}") | ||
include(AddLLVM) | ||
find_program(LLVM_LIT_PATH | ||
NAMES llvm-lit lit | ||
HINTS ${LLVM_TOOLS_BINARY_DIR} | ||
PATHS ${LLVM_ROOT_DIR}/bin /usr/bin /usr/local/bin /opt/local/bin | ||
DOC "llvm-lit executable. (Workaround for AddLLVM.cmake path not being set)" | ||
) | ||
if(LLVM_LIT_PATH) | ||
set(LLVM_EXTERNAL_LIT ${LLVM_LIT_PATH}) | ||
endif() | ||
|
||
find_program(FILECHECK_EXECUTABLE | ||
NAMES Filecheck FileCheck | ||
HINTS ${LLVM_TOOLS_BINARY_DIR} | ||
PATHS ${LLVM_ROOT_DIR}/bin /usr/bin /usr/local/bin /opt/local/bin | ||
DOC "Filecheck executable. (Workaround for AddLLVM.cmake path not being set)" | ||
) | ||
if(LLVM_FILECHECK_PATH) | ||
set(LLVM_EXTERNAL_FILECHECK ${LLVM_FILECHECK_PATH}) | ||
endif() | ||
|
||
set(PYTHON_PLUGIN ${ompd_BINARY_DIR}/gdb-plugin/python-module) | ||
|
||
# Configure the lit.site.cfg.in file | ||
set(AUTO_GEN_COMMENT "## Autogenerated by libomp configuration.\n# Do not edit!") | ||
configure_file(lit.site.cfg.in lit.site.cfg @ONLY) | ||
add_openmp_testsuite(check-ompd "Running OMPD tests" | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
DEPENDS omp ompd ompd_gdb_plugin) | ||
|
||
endif() |
13 changes: 13 additions & 0 deletions
13
openmp/libompd/test/api_tests/test_ompd_device_initialize.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// RUN: %gdb-compile 2>&1 | tee %t.compile | ||
// RUN: %gdb-test -x %s.cmd %t 2>&1 | tee %t.out | FileCheck %s | ||
#include <omp.h> | ||
#include <stdio.h> | ||
|
||
int main() { | ||
omp_set_num_threads(4); | ||
#pragma omp parallel | ||
{ printf("Parallel level 1, thread num = %d.\n", omp_get_thread_num()); } | ||
return 0; | ||
} | ||
// CHECK-NOT: Failed | ||
// CHECK-NOT: Skip |
3 changes: 3 additions & 0 deletions
3
openmp/libompd/test/api_tests/test_ompd_device_initialize.c.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ompd init | ||
b test_ompd_device_initialize.c:9 | ||
ompdtestapi ompd_device_initialize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// RUN: %gdb-compile 2>&1 | tee %t.compile | ||
// RUN: %gdb-test -x %s.cmd %t 2>&1 | tee %t.out | FileCheck %s | ||
|
||
#include <omp.h> | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
omp_set_num_threads(2); | ||
#pragma omp parallel | ||
{ printf("Parallel level 1, thread num = %d.\n", omp_get_thread_num()); } | ||
return 0; | ||
} | ||
|
||
// CHECK-NOT: Failed | ||
// CHECK-NOT: Skip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ompd init | ||
b test_ompd_enumerate_icvs.c:11 | ||
c | ||
ompdtestapi ompd_enumerate_icvs |
16 changes: 16 additions & 0 deletions
16
openmp/libompd/test/api_tests/test_ompd_enumerate_states.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// RUN: %gdb-compile 2>&1 | tee %t.compile | ||
// RUN: %gdb-test -x %s.cmd %t 2>&1 | tee %t.out | FileCheck %s | ||
|
||
#include <omp.h> | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
omp_set_num_threads(2); | ||
#pragma omp parallel | ||
{ printf("Parallel level 1, thread num = %d.\n", omp_get_thread_num()); } | ||
return 0; | ||
} | ||
|
||
// CHECK-NOT: Failed | ||
// CHECK-NOT: Skip |
4 changes: 4 additions & 0 deletions
4
openmp/libompd/test/api_tests/test_ompd_enumerate_states.c.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ompd init | ||
b test_ompd_enumerate_states.c:11 | ||
c | ||
ompdtestapi ompd_enumerate_states |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// RUN: %gdb-compile 2>&1 | tee %t.compile | ||
// RUN: %gdb-test -x %s.cmd %t 2>&1 | tee %t.out | FileCheck %s | ||
// RUN: %gdb-test -x %s.cmd2 %t 2>&1 | tee %t.out2 \ | ||
// RUN: | FileCheck --check-prefix CMD2 %s | ||
#include <omp.h> | ||
#include <stdio.h> | ||
|
||
int main() { | ||
omp_set_num_threads(4); | ||
#pragma omp parallel | ||
{ printf("Parallel level 1, thread num = %d.\n", omp_get_thread_num()); } | ||
return 0; | ||
} | ||
// CHECK-NOT: Failed | ||
// CHECK-NOT: Skip | ||
|
||
// CMD2: Run 'ompd init' before running any of the ompd commands | ||
// CMD2: Error in Initialization |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ompd init | ||
b test_ompd_finalize.c:11 | ||
c | ||
ompdtestapi ompd_finalize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
b main | ||
r | ||
ompdtestapi ompd_finalize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// RUN: %gdb-compile 2>&1 | tee %t.compile | ||
// RUN: %gdb-test -x %s.cmd %t 2>&1 | tee %t.out | FileCheck %s | ||
|
||
#include <omp.h> | ||
#include <stdio.h> | ||
|
||
int main() { | ||
omp_set_num_threads(4); | ||
#pragma omp parallel | ||
{ printf("Parallel level 1, thread num = %d.\n", omp_get_thread_num()); } | ||
return 0; | ||
} | ||
// CHECK-NOT: Failed | ||
// CHECK-NOT: Skip |
4 changes: 4 additions & 0 deletions
4
openmp/libompd/test/api_tests/test_ompd_get_api_version.c.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ompd init | ||
b test_ompd_get_api_version.c:10 | ||
c | ||
ompdtestapi ompd_get_api_version |
16 changes: 16 additions & 0 deletions
16
openmp/libompd/test/api_tests/test_ompd_get_curr_parallel_handle.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// RUN: %gdb-compile 2>&1 | tee %t.compile | ||
// RUN: %gdb-test -x %s.cmd %t 2>&1 | tee %t.out \ | ||
// RUN: | FileCheck -check-prefix=CMD %s | ||
// RUN: %gdb-test -x %s.cmd2 %t 2>&1 | tee %t.out2 | FileCheck %s | ||
#include <omp.h> | ||
#include <stdio.h> | ||
|
||
int main() { | ||
omp_set_num_threads(2); | ||
#pragma omp parallel | ||
{ printf("Parallel level 1, thread num = %d.\n", omp_get_thread_num()); } | ||
return 0; | ||
} | ||
// CMD: Return code is stale_handle | ||
// CHECK-NOT: Failed | ||
// CHECK-NOT: Skip |
3 changes: 3 additions & 0 deletions
3
openmp/libompd/test/api_tests/test_ompd_get_curr_parallel_handle.c.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ompd init | ||
b test_ompd_get_curr_parallel_handle.c:11 | ||
ompdtestapi ompd_get_curr_parallel_handle |
4 changes: 4 additions & 0 deletions
4
openmp/libompd/test/api_tests/test_ompd_get_curr_parallel_handle.c.cmd2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ompd init | ||
b test_ompd_get_curr_parallel_handle.c:11 | ||
c | ||
ompdtestapi ompd_get_curr_parallel_handle |
30 changes: 30 additions & 0 deletions
30
openmp/libompd/test/api_tests/test_ompd_get_curr_task_handle.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// RUN: %gdb-compile 2>&1 | tee %t.compile | ||
// RUN: %gdb-test -x %s.cmd %t 2>&1 | tee %t.out | FileCheck %s | ||
|
||
#include <omp.h> | ||
#include <stdio.h> | ||
int get_fib_num(int num) { | ||
int t1, t2; | ||
if (num < 2) | ||
return num; | ||
else { | ||
#pragma omp task shared(t1) | ||
t1 = get_fib_num(num - 1); | ||
#pragma omp task shared(t2) | ||
t2 = get_fib_num(num - 2); | ||
#pragma omp taskwait | ||
return t1 + t2; | ||
} | ||
} | ||
|
||
int main() { | ||
int ret = 0; | ||
omp_set_num_threads(2); | ||
#pragma omp parallel | ||
{ ret = get_fib_num(10); } | ||
printf("Fib of 10 is %d", ret); | ||
return 0; | ||
} | ||
|
||
// CHECK-NOT: Failed | ||
// CHECK-NOT: Skip |
4 changes: 4 additions & 0 deletions
4
openmp/libompd/test/api_tests/test_ompd_get_curr_task_handle.c.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ompd init | ||
b test_ompd_get_curr_task_handle.c:14 | ||
c | ||
ompdtestapi ompd_get_curr_task_handle |
30 changes: 30 additions & 0 deletions
30
openmp/libompd/test/api_tests/test_ompd_get_display_control_vars.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// RUN: %gdb-compile 2>&1 | tee %t.compile | ||
// RUN: %gdb-test -x %s.cmd %t 2>&1 | tee %t.out | FileCheck %s | ||
|
||
#include <omp.h> | ||
#include <stdio.h> | ||
int get_fib_num(int num) { | ||
int t1, t2; | ||
if (num < 2) | ||
return num; | ||
else { | ||
#pragma omp task shared(t1) | ||
t1 = get_fib_num(num - 1); | ||
#pragma omp task shared(t2) | ||
t2 = get_fib_num(num - 2); | ||
#pragma omp taskwait | ||
return t1 + t2; | ||
} | ||
} | ||
|
||
int main() { | ||
int ret = 0; | ||
omp_set_num_threads(2); | ||
#pragma omp parallel | ||
{ ret = get_fib_num(10); } | ||
printf("Fib of 10 is %d", ret); | ||
return 0; | ||
} | ||
|
||
// CHECK-NOT: Failed | ||
// CHECK-NOT: Skip |
4 changes: 4 additions & 0 deletions
4
openmp/libompd/test/api_tests/test_ompd_get_display_control_vars.c.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ompd init | ||
b test_ompd_get_display_control_vars.c:14 | ||
c | ||
ompdtestapi ompd_get_display_control_vars |
19 changes: 19 additions & 0 deletions
19
openmp/libompd/test/api_tests/test_ompd_get_enclosing_parallel_handle.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// RUN: %gdb-compile 2>&1 | tee %t.compile | ||
// RUN: %gdb-test -x %s.cmd %t 2>&1 | tee %t.out | FileCheck %s | ||
|
||
#include <omp.h> | ||
#include <stdio.h> | ||
|
||
int main() { | ||
omp_set_num_threads(4); | ||
#pragma omp parallel | ||
{ | ||
printf("Parallel level 1, thread num = %d.\n", omp_get_thread_num()); | ||
omp_set_num_threads(3); | ||
#pragma omp parallel | ||
{ printf("Parallel level 2, thread num = %d", omp_get_thread_num()); } | ||
} | ||
return 0; | ||
} | ||
// CHECK-NOT: Failed | ||
// CHECK-NOT: Skip |
4 changes: 4 additions & 0 deletions
4
openmp/libompd/test/api_tests/test_ompd_get_enclosing_parallel_handle.c.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ompd init | ||
b test_ompd_get_enclosing_parallel_handle.c:14 | ||
c | ||
ompdtestapi ompd_get_enclosing_parallel_handle |
30 changes: 30 additions & 0 deletions
30
openmp/libompd/test/api_tests/test_ompd_get_generating_task_handle.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// RUN: %gdb-compile 2>&1 | tee %t.compile | ||
// RUN: %gdb-test -x %s.cmd %t 2>&1 | tee %t.out | FileCheck %s | ||
|
||
#include <omp.h> | ||
#include <stdio.h> | ||
int get_fib_num(int num) { | ||
int t1, t2; | ||
if (num < 2) | ||
return num; | ||
else { | ||
#pragma omp task shared(t1) | ||
t1 = get_fib_num(num - 1); | ||
#pragma omp task shared(t2) | ||
t2 = get_fib_num(num - 2); | ||
#pragma omp taskwait | ||
return t1 + t2; | ||
} | ||
} | ||
|
||
int main() { | ||
int ret = 0; | ||
omp_set_num_threads(2); | ||
#pragma omp parallel | ||
{ ret = get_fib_num(10); } | ||
printf("Fib of 10 is %d", ret); | ||
return 0; | ||
} | ||
|
||
// CHECK-NOT: Failed | ||
// CHECK-NOT: Skip |
5 changes: 5 additions & 0 deletions
5
openmp/libompd/test/api_tests/test_ompd_get_generating_task_handle.c.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ompd init | ||
b test_ompd_get_generating_task_handle.c:14 | ||
c | ||
c | ||
ompdtestapi ompd_get_generating_task_handle |
30 changes: 30 additions & 0 deletions
30
openmp/libompd/test/api_tests/test_ompd_get_icv_from_scope.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// RUN: %gdb-compile 2>&1 | tee %t.compile | ||
// RUN: %gdb-test -x %s.cmd %t 2>&1 | tee %t.out | FileCheck %s | ||
|
||
#include <omp.h> | ||
#include <stdio.h> | ||
int get_fib_num(int num) { | ||
int t1, t2; | ||
if (num < 2) | ||
return num; | ||
else { | ||
#pragma omp task shared(t1) | ||
t1 = get_fib_num(num - 1); | ||
#pragma omp task shared(t2) | ||
t2 = get_fib_num(num - 2); | ||
#pragma omp taskwait | ||
return t1 + t2; | ||
} | ||
} | ||
|
||
int main() { | ||
int ret = 0; | ||
omp_set_num_threads(2); | ||
#pragma omp parallel | ||
{ ret = get_fib_num(10); } | ||
printf("Fib of 10 is %d", ret); | ||
return 0; | ||
} | ||
|
||
// CHECK-NOT: Failed | ||
// CHECK-NOT: Skip |
4 changes: 4 additions & 0 deletions
4
openmp/libompd/test/api_tests/test_ompd_get_icv_from_scope.c.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ompd init | ||
b test_ompd_get_icv_from_scope.c:14 | ||
c | ||
ompdtestapi ompd_get_icv_from_scope |
16 changes: 16 additions & 0 deletions
16
openmp/libompd/test/api_tests/test_ompd_get_icv_string_from_scope.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// RUN: %gdb-compile 2>&1 | tee %t.compile | ||
// RUN: %gdb-test -x %s.cmd %t 2>&1 | tee %t.out | FileCheck %s | ||
|
||
#include <omp.h> | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
omp_set_num_threads(2); | ||
#pragma omp parallel | ||
{ printf("Parallel level 1, thread num = %d.\n", omp_get_thread_num()); } | ||
return 0; | ||
} | ||
|
||
// CHECK-NOT: Failed | ||
// CHECK-NOT: Skip |
4 changes: 4 additions & 0 deletions
4
openmp/libompd/test/api_tests/test_ompd_get_icv_string_from_scope.c.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ompd init | ||
b test_ompd_get_icv_string_from_scope.c:11 | ||
c | ||
ompdtestapi ompd_get_icv_string_from_scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// RUN: %gdb-compile 2>&1 | tee %t.compile | ||
// RUN: %gdb-test -x %s.cmd %t 2>&1 | tee %t.out | FileCheck %s | ||
|
||
#include <omp.h> | ||
#include <stdio.h> | ||
|
||
int main() { | ||
omp_set_num_threads(4); | ||
#pragma omp parallel | ||
{ printf("Parallel level 1, thread num = %d.\n", omp_get_thread_num()); } | ||
return 0; | ||
} | ||
// CHECK-NOT: Failed | ||
// CHECK-NOT: Skip |
4 changes: 4 additions & 0 deletions
4
openmp/libompd/test/api_tests/test_ompd_get_omp_version.c.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ompd init | ||
b test_ompd_get_omp_version.c:10 | ||
c | ||
ompdtestapi ompd_get_omp_version |
Oops, something went wrong.