diff --git a/src/Pstream/mpi/UPstream.C b/src/Pstream/mpi/UPstream.C index b7a5cd0c8f..1ba7dfbe33 100644 --- a/src/Pstream/mpi/UPstream.C +++ b/src/Pstream/mpi/UPstream.C @@ -324,7 +324,9 @@ void Foam::UPstream::allToAll ( MPI_Alltoall ( - sendData.begin(), + // NOTE: const_cast is a temporary hack for + // backward-compatibility with versions of OpenMPI < 1.7.4 + const_cast(sendData.begin()), sizeof(label), MPI_BYTE, recvData.begin(),