Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge remote-tracking branch 'origin/master'
authorjean-noel quintin <jnquintin@dhcp-892b9b4c.ucd.ie>
Wed, 3 Oct 2012 15:28:45 +0000 (16:28 +0100)
committerjean-noel quintin <jnquintin@dhcp-892b9b4c.ucd.ie>
Wed, 3 Oct 2012 15:28:45 +0000 (16:28 +0100)
Conflicts:
src/smpi/smpi_base.c

1  2 
src/smpi/private.h
src/smpi/smpi_base.c

Simple merge
  #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) {
@@@ -150,10 -141,9 +160,9 @@@ void smpi_mpi_start(MPI_Request request
      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(
@@@ -326,7 -304,7 +335,8 @@@ static void finish_wait(MPI_Request * r
  
  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