main.c 332 B

1234567891011121314151617
  1. #include <stdio.h>
  2. #include <omp.h>
  3. int main(void) {
  4. #ifdef _OPENMP
  5. if (omp_get_max_threads() == 2) {
  6. return 0;
  7. } else {
  8. printf("Max threads is %d not 2.\n", omp_get_max_threads());
  9. return 1;
  10. }
  11. #else
  12. printf("_OPENMP is not defined; is OpenMP compilation working?\n");
  13. return 1;
  14. #endif
  15. }