Compiling MPI program on Hydra

It is used OPENMPI to compile and run MPI program.

Loading openmpi module

Run the following command in order to load mpi module
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 using MPI

Compiling C++ program by using MPI

Compiling fortran program by using MPI

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