https://bugs.kde.org/show_bug.cgi?id=401416
--- Comment #6 from Mark Wielaard <m...@klomp.org> ---
Looking at https://www.open-mpi.org/faq/?category=mpi-removed I would suggest
the following patch:

diff --git a/mpi/libmpiwrap.c b/mpi/libmpiwrap.c
index 488bb13fd..25eb66480 100644
--- a/mpi/libmpiwrap.c
+++ b/mpi/libmpiwrap.c
@@ -278,8 +278,12 @@ static void showTy ( FILE* f, MPI_Datatype ty )
    else if (ty == MPI_LONG_INT)       fprintf(f,"LONG_INT");
    else if (ty == MPI_SHORT_INT)      fprintf(f,"SHORT_INT");
    else if (ty == MPI_2INT)           fprintf(f,"2INT");
+#  if defined(MPI_UB)
    else if (ty == MPI_UB)             fprintf(f,"UB");
+#  endif
+#  if defined(MPI_LB)
    else if (ty == MPI_LB)             fprintf(f,"LB");
+#  endif
 #  if defined(MPI_WCHAR)
    else if (ty == MPI_WCHAR)          fprintf(f,"WCHAR");
 #  endif
@@ -459,7 +463,12 @@ static long extentOfTy ( MPI_Datatype ty )
 {
    int      r;
    MPI_Aint n;
+#if defined(MPI_TYPE_EXTENT)
    r = PMPI_Type_extent(ty, &n);
+#else
+   MPI_Aint lb;
+   r = MPI_Type_get_extent(ty, &lb, &n);
+#endif
    assert(r == MPI_SUCCESS);
    return (long)n;
 }
@@ -733,8 +742,10 @@ void walk_type ( void(*f)(void*,long), char* base,
MPI_Datatype ty )
          f(base + offsetof(Ty,loc), sizeof(int));
          return;
       }
+#if defined(MPI_LB)
       if (ty == MPI_LB || ty == MPI_UB)
          return; /* have zero size, so nothing needs to be done */
+#endif
       goto unhandled;
       /*NOTREACHED*/
    }

That builds against an openmpi configured with --enable-mpi1-compatibility
(fedora 33) and without (ubuntu 20.10)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to