1
1

Implementation of the MPI-3 Matched Probe functionality. Currently only

implemented in the OB1 PML, will return NOT_SUPPORTED in other PMLs.

This commit was SVN r25865.
Этот коммит содержится в:
Brian Barrett 2012-02-06 17:35:21 +00:00
родитель 46a22a8fc1
Коммит 25d48e22fa
65 изменённых файлов: 2651 добавлений и 10 удалений

Просмотреть файл

@ -11,7 +11,7 @@
# All rights reserved.
# Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
# Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
# Copyright (c) 2010-2011 Sandia National Laboratories. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -139,6 +139,7 @@ include errhandler/Makefile.am
include file/Makefile.am
include group/Makefile.am
include info/Makefile.am
include message/Makefile.am
include op/Makefile.am
include peruse/Makefile.am
include proc/Makefile.am

Просмотреть файл

@ -12,6 +12,7 @@
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -325,6 +326,7 @@ typedef struct ompi_group_t *MPI_Group;
typedef struct ompi_info_t *MPI_Info;
typedef struct ompi_op_t *MPI_Op;
typedef struct ompi_request_t *MPI_Request;
typedef struct ompi_message_t *MPI_Message;
typedef struct ompi_status_public_t MPI_Status;
typedef struct ompi_win_t *MPI_Win;
@ -630,6 +632,7 @@ enum {
#define MPI_GROUP_NULL OMPI_PREDEFINED_GLOBAL(MPI_Group, ompi_mpi_group_null)
#define MPI_COMM_NULL OMPI_PREDEFINED_GLOBAL(MPI_Comm, ompi_mpi_comm_null)
#define MPI_REQUEST_NULL OMPI_PREDEFINED_GLOBAL(MPI_Request, ompi_request_null)
#define MPI_MESSAGE_NULL OMPI_PREDEFINED_GLOBAL(MPI_Message, ompi_message_null)
#define MPI_OP_NULL OMPI_PREDEFINED_GLOBAL(MPI_Op, ompi_mpi_op_null)
#define MPI_ERRHANDLER_NULL OMPI_PREDEFINED_GLOBAL(MPI_Errhandler, ompi_mpi_errhandler_null)
#define MPI_INFO_NULL OMPI_PREDEFINED_GLOBAL(MPI_Info, ompi_mpi_info_null)
@ -762,6 +765,7 @@ OMPI_DECLSPEC extern struct ompi_predefined_group_t ompi_mpi_group_empty;
OMPI_DECLSPEC extern struct ompi_predefined_group_t ompi_mpi_group_null;
OMPI_DECLSPEC extern struct ompi_predefined_request_t ompi_request_null;
OMPI_DECLSPEC extern struct ompi_predefined_message_t ompi_message_null;
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_null;
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_min;
@ -1293,6 +1297,11 @@ OMPI_DECLSPEC int MPI_Group_union(MPI_Group group1, MPI_Group group2,
MPI_Group *newgroup);
OMPI_DECLSPEC int MPI_Ibsend(void *buf, int count, MPI_Datatype datatype, int dest,
int tag, MPI_Comm comm, MPI_Request *request);
OMPI_DECLSPEC int MPI_Improbe(int source, int tag, MPI_Comm comm,
int *flag, MPI_Message *message,
MPI_Status *status);
OMPI_DECLSPEC int MPI_Imrecv(void *buf, int count, MPI_Datatype type,
MPI_Message *message, MPI_Request *request);
OMPI_DECLSPEC MPI_Fint MPI_Info_c2f(MPI_Info info);
OMPI_DECLSPEC int MPI_Info_create(MPI_Info *info);
OMPI_DECLSPEC int MPI_Info_delete(MPI_Info info, char *key);
@ -1333,7 +1342,14 @@ OMPI_DECLSPEC int MPI_Keyval_create(MPI_Copy_function *copy_fn,
OMPI_DECLSPEC int MPI_Keyval_free(int *keyval)
__mpi_interface_deprecated__("MPI_Keyval_free is superseded by MPI_Comm_free_keyval in MPI-2.0");
OMPI_DECLSPEC int MPI_Lookup_name(char *service_name, MPI_Info info, char *port_name);
OMPI_DECLSPEC MPI_Fint MPI_Op_c2f(MPI_Op op);
OMPI_DECLSPEC MPI_Fint MPI_Message_c2f(MPI_Message message);
OMPI_DECLSPEC MPI_Message MPI_Message_f2c(MPI_Fint message);
OMPI_DECLSPEC int MPI_Mprobe(int source, int tag, MPI_Comm comm,
MPI_Message *message,
MPI_Status *status);
OMPI_DECLSPEC int MPI_Mrecv(void *buf, int count, MPI_Datatype type,
MPI_Message *message, MPI_Status *status);
OMPI_DECLSPEC MPI_Fint MPI_Op_c2f(MPI_Op op);
OMPI_DECLSPEC int MPI_Op_commutative(MPI_Op op, int *commute);
OMPI_DECLSPEC int MPI_Op_create(MPI_User_function *function, int commute, MPI_Op *op);
OMPI_DECLSPEC int MPI_Open_port(MPI_Info info, char *port_name);
@ -1822,6 +1838,11 @@ OMPI_DECLSPEC int PMPI_Group_union(MPI_Group group1, MPI_Group group2,
MPI_Group *newgroup);
OMPI_DECLSPEC int PMPI_Ibsend(void *buf, int count, MPI_Datatype datatype, int dest,
int tag, MPI_Comm comm, MPI_Request *request);
OMPI_DECLSPEC int PMPI_Improbe(int source, int tag, MPI_Comm comm,
int *flag, MPI_Message *message,
MPI_Status *status);
OMPI_DECLSPEC int PMPI_Imrecv(void *buf, int count, MPI_Datatype type,
MPI_Message *message, MPI_Request *request);
OMPI_DECLSPEC MPI_Fint PMPI_Info_c2f(MPI_Info info);
OMPI_DECLSPEC int PMPI_Info_create(MPI_Info *info);
OMPI_DECLSPEC int PMPI_Info_delete(MPI_Info info, char *key);
@ -1862,6 +1883,13 @@ OMPI_DECLSPEC int PMPI_Keyval_create(MPI_Copy_function *copy_fn,
OMPI_DECLSPEC int PMPI_Keyval_free(int *keyval)
__mpi_interface_deprecated__("MPI_Keyval_free is superseded by MPI_Comm_free_keyval in MPI-2.0");
OMPI_DECLSPEC int PMPI_Lookup_name(char *service_name, MPI_Info info, char *port_name);
OMPI_DECLSPEC MPI_Fint PMPI_Message_c2f(MPI_Message message);
OMPI_DECLSPEC MPI_Message PMPI_Message_f2c(MPI_Fint message);
OMPI_DECLSPEC int PMPI_Mprobe(int source, int tag, MPI_Comm comm,
MPI_Message *message,
MPI_Status *status);
OMPI_DECLSPEC int PMPI_Mrecv(void *buf, int count, MPI_Datatype type,
MPI_Message *message, MPI_Status *status);
OMPI_DECLSPEC MPI_Fint PMPI_Op_c2f(MPI_Op op);
OMPI_DECLSPEC int PMPI_Op_commutative(MPI_Op op, int *commute);
OMPI_DECLSPEC int PMPI_Op_create(MPI_User_function *function, int commute, MPI_Op *op);

Просмотреть файл

@ -198,7 +198,7 @@
!
integer MPI_GROUP_NULL, MPI_COMM_NULL, MPI_DATATYPE_NULL
integer MPI_REQUEST_NULL, MPI_OP_NULL, MPI_ERRHANDLER_NULL
integer MPI_INFO_NULL, MPI_WIN_NULL
integer MPI_INFO_NULL, MPI_WIN_NULL, MPI_MESSAGE_NULL
parameter (MPI_GROUP_NULL=0)
parameter (MPI_COMM_NULL=2)
@ -208,6 +208,7 @@
parameter (MPI_ERRHANDLER_NULL=0)
parameter (MPI_INFO_NULL=0)
parameter (MPI_WIN_NULL=0)
parameter (MPI_MESSAGE_NULL=0)
!
! MPI_Init_thread constants
!

Просмотреть файл

@ -1,6 +1,7 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -24,7 +25,9 @@ typedef enum {
MCA_PML_REQUEST_SEND,
MCA_PML_REQUEST_RECV,
MCA_PML_REQUEST_IPROBE,
MCA_PML_REQUEST_PROBE
MCA_PML_REQUEST_PROBE,
MCA_PML_REQUEST_IMPROBE,
MCA_PML_REQUEST_MPROBE
} mca_pml_base_request_type_t;
#endif /* MCA_PML_BASE_REQUEST_DBG_H */

Просмотреть файл

@ -13,6 +13,7 @@
* Copyright (c) 2008 UT-Battelle, LLC. All rights reserved.
* Copyright (c) 2006-2008 University of Houston. All rights reserved.
* Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -69,6 +70,10 @@ mca_pml_bfo_t mca_pml_bfo = {
mca_pml_bfo_iprobe,
mca_pml_bfo_probe,
mca_pml_bfo_start,
mca_pml_bfo_improbe,
mca_pml_bfo_mprobe,
mca_pml_bfo_imrecv,
mca_pml_bfo_mrecv,
mca_pml_bfo_dump,
mca_pml_bfo_ft_event,
65535,

Просмотреть файл

@ -121,6 +121,19 @@ extern int mca_pml_bfo_probe( int dst,
struct ompi_communicator_t* comm,
ompi_status_public_t* status );
extern int mca_pml_bfo_improbe( int dst,
int tag,
struct ompi_communicator_t* comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t* status );
extern int mca_pml_bfo_mprobe( int dst,
int tag,
struct ompi_communicator_t* comm,
struct ompi_message_t **message,
ompi_status_public_t* status );
extern int mca_pml_bfo_isend_init( void *buf,
size_t count,
ompi_datatype_t *datatype,
@ -171,6 +184,18 @@ extern int mca_pml_bfo_recv( void *buf,
struct ompi_communicator_t* comm,
ompi_status_public_t* status );
extern int mca_pml_bfo_imrecv( void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request );
extern int mca_pml_bfo_mrecv( void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status );
extern int mca_pml_bfo_dump( struct ompi_communicator_t* comm,
int verbose );

Просмотреть файл

@ -73,3 +73,26 @@ int mca_pml_bfo_probe(int src,
MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv );
return OMPI_SUCCESS;
}
int
mca_pml_bfo_improbe(int dst,
int tag,
struct ompi_communicator_t* comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}
int
mca_pml_bfo_mprobe(int dst,
int tag,
struct ompi_communicator_t* comm,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}

Просмотреть файл

@ -111,3 +111,25 @@ int mca_pml_bfo_recv(void *addr,
ompi_request_free( (ompi_request_t**)&recvreq );
return rc;
}
int
mca_pml_bfo_imrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request)
{
return OMPI_ERR_NOT_SUPPORTED;
}
int
mca_pml_bfo_mrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}

Просмотреть файл

@ -7,6 +7,7 @@
* reserved.
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -42,6 +43,10 @@ ompi_pml_cm_t ompi_pml_cm = {
mca_pml_cm_iprobe,
mca_pml_cm_probe,
mca_pml_cm_start,
mca_pml_cm_improbe,
mca_pml_cm_mprobe,
mca_pml_cm_imrecv,
mca_pml_cm_mrecv,
mca_pml_cm_dump,
NULL,
0,

Просмотреть файл

@ -115,6 +115,31 @@ OMPI_DECLSPEC extern int mca_pml_cm_probe(int dst,
struct ompi_communicator_t* comm,
ompi_status_public_t* status);
OMPI_DECLSPEC extern int mca_pml_cm_improbe(int dst,
int tag,
struct ompi_communicator_t* comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t* status);
OMPI_DECLSPEC extern int mca_pml_cm_mprobe(int dst,
int tag,
struct ompi_communicator_t* comm,
struct ompi_message_t **message,
ompi_status_public_t* status);
OMPI_DECLSPEC extern int mca_pml_cm_imrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request);
OMPI_DECLSPEC extern int mca_pml_cm_mrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status);
OMPI_DECLSPEC extern int mca_pml_cm_start(size_t count, ompi_request_t** requests);

Просмотреть файл

@ -44,3 +44,26 @@ mca_pml_cm_probe(int src, int tag,
return ret;
}
int
mca_pml_cm_improbe(int dst,
int tag,
struct ompi_communicator_t* comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}
int
mca_pml_cm_mprobe(int dst,
int tag,
struct ompi_communicator_t* comm,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}

Просмотреть файл

@ -123,3 +123,24 @@ mca_pml_cm_recv(void *addr,
return ret;
}
int
mca_pml_cm_imrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request)
{
return OMPI_ERR_NOT_SUPPORTED;
}
int
mca_pml_cm_mrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}

