From f905895de23cb0b3fe314fdbc5a7a827588dec98 Mon Sep 17 00:00:00 2001 From: markls Date: Fri, 31 Aug 2007 07:56:18 +0000 Subject: [PATCH 1/1] trying to debug a persistent problem. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4130 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/smpi/smpi_base.c | 1 + src/smpi/smpi_bench.c | 6 +++--- src/smpi/smpi_global.c | 2 +- src/smpi/smpi_sender.c | 6 +++--- src/smpi/smpi_util.c | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/smpi/smpi_base.c b/src/smpi/smpi_base.c index 7f0fd9d1a2..330e3d34a5 100644 --- a/src/smpi/smpi_base.c +++ b/src/smpi/smpi_base.c @@ -112,6 +112,7 @@ void smpi_mpi_init() 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; diff --git a/src/smpi/smpi_bench.c b/src/smpi/smpi_bench.c index aec13c01c4..73a3445a0c 100644 --- a/src/smpi/smpi_bench.c +++ b/src/smpi/smpi_bench.c @@ -17,7 +17,7 @@ void smpi_bench_end() 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; @@ -29,7 +29,7 @@ void smpi_bench_end() 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(); @@ -41,7 +41,7 @@ void smpi_bench_end() SIMIX_mutex_destroy(mutex); SIMIX_cond_destroy(cond); - SIMIX_action_destroy(action); + //SIMIX_action_destroy(action); // FIXME: check for success/failure? diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index 686012911a..64a4b315a6 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -2,7 +2,7 @@ #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; diff --git a/src/smpi/smpi_sender.c b/src/smpi/smpi_sender.c index 41ff7a1bd2..7b3e609d3d 100644 --- a/src/smpi/smpi_sender.c +++ b/src/smpi/smpi_sender.c @@ -16,7 +16,7 @@ int smpi_sender(int argc, char **argv) smx_host_t dhost; - char communicate[] = "communicate"; + char communication[] = "communication"; smx_action_t action; smpi_received_message_t message; @@ -83,7 +83,7 @@ int smpi_sender(int argc, char **argv) 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); @@ -91,7 +91,7 @@ int smpi_sender(int argc, char **argv) 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]; diff --git a/src/smpi/smpi_util.c b/src/smpi/smpi_util.c index faae149560..60f4157ac3 100644 --- a/src/smpi/smpi_util.c +++ b/src/smpi/smpi_util.c @@ -37,7 +37,7 @@ unsigned int smpi_sleep(unsigned int seconds) SIMIX_mutex_destroy(mutex); SIMIX_cond_destroy(cond); - SIMIX_action_destroy(action); + //SIMIX_action_destroy(action); // FIXME: check for success/failure? -- 2.20.1