= OpenMP C++ = == Hello World == {{{#!cpp // // hellp_omp.cpp: display a message on the screen // #include #include int main () { int id; std::cout << "C++ Start" << std::endl; #pragma omp parallel private(id) { id = omp_get_thread_num(); std::cout << "hello from " << id << std::endl; #pragma omp barrier if ( id == 0 ) { int nthreads = omp_get_num_threads(); std::cout << nthreads << " threads said hello!" << std::endl; } } std::cout << "End" << std::endl; } }}} == Compile with GNU C++ == {{{g++ hello_omp.c -fopemp}}} == Compile with PGI C++ == {{{pgcpp hello_omp.c -mp}}} == Compile with Intel C++ == i{{{cpc hello_omp.c -openmp}}} == Example of Jobscript == [[https://wiki.hpc.tulane.edu/trac/wiki/cypress/Programming/Cexamples#ExamplesofJobscript|See Example]]