PGI 16.1 CDUA Fortran with OpenMPI Compiling, -Mmpi flag


I’m testing the new version of PGI 16.1 (CUDA Fortran and MPI). I noticed that this version comes with OpenMPI, which is different from previous (mpich).

With previous version, I can compile my code with:
f90comp = pgfortran -Mmpi=mpich -Mcuda=7.5
But not in this version, and the key words available are: mpich|sgimpi|mpich1|mpich2|mvapich1

So, can anyone let me know what should I do with this new Open MPI.

I have modified my .bashrc file to add the path:
export PATH=/opt/pgi/linux86-64/16.1/mpi/openmpi/bin:$PATH
export LD_LIBRARY_PATH=/opt/pgi/linux86-64/16.1/mpi/openmpi/lib:$LD_LIBRARY_PATH

But, seems like the mpif.h file is located here: /opt/pgi/linux86-64/16.1/mpi/openmpi/include
So, I added one line in my Makefile: -I/opt/pgi/linux86-64/14.6/mpi/mpich/include
(Note: previously with mpich, I don’t need to do this, just use -Mmpi=mpich is enough)

Unfortunately, during the compilation it gave errors and complained about: undefined reference to MPI function calls (i.e. undefined reference to `mpi_bcast_ )

BTW, I cannot find the user’s guide or other pdf documentations in the /doc/ folder, there used to be lots of helpful PDFs in the previous installation.

Thanks in advance,

I think I fixed this issue by using ‘mpifort -Mcuda’ to compile the code.

Please let me know if you have other suggestions.