[mpich-discuss] Minor compilation problem with 3 mpich
Edric Ellis
Edric.Ellis at mathworks.co.uk
Mon Aug 1 07:16:29 CDT 2016
Here's a hopefully-comprehensible diff for what I changed:
--- REPOSITORY/mpich/src/mpi/comm/comm_agree.c 2015-08-24 16:09:33.000000000 -0400
+++ SANDBOX/mpich/src/mpi/comm/comm_agree.c 2015-08-24 16:09:33.000000000 -0400
@@ -25,7 +25,6 @@
#ifndef MPICH_MPI_FROM_PMPI
#undef MPIX_Comm_agree
#define MPIX_Comm_agree PMPIX_Comm_agree
-#endif
#undef FUNCNAME
#define FUNCNAME MPIR_Comm_agree
@@ -106,6 +105,8 @@
goto fn_exit;
}
+#endif /* !defined(MPICH_MPI_FROM_PMPI) */
+
#undef FUNCNAME
#define FUNCNAME MPIX_Comm_agree
#undef FCNAME
--- REPOSITORY/mpich/src/mpi/comm/comm_shrink.c 2015-08-24 16:09:33.000000000 -0400
+++ SANDBOX/mpich/src/mpi/comm/comm_shrink.c 2015-08-24 16:09:33.000000000 -0400
@@ -39,7 +39,6 @@
#ifndef MPICH_MPI_FROM_PMPI
#undef MPIX_Comm_shrink
#define MPIX_Comm_shrink PMPIX_Comm_shrink
-#endif
#undef FUNCNAME
#define FUNCNAME MPIR_Comm_shrink
@@ -93,6 +92,8 @@
goto fn_exit;
}
+#endif /* !defined(MPICH_MPI_FROM_PMPI) */
+
#undef FUNCNAME
#define FUNCNAME MPIX_Comm_shrink
#undef FCNAME
--- REPOSITORY/mpich/src/glue/romio/all_romio_symbols.c 2015-08-24 16:09:33.000000000 -0400
+++ SANDBOX/mpich/src/glue/romio/all_romio_symbols.c 2015-08-24 16:09:33.000000000 -0400
@@ -36,6 +36,9 @@
#include "mpi.h"
void MPIR_All_romio_symbols(void);
+
+#ifndef MPICH_MPI_FROM_PMPI
+
void MPIR_All_romio_symbols(void)
{
#ifdef MPI_MODE_RDONLY
@@ -525,3 +528,4 @@
}
#endif /* MPI_MODE_RDONLY */
}
+#endif /* !defined(MPICH_MPI_FROM_PMPI) */
Note that the problem doesn't show up when building MPICH in any normal manner - what I'm doing is unpacking the static libraries libmpi.a and libpmpi.a on Mac and re-packaging all the object files into a single .dylib file - and that fails because of the duplicate symbols.
Cheers,
Edric.
-----Original Message-----
Message: 5
Date: Thu, 28 Jul 2016 10:48:23 -0500
From: Kenneth Raffenetti <raffenet at mcs.anl.gov>
To: <discuss at mpich.org>
Subject: Re: [mpich-discuss] Minor compilation problem with 3 mpich
source files
Message-ID: <47b96cec-9753-01d1-f1bf-a7d4571b4bb2 at mcs.anl.gov>
Content-Type: text/plain; charset="utf-8"; format=flowed
Thanks, I believe I've seen this issue before but our nightly builds don't currently show any errors. Might be specific to a compiler/linker version.
Do you have a patch you could share to show your fix? If not, I will try to reimplement the solution.
Ken
On 07/28/2016 09:36 AM, Edric Ellis wrote:
> Hi there,
>
>
>
> I found three source files:
>
>
>
> src/mpi/comm/comm_agree.c
>
> src/mpi/comm/comm_shrink.c
>
> src/glue/romio/all_romio_symbols.c
>
>
>
> where the MPIR functions were ending up in both the ?mpi? and ?pmpi?
> object files (we need to repackage the libraries in a slightly odd way
> on Mac, and this was causing that to fail). I fixed this by moving (or
> adding) the ?#ifndef MPICH_MPI_FROM_PMPI? guards to ensure the MPIR
> symbols didn?t end up in the ?mpi? object files. This problem appears
> to still be present in the latest version 3.2 (I?m actually currently
> building 3.1.4).
_______________________________________________
discuss mailing list discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss
More information about the discuss
mailing list