Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Include math.h for isfinite()
[simgrid.git] / src / simix / smx_deployment.c
index 87d3f61..96e9981 100644 (file)
@@ -22,10 +22,10 @@ static double kill_time = -1.0;
 static void parse_process_init(void)
 {
   parse_host = xbt_strdup(A_surfxml_process_host);
-  xbt_assert1(SIMIX_host_get_by_name(parse_host),
+  xbt_assert(SIMIX_host_get_by_name(parse_host),
               "Host '%s' unknown", parse_host);
   parse_code = SIMIX_get_registered_function(A_surfxml_process_function);
-  xbt_assert1(parse_code, "Function '%s' unknown",
+  xbt_assert(parse_code, "Function '%s' unknown",
               A_surfxml_process_function);
   parse_argc = 0;
   parse_argv = NULL;
@@ -34,8 +34,6 @@ static void parse_process_init(void)
   parse_argv[(parse_argc) - 1] = xbt_strdup(A_surfxml_process_function);
   surf_parse_get_double(&start_time, A_surfxml_process_start_time);
   surf_parse_get_double(&kill_time, A_surfxml_process_kill_time);
-
-  current_property_set = xbt_dict_new();
 }
 
 static void parse_argument(void)
@@ -88,6 +86,7 @@ static void parse_process_finalize(void)
     }
     xbt_free(parse_host);
   }
+  current_property_set = NULL;
 }
 
 /**
@@ -107,7 +106,7 @@ static void parse_process_finalize(void)
 void SIMIX_launch_application(const char *file)
 {
   int parse_status;
-  xbt_assert0(simix_global,
+  xbt_assert(simix_global,
               "SIMIX_global_init has to be called before SIMIX_launch_application.");
 
   // Reset callbacks
@@ -122,7 +121,7 @@ void SIMIX_launch_application(const char *file)
   surf_parse_open(file);
   parse_status = surf_parse();
   surf_parse_close();
-  xbt_assert1(!parse_status, "Parse error in %s", file);
+  xbt_assert(!parse_status, "Parse error in %s", file);
 }
 
 /**
@@ -136,7 +135,7 @@ void SIMIX_launch_application(const char *file)
 XBT_INLINE void SIMIX_function_register(const char *name,
                                         xbt_main_func_t code)
 {
-  xbt_assert0(simix_global,
+  xbt_assert(simix_global,
               "SIMIX_global_init has to be called before SIMIX_function_register.");
 
   xbt_dict_set(simix_global->registered_functions, name, code, NULL);
@@ -151,7 +150,7 @@ static xbt_main_func_t default_function = NULL;
  */
 void SIMIX_function_register_default(xbt_main_func_t code)
 {
-  xbt_assert0(simix_global,
+  xbt_assert(simix_global,
               "SIMIX_global_init has to be called before SIMIX_function_register.");
 
   default_function = code;
@@ -168,7 +167,7 @@ void SIMIX_function_register_default(xbt_main_func_t code)
 xbt_main_func_t SIMIX_get_registered_function(const char *name)
 {
   xbt_main_func_t res = NULL;
-  xbt_assert0(simix_global,
+  xbt_assert(simix_global,
               "SIMIX_global_init has to be called before SIMIX_get_registered_function.");
 
   res = xbt_dict_get_or_null(simix_global->registered_functions, name);
@@ -191,10 +190,10 @@ void SIMIX_process_set_function(const char *process_host,
 
   /* init process */
   parse_host = xbt_strdup(process_host);
-  xbt_assert1(SIMIX_host_get_by_name(parse_host),
+  xbt_assert(SIMIX_host_get_by_name(parse_host),
               "Host '%s' unknown", parse_host);
   parse_code = SIMIX_get_registered_function(process_function);
-  xbt_assert1(parse_code, "Function '%s' unknown", process_function);
+  xbt_assert(parse_code, "Function '%s' unknown", process_function);
 
   parse_argc = 0;
   parse_argv = NULL;
@@ -203,7 +202,6 @@ void SIMIX_process_set_function(const char *process_host,
   parse_argv[(parse_argc) - 1] = xbt_strdup(process_function);
   start_time = process_start_time;
   kill_time = process_kill_time;
-  current_property_set = xbt_dict_new();
 
   /* add arguments */
   xbt_dynar_foreach(arguments, i, arg) {