Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <omp.h>
- int main() {
- printf("*seq1* The number of procs: %d\n", omp_get_num_procs());
- #pragma omp parallel num_threads(6)
- {
- printf("*par* Hello OMP! This is thread #%d out of #%d\n", omp_get_thread_num(), omp_get_num_threads());
- }
- printf("*seq2* Hello OMP! This is thread #%d out of #%d\n", omp_get_thread_num(), omp_get_num_threads());
- return 0;
- }
Add Comment
Please, Sign In to add comment