Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
grades overrun in test_heap_mean_operation() test funtion, adds test_reset_heap...
[simgrid.git] / testsuite / surf / surf_usage2.c
index 36da616..2adbbad 100644 (file)
@@ -42,9 +42,6 @@ void test(char *platform)
   surf_action_t actionB = NULL;
   surf_action_t actionC = NULL;
   surf_action_t commAB = NULL;
-  e_surf_action_state_t stateActionA;
-  e_surf_action_state_t stateActionB;
-  e_surf_action_state_t stateActionC;
   double now = -1.0;
 
   surf_workstation_resource_init_CLM03(platform);
@@ -85,7 +82,7 @@ void test(char *platform)
     surf_resource_t resource = NULL;
 
     now = surf_get_clock();
-    DEBUG1("Next Event : " "%lg" "\n", now);
+    DEBUG1("Next Event : " "%g" "\n", now);
 
     xbt_dynar_foreach(resource_list, i, resource) {
       DEBUG1("\t %s actions\n", resource->common_public->name);
@@ -106,7 +103,6 @@ void test(char *platform)
 
   DEBUG0("Simulation Terminated\n");
 
-  surf_finalize();
 }
 
 int main(int argc, char **argv)
@@ -114,8 +110,11 @@ int main(int argc, char **argv)
   surf_init(&argc, argv);      /* Initialize some common structures */
   if(argc==1) {
      fprintf(stderr,"Usage : %s platform.txt\n",argv[0]);
+     surf_exit();
      return 1;
   }
   test(argv[1]);
+
+  surf_exit();
   return 0;
 }