2004-01-09 19:20:50 +00:00
|
|
|
/*
|
2005-11-05 19:57:48 +00:00
|
|
|
* 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.
|
2004-11-28 20:09:25 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-01-09 19:20:50 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
2004-03-26 14:15:20 +00:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*/
|
2004-01-09 19:20:50 +00:00
|
|
|
#ifndef MCA_PML_BASE_REQUEST_H
|
|
|
|
#define MCA_PML_BASE_REQUEST_H
|
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "ompi/class/ompi_free_list.h"
|
|
|
|
#include "ompi/request/request.h"
|
2004-01-09 19:20:50 +00:00
|
|
|
|
2004-10-20 22:31:03 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2005-07-03 16:06:07 +00:00
|
|
|
OMPI_DECLSPEC extern opal_class_t mca_pml_base_request_t_class;
|
2004-01-09 19:20:50 +00:00
|
|
|
|
2004-03-26 14:15:20 +00:00
|
|
|
/**
|
|
|
|
* Type of request.
|
|
|
|
*/
|
2004-01-12 19:17:09 +00:00
|
|
|
typedef enum {
|
2004-03-16 21:56:19 +00:00
|
|
|
MCA_PML_REQUEST_NULL,
|
2004-01-12 19:17:09 +00:00
|
|
|
MCA_PML_REQUEST_SEND,
|
2004-06-09 19:45:08 +00:00
|
|
|
MCA_PML_REQUEST_RECV,
|
|
|
|
MCA_PML_REQUEST_IPROBE,
|
|
|
|
MCA_PML_REQUEST_PROBE
|
2004-01-12 19:17:09 +00:00
|
|
|
} mca_pml_base_request_type_t;
|
|
|
|
|
|
|
|
|
2004-03-26 14:15:20 +00:00
|
|
|
/**
|
|
|
|
* Base type for PML P2P requests
|
|
|
|
*/
|
2004-03-11 22:02:01 +00:00
|
|
|
struct mca_pml_base_request_t {
|
2004-07-15 18:08:20 +00:00
|
|
|
ompi_request_t req_ompi; /**< base request */
|
2004-03-26 14:15:20 +00:00
|
|
|
void *req_addr; /**< pointer to application buffer */
|
|
|
|
size_t req_count; /**< count of user datatype elements */
|
|
|
|
int32_t req_peer; /**< peer process - rank w/in this communicator */
|
|
|
|
int32_t req_tag; /**< user defined tag */
|
2005-09-12 20:22:59 +00:00
|
|
|
struct ompi_communicator_t *req_comm; /**< communicator pointer */
|
|
|
|
struct ompi_proc_t* req_proc; /**< peer process */
|
2005-05-23 22:06:50 +00:00
|
|
|
uint64_t req_sequence; /**< sequence number for MPI pt-2-pt ordering */
|
2005-05-19 22:55:18 +00:00
|
|
|
struct ompi_datatype_t *req_datatype; /**< pointer to data type */
|
2004-03-26 14:15:20 +00:00
|
|
|
mca_pml_base_request_type_t req_type; /**< MPI request type - used for test */
|
2004-10-12 15:50:01 +00:00
|
|
|
volatile bool req_pml_complete; /**< flag indicating if the pt-2-pt layer is done with this request */
|
2004-03-26 14:15:20 +00:00
|
|
|
volatile bool req_free_called; /**< flag indicating if the user has freed this request */
|
2004-03-11 22:02:01 +00:00
|
|
|
};
|
|
|
|
typedef struct mca_pml_base_request_t mca_pml_base_request_t;
|
2004-01-09 19:20:50 +00:00
|
|
|
|
2006-01-25 23:15:36 +00:00
|
|
|
/*
|
|
|
|
* Mark the MPI request as completed and trigger the condition if required.
|
|
|
|
*/
|
|
|
|
#define MCA_PML_BASE_REQUEST_MPI_COMPLETE( request ) \
|
|
|
|
do { \
|
|
|
|
(request)->req_complete = true; \
|
|
|
|
ompi_request_completed++; \
|
|
|
|
if(ompi_request_waiting) { \
|
|
|
|
opal_condition_broadcast(&ompi_request_cond); \
|
|
|
|
} \
|
|
|
|
} while(0)
|
2004-01-09 19:20:50 +00:00
|
|
|
|
2004-10-20 22:31:03 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2004-01-09 19:20:50 +00:00
|
|
|
#endif
|
|
|
|
|