Просмотреть файл

@ -91,6 +91,20 @@ BEGIN_C_DECLS
int mca_pml_crcpw_iprobe(int dst, int tag, struct ompi_communicator_t* comm, int *matched, ompi_status_public_t* status );
int mca_pml_crcpw_probe( int dst, int tag, struct ompi_communicator_t* comm, ompi_status_public_t* status );
int mca_pml_crcpw_improbe( int dst,
int tag,
struct ompi_communicator_t* comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t* status );
int mca_pml_crcpw_mprobe( int dst,
int tag,
struct ompi_communicator_t* comm,
struct ompi_message_t **message,
ompi_status_public_t* status );
int mca_pml_crcpw_isend_init( void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag,
mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm, struct ompi_request_t **request );
@ -109,6 +123,18 @@ BEGIN_C_DECLS
int mca_pml_crcpw_recv( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag,
struct ompi_communicator_t* comm, ompi_status_public_t* status);
int mca_pml_crcpw_imrecv( void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request );
int mca_pml_crcpw_mrecv( void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status );
int mca_pml_crcpw_dump( struct ompi_communicator_t* comm, int verbose );

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -45,6 +46,10 @@ mca_pml_crcpw_module_t mca_pml_crcpw_module = {
mca_pml_crcpw_iprobe,
mca_pml_crcpw_probe,
mca_pml_crcpw_start,
mca_pml_crcpw_improbe,
mca_pml_crcpw_mprobe,
mca_pml_crcpw_imrecv,
mca_pml_crcpw_mrecv,
mca_pml_crcpw_dump,
mca_pml_crcpw_ft_event,
@ -749,6 +754,52 @@ int mca_pml_crcpw_start( size_t count, ompi_request_t** requests )
return OMPI_SUCCESS;
}
int
mca_pml_crcpw_improbe(int dst,
int tag,
struct ompi_communicator_t* comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}
int
mca_pml_crcpw_mprobe(int dst,
int tag,
struct ompi_communicator_t* comm,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}
int
mca_pml_crcpw_imrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request)
{
return OMPI_ERR_NOT_SUPPORTED;
}
int
mca_pml_crcpw_mrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}
int mca_pml_crcpw_ft_event(int state)
{
int ret;

Просмотреть файл

@ -16,6 +16,7 @@
* Copyright (c) 2009 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -70,6 +71,10 @@ mca_pml_csum_t mca_pml_csum = {
mca_pml_csum_iprobe,
mca_pml_csum_probe,
mca_pml_csum_start,
mca_pml_csum_improbe,
mca_pml_csum_mprobe,
mca_pml_csum_imrecv,
mca_pml_csum_mrecv,
mca_pml_csum_dump,
mca_pml_csum_ft_event,
65535,

Просмотреть файл

@ -124,6 +124,19 @@ extern int mca_pml_csum_probe( int dst,
struct ompi_communicator_t* comm,
ompi_status_public_t* status );
extern int mca_pml_csum_improbe( int dst,
int tag,
struct ompi_communicator_t* comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t* status );
extern int mca_pml_csum_mprobe( int dst,
int tag,
struct ompi_communicator_t* comm,
struct ompi_message_t **message,
ompi_status_public_t* status );
extern int mca_pml_csum_isend_init( void *buf,
size_t count,
ompi_datatype_t *datatype,
@ -174,6 +187,18 @@ extern int mca_pml_csum_recv( void *buf,
struct ompi_communicator_t* comm,
ompi_status_public_t* status );
extern int mca_pml_csum_imrecv( void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request );
extern int mca_pml_csum_mrecv( void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status );
extern int mca_pml_csum_dump( struct ompi_communicator_t* comm,
int verbose );

Просмотреть файл

@ -73,3 +73,26 @@ int mca_pml_csum_probe(int src,
MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv );
return OMPI_SUCCESS;
}
int
mca_pml_csum_improbe(int dst,
int tag,
struct ompi_communicator_t* comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}
int
mca_pml_csum_mprobe(int dst,
int tag,
struct ompi_communicator_t* comm,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}

Просмотреть файл

@ -111,3 +111,25 @@ int mca_pml_csum_recv(void *addr,
ompi_request_free( (ompi_request_t**)&recvreq );
return rc;
}
int
mca_pml_csum_imrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request)
{
return OMPI_ERR_NOT_SUPPORTED;
}
int
mca_pml_csum_mrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}

Просмотреть файл

@ -11,6 +11,7 @@
* 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) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -58,6 +59,10 @@ mca_pml_dr_t mca_pml_dr = {
mca_pml_dr_iprobe,
mca_pml_dr_probe,
mca_pml_dr_start,
mca_pml_dr_improbe,
mca_pml_dr_mprobe,
mca_pml_dr_imrecv,
mca_pml_dr_mrecv,
mca_pml_dr_dump,
NULL,
65535,

Просмотреть файл

@ -131,6 +131,19 @@ extern int mca_pml_dr_probe(
ompi_status_public_t* status
);
extern int mca_pml_dr_improbe(int dst,
int tag,
struct ompi_communicator_t* comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t* status);
extern int mca_pml_dr_mprobe(int dst,
int tag,
struct ompi_communicator_t* comm,
struct ompi_message_t **message,
ompi_status_public_t* status);
extern int mca_pml_dr_isend_init(
void *buf,
size_t count,
@ -193,6 +206,18 @@ extern int mca_pml_dr_recv(
ompi_status_public_t* status
);
extern int mca_pml_dr_imrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request);
extern int mca_pml_dr_mrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status);
extern int mca_pml_dr_dump(
struct ompi_communicator_t* comm,
int verbose

Просмотреть файл

@ -73,3 +73,26 @@ int mca_pml_dr_probe(int src,
MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv );
return OMPI_SUCCESS;
}
int
mca_pml_dr_improbe(int dst,
int tag,
struct ompi_communicator_t* comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}
int
mca_pml_dr_mprobe(int dst,
int tag,
struct ompi_communicator_t* comm,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}

Просмотреть файл

@ -98,3 +98,24 @@ int mca_pml_dr_recv(void *addr,
return rc;
}
int
mca_pml_dr_imrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request)
{
return OMPI_ERR_NOT_SUPPORTED;
}
int
mca_pml_dr_mrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_ERR_NOT_SUPPORTED;
}

Просмотреть файл

@ -5,6 +5,7 @@
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -35,6 +36,10 @@ mca_pml_example_t mca_pml_example = {
mca_pml_example_iprobe,
mca_pml_example_probe,
mca_pml_example_start,
mca_pml_example_improbe,
mca_pml_example_mprobe,
mca_pml_example_imrecv,
mca_pml_example_mrecv,
mca_pml_example_ft_event,
32768,

Просмотреть файл

@ -5,6 +5,7 @@
* Copyright (c) 2004-2007 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -64,6 +65,19 @@ extern int mca_pml_example_probe( int dst,
struct ompi_communicator_t* comm,
ompi_status_public_t* status );
extern int mca_pml_example_improbe(int dst,
int tag,
struct ompi_communicator_t* comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t* status);
extern int mca_pml_example_mprobe(int dst,
int tag,
struct ompi_communicator_t* comm,
struct ompi_message_t **message,
ompi_status_public_t* status);
extern int mca_pml_example_cancel( ompi_request_t* request );
extern int mca_pml_example_cancelled( ompi_request_t* request, int *flag );
@ -117,6 +131,18 @@ extern int mca_pml_example_recv( void *buf,
struct ompi_communicator_t* comm,
ompi_status_public_t* status );
extern int mca_pml_example_imrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request);
extern int mca_pml_example_mrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status);
extern int mca_pml_example_progress(void);
extern int mca_pml_example_start( size_t count, ompi_request_t** requests );

Просмотреть файл

@ -2,6 +2,7 @@
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -25,3 +26,22 @@ int mca_pml_example_probe( int src, int tag,
{
return OMPI_SUCCESS;
}
int mca_pml_example_improbe(int dst,
int tag,
struct ompi_communicator_t* comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_SUCCESS;
}
int mca_pml_example_mprobe(int dst,
int tag,
struct ompi_communicator_t* comm,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_SUCCESS;
}

Просмотреть файл

@ -2,6 +2,7 @@
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -47,3 +48,20 @@ int mca_pml_example_recv( void *addr,
return OMPI_SUCCESS;
}
int mca_pml_example_imrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request)
{
return OMPI_SUCCESS;
}
int mca_pml_example_mrecv(void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status)
{
return OMPI_SUCCESS;
}

Просмотреть файл

