Open eclipse by right clicking the desktop and
selecting “eclipse (mpi)” (if you're using the
virtual machine image or remote cluster).
Go to File → New → Project.
Select “Managed Make Fortran Project” under the
“Fortran” folder in the New Project dialog.
Name the project.
Change “Project Type” from “Executable (Gnu)” to
Executable (Gnu Fortran).
Leave this dialog as it is and press “Next
>”.
Put a checkbox next to “Add MPI project settings
to this project”.
Uncheck “Use default information” and replace
both “MPI compile command” and “MPI link command”
with mpif90 (or mpif77).
Select the new project and go to Project →
Properties.
Select “Fortran Build” from the left hand menu.
From the “Tool Settings” tab, scroll down the menu
and select “GNU Fortran Compiler”. Replace gfortran
with mpif90 (or mpif77 if you did so above) in the
“Command” textbox to the right. Press “Apply” and
then “OK”.