Add a base _START macro that will do the base initialization. Additinaly, that allow me to
add the PERUSE event is a more homogeneous manner (all PML's will have them). This commit was SVN r9499.
Этот коммит содержится в:
родитель
988ba2af24
Коммит
1226d452bf
@ -2,7 +2,7 @@
|
|||||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
* University Research and Technology
|
* University Research and Technology
|
||||||
* Corporation. All rights reserved.
|
* Corporation. All rights reserved.
|
||||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
||||||
* of Tennessee Research Foundation. All rights
|
* of Tennessee Research Foundation. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||||
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "ompi/mca/pml/base/pml_base_request.h"
|
#include "ompi/mca/pml/base/pml_base_request.h"
|
||||||
#include "ompi/datatype/convertor.h"
|
#include "ompi/datatype/convertor.h"
|
||||||
|
#include "ompi/peruse/peruse-internal.h"
|
||||||
|
|
||||||
#if defined(c_plusplus) || defined(__cplusplus)
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -78,7 +79,29 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_pml_base_recv_request_t);
|
|||||||
(request)->req_base.req_proc = NULL; \
|
(request)->req_base.req_proc = NULL; \
|
||||||
(request)->req_base.req_pml_complete = (persistent ? true : false); \
|
(request)->req_base.req_pml_complete = (persistent ? true : false); \
|
||||||
(request)->req_base.req_free_called = false; \
|
(request)->req_base.req_free_called = false; \
|
||||||
|
\
|
||||||
|
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE, \
|
||||||
|
&((request)->req_base), \
|
||||||
|
PERUSE_RECV); \
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MCA_PML_BASE_RECV_START( request ) \
|
||||||
|
do { \
|
||||||
|
(request)->req_pml_complete = false; \
|
||||||
|
(request)->req_ompi.req_complete = false; \
|
||||||
|
(request)->req_ompi.req_state = OMPI_REQUEST_ACTIVE; \
|
||||||
|
\
|
||||||
|
/* always set the req_status.MPI_TAG to ANY_TAG before starting the \
|
||||||
|
* request. This field is used if cancelled to find out if the request \
|
||||||
|
* has been matched or not. \
|
||||||
|
*/ \
|
||||||
|
(request)->req_ompi.req_status.MPI_TAG = OMPI_ANY_TAG; \
|
||||||
|
(request)->req_ompi.req_status.MPI_ERROR = OMPI_SUCCESS; \
|
||||||
|
(request)->req_ompi.req_status._cancelled = 0; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a receive request. Handle the release of the communicator and the
|
* Return a receive request. Handle the release of the communicator and the
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
* University Research and Technology
|
* University Research and Technology
|
||||||
* Corporation. All rights reserved.
|
* Corporation. All rights reserved.
|
||||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
||||||
* of Tennessee Research Foundation. All rights
|
* of Tennessee Research Foundation. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||||
@ -26,6 +26,7 @@
|
|||||||
#include "ompi/mca/pml/base/pml_base_request.h"
|
#include "ompi/mca/pml/base/pml_base_request.h"
|
||||||
#include "ompi/datatype/datatype.h"
|
#include "ompi/datatype/datatype.h"
|
||||||
#include "ompi/datatype/convertor.h"
|
#include "ompi/datatype/convertor.h"
|
||||||
|
#include "ompi/peruse/peruse-internal.h"
|
||||||
|
|
||||||
#if defined(c_plusplus) || defined(__cplusplus)
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -112,8 +113,25 @@ typedef struct mca_pml_base_send_request_t mca_pml_base_send_request_t;
|
|||||||
} else { \
|
} else { \
|
||||||
(request)->req_bytes_packed = 0; \
|
(request)->req_bytes_packed = 0; \
|
||||||
} \
|
} \
|
||||||
|
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE, \
|
||||||
|
&(request)->req_base, \
|
||||||
|
PERUSE_SEND); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mark the request as started from the PML base point of view.
|
||||||
|
*
|
||||||
|
* @param request (IN) The send request.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define MCA_PML_BASE_SEND_START( request ) \
|
||||||
|
do { \
|
||||||
|
(request)->req_pml_complete = false; \
|
||||||
|
(request)->req_ompi.req_complete = false; \
|
||||||
|
(request)->req_ompi.req_state = OMPI_REQUEST_ACTIVE; \
|
||||||
|
(request)->req_ompi.req_status._cancelled = 0; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Release the ref counts on the communicator and datatype.
|
* Release the ref counts on the communicator and datatype.
|
||||||
*
|
*
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user