Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Issue a warning about latencies instead of aborting.
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 13 Aug 2007 15:32:54 +0000 (15:32 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 13 Aug 2007 15:32:54 +0000 (15:32 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4078 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/workstation_ptask_L07.c

index 077cde2..6d89a56 100644 (file)
@@ -547,7 +547,13 @@ static double get_link_bandwidth(const void *link)
 
 static double get_link_latency(const void *link)
 {
 
 static double get_link_latency(const void *link)
 {
-  xbt_assert0(0, "This model does not implement latencies");
+  static int warned = 0;
+
+  if(!warned) {
+    WARN0("This model does not take latency into account.");
+    warned = 1;
+  }
+  return 0.0:
 }
 
 /**************************************/
 }
 
 /**************************************/
@@ -908,6 +914,7 @@ void surf_workstation_resource_init_ptask_L07(const char *filename)
              "network resource type already defined");
   resource_init_internal();
   parse_file(filename);
              "network resource type already defined");
   resource_init_internal();
   parse_file(filename);
+  WARN0("This model does not take latency into account.");
 
   update_resource_description(surf_workstation_resource_description,
                              surf_workstation_resource_description_size,
 
   update_resource_description(surf_workstation_resource_description,
                              surf_workstation_resource_description_size,