From: markls Date: Mon, 24 Dec 2007 06:27:26 +0000 (+0000) Subject: some of the action checking code didn't work right, so I removed it. X-Git-Tag: v3.3~695 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2cad53ea106892eb80ebd9a11d3498d1cc5d4c2e some of the action checking code didn't work right, so I removed it. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5158 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/smpi/private.h b/src/smpi/private.h index dccaec0726..69d63f5e27 100644 --- a/src/smpi/private.h +++ b/src/smpi/private.h @@ -66,8 +66,6 @@ typedef struct smpi_received_message_t { void *data; int forward; - smx_action_t action; - } s_smpi_received_message_t; typedef struct smpi_received_message_t *smpi_received_message_t; diff --git a/src/smpi/smpi_receiver.c b/src/smpi/smpi_receiver.c index 9f4771edaa..43990a5f6b 100644 --- a/src/smpi/smpi_receiver.c +++ b/src/smpi/smpi_receiver.c @@ -20,8 +20,6 @@ int smpi_receiver(int argc, char **argv) xbt_fifo_item_t request_item; xbt_fifo_item_t message_item; - e_surf_action_state_t state; - self = SIMIX_process_self(); // make sure root is done before own initialization @@ -68,13 +66,10 @@ int smpi_receiver(int argc, char **argv) NULL != message_item; message_item = xbt_fifo_get_next_item(message_item)) { message = xbt_fifo_get_item_content(message_item); - state = SIMIX_action_get_state(message->action); if ( request->comm == message->comm && (MPI_ANY_SOURCE == request->src || request->src == message->src) && - (MPI_ANY_TAG == request->tag || request->tag == message->tag) && - (state != SURF_ACTION_READY && state != SURF_ACTION_RUNNING) - ) { + (MPI_ANY_TAG == request->tag || request->tag == message->tag)) { xbt_fifo_remove_item(request_queue, request_item); xbt_fifo_remove_item(message_queue, message_item); goto stopsearch; @@ -89,8 +84,6 @@ stopsearch: SIMIX_process_suspend(self); } else { - // FIXME: check action status for bad messages - SIMIX_mutex_lock(request->mutex); memcpy(request->buf, message->buf, request->datatype->size * request->count); request->src = message->src; diff --git a/src/smpi/smpi_sender.c b/src/smpi/smpi_sender.c index 0c84106236..26f5125a64 100644 --- a/src/smpi/smpi_sender.c +++ b/src/smpi/smpi_sender.c @@ -94,12 +94,6 @@ int smpi_sender(int argc, char **argv) action = SIMIX_action_communicate(shost, dhost, "communication", request->datatype->size * request->count, -1.0); - message->action = action; - - SIMIX_mutex_lock(smpi_global->received_message_queues_mutexes[dindex]); - xbt_fifo_push(smpi_global->received_message_queues[dindex], message); - SIMIX_mutex_unlock(smpi_global->received_message_queues_mutexes[dindex]); - SIMIX_register_action_to_condition(action, request->cond); for ( @@ -111,6 +105,10 @@ int smpi_sender(int argc, char **argv) SIMIX_cond_wait(request->cond, request->mutex); } + SIMIX_mutex_lock(smpi_global->received_message_queues_mutexes[dindex]); + xbt_fifo_push(smpi_global->received_message_queues[dindex], message); + SIMIX_mutex_unlock(smpi_global->received_message_queues_mutexes[dindex]); + SIMIX_unregister_action_to_condition(action, request->cond); SIMIX_action_destroy(action); diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 5d25da17a3..e18b2715d0 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -41,7 +41,7 @@ PLATFORMTMP="$(mktemp tmpXXXXXX)" cat > ${PLATFORMTMP} < - + PLATFORMHEAD @@ -70,7 +70,7 @@ APPLICATIONTMP="$(mktemp tmpXXXXXX)" cat > ${APPLICATIONTMP} < - + APPLICATIONHEAD