@ -13,6 +13,7 @@
* Copyright (c) 2008 UT-Battelle, LLC. All rights reserved.
* Copyright (c) 2006-2008 University of Houston. All rights reserved.
* Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -66,6 +67,10 @@ mca_pml_ob1_t mca_pml_ob1 = {
mca_pml_ob1_iprobe,
mca_pml_ob1_probe,
mca_pml_ob1_start,
mca_pml_ob1_improbe,
mca_pml_ob1_mprobe,
mca_pml_ob1_imrecv,
mca_pml_ob1_mrecv,
mca_pml_ob1_dump,
mca_pml_ob1_ft_event,
65535,

Просмотреть файл

@ -10,6 +10,7 @@
* 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) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -121,6 +122,19 @@ extern int mca_pml_ob1_probe( int dst,
struct ompi_communicator_t* comm,
ompi_status_public_t* status );
extern int mca_pml_ob1_improbe( int dst,
int tag,
struct ompi_communicator_t* comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t* status );
extern int mca_pml_ob1_mprobe( int dst,
int tag,
struct ompi_communicator_t* comm,
struct ompi_message_t **message,
ompi_status_public_t* status );
extern int mca_pml_ob1_isend_init( void *buf,
size_t count,
ompi_datatype_t *datatype,
@ -171,6 +185,18 @@ extern int mca_pml_ob1_recv( void *buf,
struct ompi_communicator_t* comm,
ompi_status_public_t* status );
extern int mca_pml_ob1_imrecv( void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request );
extern int mca_pml_ob1_mrecv( void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status );
extern int mca_pml_ob1_dump( struct ompi_communicator_t* comm,
int verbose );

Просмотреть файл

@ -10,6 +10,7 @@
* 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) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -19,6 +20,7 @@
#include "ompi_config.h"
#include "ompi/request/request.h"
#include "ompi/message/message.h"
#include "pml_ob1_recvreq.h"
@ -76,3 +78,86 @@ int mca_pml_ob1_probe(int src,
MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv );
return rc;
}
int
mca_pml_ob1_improbe(int src,
int tag,
struct ompi_communicator_t *comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t * status)
{
int rc = OMPI_SUCCESS;
mca_pml_ob1_recv_request_t *recvreq;
MCA_PML_OB1_RECV_REQUEST_ALLOC(recvreq, rc);
if (NULL == recvreq)
return rc;
recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_IMPROBE;
/* initialize the request enough to probe and get the status */
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq, NULL, 0, &ompi_mpi_char.dt,
src, tag, comm, false);
MCA_PML_OB1_RECV_REQUEST_START(recvreq);
if( recvreq->req_recv.req_base.req_ompi.req_complete == true ) {
if( NULL != status ) {
*status = recvreq->req_recv.req_base.req_ompi.req_status;
}
*matched = 1;
*message = ompi_message_alloc();
(*message)->comm = comm;
(*message)->req_ptr = recvreq;
(*message)->count = recvreq->req_recv.req_base.req_ompi.req_status._ucount;
rc = OMPI_SUCCESS;
} else {
*matched = 0;
/* we only free if we didn't match, because we're going to
translate the request into a receive request later on if it
was matched */
ompi_request_free((ompi_request_t**)&recvreq);
opal_progress();
}
return rc;
}
int
mca_pml_ob1_mprobe(int src,
int tag,
struct ompi_communicator_t *comm,
struct ompi_message_t **message,
ompi_status_public_t * status)
{
int rc = OMPI_SUCCESS;
mca_pml_ob1_recv_request_t *recvreq;
MCA_PML_OB1_RECV_REQUEST_ALLOC(recvreq, rc);
if (NULL == recvreq)
return rc;
recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_MPROBE;
/* initialize the request enough to probe and get the status */
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq, NULL, 0, &ompi_mpi_char.dt,
src, tag, comm, false);
MCA_PML_OB1_RECV_REQUEST_START(recvreq);
ompi_request_wait_completion(&recvreq->req_recv.req_base.req_ompi);
if( NULL != status ) {
*status = recvreq->req_recv.req_base.req_ompi.req_status;
}
*message = ompi_message_alloc();
(*message)->comm = comm;
(*message)->req_ptr = recvreq;
(*message)->count = recvreq->req_recv.req_base.req_ompi.req_status._ucount;
return OMPI_SUCCESS;
}

Просмотреть файл

