#6 Backport PR#6374 to fix MPI_allgatherv fastpath error
Merged 6 months ago by zbyszek. Opened 6 months ago by mathstuf.
rpms/ mathstuf/mpich allgatherv-backport  into  f37

file added
+38
@@ -0,0 +1,38 @@ 

+ From 2b8c5c7dc4974fc471b446e6cc939936aa14fd8f Mon Sep 17 00:00:00 2001

+ From: Hui Zhou <hzhou321@anl.gov>

+ Date: Sat, 21 Jan 2023 10:35:32 -0600

+ Subject: [PATCH] coll: fix allgatherv early return case

+ 

+ The localcopy omitted considering displs.

+ ---

+  src/binding/c/coll_api.txt | 10 ++++++++--

+  1 file changed, 8 insertions(+), 2 deletions(-)

+ 

+ diff --git a/src/binding/c/coll_api.txt b/src/binding/c/coll_api.txt

+ index 55be70d093e..d288272e2f3 100644

+ --- a/src/binding/c/coll_api.txt

+ +++ b/src/binding/c/coll_api.txt

+ @@ -57,7 +57,10 @@ MPI_Allgatherv:

+  { -- early_return --

+      if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM && MPIR_Comm_size(comm_ptr) == 1) {

+          if (sendbuf != MPI_IN_PLACE) {

+ -            MPIR_Localcopy(sendbuf, sendcount, sendtype, recvbuf, recvcounts[0], recvtype);

+ +            MPI_Aint recvtype_extent;

+ +            MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent);

+ +            MPIR_Localcopy(sendbuf, sendcount, sendtype,

+ +                           (char *) recvbuf + displs[0] * recvtype_extent, recvcounts[0], recvtype);

+          }

+          goto fn_exit;

+      }

+ @@ -188,7 +191,10 @@ MPI_Iallgatherv:

+  { -- early_return --

+      if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM && MPIR_Comm_size(comm_ptr) == 1) {

+          if (sendbuf != MPI_IN_PLACE) {

+ -            MPIR_Localcopy(sendbuf, sendcount, sendtype, recvbuf, recvcounts[0], recvtype);

+ +            MPI_Aint recvtype_extent;

+ +            MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent);

+ +            MPIR_Localcopy(sendbuf, sendcount, sendtype,

+ +                           (char *) recvbuf + displs[0] * recvtype_extent, recvcounts[0], recvtype);

+          }

+          MPIR_Request *request_ptr = MPIR_Request_create_complete(MPIR_REQUEST_KIND__COLL);

+          *request = request_ptr->handle;

file modified
+2
@@ -15,6 +15,8 @@ 

  Patch:          0003-Drop-build-flags-e.g.-specs.-and-lto-from-mpi-wrappe.patch

  Patch:          0004-Make-mpich.module-useful.patch

  # TODO: submit ^ upstream

+ # https://github.com/pmodels/mpich/pull/6374

+ Patch:          6374.patch

  

  BuildRequires:  make

  BuildRequires:  autoconf

Metadata