1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 
  24 
  25 #ifndef MCA_PML_CRCPW_H
  26 #define MCA_PML_CRCPW_H
  27 
  28 #include "ompi_config.h"
  29 
  30 #include "opal/class/opal_free_list.h"
  31 #include "ompi/request/request.h"
  32 #include "ompi/mca/pml/pml.h"
  33 #include "ompi/mca/pml/base/pml_base_request.h"
  34 #include "ompi/mca/pml/base/pml_base_bsend.h"
  35 #include "ompi/mca/pml/base/pml_base_sendreq.h"
  36 #include "ompi/datatype/ompi_datatype.h"
  37 #include "ompi/mca/crcp/crcp.h"
  38 #include "ompi/mca/crcp/base/base.h"
  39 
  40 BEGIN_C_DECLS
  41 
  42     
  43 
  44 
  45     struct mca_pml_crcpw_component_t {
  46         mca_pml_base_component_t super;
  47         int verbose;
  48         int priority;
  49         int output_handle;
  50         bool pml_crcp_wrapped;
  51     };
  52     typedef struct mca_pml_crcpw_component_t mca_pml_crcpw_component_t;
  53     OMPI_MODULE_DECLSPEC extern mca_pml_crcpw_component_t mca_pml_crcpw_component;
  54 
  55     struct mca_pml_crcpw_module_t {
  56         mca_pml_base_module_t super;
  57         mca_pml_base_component_t wrapped_pml_component;
  58         mca_pml_base_module_t    wrapped_pml_module;
  59     };
  60     typedef struct mca_pml_crcpw_module_t mca_pml_crcpw_module_t;
  61     extern mca_pml_crcpw_module_t mca_pml_crcpw_module;
  62 
  63     
  64     OMPI_MODULE_DECLSPEC extern opal_free_list_t pml_state_list;
  65     OMPI_MODULE_DECLSPEC extern bool pml_crcpw_is_finalized;
  66 
  67     
  68 
  69 
  70     int mca_pml_crcpw_component_open(void);
  71     int mca_pml_crcpw_component_close(void);
  72 
  73     mca_pml_base_module_t* mca_pml_crcpw_component_init(int *priority,
  74                                                         bool enable_progress_threads,
  75                                                         bool enable_mpi_threads
  76                                                         );
  77 
  78     int mca_pml_crcpw_component_finalize(void);
  79 
  80     
  81 
  82 
  83     int mca_pml_crcpw_enable( bool enable );
  84 
  85     int mca_pml_crcpw_add_comm( struct ompi_communicator_t* comm );
  86     int mca_pml_crcpw_del_comm( struct ompi_communicator_t* comm );
  87 
  88     int mca_pml_crcpw_add_procs( struct ompi_proc_t **procs, size_t nprocs );
  89     int mca_pml_crcpw_del_procs( struct ompi_proc_t **procs, size_t nprocs );
  90 
  91     int mca_pml_crcpw_progress(void);
  92 
  93     int mca_pml_crcpw_iprobe(int dst, int tag, struct ompi_communicator_t* comm, int *matched, ompi_status_public_t* status );
  94 
  95     int mca_pml_crcpw_probe( int dst, int tag, struct ompi_communicator_t* comm, ompi_status_public_t* status );
  96 
  97 
  98     int mca_pml_crcpw_improbe( int dst,
  99                              int tag,
 100                              struct ompi_communicator_t* comm,
 101                              int *matched,
 102                              struct ompi_message_t **message,
 103                              ompi_status_public_t* status );
 104 
 105     int mca_pml_crcpw_mprobe( int dst,
 106                             int tag,
 107                             struct ompi_communicator_t* comm,
 108                             struct ompi_message_t **message,
 109                             ompi_status_public_t* status );
 110 
 111     int mca_pml_crcpw_isend_init( void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag,
 112                                   mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm, struct ompi_request_t **request );
 113 
 114     int mca_pml_crcpw_isend( void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag,
 115                              mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm, struct ompi_request_t **request );
 116 
 117     int mca_pml_crcpw_send(  void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag,
 118                              mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm );
 119 
 120     int mca_pml_crcpw_irecv_init( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag,
 121                                   struct ompi_communicator_t* comm,  struct ompi_request_t **request);
 122 
 123     int mca_pml_crcpw_irecv( void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag,
 124                              struct ompi_communicator_t* comm, struct ompi_request_t **request );
 125 
 126     int mca_pml_crcpw_recv(  void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag,
 127                              struct ompi_communicator_t* comm,  ompi_status_public_t* status);
 128 
 129     int mca_pml_crcpw_imrecv( void *buf,
 130                                size_t count,
 131                                ompi_datatype_t *datatype,
 132                                struct ompi_message_t **message,
 133                                struct ompi_request_t **request );
 134 
 135     int mca_pml_crcpw_mrecv( void *buf,
 136                               size_t count,
 137                               ompi_datatype_t *datatype,
 138                               struct ompi_message_t **message,
 139                               ompi_status_public_t* status );
 140 
 141     int mca_pml_crcpw_dump( struct ompi_communicator_t* comm, int verbose );
 142 
 143     int mca_pml_crcpw_start( size_t count, ompi_request_t** requests );
 144 
 145     int mca_pml_crcpw_ft_event(int state);
 146 
 147 END_C_DECLS
 148 
 149 #endif