MPI errors when compiling Tpetra
Created by: wfspotz
When compiling Tpetra, I get the following error:
/Users/wfspotz/Development/Trilinos/packages/tpetra/core/src/Tpetra_Details_iallreduce.cpp:180:22: error: no matching function for call to 'MPI_Type_dup'
(void) MPI_Type_dup (mpiDatatype, dupDatatype);
^~~~~~~~~~~~
/Users/wfspotz/local/openmpi-1.6.5/include/mpi.h:1451:20: note: candidate function not viable: cannot convert argument of incomplete type 'MPI_Datatype'
(aka 'ompi_datatype_t *') to 'MPI_Datatype *' (aka 'ompi_datatype_t **')
OMPI_DECLSPEC int MPI_Type_dup(MPI_Datatype type, MPI_Datatype *newtype);
^
I also get this error:
/Users/wfspotz/Development/Trilinos/packages/tpetra/core/src/Tpetra_Details_iallreduce.cpp:181:22: error: no matching function for call to 'MPI_Allreduce'
(void) MPI_Allreduce (sendbuf, recvbuf, count, dupDatatype,
^~~~~~~~~~~~~
/Users/wfspotz/local/openmpi-1.6.5/include/mpi.h:1041:20: note: candidate function not viable: 1st argument ('const void *const') would lose const qualifier
OMPI_DECLSPEC int MPI_Allreduce(void *sendbuf, void *recvbuf, int count,
^
As indicated by the paths above, I am using OpenMPI 1.6.5, and this is in a code block within Tpetra_Details_iallreduce.cpp
for MPI_VERSION < 3
.