@ -12,6 +12,7 @@
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -22,7 +23,9 @@
#include "ompi_config.h"
#include "ompi/request/request.h"
#include "pml_ob1_recvreq.h"
#include "pml_ob1_recvfrag.h"
#include "ompi/peruse/peruse-internal.h"
#include "ompi/message/message.h"
int mca_pml_ob1_irecv_init(void *addr,
size_t count,
@ -111,3 +114,179 @@ int mca_pml_ob1_recv(void *addr,
ompi_request_free( (ompi_request_t**)&recvreq );
return rc;
}
int
mca_pml_ob1_imrecv( void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request )
{
mca_pml_ob1_recv_frag_t* frag;
mca_pml_ob1_recv_request_t *recvreq;
mca_pml_ob1_hdr_t *hdr;
int src, tag;
ompi_communicator_t *comm;
mca_pml_ob1_comm_proc_t* proc;
mca_pml_ob1_comm_t* ob1_comm;
uint64_t seq;
/* get the request from the message and the frag from the request
before we overwrite everything */
recvreq = (mca_pml_ob1_recv_request_t*) (*message)->req_ptr;
frag = (mca_pml_ob1_recv_frag_t*) recvreq->req_recv.req_base.req_addr;
src = recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE;
tag = recvreq->req_recv.req_base.req_ompi.req_status.MPI_TAG;
comm = (*message)->comm;
ob1_comm = recvreq->req_recv.req_base.req_comm->c_pml_comm;
seq = recvreq->req_recv.req_base.req_sequence;
/* make the request a recv request again */
recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV;
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq,
buf,
count, datatype,
src, tag, comm, false);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&((recvreq)->req_recv.req_base),
PERUSE_RECV);
/* init/re-init the request */
recvreq->req_lock = 0;
recvreq->req_pipeline_depth = 0;
recvreq->req_bytes_received = 0;
/* What about req_rdma_cnt ? */
recvreq->req_rdma_idx = 0;
recvreq->req_pending = false;
recvreq->req_ack_sent = false;
MCA_PML_BASE_RECV_START(&recvreq->req_recv.req_base);
/* Note - sequence number already assigned */
recvreq->req_recv.req_base.req_sequence = seq;
proc = &ob1_comm->procs[recvreq->req_recv.req_base.req_peer];
recvreq->req_recv.req_base.req_proc = proc->ompi_proc;
prepare_recv_req_converter(recvreq);
/* we can't go throught he match, since we already have the match.
Cheat and do what REQUEST_START does, but without the frag
search */
hdr = (mca_pml_ob1_hdr_t*)frag->segments->seg_addr.pval;
switch(hdr->hdr_common.hdr_type) {
case MCA_PML_OB1_HDR_TYPE_MATCH:
mca_pml_ob1_recv_request_progress_match(recvreq, frag->btl, frag->segments,
frag->num_segments);
break;
case MCA_PML_OB1_HDR_TYPE_RNDV:
mca_pml_ob1_recv_request_progress_rndv(recvreq, frag->btl, frag->segments,
frag->num_segments);
break;
case MCA_PML_OB1_HDR_TYPE_RGET:
mca_pml_ob1_recv_request_progress_rget(recvreq, frag->btl, frag->segments,
frag->num_segments);
break;
default:
assert(0);
}
MCA_PML_OB1_RECV_FRAG_RETURN(frag);
ompi_message_return(*message);
*message = MPI_MESSAGE_NULL;
*request = (ompi_request_t *) recvreq;
return OMPI_SUCCESS;
}
int
mca_pml_ob1_mrecv( void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status )
{
mca_pml_ob1_recv_frag_t* frag;
mca_pml_ob1_recv_request_t *recvreq;
mca_pml_ob1_hdr_t *hdr;
int src, tag, rc;
ompi_communicator_t *comm;
mca_pml_ob1_comm_proc_t* proc;
mca_pml_ob1_comm_t* ob1_comm;
uint64_t seq;
/* get the request from the message and the frag from the request
before we overwrite everything */
comm = (*message)->comm;
recvreq = (mca_pml_ob1_recv_request_t*) (*message)->req_ptr;
frag = (mca_pml_ob1_recv_frag_t*) recvreq->req_recv.req_base.req_addr;
src = recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE;
tag = recvreq->req_recv.req_base.req_ompi.req_status.MPI_TAG;
seq = recvreq->req_recv.req_base.req_sequence;
ob1_comm = recvreq->req_recv.req_base.req_comm->c_pml_comm;
/* make the request a recv request again */
recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV;
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq,
buf,
count, datatype,
src, tag, comm, false);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&((recvreq)->req_recv.req_base),
PERUSE_RECV);
/* init/re-init the request */
recvreq->req_lock = 0;
recvreq->req_pipeline_depth = 0;
recvreq->req_bytes_received = 0;
recvreq->req_rdma_cnt = 0;
recvreq->req_rdma_idx = 0;
recvreq->req_pending = false;
MCA_PML_BASE_RECV_START(&recvreq->req_recv.req_base);
/* Note - sequence number already assigned */
recvreq->req_recv.req_base.req_sequence = seq;
proc = &ob1_comm->procs[recvreq->req_recv.req_base.req_peer];
recvreq->req_recv.req_base.req_proc = proc->ompi_proc;
prepare_recv_req_converter(recvreq);
/* we can't go throught he match, since we already have the match.
Cheat and do what REQUEST_START does, but without the frag
search */
hdr = (mca_pml_ob1_hdr_t*)frag->segments->seg_addr.pval;
switch(hdr->hdr_common.hdr_type) {
case MCA_PML_OB1_HDR_TYPE_MATCH:
mca_pml_ob1_recv_request_progress_match(recvreq, frag->btl, frag->segments,
frag->num_segments);
break;
case MCA_PML_OB1_HDR_TYPE_RNDV:
mca_pml_ob1_recv_request_progress_rndv(recvreq, frag->btl, frag->segments,
frag->num_segments);
break;
case MCA_PML_OB1_HDR_TYPE_RGET:
mca_pml_ob1_recv_request_progress_rget(recvreq, frag->btl, frag->segments,
frag->num_segments);
break;
default:
assert(0);
}
ompi_message_return(*message);
*message = MPI_MESSAGE_NULL;
ompi_request_wait_completion(&(recvreq->req_recv.req_base.req_ompi));
MCA_PML_OB1_RECV_FRAG_RETURN(frag);
if (NULL != status) { /* return 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 );
return rc;
}

Просмотреть файл

@ -468,6 +468,7 @@ match_one(mca_btl_base_module_t *btl,
{
mca_pml_ob1_recv_request_t *match;
mca_pml_ob1_comm_t *comm = (mca_pml_ob1_comm_t *)comm_ptr->c_pml_comm;
int rc;
do {
match = match_incomming(hdr, comm, proc);
@ -482,6 +483,24 @@ match_one(mca_btl_base_module_t *btl,
num_segments);
/* attempt to match actual request */
continue;
} else if (MCA_PML_REQUEST_MPROBE == match->req_recv.req_base.req_type) {
/* create a receive frag and associate it with the
request, which is then completed so that it can be
restarted later during mrecv */
mca_pml_ob1_recv_frag_t *tmp;
if(NULL == frag) {
MCA_PML_OB1_RECV_FRAG_ALLOC(tmp, rc);
MCA_PML_OB1_RECV_FRAG_INIT(tmp, hdr, segments, num_segments, btl);
} else {
tmp = frag;
}
match->req_recv.req_base.req_addr = tmp;
mca_pml_ob1_recv_request_matched_probe(match, btl, segments,
num_segments);
/* this frag is already processed, so we want to break out
of the loop and not end up back on the unexpected queue. */
return NULL;
}
PERUSE_TRACE_COMM_EVENT(PERUSE_COMM_MSG_MATCH_POSTED_REQ,

Просмотреть файл

@ -10,6 +10,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2008 UT-Battelle, LLC. All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow

Просмотреть файл

@ -10,6 +10,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2008 UT-Battelle, LLC. All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -672,6 +673,7 @@ void mca_pml_ob1_recv_request_matched_probe( mca_pml_ob1_recv_request_t* recvreq
recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE = hdr->hdr_match.hdr_src;
recvreq->req_bytes_received = bytes_packed;
recvreq->req_bytes_expected = bytes_packed;
recv_request_pml_complete(recvreq);
}
@ -826,12 +828,18 @@ int mca_pml_ob1_recv_request_schedule_once( mca_pml_ob1_recv_request_t* recvreq,
#define IS_PROB_REQ(R) \
((MCA_PML_REQUEST_IPROBE == (R)->req_recv.req_base.req_type) || \
(MCA_PML_REQUEST_PROBE == (R)->req_recv.req_base.req_type))
(MCA_PML_REQUEST_PROBE == (R)->req_recv.req_base.req_type) || \
(MCA_PML_REQUEST_IMPROBE == (R)->req_recv.req_base.req_type) || \
(MCA_PML_REQUEST_MPROBE == (R)->req_recv.req_base.req_type))
#define IS_MPROB_REQ(R) \
((MCA_PML_REQUEST_IMPROBE == (R)->req_recv.req_base.req_type) || \
(MCA_PML_REQUEST_MPROBE == (R)->req_recv.req_base.req_type))
static inline void append_recv_req_to_queue(opal_list_t *queue,
mca_pml_ob1_recv_request_t *req)
{
if(OPAL_UNLIKELY(req->req_recv.req_base.req_type == MCA_PML_REQUEST_IPROBE))
if(OPAL_UNLIKELY(req->req_recv.req_base.req_type == MCA_PML_REQUEST_IPROBE ||
req->req_recv.req_base.req_type == MCA_PML_REQUEST_IMPROBE))
return;
opal_list_append(queue, (opal_list_item_t*)req);
@ -841,7 +849,8 @@ static inline void append_recv_req_to_queue(opal_list_t *queue,
* the compiler will optimize out the empty if loop in the case where PERUSE
* support is not required by the user.
*/
if(req->req_recv.req_base.req_type != MCA_PML_REQUEST_PROBE) {
if(req->req_recv.req_base.req_type != MCA_PML_REQUEST_PROBE ||
req->req_recv.req_base.req_type != MCA_PML_REQUEST_MPROBE) {
PERUSE_TRACE_COMM_EVENT(PERUSE_COMM_REQ_INSERT_IN_POSTED_Q,
&(req->req_recv.req_base), PERUSE_RECV);
}
@ -1037,6 +1046,21 @@ void mca_pml_ob1_recv_req_start(mca_pml_ob1_recv_request_t *req)
MCA_PML_OB1_RECV_FRAG_RETURN(frag);
} else if (OPAL_UNLIKELY(IS_MPROB_REQ(req))) {
/* Remove the fragment from the match list, as it's now
matched. Stash it somewhere in the request (which,
yes, is a complete hack), where it will be plucked out
during the end of mprobe. The request will then be
"recreated" as a receive request, and the frag will be
restarted with this request during mrecv */
opal_list_remove_item(&proc->unexpected_frags,
(opal_list_item_t*)frag);
OPAL_THREAD_UNLOCK(&comm->matching_lock);
req->req_recv.req_base.req_addr = frag;
mca_pml_ob1_recv_request_matched_probe(req, frag->btl,
frag->segments, frag->num_segments);
} else {
OPAL_THREAD_UNLOCK(&comm->matching_lock);
mca_pml_ob1_recv_request_matched_probe(req, frag->btl,

Просмотреть файл

@ -11,6 +11,7 @@
* All rights reserved.
* Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -261,6 +262,13 @@ typedef int (*mca_pml_base_module_irecv_fn_t)(
struct ompi_communicator_t* comm,
struct ompi_request_t **request
);
typedef int (*mca_pml_base_module_imrecv_fn_t)(
void *buf,
size_t count,
struct ompi_datatype_t *datatype,
struct ompi_message_t **message,
struct ompi_request_t **request
);
/**
* Post a receive and wait for completion.
@ -283,6 +291,13 @@ typedef int (*mca_pml_base_module_recv_fn_t)(
struct ompi_communicator_t* comm,
ompi_status_public_t* status
);
typedef int (*mca_pml_base_module_mrecv_fn_t)(
void *buf,
size_t count,
struct ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status
);
/**
* Initialize a persistent send request.
@ -387,6 +402,15 @@ typedef int (*mca_pml_base_module_iprobe_fn_t)(
ompi_status_public_t *status
);
typedef int (*mca_pml_base_module_improbe_fn_t)(
int src,
int tag,
struct ompi_communicator_t* comm,
int *matched,
struct ompi_message_t **message,
ompi_status_public_t *status
);
/**
* Blocking probe to wait for pending recv.
*
@ -404,6 +428,14 @@ typedef int (*mca_pml_base_module_probe_fn_t)(
ompi_status_public_t *status
);
typedef int (*mca_pml_base_module_mprobe_fn_t)(
int src,
int tag,
struct ompi_communicator_t* comm,
struct ompi_message_t **message,
ompi_status_public_t *status
);
/**
* Cancel pending operation.
*
@ -497,6 +529,10 @@ struct mca_pml_base_module_1_0_0_t {
mca_pml_base_module_iprobe_fn_t pml_iprobe;
mca_pml_base_module_probe_fn_t pml_probe;
mca_pml_base_module_start_fn_t pml_start;
mca_pml_base_module_improbe_fn_t pml_improbe;
mca_pml_base_module_mprobe_fn_t pml_mprobe;
mca_pml_base_module_imrecv_fn_t pml_imrecv;
mca_pml_base_module_mrecv_fn_t pml_mrecv;
/* diagnostics */
mca_pml_base_module_dump_fn_t pml_dump;

27
ompi/message/Makefile.am Обычный файл
Просмотреть файл

@ -0,0 +1,27 @@
# -*- makefile -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# This makefile.am does not stand on its own - it is included from ompi/Makefile.am
headers += \
message/message.h
libmpi_la_SOURCES += \
message/message.c

53
ompi/message/message.c Обычный файл
Просмотреть файл

@ -0,0 +1,53 @@
/*
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "opal/class/opal_object.h"
#include "ompi/message/message.h"
#include "ompi/constants.h"
OBJ_CLASS_INSTANCE(ompi_message_t,
opal_free_list_item_t,
NULL, NULL);
opal_free_list_t ompi_message_free_list;
opal_pointer_array_t ompi_message_f_to_c_table;
ompi_predefined_message_t ompi_message_null;
int
ompi_message_init(void)
{
int rc;
OBJ_CONSTRUCT(&ompi_message_free_list, opal_free_list_t);
rc = opal_free_list_init(&ompi_message_free_list,
sizeof(ompi_message_t),
OBJ_CLASS(ompi_message_t),
8, -1, 8);
OBJ_CONSTRUCT(&ompi_message_f_to_c_table, opal_pointer_array_t);
ompi_message_null.message.req_ptr = NULL;
ompi_message_null.message.count = 0;
ompi_message_null.message.m_f_to_c_index =
opal_pointer_array_add(&ompi_message_f_to_c_table, &ompi_message_null);
return rc;
}
int
ompi_message_finalize(void)
{
OBJ_DESTRUCT(&ompi_message_free_list);
OBJ_DESTRUCT(&ompi_message_f_to_c_table);
return OMPI_SUCCESS;
}

84
ompi/message/message.h Обычный файл
Просмотреть файл

@ -0,0 +1,84 @@
/*
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef OMPI_MESSAGE_H
#define OMPI_MESSAGE_H
#include "mpi.h"
#include "opal/class/opal_free_list.h"
#include "opal/class/opal_pointer_array.h"
BEGIN_C_DECLS
struct ompi_communicator_t;
struct ompi_message_t {
opal_free_list_item_t super; /**< Base type */
int m_f_to_c_index; /** Fortran handle for this message */
struct ompi_communicator_t *comm; /**< communicator used in probe */
void* req_ptr; /**< PML data */
size_t count; /**< same value as
status._count */
};
typedef struct ompi_message_t ompi_message_t;
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_message_t);
/**
* Padded struct to maintain back compatibiltiy.
* See ompi/communicator/communicator.h comments with struct ompi_communicator_t
* for full explanation why we chose the following padding construct for predefines.
*/
#define PREDEFINED_MESSAGE_PAD (sizeof(void*) * 32)
struct ompi_predefined_message_t {
struct ompi_message_t message;
char padding[PREDEFINED_MESSAGE_PAD - sizeof(ompi_message_t)];
};
typedef struct ompi_predefined_message_t ompi_predefined_message_t;
int ompi_message_init(void);
int ompi_message_finalize(void);
OMPI_DECLSPEC extern opal_free_list_t ompi_message_free_list;
OMPI_DECLSPEC extern opal_pointer_array_t ompi_message_f_to_c_table;
static inline
ompi_message_t*
ompi_message_alloc(void)
{
int rc;
opal_free_list_item_t *tmp;
OPAL_FREE_LIST_GET(&ompi_message_free_list,
tmp,
rc);
return (ompi_message_t*) tmp;
}
static inline
void
ompi_message_return(ompi_message_t* msg)
{
if (MPI_UNDEFINED != msg->m_f_to_c_index) {
opal_pointer_array_set_item(&ompi_message_f_to_c_table,
msg->m_f_to_c_index, NULL);
msg->m_f_to_c_index = MPI_UNDEFINED;
}
OPAL_FREE_LIST_RETURN(&ompi_message_free_list,
&msg->super);
}
END_C_DECLS
#endif

Просмотреть файл

@ -10,6 +10,7 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -165,6 +166,8 @@ libmpi_c_mpi_la_SOURCES = \
group_translate_ranks.c \
group_union.c \
ibsend.c \
improbe.c \
imrecv.c \
info_c2f.c \
info_create.c \
info_delete.c \
@ -190,6 +193,10 @@ libmpi_c_mpi_la_SOURCES = \
keyval_create.c \
keyval_free.c \
lookup_name.c \
message_f2c.c \
message_c2f.c \
mprobe.c \
mrecv.c \
op_c2f.c \
op_commutative.c \
op_create.c \

81
ompi/mpi/c/improbe.c Обычный файл
Просмотреть файл

@ -0,0 +1,81 @@
/*
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/mca/pml/pml.h"
#include "ompi/memchecker.h"
#include "ompi/request/request.h"
#include "ompi/message/message.h"
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#pragma weak MPI_Improbe = PMPI_Improbe
#endif
#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/c/profile/defines.h"
#endif
static const char FUNC_NAME[] = "MPI_Improbe";
int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag,
MPI_Message *message, MPI_Status *status)
{
int rc;
MEMCHECKER(
memchecker_comm(comm);
);
if ( MPI_PARAM_CHECK ) {
rc = MPI_SUCCESS;
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > mca_pml.pml_max_tag)) {
rc = MPI_ERR_TAG;
} else if (ompi_comm_invalid(comm)) {
rc = MPI_ERR_COMM;
} else if ((source != MPI_ANY_SOURCE) &&
(MPI_PROC_NULL != source) &&
ompi_comm_peer_invalid(comm, source)) {
rc = MPI_ERR_RANK;
} else if (NULL == message) {
rc = MPI_ERR_REQUEST;
}
OMPI_ERRHANDLER_CHECK(rc, comm, rc, FUNC_NAME);
}
if (MPI_PROC_NULL == source) {
if (MPI_STATUS_IGNORE != status) {
*status = ompi_request_empty.req_status;
/*
* Per MPI-1, the MPI_ERROR field is not defined for single-completion calls
*/
MEMCHECKER(
opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
);
}
return MPI_SUCCESS;
}
OPAL_CR_ENTER_LIBRARY();
rc = MCA_PML_CALL(improbe(source, tag, comm, flag, message, status));
/*
* Per MPI-1, the MPI_ERROR field is not defined for single-completion calls
*/
MEMCHECKER(
opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
);
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
}

