diff --git a/ompi/mpi/fortran/mpif-h/buffer_detach_f.c b/ompi/mpi/fortran/mpif-h/buffer_detach_f.c index 18e6dd968f..e2114d7340 100644 --- a/ompi/mpi/fortran/mpif-h/buffer_detach_f.c +++ b/ompi/mpi/fortran/mpif-h/buffer_detach_f.c @@ -79,6 +79,7 @@ void ompi_buffer_detach_f(char *buffer, MPI_Fint *size, MPI_Fint *ierr) int c_ierr; void *dummy; OMPI_SINGLE_NAME_DECL(size); + c_ierr = MPI_Buffer_detach(&dummy, OMPI_SINGLE_NAME_CONVERT(size)); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); @@ -96,15 +97,13 @@ void ompi_buffer_detach_f08(char *buffer, MPI_Fint *size, MPI_Fint *ierr) { int c_ierr; void *dummy; - OMPI_SINGLE_NAME_DECL(size); + c_ierr = MPI_Buffer_detach(&dummy, OMPI_SINGLE_NAME_CONVERT(size)); - if (NULL != ierr) { - *(void **)buffer = dummy; - *ierr = OMPI_INT_2_FINT(c_ierr); - } + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); if (MPI_SUCCESS == c_ierr) { + *(void **)buffer = dummy; OMPI_SINGLE_INT_2_FINT(size); } } diff --git a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h index 08ab059e74..5fc8c85ec8 100644 --- a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h +++ b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011-2013 Inria. All rights reserved. * Copyright (c) 2011-2013 Universite Bordeaux 1 * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights @@ -459,6 +459,12 @@ PN2(void, MPI_Comm_null_delete_fn, mpi_comm_null_delete_fn, MPI_COMM_NULL_DELETE PN2(void, MPI_Comm_null_copy_fn, mpi_comm_null_copy_fn, MPI_COMM_NULL_COPY_FN, (MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Aint* extra_state, MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t * flag, MPI_Fint* ierr)); PN2(void, MPI_Comm_dup_fn, mpi_comm_dup_fn, MPI_COMM_DUP_FN, (MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Aint* extra_state, MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t * flag, MPI_Fint* ierr)); +/* + * The following is an mpi_f08-module-specific function that does not + * fit in to the normal/templated prototypes, above. + */ +void ompi_buffer_detach_f08(char *buffer, MPI_Fint *size, MPI_Fint *ierr); + END_C_DECLS #endif