From: navarro Date: Tue, 29 May 2012 13:39:58 +0000 (+0200) Subject: Must have init MSG/SD/GRAS before using mutex X-Git-Tag: v3_8~662^2~5 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7fa0f7db3dfd8b367a52fa77cee3cf66753d577d Must have init MSG/SD/GRAS before using mutex --- diff --git a/src/simix/smx_user.c b/src/simix/smx_user.c index 0438918a34..a23bdda151 100644 --- a/src/simix/smx_user.c +++ b/src/simix/smx_user.c @@ -1005,6 +1005,10 @@ int simcall_comm_is_latency_bounded(smx_action_t comm) smx_mutex_t simcall_mutex_init(void) { + if(!simix_global) { + fprintf(stderr,"You must run MSG_global_init or gras_init before using MSG or GRAS\n"); // I would have loved using xbt_die but I can't since it is not initialized yet... :) + abort(); + } smx_simcall_t simcall = SIMIX_simcall_mine(); simcall->call = SIMCALL_MUTEX_INIT;