63
ompi/mpi/c/imrecv.c Обычный файл
Просмотреть файл

@ -0,0 +1,63 @@
/*
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/mca/pml/pml.h"
#include "ompi/memchecker.h"
#include "ompi/request/request.h"
#include "ompi/message/message.h"
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#pragma weak MPI_Imrecv = PMPI_Imrecv
#endif
#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/c/profile/defines.h"
#endif
static const char FUNC_NAME[] = "MPI_Imrecv";
int MPI_Imrecv(void *buf, int count, MPI_Datatype type,
MPI_Message *message, MPI_Request *request)
{
int rc = MPI_SUCCESS;
ompi_communicator_t *comm;
MEMCHECKER(
memchecker_datatype(type);
memchecker_call(&opal_memchecker_base_isaddressible, buf, count, type);
memchecker_comm(comm);
);
if ( MPI_PARAM_CHECK ) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
OMPI_CHECK_DATATYPE_FOR_RECV(rc, type, count);
OMPI_CHECK_USER_BUFFER(rc, buf, type, count);
if (NULL == message || MPI_MESSAGE_NULL == *message) {
rc = MPI_ERR_REQUEST;
comm = MPI_COMM_NULL;
} else {
comm = (*message)->comm;
}
OMPI_ERRHANDLER_CHECK(rc, comm, rc, FUNC_NAME);
} else {
comm = (*message)->comm;
}
OPAL_CR_ENTER_LIBRARY();
rc = MCA_PML_CALL(imrecv(buf, count, type, message, request));
OMPI_ERRHANDLER_RETURN(rc, (*message)->comm, rc, FUNC_NAME);
}

76
ompi/mpi/c/message_c2f.c Обычный файл
Просмотреть файл

@ -0,0 +1,76 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2007 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include <stdio.h>
#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/mpi/f77/fint_2_int.h"
#include "ompi/message/message.h"
#include "ompi/memchecker.h"
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#pragma weak MPI_Message_c2f = PMPI_Message_c2f
#endif
#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/c/profile/defines.h"
#endif
static const char FUNC_NAME[] = "MPI_Message_f2c";
MPI_Fint MPI_Message_c2f(MPI_Message message)
{
MEMCHECKER(
memchecker_message(&message);
);
OPAL_CR_NOOP_PROGRESS();
if ( MPI_PARAM_CHECK ) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (NULL == message) {
return OMPI_INT_2_FINT(-1);
}
}
/* We only put messages in the f2c table when this function is
invoked. This is because putting messages in the table
involves locking and unlocking the table, which would incur a
performance penalty (in the critical performance path) for C
applications. In this way, at least only Fortran applications
are penalized. :-\
Modifying this one function neatly fixes up all the Fortran
bindings because they all call MPI_Message_c2f in order to
transmorgify the C MPI_Message that they got back into a
fortran integer.
*/
if (MPI_UNDEFINED == message->m_f_to_c_index) {
message->m_f_to_c_index =
opal_pointer_array_add(&ompi_message_f_to_c_table, message);
}
return OMPI_INT_2_FINT(message->m_f_to_c_index) ;
}

61
ompi/mpi/c/message_f2c.c Обычный файл
Просмотреть файл

@ -0,0 +1,61 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2007 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/mpi/f77/fint_2_int.h"
#include "ompi/message/message.h"
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#pragma weak MPI_Message_f2c = PMPI_Message_f2c
#endif
#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/c/profile/defines.h"
#endif
static const char FUNC_NAME[] = "MPI_Message_f2c";
MPI_Message MPI_Message_f2c(MPI_Fint message)
{
int message_index = OMPI_FINT_2_INT(message);
OPAL_CR_NOOP_PROGRESS();
if (MPI_PARAM_CHECK) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
}
/* Per MPI-2:4.12.4, do not invoke an error handler if we get an
invalid fortran handle. If we get an invalid fortran handle,
return an invalid C handle. */
if (message_index < 0 ||
message_index >=
opal_pointer_array_get_size(&ompi_message_f_to_c_table)) {
return NULL;
}
return (MPI_Message)opal_pointer_array_get_item(&ompi_message_f_to_c_table,
message_index);
}

80
ompi/mpi/c/mprobe.c Обычный файл
Просмотреть файл

@ -0,0 +1,80 @@
/*
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include <stdio.h>
#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/mca/pml/pml.h"
#include "ompi/memchecker.h"
#include "ompi/request/request.h"
#include "ompi/message/message.h"
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#pragma weak MPI_Mprobe = PMPI_Mprobe
#endif
#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/c/profile/defines.h"
#endif
static const char FUNC_NAME[] = "MPI_Mprobe";
int MPI_Mprobe(int source, int tag, MPI_Comm comm,
MPI_Message *message, MPI_Status *status)
{
int rc;
MEMCHECKER(
memchecker_comm(comm);
);
if ( MPI_PARAM_CHECK ) {
rc = MPI_SUCCESS;
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > mca_pml.pml_max_tag)) {
rc = MPI_ERR_TAG;
} else if (ompi_comm_invalid(comm)) {
rc = MPI_ERR_COMM;
} else if ((source != MPI_ANY_SOURCE) &&
(MPI_PROC_NULL != source) &&
ompi_comm_peer_invalid(comm, source)) {
rc = MPI_ERR_RANK;
} else if (NULL == message) {
rc = MPI_ERR_REQUEST;
}
OMPI_ERRHANDLER_CHECK(rc, comm, rc, FUNC_NAME);
}
if (MPI_PROC_NULL == source) {
if (MPI_STATUS_IGNORE != status) {
*status = ompi_request_empty.req_status;
/*
* Per MPI-1, the MPI_ERROR field is not defined for single-completion calls
*/
MEMCHECKER(
opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
);
}
return MPI_SUCCESS;
}
OPAL_CR_ENTER_LIBRARY();
rc = MCA_PML_CALL(mprobe(source, tag, comm, message, status));
/*
* Per MPI-1, the MPI_ERROR field is not defined for single-completion calls
*/
MEMCHECKER(
opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
);
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
}

70
ompi/mpi/c/mrecv.c Обычный файл
Просмотреть файл

@ -0,0 +1,70 @@
/*
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/mca/pml/pml.h"
#include "ompi/memchecker.h"
#include "ompi/request/request.h"
#include "ompi/message/message.h"
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#pragma weak MPI_Mrecv = PMPI_Mrecv
#endif
#if OMPI_PROFILING_DEFINES
#include "ompi/mpi/c/profile/defines.h"
#endif
static const char FUNC_NAME[] = "MPI_Mrecv";
int MPI_Mrecv(void *buf, int count, MPI_Datatype type,
MPI_Message *message, MPI_Status *status)
{
int rc = MPI_SUCCESS;
ompi_communicator_t *comm;
MEMCHECKER(
memchecker_datatype(type);
memchecker_call(&opal_memchecker_base_isaddressible, buf, count, type);
memchecker_comm(comm);
);
if ( MPI_PARAM_CHECK ) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
OMPI_CHECK_DATATYPE_FOR_RECV(rc, type, count);
OMPI_CHECK_USER_BUFFER(rc, buf, type, count);
if (NULL == message || MPI_MESSAGE_NULL == *message) {
rc = MPI_ERR_REQUEST;
comm = MPI_COMM_NULL;
} else {
comm = (*message)->comm;
}
OMPI_ERRHANDLER_CHECK(rc, comm, rc, FUNC_NAME);
} else {
comm = (*message)->comm;
}
OPAL_CR_ENTER_LIBRARY();
rc = MCA_PML_CALL(mrecv(buf, count, type, message, status));
/*
* Per MPI-1, the MPI_ERROR field is not defined for single-completion calls
*/
MEMCHECKER(
opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
);
OMPI_ERRHANDLER_RETURN(rc, (*message)->comm, rc, FUNC_NAME);
}

Просмотреть файл

@ -11,6 +11,7 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -147,6 +148,8 @@ nodist_libmpi_c_pmpi_la_SOURCES = \
pgroup_translate_ranks.c \
pgroup_union.c \
pibsend.c \
pimprobe.c \
pimrecv.c \
pinfo_c2f.c \
pinfo_create.c \
pinfo_delete.c \
@ -172,6 +175,8 @@ nodist_libmpi_c_pmpi_la_SOURCES = \
pkeyval_create.c \
pkeyval_free.c \
plookup_name.c \
pmprobe.c \
pmrecv.c \
pop_c2f.c \
pop_create.c \
pop_commutative.c \

Просмотреть файл

@ -10,6 +10,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -192,6 +193,10 @@
#define MPI_Group_union PMPI_Group_union
#define MPI_Free_mem PMPI_Free_mem
#define MPI_Ibsend PMPI_Ibsend
#define MPI_Message_c2f PMPI_Message_c2f
#define MPI_Message_f2c PMPI_Message_f2c
#define MPI_Improbe PMPI_Improbe
#define MPI_Imrecv PMPI_Imrecv
#define MPI_Info_c2f PMPI_Info_c2f
#define MPI_Info_create PMPI_Info_create
#define MPI_Info_delete PMPI_Info_delete
@ -217,6 +222,9 @@
#define MPI_Keyval_create PMPI_Keyval_create
#define MPI_Keyval_free PMPI_Keyval_free
#define MPI_Lookup_name PMPI_Lookup_name
#define MPI_Mprobe PMPI_Mprobe
#define MPI_Mrecv PMPI_Mrecv
#define MPI_Message_cancel PMPI_Message_cancel
#define MPI_Op_c2f PMPI_Op_c2f
#define MPI_Op_commutative PMPI_Op_commutative
#define MPI_Op_create PMPI_Op_create

Просмотреть файл

@ -179,6 +179,8 @@ libmpi_f77_la_SOURCES += \
group_translate_ranks_f.c \
group_union_f.c \
ibsend_f.c \
improbe_f.c \
imrecv_f.c \
info_create_f.c \
info_delete_f.c \
info_dup_f.c \
@ -202,6 +204,8 @@ libmpi_f77_la_SOURCES += \
keyval_create_f.c \
keyval_free_f.c \
lookup_name_f.c \
mprobe_f.c \
mrecv_f.c \
op_commutative_f.c \
op_create_f.c \
open_port_f.c \

108
ompi/mpi/f77/improbe_f.c Обычный файл
Просмотреть файл

@ -0,0 +1,108 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "ompi/mpi/f77/bindings.h"
#include "ompi/mpi/f77/constants.h"
#include "ompi/communicator/communicator.h"
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
#pragma weak PMPI_IMPROBE = mpi_improbe_f
#pragma weak pmpi_improbe = mpi_improbe_f
#pragma weak pmpi_improbe_ = mpi_improbe_f
#pragma weak pmpi_improbe__ = mpi_improbe_f
#elif OMPI_PROFILE_LAYER
OMPI_GENERATE_F77_BINDINGS (PMPI_IMPROBE,
pmpi_improbe,
pmpi_improbe_,
pmpi_improbe__,
pmpi_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),
(source, tag, comm, flag, message, status, ierr) )
#endif
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_IMPROBE = mpi_improbe_f
#pragma weak mpi_improbe = mpi_improbe_f
#pragma weak mpi_improbe_ = mpi_improbe_f
#pragma weak mpi_improbe__ = mpi_improbe_f
#endif
#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER
OMPI_GENERATE_F77_BINDINGS (MPI_IMPROBE,
mpi_improbe,
mpi_improbe_,
mpi_improbe__,
mpi_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),
(source, tag, comm, flag, message, status, ierr) )
#endif
#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS
#include "ompi/mpi/f77/profile/defines.h"
#endif
void mpi_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_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
}
*ierr = OMPI_INT_2_FINT(MPI_Improbe(OMPI_FINT_2_INT(*source),
OMPI_FINT_2_INT(*tag),
c_comm, OMPI_LOGICAL_SINGLE_NAME_CONVERT(flag),
&c_message, c_status));
if (MPI_SUCCESS == OMPI_FINT_2_INT(*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
*message = MPI_Message_c2f(c_message);
}
}

