On OS X the generating the MPI library fails with the following error
message:

duplicate symbol _ompi_buffer_detach_f08 in:
    .libs/buffer_detach_f.o
    profile/.libs/libmpi_mpifh_pmpi.a(pbuffer_detach_f.o)
ld: 1 duplicate symbol for architecture x86_64

I came up with the following patch, but I'm not sure this is the real fix.
It does fix the issue in my particular configuration.

diff --git a/ompi/mpi/fortran/mpif-h/buffer_detach_f.c
b/ompi/mpi/fortran/mpif-h/buffer_detach_f.c
index e2114d7..5d2c530 100644
--- a/ompi/mpi/fortran/mpif-h/buffer_detach_f.c
+++ b/ompi/mpi/fortran/mpif-h/buffer_detach_f.c
@@ -88,6 +88,7 @@ void ompi_buffer_detach_f(char *buffer, MPI_Fint *size,
MPI_Fint *ierr)
     }
 }

+#if !OMPI_PROFILE_LAYER
 /*
  * Per above, this is the mpi_f08 module implementation of
  * MPI_BUFFER_DETACH.  It handles the buffer arugment just like the C
@@ -107,3 +108,4 @@ void ompi_buffer_detach_f08(char *buffer, MPI_Fint
*size, MPI_Fint *ierr)
         OMPI_SINGLE_INT_2_FINT(size);
     }
 }
+#endif  /* !OMPI_PROFILE_LAYER */

George.

Reply via email to