Compiling OpenMP programs on Heracles, Hydra and Dozer

Home
Compiling OpenMP programs by using cgg, g++ and gfortran compilers
https://computing.llnl.gov/tutorials/openMP/     
http://www.openmp.org/presentations/sc99/sc99_tutorial.pdf
http://www.openmp.org/mp-documents/spec30.pdf
Compiling C program with openMP
Example:

gcc -O -fopenmp /home/john/csc5551/cge-omp1.cpp  -o  /home/john/csc5551/cge-omp1


Compiling C++ program with openMP
Example:

g++ -O -fopenmp /home/john/csc5551/cge-omp1.cpp  -o  /home/john/csc5551/cge-omp1

Compiling Fortran program with openMP
Example:

gfortran  –O  –fopenmp /home/john/csc5551/fge-omp2.f90  –o  /home/john/csc5551/fge-omp2


Compiling options:

-o <file>:
place the output into <file>. If this option is omitted, the compiler will create execution program named a.out in working directory.

<path/>:
directory where the code is. It is optional.

-O:
compile program with optimization

-Wall:
print out all warning

-fopenmp:
Compiling OpenMP program