Skip to content

Instantly share code, notes, and snippets.

@willtownes
Created October 5, 2018 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willtownes/5f5939434897a19cbf80a1e681f39407 to your computer and use it in GitHub Desktop.
Save willtownes/5f5939434897a19cbf80a1e681f39407 to your computer and use it in GitHub Desktop.
Test whether clang++ recognizes openmp
#include <omp.h>
#include <stdio.h>
//clang++ -Xpreprocessor -fopenmp -lomp omptest.cpp -o omptest
int main() {
#pragma omp parallel
printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment