#include <errno.h>
#include "surf/surf.h"
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_base, smpi,
- "Logging specific to SMPI (base)");
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_base, smpi, "Logging specific to SMPI (base)");
+
static int match_recv(void* a, void* b, smx_action_t ignored) {
- MPI_Request ref = (MPI_Request)a;
- MPI_Request req = (MPI_Request)b;
+ MPI_Request ref = (MPI_Request)a;
+ MPI_Request req = (MPI_Request)b;
+ XBT_DEBUG("Trying to match a recv of src %d against %d, tag %d against %d",ref->src,req->src, ref->tag, req->tag);
- xbt_assert(ref, "Cannot match recv against null reference");
- xbt_assert(req, "Cannot match recv against null request");
- return (ref->src == MPI_ANY_SOURCE || req->src == ref->src)
- && (ref->tag == MPI_ANY_TAG || req->tag == ref->tag);
+ xbt_assert(ref, "Cannot match recv against null reference");
+ xbt_assert(req, "Cannot match recv against null request");
+ return (ref->src == MPI_ANY_SOURCE || req->src == ref->src)
+ && (ref->tag == MPI_ANY_TAG || req->tag == ref->tag);
}
static int match_send(void* a, void* b,smx_action_t ignored) {
request->action = simcall_comm_irecv(mailbox, request->buf, &request->size, &match_recv, request);
} else {
print_request("New send", request);
-
- if (request->size < xbt_cfg_get_int(_surf_cfg_set, "smpi/async_small_thres")) { // eager mode => detached send (FIXME: this limit should be configurable)
+ if (request->size < xbt_cfg_get_int(_surf_cfg_set, "smpi/async_small_thres")) { // eager mode
mailbox = smpi_process_remote_mailbox_small(
- smpi_group_index(smpi_comm_group(request->comm), request->dst));
+ smpi_group_index(smpi_comm_group(request->comm), request->dst));
}else{
XBT_DEBUG("Send request %p is not in the permanent receive mailbox (buf: %p)",request,request->buf);
mailbox = smpi_process_remote_mailbox(
int smpi_mpi_test(MPI_Request * request, MPI_Status * status) {
int flag;
+
+ //assume that request is not MPI_REQUEST_NULL (filtered in PMPI_Test or smpi_mpi_testall before)
if ((*request)->action == NULL)
flag = 1;
else