MPI Error

Hi,

I am using a trial license of PGI Workstation 2010 and when I try to compile a fortran 90 code (that compiles with no errors with gnu fortran over openmpi), I got the following error message:

PGF90-F-0004-Unable to open MODULE file mpi.mod

The line that is pointed by the error message is simply:

use mpi

I am trying to use the previously installed mpich libraries that comes with the openSUSE 11.1, so I answered “no” when the PGI Workstation installation procedure asked for a mpich installation. The environmental variable MPIDIR was set in the .bash_profile as:

export MPIDIR=/opt/mpich

where /opt/mpich is the root directory of the mpich libraries.

Thanks in advance,

Roberto

Hi Roberto,

It’s not a problem to use you’re own build of OpenMPI. However, the Fortran portions must be built with the PGI compilers. Information on how to build OpenMPI can be found at: http://www.pgroup.com/resources/openmpi/openmpi141_pgi2010.htm

As for your specific error of not finding the MPI module, the most likely you need to add “-I/path/to/mpi/mod/include/directory” to your compile options or you need to compile using the MPI driver script, mpif90.

Also, you should check that ‘mpi.mod’ exists. Not all MPI implementations include a F90 mpi module, or it does included, it doesn’t always get built by default. Note that you can try changing ‘use mpi’ to ‘#include “mpif.h”’ if your implementation includes a Fortran header file instead.

Hope this helps.
Mat