/* L-9 MCS 572 Mon 12 Sep 2016 : hello_openmp.c */

#include <stdio.h>
#include <omp.h>

int main ( int argc, char *argv[] )
{
   omp_set_num_threads(8);

   #pragma omp parallel
   {
      #pragma omp master
      {
         printf("Hello from the master thread %d!\n",
                omp_get_thread_num());
      }
      printf("Thread %d says hello.\n",
             omp_get_thread_num());
   }     
   return 0;
} 