80
ompi/mpi/f77/imrecv_f.c Обычный файл
Просмотреть файл

@ -0,0 +1,80 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "ompi/mpi/f77/bindings.h"
#include "ompi/mpi/f77/constants.h"
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
#pragma weak PMPI_IMRECV = mpi_imrecv_f
#pragma weak pmpi_imrecv = mpi_imrecv_f
#pragma weak pmpi_imrecv_ = mpi_imrecv_f
#pragma weak pmpi_imrecv__ = mpi_imrecv_f
#elif OMPI_PROFILE_LAYER
OMPI_GENERATE_F77_BINDINGS (PMPI_IMRECV,
pmpi_imrecv,
pmpi_imrecv_,
pmpi_imrecv__,
pmpi_imrecv_f,
(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *message,
MPI_Fint *request, MPI_Fint *ierr),
(buf, count, datatype, message, request, ierr) )
#endif
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_IMRECV = mpi_imrecv_f
#pragma weak mpi_imrecv = mpi_imrecv_f
#pragma weak mpi_imrecv_ = mpi_imrecv_f
#pragma weak mpi_imrecv__ = mpi_imrecv_f
#endif
#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER
OMPI_GENERATE_F77_BINDINGS (MPI_IMRECV,
mpi_imrecv,
mpi_imrecv_,
mpi_imrecv__,
mpi_imrecv_f,
(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *message,
MPI_Fint *request, MPI_Fint *ierr),
(buf, count, datatype, message, request, ierr) )
#endif
#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS
#include "ompi/mpi/f77/profile/defines.h"
#endif
void mpi_imrecv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
MPI_Fint *message, MPI_Fint *request, MPI_Fint *ierr)
{
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
MPI_Request c_req;
MPI_Message c_message;
c_message = MPI_Message_f2c(*message);
*ierr = OMPI_INT_2_FINT(MPI_Imrecv(OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count),
c_type, &c_message, &c_req));
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
*request = MPI_Request_c2f(c_req);
/* message is an INOUT, and may be updated by the recv */
*message = MPI_Message_c2f(c_message);
}
}

105
ompi/mpi/f77/mprobe_f.c Обычный файл
Просмотреть файл

@ -0,0 +1,105 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "ompi/mpi/f77/bindings.h"
#include "ompi/mpi/f77/constants.h"
#include "ompi/communicator/communicator.h"
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
#pragma weak PMPI_MPROBE = mpi_mprobe_f
#pragma weak pmpi_mprobe = mpi_mprobe_f
#pragma weak pmpi_mprobe_ = mpi_mprobe_f
#pragma weak pmpi_mprobe__ = mpi_mprobe_f
#elif OMPI_PROFILE_LAYER
OMPI_GENERATE_F77_BINDINGS (PMPI_MPROBE,
pmpi_mprobe,
pmpi_mprobe_,
pmpi_mprobe__,
pmpi_mprobe_f,
(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *message,
MPI_Fint *status, MPI_Fint *ierr),
(source, tag, comm, message, status, ierr) )
#endif
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_MPROBE = mpi_mprobe_f
#pragma weak mpi_mprobe = mpi_mprobe_f
#pragma weak mpi_mprobe_ = mpi_mprobe_f
#pragma weak mpi_mprobe__ = mpi_mprobe_f
#endif
#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER
OMPI_GENERATE_F77_BINDINGS (MPI_MPROBE,
mpi_mprobe,
mpi_mprobe_,
mpi_mprobe__,
mpi_mprobe_f,
(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *message,
MPI_Fint *status, MPI_Fint *ierr),
(source, tag, comm, message, status, ierr) )
#endif
#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS
#include "ompi/mpi/f77/profile/defines.h"
#endif
void mpi_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
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
}
*ierr = OMPI_INT_2_FINT(MPI_Mprobe(OMPI_FINT_2_INT(*source),
OMPI_FINT_2_INT(*tag),
c_comm, &c_message,
c_status));
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
if (MPI_STATUS_IGNORE != c_status) {
MPI_Status_c2f(c_status, status);
}
#endif
*message = MPI_Message_c2f(c_message);
}
}

102
ompi/mpi/f77/mrecv_f.c Обычный файл
Просмотреть файл

@ -0,0 +1,102 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "ompi/mpi/f77/bindings.h"
#include "ompi/mpi/f77/constants.h"
#include "ompi/communicator/communicator.h"
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
#pragma weak PMPI_MRECV = mpi_mrecv_f
#pragma weak pmpi_mrecv = mpi_mrecv_f
#pragma weak pmpi_mrecv_ = mpi_mrecv_f
#pragma weak pmpi_mrecv__ = mpi_mrecv_f
#elif OMPI_PROFILE_LAYER
OMPI_GENERATE_F77_BINDINGS (PMPI_MRECV,
pmpi_mrecv,
pmpi_mrecv_,
pmpi_mrecv__,
pmpi_mrecv_f,
(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *message,
MPI_Fint *status, MPI_Fint *ierr),
(buf, count, datatype, message, status, ierr) )
#endif
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_MRECV = mpi_mrecv_f
#pragma weak mpi_mrecv = mpi_mrecv_f
#pragma weak mpi_mrecv_ = mpi_mrecv_f
#pragma weak mpi_mrecv__ = mpi_mrecv_f
#endif
#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER
OMPI_GENERATE_F77_BINDINGS (MPI_MRECV,
mpi_mrecv,
mpi_mrecv_,
mpi_mrecv__,
mpi_mrecv_f,
(char *buf, MPI_Fint *count, MPI_Fint *datatype,
MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr),
(buf, count, datatype, message, status, ierr) )
#endif
#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS
#include "ompi/mpi/f77/profile/defines.h"
#endif
void mpi_mrecv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr)
{
MPI_Status *c_status;
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
MPI_Status c_status2;
#endif
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
}
/* Call the C function */
*ierr = OMPI_INT_2_FINT(MPI_Mrecv(OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count),
c_type, c_message,
c_status));
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
if (MPI_STATUS_IGNORE != c_status) {
MPI_Status_c2f(c_status, status);
}
#endif
/* message is an INOUT, and may be updated by the recv */
*message = MPI_Message_c2f(c_message);
}
}

Просмотреть файл

@ -177,6 +177,8 @@
#define mpi_group_translate_ranks_f pmpi_group_translate_ranks_f
#define mpi_group_union_f pmpi_group_union_f
#define mpi_ibsend_f pmpi_ibsend_f
#define mpi_improbe_f pmpi_improbe_f
#define mpi_imrecv_f pmpi_imrecv_f
#define mpi_info_create_f pmpi_info_create_f
#define mpi_info_delete_f pmpi_info_delete_f
#define mpi_info_dup_f pmpi_info_dup_f
@ -200,6 +202,8 @@
#define mpi_keyval_create_f pmpi_keyval_create_f
#define mpi_keyval_free_f pmpi_keyval_free_f
#define mpi_lookup_name_f pmpi_lookup_name_f
#define mpi_mprobe_f pmpi_mprobe_f
#define mpi_mrecv_f pmpi_mrecv_f
#define mpi_op_commutative_f pmpi_op_commutative_f
#define mpi_op_create_f pmpi_op_create_f
#define mpi_open_port_f pmpi_open_port_f

Просмотреть файл

