#include<stdio.h>#include<stdlib.h>#ifdef _OPENMP# pragma message "Compiler did support OPENMP"# include<omp.h>#else# pragma message "Compiler did NOT support OPENMP"#endifvoidhelloWorld(){#ifdef _OPENMPint my_rank =omp_get_thread_num();int thread_num =omp_get_num_threads();#elseint my_rank =0;int thread_num =1;#endifprintf("Hello World from %d of %d\n",my_rank,thread_num);}intmain(int argc,char* argv[]){int thread_count =strtol(argv[1],NULL,10);#ifdef _OPENMP #pragma omp parallel num_threads(thread_count)#endifhelloWorld();return0;}
#include <stdio.h>#include <stdlib.h>#ifdef _OPENMP# pragma message "Compiler did support OPENMP"# include <omp.h>#else# pragma message "Compiler did NOT support OPENMP"#endi...