I try to compile the pgc++ with MPI application, and I am using the openmpi.
module load mpi/OpenMPI/3.1.4-GCC-8.3.0
module load compiler/PGI/19.10-GCC-8.3.0-2.32
and I see a few options here:
pgc++-Fatal-Switch -Mmpi must have a value
-Mmpi=mpich|sgimpi|mpich1|mpich2|mvapich1
Use default or specified MPI communication libraries
mpich Use default or MPIDIR-specified MPICH v3.0 libraries
sgimpi Use default or MPI_ROOT-specified SGI MPI libraries
mpich1 DEPRECATED: Use MPIDIR to specify MPICH1 libraries
mpich2 DEPRECATED: Use MPIDIR to specify MPICH2 libraries
mvapich1 DEPRECATED: Use MPIDIR to specify MVAPICH1 libraries
And I am using the following compilation option:
pgc++ -fast -Mmpi=mpic++ -Minfo=acc -ta=multicore -acc hello.cpp
afterwards I am getting the following error:
/software/binutils/2.32-GCCcore-8.3.0/bin/ld: hello.o: in function `communicate_fields()':
5/mpi/fields.cpp:130: undefined reference to `ompi_mpi_comm_world'
.
.
/software/binutils/2.32-GCCcore-8.3.0/bin/ld: hello.o:(.data+0x88): undefined reference to `MPI::Datatype::Free()'
/software/binutils/2.32-GCCcore-8.3.0/bin/ld: hello.o:(.data+0x568): undefined reference to `MPI::Win::Free()'
Could you please tell me how to link the MPI library with PGI?