@ -222,6 +222,10 @@ PN(void, mpi_group_size, MPI_GROUP_SIZE, (MPI_Fint *group, MPI_Fint *size, MPI_F
PN(void, mpi_group_translate_ranks, MPI_GROUP_TRANSLATE_RANKS, (MPI_Fint *group1, MPI_Fint *n, MPI_Fint *ranks1, MPI_Fint *group2, MPI_Fint *ranks2, MPI_Fint *ierr));
PN(void, mpi_group_union, MPI_GROUP_UNION, (MPI_Fint *group1, MPI_Fint *group2, MPI_Fint *newgroup, MPI_Fint *ierr));
PN(void, mpi_ibsend, MPI_IBSEND, (char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr));
PN(void, mpi_improbe, MPI_IMPROBE, (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, ompi_fortran_logical_t *flag, MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr));
PN(void, mpi_imrecv, MPI_IMRECV, (char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *message, MPI_Fint *request, MPI_Fint *ierr));
PN(void, mpi_info_create, MPI_INFO_CREATE, (MPI_Fint *info, MPI_Fint *ierr));
PN(void, mpi_info_delete, MPI_INFO_DELETE, (MPI_Fint *info, char *key, MPI_Fint *ierr, int key_len));
PN(void, mpi_info_dup, MPI_INFO_DUP, (MPI_Fint *info, MPI_Fint *newinfo, MPI_Fint *ierr));
@ -245,6 +249,8 @@ PN(void, mpi_is_thread_main, MPI_IS_THREAD_MAIN, (ompi_fortran_logical_t *flag,
PN(void, mpi_keyval_create, MPI_KEYVAL_CREATE, (ompi_mpi1_fortran_copy_attr_function* copy_fn, ompi_mpi1_fortran_delete_attr_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr));
PN(void, mpi_keyval_free, MPI_KEYVAL_FREE, (MPI_Fint *keyval, MPI_Fint *ierr));
PN(void, mpi_lookup_name, MPI_LOOKUP_NAME, (char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr, int service_name_len, int port_name_len));
PN(void, mpi_mprobe, MPI_MPROBE, (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr));
PN(void, mpi_mrecv, MPI_MRECV, (char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr));
PN(void, mpi_op_commutative, MPI_OP_COMMUTATIVE, (MPI_Fint *op, MPI_Fint *commute, MPI_Fint *ierr));
PN(void, mpi_op_create, MPI_OP_CREATE, (ompi_op_fortran_handler_fn_t* function, ompi_fortran_logical_t *commute, MPI_Fint *op, MPI_Fint *ierr));
PN(void, mpi_open_port, MPI_OPEN_PORT, (MPI_Fint *info, char *port_name, MPI_Fint *ierr, int port_name_len));

Просмотреть файл

@ -10,7 +10,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2006-2011 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2007 Los Alamos National Security, LLC. All rights
# reserved.
# $COPYRIGHT$
@ -198,10 +198,12 @@ medium_sources = \
mpi_file_write_shared_f90.f90 \
mpi_get_f90.f90 \
mpi_ibsend_f90.f90 \
mpi_imrecv_f90.f90 \
mpi_irecv_f90.f90 \
mpi_irsend_f90.f90 \
mpi_isend_f90.f90 \
mpi_issend_f90.f90 \
mpi_mrecv_f90.f90 \
mpi_put_f90.f90 \
mpi_recv_f90.f90 \
mpi_recv_init_f90.f90 \

Просмотреть файл

@ -10,7 +10,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2006-2011 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -69,10 +69,12 @@ noinst_SCRIPTS = \
mpi_gatherv_f90.f90.sh \
mpi_get_f90.f90.sh \
mpi_ibsend_f90.f90.sh \
mpi_imrecv_f90.f90.sh \
mpi_irecv_f90.f90.sh \
mpi_irsend_f90.f90.sh \
mpi_isend_f90.f90.sh \
mpi_issend_f90.f90.sh \
mpi_mrecv_f90.f90.sh \
mpi_pack_external_f90.f90.sh \
mpi_pack_f90.f90.sh \
mpi_put_f90.f90.sh \

Просмотреть файл

@ -9564,6 +9564,173 @@ output_285() {
procedure=$1
cat <<EOF
subroutine ${procedure}(source, tag, comm, message, status, ierr)
include 'mpif-config.h'
integer, intent(in) :: source
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: message
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
end subroutine ${procedure}
EOF
}
start MPI_Mprobe small
output_285 MPI_Mprobe
end MPI_Mprobe
#------------------------------------------------------------------------
output_286() {
if test "$output" = "0"; then
return 0
fi
procedure=$1
cat <<EOF
subroutine ${procedure}(source, tag, comm, flag, message, status, ierr)
include 'mpif-config.h'
integer, intent(in) :: source
integer, intent(in) :: tag
integer, intent(in) :: comm
logical, intent(out) :: flag
integer, intent(out) :: message
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
end subroutine ${procedure}
EOF
}
start MPI_Improbe small
output_286 MPI_Improbe
end MPI_Improbe
#------------------------------------------------------------------------
output_287() {
if test "$output" = "0"; then
return 0
fi
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, message, status, ierr)
include 'mpif-config.h'
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(inout) :: message
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
end subroutine ${proc}
EOF
}
start MPI_Mrecv medium
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(*)' ; esac
case "$rank" in 2) dim=', dimension(1,*)' ; esac
case "$rank" in 3) dim=', dimension(1,1,*)' ; esac
case "$rank" in 4) dim=', dimension(1,1,1,*)' ; esac
case "$rank" in 5) dim=', dimension(1,1,1,1,*)' ; esac
case "$rank" in 6) dim=', dimension(1,1,1,1,1,*)' ; esac
case "$rank" in 7) dim=', dimension(1,1,1,1,1,1,*)' ; esac
output_287 MPI_Mrecv ${rank} CH "character${dim}"
output_287 MPI_Mrecv ${rank} L "logical${dim}"
for kind in $ikinds
do
output_287 MPI_Mrecv ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output_287 MPI_Mrecv ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output_287 MPI_Mrecv ${rank} C${kind} "complex*${kind}${dim}"
done
done
end MPI_Mrecv
#------------------------------------------------------------------------
output_288() {
if test "$output" = "0"; then
return 0
fi
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, message, request, ierr)
include 'mpif-config.h'
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(inout) :: message
integer, intent(out) :: request
integer, intent(out) :: ierr
end subroutine ${proc}
EOF
}
start MPI_Imrecv medium
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(*)' ; esac
case "$rank" in 2) dim=', dimension(1,*)' ; esac
case "$rank" in 3) dim=', dimension(1,1,*)' ; esac
case "$rank" in 4) dim=', dimension(1,1,1,*)' ; esac
case "$rank" in 5) dim=', dimension(1,1,1,1,*)' ; esac
case "$rank" in 6) dim=', dimension(1,1,1,1,1,*)' ; esac
case "$rank" in 7) dim=', dimension(1,1,1,1,1,1,*)' ; esac
output_288 MPI_Imrecv ${rank} CH "character${dim}"
output_288 MPI_Imrecv ${rank} L "logical${dim}"
for kind in $ikinds
do
output_288 MPI_Imrecv ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output_288 MPI_Imrecv ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output_288 MPI_Imrecv ${rank} C${kind} "complex*${kind}${dim}"
done
done
end MPI_Imrecv
#------------------------------------------------------------------------
output_289() {
if test "$output" = "0"; then
return 0
fi
procedure=$1
cat <<EOF
subroutine ${procedure}(version, resultlen, ierr)
character(len=*), intent(out) :: version
integer, intent(out) :: resultlen
@ -9574,6 +9741,6 @@ EOF
}
start MPI_Get_library_version small
output_285 MPI_Get_library_version
output_289 MPI_Get_library_version
end MPI_Get_library_version

88
ompi/mpi/f90/scripts/mpi_imrecv_f90.f90.sh Обычный файл
Просмотреть файл

@ -0,0 +1,88 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2011 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, message, request, ierr)
include "mpif-config.h"
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(inout) :: message
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, message, request, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(*)' ; esac
case "$rank" in 2) dim=', dimension(1,*)' ; esac
case "$rank" in 3) dim=', dimension(1,1,*)' ; esac
case "$rank" in 4) dim=', dimension(1,1,1,*)' ; esac
case "$rank" in 5) dim=', dimension(1,1,1,1,*)' ; esac
case "$rank" in 6) dim=', dimension(1,1,1,1,1,*)' ; esac
case "$rank" in 7) dim=', dimension(1,1,1,1,1,1,*)' ; esac
output MPI_Imrecv ${rank} CH "character${dim}"
output MPI_Imrecv ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Imrecv ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Imrecv ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Imrecv ${rank} C${kind} "complex*${kind}${dim}"
done
done

88
ompi/mpi/f90/scripts/mpi_mrecv_f90.f90.sh Обычный файл
Просмотреть файл

@ -0,0 +1,88 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2011 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, message, status, ierr)
include "mpif-config.h"
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(inout) :: message
integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, message, status, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(*)' ; esac
case "$rank" in 2) dim=', dimension(1,*)' ; esac
case "$rank" in 3) dim=', dimension(1,1,*)' ; esac
case "$rank" in 4) dim=', dimension(1,1,1,*)' ; esac
case "$rank" in 5) dim=', dimension(1,1,1,1,*)' ; esac
case "$rank" in 6) dim=', dimension(1,1,1,1,1,*)' ; esac
case "$rank" in 7) dim=', dimension(1,1,1,1,1,1,*)' ; esac
output MPI_Mrecv ${rank} CH "character${dim}"
output MPI_Mrecv ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Mrecv ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Mrecv ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Mrecv ${rank} C${kind} "complex*${kind}${dim}"
done
done

106
ompi/mpi/man/man3/MPI_Improbe.3in Обычный файл
Просмотреть файл

@ -0,0 +1,106 @@
.\" Copyright 2012 Cisco Systems, Inc. All rights reserved.
.\" Copyright 2006-2008 Sun Microsystems, Inc.
.\" Copyright (c) 1996 Thinking Machines Corporation
.TH MPI_Improbe 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
.SH NAME
\fBMPI_Improbe\fP \- Non-blocking matched probe for a message.
.SH SYNTAX
.ft R
.SH C Syntax
.nf
#include <mpi.h>
int MPI_Improbe(int \fIsource\fP, int\fI tag\fP, MPI_Comm\fI comm\fP,
int\fI *flag\fP, MPI_Message\fI *message\fP, MPI_Status\fI *status\fP)
.fi
.SH Fortran Syntax
.nf
INCLUDE 'mpif.h'
MPI_IMPROBE(\fISOURCE, TAG, COMM, FLAG, MESSAGE, STATUS, IERROR\fP)
LOGICAL \fIFLAG\fP
INTEGER \fISOURCE, TAG, COMM, MESSAGE\fP
INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP
.fi
.SH C++ Syntax
.nf
There is no C++ binding for this function.
.fi
.SH INPUT PARAMETERS
.ft R
.TP 1i
source
Source rank or MPI_ANY_SOURCE (integer).
.TP 1i
tag
Tag value or MPI_ANY_TAG (integer).
.TP 1i
comm
Communicator (handle).
.SH OUTPUT PARAMETERS
.ft R
.TP 1i
flag
Flag (logical).
.ft R
.TP 1i
message
Message (handle).
.ft R
.TP 1i
status
Status object (status).
.ft R
.TP 1i
IERROR
Fortran only: Error status (integer).
.SH DESCRIPTION
.ft R
Like MPI_Probe and MPI_Iprobe, the MPI_Mprobe and MPI_Improbe opera-
tions allow incoming messages to be queried without actually receiving
them, except that MPI_Mprobe and MPI_Improbe provide a mechanism to
receive the specific message that was matched regardless of other
intervening probe or receive operations. This gives the application
an opportunity to decide how to receive the message, based on the
information returned by the probe. In particular, the application may
allocate memory for the receive buffer according to the length of the
probed message.
.sp
A matching probe with MPI_PROC_NULL as \fIsource\fP returns \fIflag\fP
= true, \fImessage\fP = MPI_MESSAGE_NULL, and the \fIstatus\fP object
returns source = MPI_PROC_NULL, tag = MPI_ANY_TAG, and count = 0.
.sp
MPI_Iprobe returns a true value in \fIflag\fP if a message has been
matched and can be received by passing the \fImessage\fP handle to the
MPI_Mrecv or MPI_Imrecv functions, provided the \fIsource\fP was not
MPI_PROC_NULL.
.SH NOTE
This is an MPI-3 function and has no C++ binding.
.SH ERRORS
Almost all MPI routines return an error value; C routines as the value
of the function and Fortran routines in the last argument. C++
functions do not return errors.
.sp
Before the error value is returned, the current MPI error handler is
called. By default, this error handler aborts the MPI job, except for
I/O function errors. The error handler may be changed with
MPI_Comm_set_errhandler; the predefined error handler
MPI_ERRORS_RETURN may be used to cause error values to be
returned. Note that MPI does not guarantee that an MPI program can
continue past an error.
.SH SEE ALSO
.ft R
.nf
MPI_Mprobe
MPI_Probe
MPI_Iprobe
MPI_Mrecv
MPI_Imrecv
MPI_Cancel

106
ompi/mpi/man/man3/MPI_Imrecv.3in Обычный файл
Просмотреть файл

