Summary: | Compile failure with openmpi 4.0 | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Orion Poplawski <orion> |
Component: | general | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | balint, mark |
Priority: | NOR | ||
Version: | 3.14.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Stop using symbols dropped in openmpi 4.0
Only use MPI1 symbols when properly defined |
Description
Orion Poplawski
2018-11-26 05:02:12 UTC
Do you mean that OpenMPI no longer supports MPI1 at all? Well, not really. By default, OpenMPI 4.0 does not support MPI1. It is possible to enable it (for now) with a compile time flag, and this is probably what we'll do in Fedora for now. But support is going away. Created attachment 124176 [details]
Stop using symbols dropped in openmpi 4.0
I'm attaching the patch used in Ubuntu.
(In reply to Balint Reczey from comment #3) > Created attachment 124176 [details] > Stop using symbols dropped in openmpi 4.0 > > I'm attaching the patch used in Ubuntu. Is there a reason to remove them completely instead of keep using the if defined (...) constructs? (In reply to Mark Wielaard from comment #4) > Is there a reason to remove them completely instead of keep using the if > defined (...) constructs? I had wondered that too. I'm trying the if-defined scheme right now. 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) Created attachment 136756 [details]
Only use MPI1 symbols when properly defined
Julian came up with a slightly better fix that works for me on both fedora 33 and ubuntu 20.10
Fixed, 3415e1e1acc5095607663071db299f961bd65bde. |