Compiling MPI + OpenMP program on Hydra

Home
It is used OPENMPI to compile and run MPI program.

Loading openmpi module

Run the following command in order to load mpi module
Note:
If you forget running the above command, some errors may occur because MPICH will be used instead OpenMPI.

Both MPICH and OpenMPI are MPI implementations and OpenMPI usually has better performance.

Compiling C program by combining MPI and OpenMP

Compiling C++ program by combining MPI and OpenMP

Compiling fortran program by combining MPI and OpenMP


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 the program with optimization

-fopenmp:  compiling openMP program