Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
removing the loopback and unused links from the platform used by tracing examples
[simgrid.git] / examples / msg / masterslave / masterslave_bypass.c
index be9403f..d5e47f3 100644 (file)
@@ -28,6 +28,7 @@ static int surf_parse_bypass_platform(void)
 
   XBT_DEBUG("<AS>");
   SURFXML_BUFFER_SET(AS_id, "AS0");
+  SURFXML_BUFFER_SET(AS_coordinates, "");
   SURFXML_BUFFER_SET(AS_routing, "Full");
   SURFXML_START_TAG(AS);
 
@@ -39,6 +40,7 @@ static int surf_parse_bypass_platform(void)
   SURFXML_BUFFER_SET(host_core, "1");
   A_surfxml_host_state = A_surfxml_host_state_ON;
   SURFXML_BUFFER_SET(host_state_file, "");
+  SURFXML_BUFFER_SET(host_coordinates, "");
   SURFXML_START_TAG(host);
   SURFXML_END_TAG(host);
 
@@ -50,6 +52,7 @@ static int surf_parse_bypass_platform(void)
   SURFXML_BUFFER_SET(host_core, "1");
   A_surfxml_host_state = A_surfxml_host_state_ON;
   SURFXML_BUFFER_SET(host_state_file, "");
+  SURFXML_BUFFER_SET(host_coordinates, "");
   SURFXML_START_TAG(host);
   SURFXML_END_TAG(host);
 
@@ -164,16 +167,15 @@ int master(int argc, char *argv[])
   int number_of_tasks = 0;
   double task_comp_size = 0;
   double task_comm_size = 0;
-
-
   int i;
-
-  xbt_assert1(sscanf(argv[1], "%d", &number_of_tasks),
-              "Invalid argument %s\n", argv[1]);
-  xbt_assert1(sscanf(argv[2], "%lg", &task_comp_size),
-              "Invalid argument %s\n", argv[2]);
-  xbt_assert1(sscanf(argv[3], "%lg", &task_comm_size),
-              "Invalid argument %s\n", argv[3]);
+  int read;
+
+  read = sscanf(argv[1], "%d", &number_of_tasks);
+  xbt_assert(read, "Invalid argument %s\n", argv[1]);
+  read = sscanf(argv[2], "%lg", &task_comp_size);
+  xbt_assert(read, "Invalid argument %s\n", argv[2]);
+  read = sscanf(argv[3], "%lg", &task_comm_size);
+  xbt_assert(read, "Invalid argument %s\n", argv[3]);
 
   {                             /*  Task creation */
     char sprintf_buffer[64];