void smpi_mpi_finalize()
{
int i;
+ int rank = smpi_mpi_comm_rank_self(smpi_mpi_global->mpi_comm_world);
SIMIX_mutex_lock(smpi_global->running_hosts_count_mutex);
i = --smpi_global->running_hosts_count;
int rank = smpi_mpi_comm_rank_self(smpi_mpi_global->mpi_comm_world);
double duration;
smx_host_t host;
- char compute[] = "compute";
+ char computation[] = "computation";
smx_action_t action;
smx_mutex_t mutex;
smx_cond_t cond;
SIMIX_mutex_unlock(smpi_global->timers_mutexes[rank]);
host = smpi_mpi_global->mpi_comm_world->hosts[rank];
- action = SIMIX_action_execute(host, compute, duration * SMPI_DEFAULT_SPEED);
+ action = SIMIX_action_execute(host, computation, duration * SMPI_DEFAULT_SPEED);
mutex = SIMIX_mutex_init();
cond = SIMIX_cond_init();
SIMIX_mutex_destroy(mutex);
SIMIX_cond_destroy(cond);
- SIMIX_action_destroy(action);
+ //SIMIX_action_destroy(action);
// FIXME: check for success/failure?
#include "private.h"
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi,XBT_LOG_ROOT_CAT, "All SMPI categories");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi, XBT_LOG_ROOT_CAT, "All SMPI categories");
SMPI_Global_t smpi_global = NULL;
smx_host_t dhost;
- char communicate[] = "communicate";
+ char communication[] = "communication";
smx_action_t action;
smpi_received_message_t message;
request->completed = 1;
- action = SIMIX_action_communicate(shost, dhost, communicate, 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);
SIMIX_mutex_unlock(request->mutex);
- SIMIX_action_destroy(action);
+ //SIMIX_action_destroy(action);
// wake up receiver if necessary
receiver_process = smpi_global->receiver_processes[drank];
SIMIX_mutex_destroy(mutex);
SIMIX_cond_destroy(cond);
- SIMIX_action_destroy(action);
+ //SIMIX_action_destroy(action);
// FIXME: check for success/failure?