Created
March 1, 2018 16:42
-
-
Save sethhillbrand/45dfb50e5a1865ad65bda1d6522778c5 to your computer and use it in GitHub Desktop.
Quick OpenMP test
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <omp.h> | |
int main() | |
{ | |
#pragma omp parallel num_threads(4) | |
{ | |
printf("Hello from thread %d, nthreads %d\\n", omp_get_thread_num(), omp_get_num_threads()); | |
} | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment