OpenMPI compilation error with PGI

I am trying to compile OpenMPI with PGI. We only have license for pgfortran so this is how I configured it.

./configure FC=pgfortran FCFLAGS=-fast

It configures, but then I do make and I get this error.

make[2]: Entering directory `/install/src/openmpi-2.0.0/ompi/mpi/fortran/use-mpi-ignore-tkr'
  GENERATE mpi-ignore-tkr-sizeof.h
  GENERATE mpi-ignore-tkr-sizeof.f90
  PPFC     mpi-ignore-tkr.lo
  FC       mpi-ignore-tkr-sizeof.lo
pgfortran-Error-Unknown switch: -pthread
make[2]: *** [] Error 1

Any pointers to how to solve this problem?

So the switch -pthread is the problem.

It should probably translate to

Create a world readable file

to solve this for everyone, or put it in your $HOME directory for it to only
work for you.

In the file, add the line

switch -pthread is

To verify it works, look at

pgfortran -dryrun foo.f
output, and make sure the siterc file is being read.