Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
small change to calls to SIMIX_action_communicate and SIMIX_action_execute
[simgrid.git] / src / smpi / smpi_sender.c
index 983ded8..0035d63 100644 (file)
@@ -15,7 +15,6 @@ int smpi_sender(int argc, char **argv)
 
        smx_host_t dhost;
 
-       char communication[] = "communication";
        smx_action_t action;
 
        smpi_received_message_t message;
@@ -66,7 +65,7 @@ int smpi_sender(int argc, char **argv)
                        SIMIX_mutex_lock(request->mutex);
 
                        message->comm    = request->comm;
-                       message->src     = smpi_mpi_comm_rank(request->comm);
+                       message->src     = request->comm->index_to_rank_map[index];
                        message->tag     = request->tag;
                        message->data    = request->data;
                        message->buf     = xbt_malloc(request->datatype->size * request->count);
@@ -91,7 +90,7 @@ int smpi_sender(int argc, char **argv)
                                request->completed = 1;
                        }
 
-                       action = SIMIX_action_communicate(shost, dhost, communication, request->datatype->size * request->count, -1.0);
+                       action = SIMIX_action_communicate(shost, dhost, "communication", request->datatype->size * request->count, -1.0);
 
                        SIMIX_register_action_to_condition(action, request->cond);
                        SIMIX_cond_wait(request->cond, request->mutex);