root/ompi/mca/mtl/portals4/mtl_portals4_request.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2004-2005 The University of Tennessee and The University
   6  *                         of Tennessee Research Foundation.  All rights
   7  *                         reserved.
   8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   9  *                         University of Stuttgart.  All rights reserved.
  10  * Copyright (c) 2004-2005 The Regents of the University of California.
  11  *                         All rights reserved.
  12  * Copyright (c) 2010-2012 Sandia National Laboratories.  All rights reserved.
  13  * $COPYRIGHT$
  14  *
  15  * Additional copyrights may follow
  16  *
  17  * $HEADER$
  18  */
  19 
  20 #ifndef OMPI_MTL_PORTALS_REQUEST_H
  21 #define OMPI_MTL_PORTALS_REQUEST_H
  22 
  23 #include "opal/datatype/opal_convertor.h"
  24 #include "ompi/mca/mtl/mtl.h"
  25 #include "opal/mca/timer/base/base.h"
  26 
  27 struct ompi_mtl_portals4_message_t;
  28 struct ompi_mtl_portals4_pending_request_t;
  29 
  30 
  31 typedef enum { portals4_req_isend,
  32                portals4_req_send,
  33                portals4_req_recv,
  34                portals4_req_probe,
  35                portals4_req_recv_short,
  36                portals4_req_flowctl
  37 } ompi_mtl_portals4_request_type_t;
  38 
  39 
  40 struct ompi_mtl_portals4_base_request_t {
  41     struct mca_mtl_request_t super;
  42     ompi_mtl_portals4_request_type_t type;
  43     int (*event_callback)(ptl_event_t *ev, struct ompi_mtl_portals4_base_request_t*);
  44 };
  45 typedef struct ompi_mtl_portals4_base_request_t ompi_mtl_portals4_base_request_t;
  46 
  47 
  48 struct ompi_mtl_portals4_isend_request_t {
  49     ompi_mtl_portals4_base_request_t super;
  50     void *buffer_ptr;
  51     ptl_handle_me_t me_h;
  52     uint64_t opcount;
  53 #if OMPI_MTL_PORTALS4_FLOW_CONTROL
  54     struct ompi_mtl_portals4_pending_request_t *pending;
  55 #endif
  56     ptl_size_t length;
  57     opal_atomic_int32_t pending_get;
  58     opal_atomic_uint32_t event_count;
  59 };
  60 typedef struct ompi_mtl_portals4_isend_request_t ompi_mtl_portals4_isend_request_t;
  61 
  62 
  63 struct ompi_mtl_portals4_send_request_t {
  64     ompi_mtl_portals4_isend_request_t super;
  65     int retval;
  66     volatile int complete;
  67 };
  68 typedef struct ompi_mtl_portals4_send_request_t ompi_mtl_portals4_send_request_t;
  69 
  70 
  71 struct ompi_mtl_portals4_recv_request_t {
  72     ompi_mtl_portals4_base_request_t super;
  73     void *buffer_ptr;
  74     ptl_handle_me_t me_h;
  75     struct opal_convertor_t *convertor;
  76     void *delivery_ptr;
  77     size_t delivery_len;
  78     volatile bool req_started;
  79     opal_atomic_int32_t pending_reply;
  80 #if OPAL_ENABLE_DEBUG
  81     uint64_t opcount;
  82     ptl_hdr_data_t hdr_data;
  83 #endif
  84 };
  85 typedef struct ompi_mtl_portals4_recv_request_t ompi_mtl_portals4_recv_request_t;
  86 
  87 struct ompi_mtl_portals4_rndv_get_frag_t {
  88     opal_free_list_item_t super;
  89     /* the recv request that's composed of these frags */
  90     ompi_mtl_portals4_recv_request_t *request;
  91     /* info extracted from the put_overflow event that is required to retry the rndv-get */
  92     void            *frag_start;
  93     ptl_size_t       frag_length;
  94     ptl_process_t    frag_target;
  95     ptl_hdr_data_t   frag_match_bits;
  96     ptl_size_t       frag_remote_offset;
  97     /* the absolute time at which this frag times out */
  98     opal_timer_t     frag_abs_timeout_usec;
  99 
 100     int (*event_callback)(ptl_event_t *ev, struct ompi_mtl_portals4_rndv_get_frag_t*);
 101 
 102 #if OPAL_ENABLE_DEBUG
 103     uint32_t frag_num;
 104 #endif
 105 };
 106 typedef struct ompi_mtl_portals4_rndv_get_frag_t ompi_mtl_portals4_rndv_get_frag_t;
 107 OBJ_CLASS_DECLARATION(ompi_mtl_portals4_rndv_get_frag_t);
 108 
 109 
 110 struct ompi_mtl_portals4_recv_short_request_t {
 111     ompi_mtl_portals4_base_request_t super;
 112     struct ompi_mtl_portals4_recv_short_block_t *block;
 113 };
 114 typedef struct ompi_mtl_portals4_recv_short_request_t ompi_mtl_portals4_recv_short_request_t;
 115 
 116 
 117 struct ompi_mtl_portals4_probe_request_t {
 118     ompi_mtl_portals4_base_request_t super;
 119     volatile int req_complete;
 120     int found_match;
 121     struct ompi_status_public_t status;
 122     struct ompi_mtl_portals4_message_t *message;
 123 };
 124 typedef struct ompi_mtl_portals4_probe_request_t ompi_mtl_portals4_probe_request_t;
 125 
 126 
 127 struct ompi_mtl_portals4_request_t {
 128     union {
 129         ompi_mtl_portals4_isend_request_t isend;
 130         ompi_mtl_portals4_send_request_t send;
 131         ompi_mtl_portals4_recv_request_t recv;
 132         ompi_mtl_portals4_recv_short_request_t recv_short;
 133         ompi_mtl_portals4_probe_request_t probe;
 134     } u;
 135 };
 136 typedef struct ompi_mtl_portals4_request_t ompi_mtl_portals4_request_t;
 137 
 138 
 139 #endif

/* [<][>][^][v][top][bottom][index][help] */