/* This is a simple program written in c that will print a Greeting message to the monitor. This program is parallelized so all/some of the cores (more than one) at a time can print the greeting message. Therefore, there are two lines that you will not see in a pure c greetings message program. - #include // The omp.h files is library that defines OpenMP specifications such as functions, environment variables and runtime functionalities. We use OpenMP when we are writing programs for computers with multiple cores in them. - #pragma omp parallel //when compiler is reading the source code file it stops the compiler and tell it that imidiately after the #pragama * line something special will be happening, and in our case its OpenMP parallelization the the printf(*) function will be run in parallel by the number of threads that were setup by the user useing $ export OMP_NUM_THREADS=N. (N=integer value) How to Compile this Program: $ gcc -fopenmp omp_hello_world.c -o omp_hello_world How to setup runtime environment for this program: $ export OMP_NUM_THREADS=8 How to Run this Program: $ ./omp_hello_world */ #include // Tells the compiler I am using standard c #include // Tells the compiler I am using OpenMP // Every has to start somewhere. In C/C++ programs they all start at main. int main(){ #pragma omp parallel printf("Hello from thread %d, of nthreads %d: \n", omp_get_thread_num(), omp_get_num_threads()); }// End of main