Missing MPI in 19.4

I’ve just installed PGI Fortran 19.4 Community Edition for Windows. However, no MPI-related files seems to have been installed. I’ve copied one of the examples to a working directory, but when I try

pgfortran -o test.exe mpihello.f90 -Mmpi=msmpi

I get the error message:

PGF90-F-0004-Unable to open MODULE file mpi.mod (mpihello.f90: 2)

I’ve manually checked C:\Program Files\PGI\win64\19.4\include and couldn’t find any MSMPI-looking .mod file there (omp and openacc so show up, though).

I’ve tried searching for this error message, but all I could find was this older forum post:

However, there was no choice about MSMPI in the 19.4 installer (in fact, there was no component choice at all, other than a prompt to install Cygwin), and I have not manually installed MSMPI or any Microsoft HPC software before installing PGI Fortran (I did install Visual Studio as per the PGI installation guide).

How do I get PGI Fortran to install with support for MPI? Or how can I add it after the fact and have it work with -Mmpi=msmpi (as opposed to -L, -I, etc.)?


I think we dropped bundling an MPI distribution with PGI releases on Windows. Downloading it and building it yourself should be fine, though I don’t think you’ll be able to get it to work nicely with the -Mmpi flag since we stopped bundling it. Using the -I and -L flags manually is probably the best bet going forward.

Thanks for your reply, aglobus.

I’ll try that route then. I guess the relevant section of the documentation should be updated accordingly, though.

Have a nice day!


I have been using the Microsoft MPI for Windows, and it seems to work fine with -Mmpi=msmpi, for what it’s worth.


Erin, did you install previous versions of PGI to 19.4? Were they community editions?