Skip to content

Commit

Permalink
added parallel region
Browse files Browse the repository at this point in the history
  • Loading branch information
koooee committed Jun 5, 2012
1 parent a3b5ea0 commit 88d0986
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MPI/Hello_World/mpi_omp_hello_world.c
Expand Up @@ -16,9 +16,10 @@ int main(int argc, char *argv[])

/* openMP is an api that allows multi-core programming through use of compiler directives */
#pragma omp parallel /* Tell the compiler to do this for every core on the processor */
{
printf("omp thread %d on node %s\n", omp_get_thread_num(), nodename); /* This should print a line for every core on the processor */
} /* END omp parallel region */

printf("omp thread %d on node %s\n", omp_get_thread_num(), nodename); /* This should print a line for every core on the processor */

MPI_Finalize(); /* Kill MPI Environment */
return 0;
}

0 comments on commit 88d0986

Please sign in to comment.