From: Marion Guthmuller Date: Tue, 18 Feb 2014 13:44:13 +0000 (+0100) Subject: model-checker : try to fix the model-checker in case of send detached X-Git-Tag: v3_11~199^2~2^2~31 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4ea540ea3e645b1a0b2c4ffd46643cd2695396f2 model-checker : try to fix the model-checker in case of send detached --- diff --git a/src/mc/mc_request.c b/src/mc/mc_request.c index 98565b0837..1a3d2aa558 100644 --- a/src/mc/mc_request.c +++ b/src/mc/mc_request.c @@ -339,6 +339,8 @@ int MC_request_is_enabled(smx_simcall_t req) } }else{ act = simcall_comm_wait__get__comm(req); + if(act->comm.detached && act->comm.src_proc == NULL && act->comm.type == SIMIX_COMM_READY) + return (act->comm.dst_proc != NULL); return (act->comm.src_proc && act->comm.dst_proc); } break; diff --git a/src/mc/mc_state.c b/src/mc/mc_state.c index f0c240df0d..7036c25b43 100644 --- a/src/mc/mc_state.c +++ b/src/mc/mc_state.c @@ -143,6 +143,7 @@ smx_simcall_t MC_state_get_request(mc_state_t state, int *value) smx_process_t process = NULL; mc_procstate_t procstate = NULL; unsigned int start_count; + smx_action_t act = NULL; xbt_swag_foreach(process, simix_global->process_list){ procstate = &state->proc_status[process->pid]; @@ -186,11 +187,14 @@ smx_simcall_t MC_state_get_request(mc_state_t state, int *value) break; case SIMCALL_COMM_WAIT: - if(simcall_comm_wait__get__comm(&process->simcall)->comm.src_proc - && simcall_comm_wait__get__comm(&process->simcall)->comm.dst_proc){ + act = simcall_comm_wait__get__comm(&process->simcall); + if(act->comm.src_proc && act->comm.dst_proc){ *value = 0; }else{ - *value = -1; + if(act->comm.src_proc == NULL && act->comm.type == SIMIX_COMM_READY && act->comm.detached == 1) + *value = 0; + else + *value = -1; } procstate->state = MC_DONE; return &process->simcall;