From 1d144e49b7ec90abb0dcd0121497b8443b5176fc Mon Sep 17 00:00:00 2001 From: Ben Wibking Date: Mon, 11 Nov 2024 15:49:52 -0500 Subject: [PATCH] fix MPI_Allreduce buffer aliasing --- src/hydro/hydro.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hydro/hydro.cpp b/src/hydro/hydro.cpp index aa7cb5f3..a720b6fc 100644 --- a/src/hydro/hydro.cpp +++ b/src/hydro/hydro.cpp @@ -865,7 +865,7 @@ Real EstimateHyperbolicTimestep(MeshData *md) { MPI_Op_create(ValPropPairMPIReducer, 1, &mpi_minloc_valproppair); // do MPI reduction - MPI_Allreduce(&min_dt_hyperbolic, &min_dt_hyperbolic, 1, mpi_valproppair, + MPI_Allreduce(MPI_IN_PLACE, &min_dt_hyperbolic, 1, mpi_valproppair, mpi_minloc_valproppair, MPI_COMM_WORLD); if (parthenon::Globals::my_rank == 0) {