aboutsummaryrefslogtreecommitdiff
path: root/test cases/common/184 openmp/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/common/184 openmp/main.c')
-rw-r--r--test cases/common/184 openmp/main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test cases/common/184 openmp/main.c b/test cases/common/184 openmp/main.c
new file mode 100644
index 0000000..cc81f48
--- /dev/null
+++ b/test cases/common/184 openmp/main.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <omp.h>
+
+int main(void) {
+#ifdef _OPENMP
+ if (omp_get_max_threads() == 2) {
+ return 0;
+ } else {
+ printf("Max threads is %d not 2.\n", omp_get_max_threads());
+ return 1;
+ }
+#else
+ printf("_OPENMP is not defined; is OpenMP compilation working?\n");
+ return 1;
+#endif
+}