@ -0,0 +1,106 @@
.\" Copyright 2012 Cisco Systems, Inc. All rights reserved.
.\" Copyright 2006-2008 Sun Microsystems, Inc.
.\" Copyright (c) 1996 Thinking Machines Corporation
.TH MPI_Imrecv 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
.SH NAME
\fBMPI_Imrecv\fP \- Non-blocking receive for a matched message
.SH SYNTAX
.ft R
.SH C Syntax
.nf
#include <mpi.h>
int MPI_Imrecv(void \fI*buf\fP, int\fI count\fP, MPI_Datatype\fI type\fP,
MPI_Message\fI *message\fP, MPI_Request\fI *request\fP)
.fi
.SH Fortran Syntax
.nf
INCLUDE 'mpif.h'
MPI_IMRECV(\fIBUF, COUNT, DATATYPE, MESSAGE, REQUEST, IERROR\fP)
<type> \fIBUF(*)\fP
INTEGER \fCOUNT, DATATYPE, MESSAGE, REQUEST, IERROR\fP
.fi
.SH C++ Syntax
.nf
There is no C++ binding for this function.
.fi
.SH INPUT PARAMETERS
.ft R
.TP 1i
count
Number of elements to receive (nonnegative integer).
.TP 1i
datatype
Datatype of each send buffer element (handle).
.TP 1i
message
Message (handle).
.SH OUTPUT PARAMETERS
.ft R
.TP 1i
buf
Initial address of receive buffer (choice).
.TP 1i
request
Request (handle).
.TP 1i
IERROR
Fortran only: Error status (integer).
.SH DESCRIPTION
.ft R
The functions MPI_Mrecv and MPI_Imrecv receive messages that have been
previously matched by a matching probe.
.sp
The \fIrequest\fP returned from MPI_Imrecv can be used with any of the
MPI_Test and MPI_Wait variants, like any non-blocking receive request.
.sp
If MPI_Imrecv is called with MPI_MESSAGE_NULL as the message argument,
a call to one of the MPI_Test or MPI_Wait variants will return
immediately with the \fIstatus\fP object set to \fIsource\fP =
MPI_PROC_NULL, \fItag\fP = MPI_ANY_TAG, and \fIcount\fP = 0, as if a
receive from MPI_PROC_NULL was issued.
.sp
If reception of a matched message is started with MPI_Imrecv, then it
is possible to cancel the returned request with MPI_Cancel. If
MPI_Cancel succeeds, the matched message must be found by a subsequent
message probe (MPI_Probe, MPI_Iprobe, MPI_Mprobe, or MPI_Improbe),
received by a subsequent receive operation or canceled by the
sender.
.sp
Note, however, that is it possible for the cancellation of operations
initiated with MPI_Imrecv to fail. An example of a failing case is
when canceling the matched message receive would violate MPI message
ordering rules (e.g., if another message matching the same message
signature has matched -- and possible received -- before this
MPI_Imrecv is canceled).
.SH NOTE
This is an MPI-3 function and has no C++ binding.
.SH ERRORS
Almost all MPI routines return an error value; C routines as the value
of the function and Fortran routines in the last argument. C++
functions do not return errors.
.sp
Before the error value is returned, the current MPI error handler is
called. By default, this error handler aborts the MPI job, except for
I/O function errors. The error handler may be changed with
MPI_Comm_set_errhandler; the predefined error handler
MPI_ERRORS_RETURN may be used to cause error values to be
returned. Note that MPI does not guarantee that an MPI program can
continue past an error.
.SH SEE ALSO
.ft R
.nf
MPI_Mprobe
MPI_Improbe
MPI_Probe
MPI_Iprobe
MPI_Imrecv
MPI_Cancel

100
ompi/mpi/man/man3/MPI_Mprobe.3in Обычный файл
Просмотреть файл

@ -0,0 +1,100 @@
.\" Copyright 2012 Cisco Systems, Inc. All rights reserved.
.\" Copyright 2006-2008 Sun Microsystems, Inc.
.\" Copyright (c) 1996 Thinking Machines Corporation
.TH MPI_Mprobe 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
.SH NAME
\fBMPI_Mprobe\fP \- Blocking matched probe for a message.
.SH SYNTAX
.ft R
.SH C Syntax
.nf
#include <mpi.h>
int MPI_Mprobe(int \fIsource\fP, int\fI tag\fP, MPI_Comm\fI comm\fP,
MPI_Message\fI *message\fP, MPI_Status\fI *status\fP)
.fi
.SH Fortran Syntax
.nf
INCLUDE 'mpif.h'
MPI_MPROBE(\fISOURCE, TAG, COMM, MESSAGE, STATUS, IERROR\fP)
INTEGER \fISOURCE, TAG, COMM, MESSAGE\fP
INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP
.fi
.SH C++ Syntax
.nf
There is no C++ binding for this function.
.fi
.SH INPUT PARAMETERS
.ft R
.TP 1i
source
Source rank or MPI_ANY_SOURCE (integer).
.TP 1i
tag
Tag value or MPI_ANY_TAG (integer).
.TP 1i
comm
Communicator (handle).
.SH OUTPUT PARAMETERS
.ft R
.TP 1i
message
Message (handle).
.ft R
.TP 1i
status
Status object (status).
.ft R
.TP 1i
IERROR
Fortran only: Error status (integer).
.SH DESCRIPTION
.ft R
Like MPI_Probe and MPI_Iprobe, the MPI_Mprobe and MPI_Improbe opera-
tions allow incoming messages to be queried without actually receiving
them, except that MPI_Mprobe and MPI_Improbe provide a mechanism to
receive the specific message that was matched regardless of other
intervening probe or receive operations. This gives the application
an opportunity to decide how to receive the message, based on the
information returned by the probe. In particular, the application may
allocate memory for the receive buffer according to the length of the
probed message.
.sp
A matching probe with MPI_PROC_NULL as \fIsource\fP returns
\fImessage\fP = MPI_MESSAGE_NULL, and the \fIstatus\fP object returns
source = MPI_PROC_NULL, tag = MPI_ANY_TAG, and count = 0.
.sp
When MPI_Mprobe returns (from a non-MPI_PROC_NULL \fIsource\fP), the
matched message can then be received by passing the \fImessage\fP
handle to the MPI_Mrecv or MPI_Imrecv functions.
.SH NOTE
This is an MPI-3 function and has no C++ binding.
.SH ERRORS
Almost all MPI routines return an error value; C routines as the value
of the function and Fortran routines in the last argument. C++
functions do not return errors.
.sp
Before the error value is returned, the current MPI error handler is
called. By default, this error handler aborts the MPI job, except for
I/O function errors. The error handler may be changed with
MPI_Comm_set_errhandler; the predefined error handler
MPI_ERRORS_RETURN may be used to cause error values to be
returned. Note that MPI does not guarantee that an MPI program can
continue past an error.
.SH SEE ALSO
.ft R
.nf
MPI_Improbe
MPI_Probe
MPI_Iprobe
MPI_Mrecv
MPI_Imrecv
MPI_Cancel

89
ompi/mpi/man/man3/MPI_Mrecv.3in Обычный файл
Просмотреть файл

@ -0,0 +1,89 @@
.\" Copyright 2012 Cisco Systems, Inc. All rights reserved.
.\" Copyright 2006-2008 Sun Microsystems, Inc.
.\" Copyright (c) 1996 Thinking Machines Corporation
.TH MPI_Mrecv 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
.SH NAME
\fBMPI_Mrecv\fP \- Blocking receive for a matched message
.SH SYNTAX
.ft R
.SH C Syntax
.nf
#include <mpi.h>
int MPI_Mrecv(void \fI*buf\fP, int\fI count\fP, MPI_Datatype\fI type\fP,
MPI_Message\fI *message\fP, MPI_Status\fI *status\fP)
.fi
.SH Fortran Syntax
.nf
INCLUDE 'mpif.h'
MPI_MRECV(\fIBUF, COUNT, DATATYPE, MESSAGE, STATUS, IERROR\fP)
<type> \fIBUF(*)\fP
INTEGER \fCOUNT, DATATYPE, MESSAGE\fP
INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP
.fi
.SH C++ Syntax
.nf
There is no C++ binding for this function.
.fi
.SH INPUT PARAMETERS
.ft R
.TP 1i
count
Number of elements to receive (nonnegative integer).
.TP 1i
datatype
Datatype of each send buffer element (handle).
.TP 1i
message
Message (handle).
.SH OUTPUT PARAMETERS
.ft R
.TP 1i
buf
Initial address of receive buffer (choice).
.TP 1i
status
Status object (status).
.TP 1i
IERROR
Fortran only: Error status (integer).
.SH DESCRIPTION
.ft R
The functions MPI_Mrecv and MPI_Imrecv receive messages that have been
previously matched by a matching probe.
.sp
If MPI_Mrecv is called with MPI_MESSAGE_NULL as the message argument,
the call returns immediately with the \fIstatus\fP object set to
\fIsource\fP = MPI_PROC_NULL, \fItag\fP = MPI_ANY_TAG, and \fIcount\fP
= 0, as if a receive from MPI_PROC_NULL was issued.
.SH NOTE
This is an MPI-3 function and has no C++ binding.
.SH ERRORS
Almost all MPI routines return an error value; C routines as the value
of the function and Fortran routines in the last argument. C++
functions do not return errors.
.sp
Before the error value is returned, the current MPI error handler is
called. By default, this error handler aborts the MPI job, except for
I/O function errors. The error handler may be changed with
MPI_Comm_set_errhandler; the predefined error handler
MPI_ERRORS_RETURN may be used to cause error values to be
returned. Note that MPI does not guarantee that an MPI program can
continue past an error.
.SH SEE ALSO
.ft R
.nf
MPI_Mprobe
MPI_Improbe
MPI_Probe
MPI_Iprobe
MPI_Imrecv
MPI_Cancel

Просмотреть файл

@ -175,6 +175,8 @@ mpi_api_man_pages = \
mpi/man/man3/MPI_Group_translate_ranks.3 \
mpi/man/man3/MPI_Group_union.3 \
mpi/man/man3/MPI_Ibsend.3 \
mpi/man/man3/MPI_Improbe.3 \
mpi/man/man3/MPI_Imrecv.3 \
mpi/man/man3/MPI_Info_c2f.3 \
mpi/man/man3/MPI_Info_create.3 \
mpi/man/man3/MPI_Info_delete.3 \
@ -200,6 +202,8 @@ mpi_api_man_pages = \
mpi/man/man3/MPI_Keyval_create.3 \
mpi/man/man3/MPI_Keyval_free.3 \
mpi/man/man3/MPI_Lookup_name.3 \
mpi/man/man3/MPI_Mprobe.3 \
mpi/man/man3/MPI_Mrecv.3 \
mpi/man/man3/MPI_Op_c2f.3 \
mpi/man/man3/MPI_Op_create.3 \
mpi/man/man3/MPI_Open_port.3 \

Просмотреть файл

@ -15,6 +15,7 @@
* reserved.
* Copyright (c) 2006 University of Houston. All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
*
* $COPYRIGHT$
*
@ -58,6 +59,7 @@
#include "ompi/errhandler/errcode.h"
#include "ompi/communicator/communicator.h"
#include "ompi/datatype/ompi_datatype.h"
#include "ompi/message/message.h"
#include "ompi/op/op.h"
#include "ompi/file/file.h"
#include "ompi/info/info.h"
@ -298,6 +300,10 @@ int ompi_mpi_finalize(void)
return ret;
}
if (OMPI_SUCCESS != (ret = ompi_message_finalize())) {
return ret;
}
/* If requested, print out a list of memory allocated by ALLOC_MEM
but not freed by FREE_MEM */
if (0 != ompi_debug_show_mpi_alloc_mem_leaks) {

Просмотреть файл

@ -14,6 +14,7 @@
* reserved.
* Copyright (c) 2006-2009 University of Houston. All rights reserved.
* Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
*
* $COPYRIGHT$
*
@ -70,6 +71,7 @@
#include "ompi/errhandler/errcode.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/request/request.h"
#include "ompi/message/message.h"
#include "ompi/op/op.h"
#include "ompi/mca/op/op.h"
#include "ompi/mca/op/base/base.h"
@ -808,6 +810,11 @@ MOVEON:
goto error;
}
if (OMPI_SUCCESS != (ret = ompi_message_init())) {
error = "ompi_message_init() failed";
goto error;
}
/* initialize info */
if (OMPI_SUCCESS != (ret = ompi_info_init())) {
error = "ompi_info_init() failed";