Ensure that MPI_Status objects have proper alignment:
- fix the Fortran layer to use new macros to convert Fortran-to-C status - change the C internals to pull out old OMPI_SET_STATUS* macros Also, change name of "status" argument in topo_test_f.c to "topo_type". This commit was SVN r27403.
Этот коммит содержится в:
родитель
0122cf6cbb
Коммит
25ad84b925
@ -16,6 +16,7 @@
|
||||
# reserved.
|
||||
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
# Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
|
||||
# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -432,6 +433,7 @@ if test "$ac_cv_type_long_double__Complex" = yes; then
|
||||
fi
|
||||
|
||||
OMPI_C_GET_ALIGNMENT(void *, OPAL_ALIGNMENT_VOID_P)
|
||||
OMPI_C_GET_ALIGNMENT(size_t, OPAL_ALIGNMENT_SIZE_T)
|
||||
|
||||
#
|
||||
# Does the C compiler native support "bool"? (i.e., without
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Copyright (c) 2010-2011 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -5209,7 +5209,7 @@ static int coord_request_wait( ompi_request_t * req,
|
||||
status->MPI_TAG = req->req_status.MPI_TAG;
|
||||
status->MPI_SOURCE = req->req_status.MPI_SOURCE;
|
||||
status->_cancelled = req->req_status._cancelled;
|
||||
OMPI_STATUS_SET_COUNT(&status->_ucount, &req->req_status._ucount);
|
||||
status->_ucount = req->req_status._ucount;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
|
@ -11,7 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
@ -62,7 +62,7 @@ ompi_mtl_mx_iprobe(struct mca_mtl_base_module_t* mtl,
|
||||
if(MPI_STATUS_IGNORE != status) {
|
||||
MX_GET_SRC(mx_status.match_info, status->MPI_SOURCE);
|
||||
MX_GET_TAG(mx_status.match_info, status->MPI_TAG);
|
||||
OMPI_STATUS_SET_COUNT(&status->_ucount, &mx_status.msg_length);
|
||||
status->_ucount = mx_status.msg_length;
|
||||
}
|
||||
*flag = 1;
|
||||
} else {
|
||||
|
@ -40,7 +40,7 @@ int mca_pml_bfo_iprobe(int src,
|
||||
|
||||
if( recvreq.req_recv.req_base.req_ompi.req_complete == true ) {
|
||||
if( NULL != status ) {
|
||||
OMPI_STATUS_SET(status, &recvreq.req_recv.req_base.req_ompi.req_status);
|
||||
*status = recvreq.req_recv.req_base.req_ompi.req_status;
|
||||
}
|
||||
rc = recvreq.req_recv.req_base.req_ompi.req_status.MPI_ERROR;
|
||||
*matched = 1;
|
||||
@ -71,7 +71,7 @@ int mca_pml_bfo_probe(int src,
|
||||
ompi_request_wait_completion(&recvreq.req_recv.req_base.req_ompi);
|
||||
rc = recvreq.req_recv.req_base.req_ompi.req_status.MPI_ERROR;
|
||||
if (NULL != status) {
|
||||
OMPI_STATUS_SET(status, &recvreq.req_recv.req_base.req_ompi.req_status);
|
||||
*status = recvreq.req_recv.req_base.req_ompi.req_status;
|
||||
}
|
||||
|
||||
MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv );
|
||||
|
@ -107,7 +107,7 @@ int mca_pml_bfo_recv(void *addr,
|
||||
ompi_request_wait_completion(&recvreq->req_recv.req_base.req_ompi);
|
||||
|
||||
if (NULL != status) { /* return status */
|
||||
OMPI_STATUS_SET(status, &recvreq->req_recv.req_base.req_ompi.req_status);
|
||||
*status = recvreq->req_recv.req_base.req_ompi.req_status;
|
||||
}
|
||||
rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR;
|
||||
ompi_request_free( (ompi_request_t**)&recvreq );
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -115,7 +115,7 @@ mca_pml_cm_recv(void *addr,
|
||||
ompi_request_wait_completion(&recvreq->req_base.req_ompi);
|
||||
|
||||
if (NULL != status) { /* return status */
|
||||
OMPI_STATUS_SET(status, &recvreq->req_base.req_ompi.req_status);
|
||||
*status = recvreq->req_base.req_ompi.req_status;
|
||||
}
|
||||
ret = recvreq->req_base.req_ompi.req_status.MPI_ERROR;
|
||||
ompi_request_free( (ompi_request_t**)&recvreq );
|
||||
@ -190,7 +190,7 @@ mca_pml_cm_mrecv(void *buf,
|
||||
ompi_request_wait_completion(&recvreq->req_base.req_ompi);
|
||||
|
||||
if (NULL != status) { /* return status */
|
||||
OMPI_STATUS_SET(status, &recvreq->req_base.req_ompi.req_status);
|
||||
*status = recvreq->req_base.req_ompi.req_status;
|
||||
}
|
||||
ret = recvreq->req_base.req_ompi.req_status.MPI_ERROR;
|
||||
ompi_request_free( (ompi_request_t**)&recvreq );
|
||||
|
@ -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) 2009-2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -39,7 +39,7 @@ int mca_pml_csum_iprobe(int src,
|
||||
|
||||
if( recvreq.req_recv.req_base.req_ompi.req_complete == true ) {
|
||||
if( NULL != status ) {
|
||||
OMPI_STATUS_SET(status, &recvreq.req_recv.req_base.req_ompi.req_status);
|
||||
*status = recvreq.req_recv.req_base.req_ompi.req_status;
|
||||
}
|
||||
*matched = 1;
|
||||
} else {
|
||||
@ -68,7 +68,7 @@ int mca_pml_csum_probe(int src,
|
||||
ompi_request_wait_completion(&recvreq.req_recv.req_base.req_ompi);
|
||||
|
||||
if (NULL != status) {
|
||||
OMPI_STATUS_SET(status, &recvreq.req_recv.req_base.req_ompi.req_status);
|
||||
*status = recvreq.req_recv.req_base.req_ompi.req_status;
|
||||
}
|
||||
MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv );
|
||||
return OMPI_SUCCESS;
|
||||
|
@ -11,7 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -105,7 +105,7 @@ int mca_pml_csum_recv(void *addr,
|
||||
ompi_request_wait_completion(&recvreq->req_recv.req_base.req_ompi);
|
||||
|
||||
if (NULL != status) { /* return status */
|
||||
OMPI_STATUS_SET(status, &recvreq->req_recv.req_base.req_ompi.req_status);
|
||||
*status = recvreq->req_recv.req_base.req_ompi.req_status;
|
||||
}
|
||||
rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR;
|
||||
ompi_request_free( (ompi_request_t**)&recvreq );
|
||||
|
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -39,7 +39,7 @@ int mca_pml_dr_iprobe(int src,
|
||||
|
||||
if( recvreq.req_recv.req_base.req_ompi.req_complete == true ) {
|
||||
if( NULL != status ) {
|
||||
OMPI_STATUS_SET(status, &recvreq.req_recv.req_base.req_ompi.req_status);
|
||||
*status = recvreq.req_recv.req_base.req_ompi.req_status;
|
||||
}
|
||||
*matched = 1;
|
||||
} else {
|
||||
@ -68,7 +68,7 @@ int mca_pml_dr_probe(int src,
|
||||
ompi_request_wait_completion(&recvreq.req_recv.req_base.req_ompi);
|
||||
|
||||
if (NULL != status) {
|
||||
OMPI_STATUS_SET(status, &recvreq.req_recv.req_base.req_ompi.req_status);
|
||||
*status = recvreq.req_recv.req_base.req_ompi.req_status;
|
||||
}
|
||||
MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv );
|
||||
return OMPI_SUCCESS;
|
||||
|
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -91,7 +91,7 @@ int mca_pml_dr_recv(void *addr,
|
||||
ompi_request_wait_completion(&recvreq->req_recv.req_base.req_ompi);
|
||||
|
||||
if (NULL != status) { /* return status */
|
||||
OMPI_STATUS_SET(status, &recvreq->req_recv.req_base.req_ompi.req_status);
|
||||
*status = recvreq->req_recv.req_base.req_ompi.req_status;
|
||||
}
|
||||
rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR;
|
||||
ompi_request_free( (ompi_request_t**)&recvreq );
|
||||
|
@ -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) 2009-2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011-2012 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -41,7 +41,7 @@ int mca_pml_ob1_iprobe(int src,
|
||||
|
||||
if( recvreq.req_recv.req_base.req_ompi.req_complete == true ) {
|
||||
if( NULL != status ) {
|
||||
OMPI_STATUS_SET(status, &recvreq.req_recv.req_base.req_ompi.req_status);
|
||||
*status = recvreq.req_recv.req_base.req_ompi.req_status;
|
||||
}
|
||||
rc = recvreq.req_recv.req_base.req_ompi.req_status.MPI_ERROR;
|
||||
*matched = 1;
|
||||
@ -72,7 +72,7 @@ int mca_pml_ob1_probe(int src,
|
||||
ompi_request_wait_completion(&recvreq.req_recv.req_base.req_ompi);
|
||||
rc = recvreq.req_recv.req_base.req_ompi.req_status.MPI_ERROR;
|
||||
if (NULL != status) {
|
||||
OMPI_STATUS_SET(status, &recvreq.req_recv.req_base.req_ompi.req_status);
|
||||
*status = recvreq.req_recv.req_base.req_ompi.req_status;
|
||||
}
|
||||
|
||||
MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv );
|
||||
|
@ -11,7 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -108,7 +108,7 @@ int mca_pml_ob1_recv(void *addr,
|
||||
ompi_request_wait_completion(&recvreq->req_recv.req_base.req_ompi);
|
||||
|
||||
if (NULL != status) { /* return status */
|
||||
OMPI_STATUS_SET(status, &recvreq->req_recv.req_base.req_ompi.req_status);
|
||||
*status = recvreq->req_recv.req_base.req_ompi.req_status;
|
||||
}
|
||||
rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR;
|
||||
ompi_request_free( (ompi_request_t**)&recvreq );
|
||||
|
@ -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) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -127,7 +127,7 @@ int MPI_Sendrecv_replace(void * buf, int count, MPI_Datatype datatype,
|
||||
|
||||
/* return status to user */
|
||||
if(status != MPI_STATUS_IGNORE) {
|
||||
OMPI_STATUS_SET(status, &recv_status);
|
||||
*status = recv_status;
|
||||
}
|
||||
|
||||
/* release resources */
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -69,36 +71,13 @@ void ompi_file_read_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_read_all_end(c_fh, buf, c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -71,35 +73,14 @@ void ompi_file_read_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_read_all(c_fh, OMPI_F2C_BOTTOM(buf),
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -70,35 +72,12 @@ void ompi_file_read_at_all_end_f(MPI_Fint *fh, char *buf,
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_read_at_all_end(c_fh, buf, c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -73,25 +75,9 @@ void ompi_file_read_at_all_f(MPI_Fint *fh, MPI_Offset *offset,
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_read_at_all(c_fh,
|
||||
(MPI_Offset) *offset,
|
||||
@ -101,10 +87,5 @@ void ompi_file_read_at_all_f(MPI_Fint *fh, MPI_Offset *offset,
|
||||
c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -72,27 +74,9 @@ void ompi_file_read_at_f(MPI_Fint *fh, MPI_Offset *offset, char *buf,
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_read_at(c_fh,
|
||||
(MPI_Offset) *offset,
|
||||
@ -101,10 +85,5 @@ void ompi_file_read_at_f(MPI_Fint *fh, MPI_Offset *offset, char *buf,
|
||||
c_type, c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -71,35 +73,14 @@ void ompi_file_read_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_read(c_fh, OMPI_F2C_BOTTOM(buf),
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -70,35 +72,12 @@ void ompi_file_read_ordered_end_f(MPI_Fint *fh, char *buf,
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_read_ordered_end(c_fh, buf, c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -72,25 +74,9 @@ void ompi_file_read_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_read_ordered(c_fh,
|
||||
OMPI_F2C_BOTTOM(buf),
|
||||
@ -99,10 +85,5 @@ void ompi_file_read_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -72,25 +74,9 @@ void ompi_file_read_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_read_shared(c_fh,
|
||||
OMPI_F2C_BOTTOM(buf),
|
||||
@ -99,10 +85,5 @@ void ompi_file_read_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -69,36 +71,13 @@ void ompi_file_write_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_write_all_end(c_fh, buf, c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -71,35 +73,14 @@ void ompi_file_write_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_write_all(c_fh, OMPI_F2C_BOTTOM(buf),
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -70,35 +72,12 @@ void ompi_file_write_at_all_end_f(MPI_Fint *fh, char *buf,
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_write_at_all_end(c_fh, buf, c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -73,25 +75,9 @@ void ompi_file_write_at_all_f(MPI_Fint *fh, MPI_Offset *offset,
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_write_at_all(c_fh,
|
||||
(MPI_Offset) *offset,
|
||||
@ -101,10 +87,5 @@ void ompi_file_write_at_all_f(MPI_Fint *fh, MPI_Offset *offset,
|
||||
c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -71,25 +73,9 @@ void ompi_file_write_at_f(MPI_Fint *fh, MPI_Offset *offset,
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_write_at(c_fh,
|
||||
(MPI_Offset) *offset,
|
||||
@ -98,10 +84,5 @@ void ompi_file_write_at_f(MPI_Fint *fh, MPI_Offset *offset,
|
||||
c_type, c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -71,35 +73,14 @@ void ompi_file_write_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_write(c_fh, OMPI_F2C_BOTTOM(buf),
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -70,35 +72,12 @@ void ompi_file_write_ordered_end_f(MPI_Fint *fh, char *buf,
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_write_ordered_end(c_fh, buf, c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -72,25 +74,9 @@ void ompi_file_write_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_write_ordered(c_fh,
|
||||
OMPI_F2C_BOTTOM(buf),
|
||||
@ -99,10 +85,5 @@ void ompi_file_write_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
@ -72,25 +74,9 @@ void ompi_file_write_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
int c_ierr;
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_File_write_shared(c_fh,
|
||||
OMPI_F2C_BOTTOM(buf),
|
||||
@ -99,10 +85,5 @@ void ompi_file_write_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
|
||||
@ -66,32 +68,15 @@ void ompi_improbe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm,
|
||||
ompi_fortran_logical_t *flag, MPI_Fint *message,
|
||||
MPI_Fint *status, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Status *c_status;
|
||||
MPI_Message c_message;
|
||||
MPI_Comm c_comm;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
int c_ierr;
|
||||
OMPI_LOGICAL_NAME_DECL(flag);
|
||||
|
||||
c_comm = MPI_Comm_f2c (*comm);
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = OMPI_INT_2_FINT(MPI_Improbe(OMPI_FINT_2_INT(*source),
|
||||
OMPI_FINT_2_INT(*tag),
|
||||
@ -102,11 +87,7 @@ void ompi_improbe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm,
|
||||
if (MPI_SUCCESS == c_ierr) {
|
||||
OMPI_SINGLE_INT_2_LOGICAL(flag);
|
||||
if (OMPI_FORTRAN_VALUE_TRUE == *flag) {
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
*message = MPI_Message_c2f(c_message);
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
|
||||
@ -70,30 +72,13 @@ void ompi_iprobe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm,
|
||||
ompi_fortran_logical_t *flag, MPI_Fint *status, MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Status *c_status;
|
||||
MPI_Comm c_comm;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
OMPI_LOGICAL_NAME_DECL(flag);
|
||||
|
||||
c_comm = MPI_Comm_f2c (*comm);
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_Iprobe(OMPI_FINT_2_INT(*source),
|
||||
OMPI_FINT_2_INT(*tag),
|
||||
@ -103,10 +88,6 @@ void ompi_iprobe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm,
|
||||
|
||||
if (MPI_SUCCESS == c_ierr) {
|
||||
OMPI_SINGLE_INT_2_LOGICAL(flag);
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
|
||||
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -21,6 +22,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
|
||||
@ -69,31 +71,14 @@ OMPI_GENERATE_F77_BINDINGS (MPI_MPROBE,
|
||||
void ompi_mprobe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm,
|
||||
MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Status *c_status;
|
||||
MPI_Comm c_comm;
|
||||
MPI_Message c_message;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
int c_ierr;
|
||||
|
||||
c_comm = MPI_Comm_f2c (*comm);
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = OMPI_INT_2_FINT(MPI_Mprobe(OMPI_FINT_2_INT(*source),
|
||||
OMPI_FINT_2_INT(*tag),
|
||||
@ -102,11 +87,7 @@ void ompi_mprobe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm,
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
if (MPI_SUCCESS == c_ierr) {
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
*message = MPI_Message_c2f(c_message);
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
|
||||
@ -66,27 +68,11 @@ void ompi_mrecv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
|
||||
MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
MPI_Message c_message = MPI_Message_f2c(*message);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
/* Call the C function */
|
||||
c_ierr = OMPI_INT_2_FINT(MPI_Mrecv(OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count),
|
||||
@ -95,11 +81,7 @@ void ompi_mrecv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
if (MPI_SUCCESS == c_ierr) {
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
/* message is an INOUT, and may be updated by the recv */
|
||||
*message = MPI_Message_c2f(c_message);
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
|
||||
@ -69,39 +71,17 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PROBE,
|
||||
void ompi_probe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Status *c_status;
|
||||
MPI_Comm c_comm;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
|
||||
c_comm = MPI_Comm_f2c (*comm);
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
c_ierr = MPI_Probe(OMPI_FINT_2_INT(*source),
|
||||
OMPI_FINT_2_INT(*tag),
|
||||
c_comm, c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -20,6 +21,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/mpif-h/status-conversion.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
|
||||
@ -70,28 +72,12 @@ void ompi_recv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
|
||||
MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm,
|
||||
MPI_Fint *status, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
MPI_Comm c_comm = MPI_Comm_f2c(*comm);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
int c_ierr;
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
|
||||
/* Call the C function */
|
||||
c_ierr = MPI_Recv(OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count),
|
||||
@ -100,9 +86,5 @@ void ompi_recv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
|
||||
c_status);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_SUCCESS == c_ierr && MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
}
|
||||
|
171
ompi/mpi/fortran/mpif-h/status-conversion.h
Обычный файл
171
ompi/mpi/fortran/mpif-h/status-conversion.h
Обычный файл
@ -0,0 +1,171 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef OMPI_FORTRAN_STATUS_CONVERSION_H
|
||||
#define OMPI_FORTRAN_STATUS_CONVERSION_H
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "mpi.h"
|
||||
|
||||
/*
|
||||
* A Fortran MPI_STATUS argument and a C MPI_Status argument can differ.
|
||||
* Therefore, the Fortran layer converts between Fortran and C statuses
|
||||
* using the MPI_Status_[f2c|c2f] functions:
|
||||
*
|
||||
* void Fortran_api(... MPI_Fint *status ...)
|
||||
* {
|
||||
* int c_ierr;
|
||||
* MPI_Status c_status;
|
||||
* MPI_Status_f2c(status, &c_status);
|
||||
* c_ierr = C_api(... &c_status ...);
|
||||
* MPI_Status_c2f(&c_status, status);
|
||||
* }
|
||||
*
|
||||
* The macros we define below support a different approach that avoids
|
||||
* the overhead of conversion in cases where we can detect that the
|
||||
* Fortran status can be used directly:
|
||||
*
|
||||
* void Fortran_api(... MPI_Fint *status ...)
|
||||
* {
|
||||
* int c_ierr;
|
||||
* OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
* OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
* c_ierr = C_api(... c_status ...);
|
||||
* OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
* }
|
||||
*
|
||||
* Issues around whether a Fortran status can be used directly by
|
||||
* OMPI C internals are discussed in trac tickets 2526 and 3218 as
|
||||
* well as ompi/mpi/c/status_c2f.c. The issues include:
|
||||
*
|
||||
* - A Fortran status must be large enough to hold a C status.
|
||||
* This requirement is always satisfied by the configure-time
|
||||
* determination of the Fortran parameter MPI_STATUS_SIZE.
|
||||
*
|
||||
* - A Fortran INTEGER should be the same size as a C int so
|
||||
* that components indicated by MPI_SOURCE, MPI_TAG, and
|
||||
* MPI_ERROR can be addressed properly from either language.
|
||||
*
|
||||
* - A Fortran status must be aligned such that all C status
|
||||
* struct components have proper alignment. The Fortran
|
||||
* status alignment is only guaranteed to be suitable for
|
||||
* Fortran INTEGERs. The C status requires alignment for a
|
||||
* size_t component. We utilize two tests:
|
||||
*
|
||||
* - Check if Fortran INTEGER alignment matches size_t alignment.
|
||||
* This check is not necessary, but it is sufficient and can be
|
||||
* assessed at compile time.
|
||||
*
|
||||
* - Check if the particular Fortran status pointer provided by
|
||||
* the user has suitable alignment. This check is both necessary
|
||||
* and sufficient, but must be conducted at run time.
|
||||
*
|
||||
* These alignment issues are taken into consideration only
|
||||
* for 64-bit SPARC runs, which is where these issues have
|
||||
* been visible.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* First, we have two preliminary checks:
|
||||
* - OMPI_FORTRAN_STATUS_NEED_CONVERSION_1
|
||||
* is sufficient, but not necessary
|
||||
* can be evaluated at compile time
|
||||
* - OMPI_FORTRAN_STATUS_NEED_CONVERSION_2(status)
|
||||
* is sufficient and necessary
|
||||
* must be evaluated at run time
|
||||
* If check #1 is false at compile time, then check #2 will always be false at run time.
|
||||
* The compile-time check is used to conditionalize compilation of references to c_status2.
|
||||
*/
|
||||
|
||||
|
||||
#if defined(__sparc) && SIZEOF_SIZE_T == 8
|
||||
#define OMPI_FORTRAN_STATUS_NEED_CONVERSION_1 \
|
||||
((OMPI_SIZEOF_FORTRAN_INTEGER!=SIZEOF_INT) || \
|
||||
(OMPI_ALIGNMENT_FORTRAN_INTEGER!=OPAL_ALIGNMENT_SIZE_T))
|
||||
#else
|
||||
#define OMPI_FORTRAN_STATUS_NEED_CONVERSION_1 \
|
||||
(OMPI_SIZEOF_FORTRAN_INTEGER!=SIZEOF_INT)
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__sparc) && SIZEOF_SIZE_T == 8
|
||||
#define OMPI_FORTRAN_STATUS_NEED_CONVERSION_2(status) \
|
||||
( \
|
||||
(OMPI_SIZEOF_FORTRAN_INTEGER!=SIZEOF_INT) \
|
||||
|| \
|
||||
( \
|
||||
(OMPI_ALIGNMENT_FORTRAN_INTEGER!=OPAL_ALIGNMENT_SIZE_T) \
|
||||
&& \
|
||||
(((ulong) (status)) & (OPAL_ALIGNMENT_SIZE_T-1)) \
|
||||
) \
|
||||
)
|
||||
#else
|
||||
#define OMPI_FORTRAN_STATUS_NEED_CONVERSION_2(status) \
|
||||
(OMPI_SIZEOF_FORTRAN_INTEGER!=SIZEOF_INT)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Now, the macros:
|
||||
* - OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
|
||||
* - OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
|
||||
* - OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
*/
|
||||
|
||||
|
||||
#if OMPI_FORTRAN_STATUS_NEED_CONVERSION_1
|
||||
#define OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2) MPI_Status *c_status, c_status2;
|
||||
#else
|
||||
#define OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2) MPI_Status *c_status;
|
||||
#endif
|
||||
|
||||
|
||||
#if OMPI_FORTRAN_STATUS_NEED_CONVERSION_1
|
||||
#define OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) \
|
||||
do { \
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) { \
|
||||
c_status = MPI_STATUS_IGNORE; \
|
||||
} else { \
|
||||
if ( OMPI_FORTRAN_STATUS_NEED_CONVERSION_2(status) ) { \
|
||||
c_status = &c_status2; \
|
||||
} else { \
|
||||
c_status = (MPI_Status *) status; \
|
||||
} \
|
||||
} \
|
||||
} while (0);
|
||||
#else
|
||||
#define OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) \
|
||||
do { \
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) { \
|
||||
c_status = MPI_STATUS_IGNORE; \
|
||||
} else { \
|
||||
c_status = (MPI_Status *) status; \
|
||||
} \
|
||||
} while (0);
|
||||
#endif
|
||||
|
||||
|
||||
#if OMPI_FORTRAN_STATUS_NEED_CONVERSION_1
|
||||
#define OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr) \
|
||||
do { \
|
||||
if ( \
|
||||
OMPI_FORTRAN_STATUS_NEED_CONVERSION_2(status) && \
|
||||
MPI_SUCCESS == c_ierr && \
|
||||
MPI_STATUS_IGNORE != c_status ) \
|
||||
{ \
|
||||
MPI_Status_c2f(c_status, status); \
|
||||
} \
|
||||
} while (0);
|
||||
#else
|
||||
#define OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* OMPI_FORTRAN_STATUS_CONVERSION_H */
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -35,8 +36,8 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_TOPO_TEST,
|
||||
pmpi_topo_test_,
|
||||
pmpi_topo_test__,
|
||||
pompi_topo_test_f,
|
||||
(MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr),
|
||||
(comm, status, ierr) )
|
||||
(MPI_Fint *comm, MPI_Fint *topo_type, MPI_Fint *ierr),
|
||||
(comm, topo_type, ierr) )
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
@ -55,8 +56,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TOPO_TEST,
|
||||
mpi_topo_test_,
|
||||
mpi_topo_test__,
|
||||
ompi_topo_test_f,
|
||||
(MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr),
|
||||
(comm, status, ierr) )
|
||||
(MPI_Fint *comm, MPI_Fint *topo_type, MPI_Fint *ierr),
|
||||
(comm, topo_type, ierr) )
|
||||
#endif
|
||||
|
||||
|
||||
@ -64,18 +65,18 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TOPO_TEST,
|
||||
#include "ompi/mpi/fortran/mpif-h/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void ompi_topo_test_f(MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr)
|
||||
void ompi_topo_test_f(MPI_Fint *comm, MPI_Fint *topo_type, MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Comm c_comm;
|
||||
OMPI_SINGLE_NAME_DECL(status);
|
||||
OMPI_SINGLE_NAME_DECL(topo_type);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
c_ierr = MPI_Topo_test(c_comm, OMPI_SINGLE_NAME_CONVERT(status));
|
||||
c_ierr = MPI_Topo_test(c_comm, OMPI_SINGLE_NAME_CONVERT(topo_type));
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
if (MPI_SUCCESS == c_ierr) {
|
||||
OMPI_SINGLE_INT_2_FINT(status);
|
||||
OMPI_SINGLE_INT_2_FINT(topo_type);
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012 Oak Ridge National Labs. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -41,7 +41,7 @@ int ompi_request_default_test( ompi_request_t ** rptr,
|
||||
if( request->req_state == OMPI_REQUEST_INACTIVE ) {
|
||||
*completed = true;
|
||||
if (MPI_STATUS_IGNORE != status) {
|
||||
OMPI_STATUS_SET(status, &ompi_status_empty);
|
||||
*status = ompi_status_empty;
|
||||
}
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -57,14 +57,14 @@ int ompi_request_default_test( ompi_request_t ** rptr,
|
||||
ompi_grequest_invoke_query(request, &request->req_status);
|
||||
if (MPI_STATUS_IGNORE != status) {
|
||||
int old_error = status->MPI_ERROR;
|
||||
OMPI_STATUS_SET(status, &request->req_status);
|
||||
*status = request->req_status;
|
||||
status->MPI_ERROR = old_error;
|
||||
}
|
||||
} else if (MPI_STATUS_IGNORE != status) {
|
||||
/* Do *NOT* set a new value for status->MPI_ERROR here!
|
||||
See MPI-1.1 doc, sec 3.2.5, p.22 */
|
||||
int old_error = status->MPI_ERROR;
|
||||
OMPI_STATUS_SET(status, &request->req_status);
|
||||
*status = request->req_status;
|
||||
status->MPI_ERROR = old_error;
|
||||
}
|
||||
if( request->req_persistent ) {
|
||||
@ -133,14 +133,14 @@ int ompi_request_default_test_any(
|
||||
/* Do *NOT* set a new value for status->MPI_ERROR
|
||||
here! See MPI-1.1 doc, sec 3.2.5, p.22 */
|
||||
int old_error = status->MPI_ERROR;
|
||||
OMPI_STATUS_SET(status, &request->req_status);
|
||||
*status = request->req_status;
|
||||
status->MPI_ERROR = old_error;
|
||||
}
|
||||
} else if (MPI_STATUS_IGNORE != status) {
|
||||
/* Do *NOT* set a new value for status->MPI_ERROR
|
||||
here! See MPI-1.1 doc, sec 3.2.5, p.22 */
|
||||
int old_error = status->MPI_ERROR;
|
||||
OMPI_STATUS_SET(status, &request->req_status);
|
||||
*status = request->req_status;
|
||||
status->MPI_ERROR = old_error;
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ int ompi_request_default_test_any(
|
||||
} else {
|
||||
*completed = true;
|
||||
if (MPI_STATUS_IGNORE != status) {
|
||||
OMPI_STATUS_SET(status, &ompi_status_empty);
|
||||
*status = ompi_status_empty;
|
||||
}
|
||||
}
|
||||
return OMPI_SUCCESS;
|
||||
@ -222,13 +222,13 @@ int ompi_request_default_test_all(
|
||||
* Works also in the case of persistent request w/ MPI_PROC_NULL.
|
||||
*/
|
||||
if( request->req_state == OMPI_REQUEST_INACTIVE ) {
|
||||
OMPI_STATUS_SET(&statuses[i], &request->req_status);
|
||||
statuses[i] = request->req_status;
|
||||
continue;
|
||||
}
|
||||
if (OMPI_REQUEST_GEN == request->req_type) {
|
||||
ompi_grequest_invoke_query(request, &request->req_status);
|
||||
}
|
||||
OMPI_STATUS_SET(&statuses[i], &request->req_status);
|
||||
statuses[i] = request->req_status;
|
||||
if( request->req_persistent ) {
|
||||
request->req_state = OMPI_REQUEST_INACTIVE;
|
||||
continue;
|
||||
@ -329,7 +329,7 @@ int ompi_request_default_test_some(
|
||||
if (OMPI_REQUEST_GEN == request->req_type) {
|
||||
ompi_grequest_invoke_query(request, &request->req_status);
|
||||
}
|
||||
OMPI_STATUS_SET(&statuses[i], &request->req_status);
|
||||
statuses[i] = request->req_status;
|
||||
}
|
||||
|
||||
if (MPI_SUCCESS != request->req_status.MPI_ERROR) {
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012 Oak Ridge National Labs. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -56,7 +56,7 @@ int ompi_request_default_wait(
|
||||
3.2.5, p.22 */
|
||||
status->MPI_TAG = req->req_status.MPI_TAG;
|
||||
status->MPI_SOURCE = req->req_status.MPI_SOURCE;
|
||||
OMPI_STATUS_SET_COUNT(&status->_ucount, &req->req_status._ucount);
|
||||
status->_ucount = req->req_status._ucount;
|
||||
status->_cancelled = req->req_status._cancelled;
|
||||
}
|
||||
if( req->req_persistent ) {
|
||||
@ -169,7 +169,7 @@ finished:
|
||||
if(num_requests_null_inactive == count) {
|
||||
*index = MPI_UNDEFINED;
|
||||
if (MPI_STATUS_IGNORE != status) {
|
||||
OMPI_STATUS_SET(status, &ompi_status_empty);
|
||||
*status = ompi_status_empty;
|
||||
}
|
||||
} else {
|
||||
assert( true == request->req_complete );
|
||||
@ -182,7 +182,7 @@ finished:
|
||||
/* Do *NOT* set status->MPI_ERROR here! See MPI-1.1 doc,
|
||||
sec 3.2.5, p.22 */
|
||||
int old_error = status->MPI_ERROR;
|
||||
OMPI_STATUS_SET(status, &request->req_status);
|
||||
*status = request->req_status;
|
||||
status->MPI_ERROR = old_error;
|
||||
}
|
||||
rc = request->req_status.MPI_ERROR;
|
||||
@ -343,7 +343,7 @@ int ompi_request_default_wait_all( size_t count,
|
||||
ompi_grequest_invoke_query(request, &request->req_status);
|
||||
}
|
||||
|
||||
OMPI_STATUS_SET(&statuses[i], &request->req_status);
|
||||
statuses[i] = request->req_status;
|
||||
/*
|
||||
* Per MPI 2.2 p 60:
|
||||
* Allows requests to be marked as MPI_ERR_PENDING if they are
|
||||
@ -557,7 +557,7 @@ finished:
|
||||
ompi_grequest_invoke_query(request, &request->req_status);
|
||||
}
|
||||
if (MPI_STATUSES_IGNORE != statuses) {
|
||||
OMPI_STATUS_SET(&statuses[i], &request->req_status);
|
||||
statuses[i] = request->req_status;
|
||||
}
|
||||
|
||||
if (MPI_SUCCESS != request->req_status.MPI_ERROR) {
|
||||
|
@ -11,7 +11,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012 Oak Ridge National Labs. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -415,46 +415,6 @@ static inline int ompi_request_complete(ompi_request_t* request, bool with_signa
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
/* In a 64-bit library with strict alignment requirements (like 64-bit
|
||||
* SPARC), the _ucount field of a C status is a long and requires 8
|
||||
* byte alignment. Unfortunately a Fortran status is an array of 6
|
||||
* integers which only requires 4 byte alignment. When storing the
|
||||
* length into a status we don't know whether it is a C or Fortran
|
||||
* status. Therefore, we just copy the entire status as an integer
|
||||
* array to avoid any issues. We supply one macro for doing the entire
|
||||
* status and another for just the _ucount field. Note that these
|
||||
* macros are enabled on 64-bit SPARC platforms only. This is because
|
||||
* an investigation into performance effects showed that keeping the
|
||||
* structure assignment code wherever possible resulted in the best
|
||||
* performance. Details of the investigation into this issue are at
|
||||
* https://svn.open-mpi.org/trac/ompi/ticket/2526
|
||||
*/
|
||||
#if defined(__sparc) && SIZEOF_SIZE_T == 8
|
||||
#define OMPI_STATUS_SET(outstat, instat) \
|
||||
do { \
|
||||
if (((ulong)(outstat)) & 0x7) { \
|
||||
int _i; \
|
||||
for(_i=0; _i<(int)(sizeof(ompi_status_public_t)/sizeof(int)); _i++) { \
|
||||
((int *)(outstat))[_i] = ((int *)(instat))[_i]; \
|
||||
} \
|
||||
} else { \
|
||||
*(outstat) = *(instat); \
|
||||
} \
|
||||
} while(0)
|
||||
#define OMPI_STATUS_SET_COUNT(outcount, incount) \
|
||||
do { \
|
||||
if (((ulong)(outcount)) & 0x7) { \
|
||||
((int *)(outcount))[0] = ((int *)(incount))[0]; \
|
||||
((int *)(outcount))[1] = ((int *)(incount))[1]; \
|
||||
} else { \
|
||||
*(outcount) = *(incount); \
|
||||
} \
|
||||
} while(0)
|
||||
#else
|
||||
#define OMPI_STATUS_SET(outstat, instat) (*(outstat) = *(instat))
|
||||
#define OMPI_STATUS_SET_COUNT(outcount, incount) (*(outcount) = *(incount))
|
||||
#endif
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user