summaryrefslogtreecommitdiffstats
path: root/test cases/common/184 openmp/main.c
blob: cc81f4897e5c29d3a3e16cea852c9a7d8c45aef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
}