This source file includes following definitions.
- ompi_mtl_psm_iprobe
- ompi_mtl_psm_improbe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #include "ompi_config.h"
23 #include "mtl_psm.h"
24 #include "mtl_psm_types.h"
25 #include "psm.h"
26 #include "ompi/communicator/communicator.h"
27
28
29 int ompi_mtl_psm_iprobe(struct mca_mtl_base_module_t* mtl,
30 struct ompi_communicator_t *comm,
31 int src,
32 int tag,
33 int *flag,
34 struct ompi_status_public_t *status)
35 {
36 uint64_t mqtag, tagsel;
37 psm_mq_status_t mqstat;
38 psm_error_t err;
39
40 PSM_MAKE_TAGSEL(src, tag, comm->c_contextid, mqtag, tagsel);
41
42 err = psm_mq_iprobe(ompi_mtl_psm.mq, mqtag, tagsel, &mqstat);
43 if (err == PSM_OK) {
44 *flag = 1;
45 if(MPI_STATUS_IGNORE != status) {
46 status->MPI_SOURCE = PSM_GET_MQRANK(mqstat.msg_tag);
47 status->MPI_TAG = PSM_GET_MQUTAG(mqstat.msg_tag);
48 status->_ucount = mqstat.nbytes;
49
50 switch (mqstat.error_code) {
51 case PSM_OK:
52 status->MPI_ERROR = OMPI_SUCCESS;
53 break;
54 case PSM_MQ_TRUNCATION:
55 status->MPI_ERROR = MPI_ERR_TRUNCATE;
56 break;
57 default:
58 status->MPI_ERROR = MPI_ERR_INTERN;
59 }
60 }
61
62 return OMPI_SUCCESS;
63 }
64 else if (err == PSM_MQ_INCOMPLETE) {
65 *flag = 0;
66 return OMPI_SUCCESS;
67 }
68 else
69 return OMPI_ERROR;
70 }
71
72
73 int
74 ompi_mtl_psm_improbe(struct mca_mtl_base_module_t *mtl,
75 struct ompi_communicator_t *comm,
76 int src,
77 int tag,
78 int *matched,
79 struct ompi_message_t **message,
80 struct ompi_status_public_t *status)
81 {
82 return OMPI_ERR_NOT_IMPLEMENTED;
83 }