From 36adf2da2f22978d0df787fd1f59929a7768a37c Mon Sep 17 00:00:00 2001 From: cristianrosa Date: Mon, 10 May 2010 14:14:47 +0000 Subject: [PATCH 1/1] Improve the transition's dependence detection in MC git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7730 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/mc/mc_transition.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/mc/mc_transition.c b/src/mc/mc_transition.c index 4e5c95d349..e397f35569 100644 --- a/src/mc/mc_transition.c +++ b/src/mc/mc_transition.c @@ -87,18 +87,24 @@ int MC_transition_depend(mc_transition_t t1, mc_transition_t t2) /* The semantics of SIMIX network operations implies that ONLY transitions of the same type, in the same rendez-vous point, and from different processes are dependant, except wait transitions that are always independent */ - if( t1->type == mc_wait - || t2->type == mc_wait - || t1->process == t2->process - || t1->type != t2->type - || t1->rdv != t2->rdv) + if(t1->process == t2->process) return FALSE; - else - return TRUE; -} - - - + if(t1->type == mc_isend && t2->type == mc_isend && t1->rdv == t2->rdv) + return TRUE; + if(t1->type == mc_irecv && t2->type == mc_irecv && t1->rdv == t2->rdv) + return TRUE; + if(t1->type == mc_wait && t2->type == mc_wait + && t1->comm->src_buff != NULL + && t1->comm->dst_buff != NULL + && t2->comm->src_buff != NULL + && t2->comm->dst_buff != NULL + && ( t1->comm->dst_buff == t2->comm->src_buff + || t1->comm->dst_buff == t2->comm->dst_buff + || t2->comm->dst_buff == t1->comm->src_buff)) + return TRUE; + + return FALSE; +} \ No newline at end of file -- 2.20.1