Skip to content

Commit 5c44af1

Browse files
author
rhc54
committed
Merge pull request open-mpi#970 from jsquyres/pr/v1.10/fix-get-address-bottom
v1.10: Fix MPI_Get_address (MPI_BOTTOM, ...)
2 parents d363092 + b87a4be commit 5c44af1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ompi/mpi/c/get_address.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
13+
* Copyright (c) 2013-2016 Los Alamos National Security, LLC. All rights
1414
* reserved.
1515
* $COPYRIGHT$
1616
*
@@ -43,7 +43,7 @@ int MPI_Get_address(const void *location, MPI_Aint *address)
4343

4444
if( MPI_PARAM_CHECK ) {
4545
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
46-
if (NULL == location || NULL == address) {
46+
if (NULL == address) {
4747
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME);
4848
}
4949
}

ompi/mpi/fortran/mpif-h/get_address_f.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "ompi_config.h"
2121

2222
#include "ompi/mpi/fortran/mpif-h/bindings.h"
23+
#include "ompi/mpi/fortran/base/constants.h"
2324

2425
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
2526
#pragma weak PMPI_GET_ADDRESS = ompi_get_address_f
@@ -69,7 +70,7 @@ void ompi_get_address_f(char *location, MPI_Aint *address, MPI_Fint *ierr)
6970
int c_ierr;
7071
MPI_Aint c_address;
7172

72-
c_ierr = MPI_Get_address(location, &c_address);
73+
c_ierr = PMPI_Get_address(OMPI_F2C_BOTTOM(location), &c_address);
7374
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
7475

7576
if (MPI_SUCCESS == c_ierr) {

0 commit comments

Comments
 (0)