Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ompi/mca/mtl/psm/help-mtl-psm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ Unable to post application receive buffer (psm_mq_irecv).

Error: %s
Buffer: %p
Length: %d
Length: %llu
#
[path query mechanism unknown]
Unknown path record query mechanism %s. Supported mechanisms are %s.
#
[message too big]
Message size %llu bigger than supported by PSM API. Max = %llu
7 changes: 7 additions & 0 deletions ompi/mca/mtl/psm/mtl_psm_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ ompi_mtl_psm_irecv(struct mca_mtl_base_module_t* mtl,

if (OMPI_SUCCESS != ret) return ret;

if (length >= 1ULL << sizeof(uint32_t) * 8) {
opal_show_help("help-mtl-psm.txt",
"message too big", false,
length, 1ULL << sizeof(uint32_t) * 8);
return OMPI_ERROR;
}

mtl_psm_request->length = length;
mtl_psm_request->convertor = convertor;
mtl_psm_request->type = OMPI_MTL_PSM_IRECV;
Expand Down
23 changes: 19 additions & 4 deletions ompi/mca/mtl/psm/mtl_psm_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "ompi/mca/pml/pml.h"
#include "ompi/communicator/communicator.h"
#include "opal/datatype/opal_convertor.h"
#include "opal/util/show_help.h"

#include "mtl_psm.h"
#include "mtl_psm_types.h"
Expand Down Expand Up @@ -56,13 +57,19 @@ ompi_mtl_psm_send(struct mca_mtl_base_module_t* mtl,
&length,
&mtl_psm_request.free_after);

if (OMPI_SUCCESS != ret) return ret;

if (length >= 1ULL << sizeof(uint32_t) * 8) {
opal_show_help("help-mtl-psm.txt",
"message too big", false,
length, 1ULL << sizeof(uint32_t) * 8);
return OMPI_ERROR;
}

mtl_psm_request.length = length;
mtl_psm_request.convertor = convertor;
mtl_psm_request.type = OMPI_MTL_PSM_ISEND;

if (OMPI_SUCCESS != ret) return ret;

if (mode == MCA_PML_BASE_SEND_SYNCHRONOUS)
flags |= PSM_MQ_FLAG_SENDSYNC;

Expand Down Expand Up @@ -109,12 +116,20 @@ ompi_mtl_psm_isend(struct mca_mtl_base_module_t* mtl,
&length,
&mtl_psm_request->free_after);


if (OMPI_SUCCESS != ret) return ret;

if (length >= 1ULL << sizeof(uint32_t) * 8) {
opal_show_help("help-mtl-psm.txt",
"message too big", false,
length, 1ULL << sizeof(uint32_t) * 8);
return OMPI_ERROR;
}

mtl_psm_request->length= length;
mtl_psm_request->convertor = convertor;
mtl_psm_request->type = OMPI_MTL_PSM_ISEND;

if (OMPI_SUCCESS != ret) return ret;

if (mode == MCA_PML_BASE_SEND_SYNCHRONOUS)
flags |= PSM_MQ_FLAG_SENDSYNC;

Expand Down
5 changes: 4 additions & 1 deletion ompi/mca/mtl/psm2/help-mtl-psm2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ Unable to post application receive buffer (psm2_mq_irecv or psm2_mq_imrecv).

Error: %s
Buffer: %p
Length: %d
Length: %llu
#
[path query mechanism unknown]
Unknown path record query mechanism %s. Supported mechanisms are %s.
#
[message too big]
Message size %llu bigger than supported by PSM2 API. Max = %llu
14 changes: 14 additions & 0 deletions ompi/mca/mtl/psm2/mtl_psm2_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ ompi_mtl_psm2_irecv(struct mca_mtl_base_module_t* mtl,

if (OMPI_SUCCESS != ret) return ret;

if (length >= 1ULL << sizeof(uint32_t) * 8) {
opal_show_help("help-mtl-psm2.txt",
"message too big", false,
length, 1ULL << sizeof(uint32_t) * 8);
return OMPI_ERROR;
}

mtl_psm2_request->length = length;
mtl_psm2_request->convertor = convertor;
mtl_psm2_request->type = OMPI_mtl_psm2_IRECV;
Expand Down Expand Up @@ -102,6 +109,13 @@ ompi_mtl_psm2_imrecv(struct mca_mtl_base_module_t* mtl,

if (OMPI_SUCCESS != ret) return ret;

if (length >= 1ULL << sizeof(uint32_t) * 8) {
opal_show_help("help-mtl-psm2.txt",
"message too big", false,
length, 1ULL << sizeof(uint32_t) * 8);
return OMPI_ERROR;
}

mtl_psm2_request->length = length;
mtl_psm2_request->convertor = convertor;
mtl_psm2_request->type = OMPI_mtl_psm2_IRECV;
Expand Down
14 changes: 14 additions & 0 deletions ompi/mca/mtl/psm2/mtl_psm2_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "ompi/mca/pml/pml.h"
#include "ompi/communicator/communicator.h"
#include "opal/datatype/opal_convertor.h"
#include "opal/util/show_help.h"

#include "mtl_psm2.h"
#include "mtl_psm2_types.h"
Expand Down Expand Up @@ -54,6 +55,12 @@ ompi_mtl_psm2_send(struct mca_mtl_base_module_t* mtl,
&length,
&mtl_psm2_request.free_after);

if (length >= 1ULL << sizeof(uint32_t) * 8) {
opal_show_help("help-mtl-psm2.txt",
"message too big", false,
length, 1ULL << sizeof(uint32_t) * 8);
return OMPI_ERROR;
}

mtl_psm2_request.length = length;
mtl_psm2_request.convertor = convertor;
Expand Down Expand Up @@ -107,6 +114,13 @@ ompi_mtl_psm2_isend(struct mca_mtl_base_module_t* mtl,
&length,
&mtl_psm2_request->free_after);

if (length >= 1ULL << sizeof(uint32_t) * 8) {
opal_show_help("help-mtl-psm2.txt",
"message too big", false,
length, 1ULL << sizeof(uint32_t) * 8);
return OMPI_ERROR;
}

mtl_psm2_request->length= length;
mtl_psm2_request->convertor = convertor;
mtl_psm2_request->type = OMPI_mtl_psm2_ISEND;
Expand Down