This source file includes following definitions.
- ompi_mtl_psm_irecv
- ompi_mtl_psm_imrecv
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 #include "ompi_config.h"
  22 #include "ompi/communicator/communicator.h"
  23 #include "opal/datatype/opal_convertor.h"
  24 #include "ompi/mca/mtl/base/mtl_base_datatype.h"
  25 #include "opal/util/show_help.h"
  26 
  27 #include "mtl_psm.h"
  28 #include "mtl_psm_types.h"
  29 #include "mtl_psm_request.h"
  30 
  31 int
  32 ompi_mtl_psm_irecv(struct mca_mtl_base_module_t* mtl,
  33                   struct ompi_communicator_t *comm,
  34                   int src,
  35                   int tag,
  36                   struct opal_convertor_t *convertor,
  37                   struct mca_mtl_request_t *mtl_request)
  38 {
  39     int ret;
  40     psm_error_t err;
  41     mca_mtl_psm_request_t * mtl_psm_request = (mca_mtl_psm_request_t*) mtl_request;
  42     uint64_t mqtag;
  43     uint64_t tagsel;
  44     size_t length;
  45 
  46     ret = ompi_mtl_datatype_recv_buf(convertor,
  47                                      &mtl_psm_request->buf,
  48                                      &length,
  49                                      &mtl_psm_request->free_after);
  50 
  51     if (OMPI_SUCCESS != ret) return ret;
  52 
  53     if (length >= 1ULL << sizeof(uint32_t) * 8) {
  54             opal_show_help("help-mtl-psm.txt",
  55                    "message too big", false,
  56                    length, 1ULL << sizeof(uint32_t) * 8);
  57             return OMPI_ERROR;
  58     }
  59 
  60     mtl_psm_request->length = length;
  61     mtl_psm_request->convertor = convertor;
  62     mtl_psm_request->type = OMPI_MTL_PSM_IRECV;
  63 
  64     PSM_MAKE_TAGSEL(src, tag, comm->c_contextid, mqtag, tagsel);
  65 
  66 #if 0
  67     printf("recv bits:   0x%016llx 0x%016llx\n", mqtag, tagsel);
  68 #endif
  69     err = psm_mq_irecv(ompi_mtl_psm.mq,
  70                        mqtag,
  71                        tagsel,
  72                        0,
  73                        mtl_psm_request->buf,
  74                        length,
  75                        mtl_psm_request,
  76                        &mtl_psm_request->psm_request);
  77 
  78     if (err) {
  79       opal_show_help("help-mtl-psm.txt",
  80                      "error posting receive", true,
  81                      psm_error_get_string(err),
  82                      mtl_psm_request->buf, length);
  83       return OMPI_ERROR;
  84     }
  85 
  86     return OMPI_SUCCESS;
  87 }
  88 
  89 
  90 int
  91 ompi_mtl_psm_imrecv(struct mca_mtl_base_module_t* mtl,
  92                     struct opal_convertor_t *convertor,
  93                     struct ompi_message_t **message,
  94                     struct mca_mtl_request_t *mtl_request)
  95 {
  96     return OMPI_ERR_NOT_IMPLEMENTED;
  97 }