Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
protect smpi against problems with replay+collectives.
[simgrid.git] / src / xbt / xbt_replay.c
index 211940d..ffd8002 100644 (file)
@@ -31,6 +31,8 @@ xbt_dict_t action_queues;
 static char *action_line = NULL;
 static size_t action_len = 0;
 
+int is_replay_active = 0 ;
+
 static char **action_get_action(char *name);
 
 static char *str_tolower (const char *str)
@@ -42,6 +44,9 @@ static char *str_tolower (const char *str)
   return ret;
 }
 
+int _xbt_replay_is_active(void){
+  return is_replay_active;
+}
 
 xbt_replay_reader_t xbt_replay_reader_new(const char *filename)
 {
@@ -127,6 +132,7 @@ void xbt_replay_action_unregister(const char *action_name)
 
 void _xbt_replay_action_init(void)
 {
+  is_replay_active = 1;
   action_funs = xbt_dict_new_homogeneous(NULL);
   action_queues = xbt_dict_new_homogeneous(NULL);
 }