Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cleanup.
[simgrid.git] / src / surf / surfxml_parse.c
index 2013d9a..9ed3fd5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2013. The SimGrid Team.
+/* Copyright (c) 2006-2014. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -520,6 +520,20 @@ void ETag_surfxml_cluster(void){
     cluster.loopback_bw = surf_parse_get_bandwidth(A_surfxml_cluster_loopback___bw);
   if(strcmp(A_surfxml_cluster_loopback___lat,""))
     cluster.loopback_lat = surf_parse_get_time(A_surfxml_cluster_loopback___lat);
+
+  switch(AX_surfxml_cluster_topology){
+  case A_surfxml_cluster_topology_FLAT:
+    cluster.topology= SURF_CLUSTER_FLAT ;
+    break;
+  case A_surfxml_cluster_topology_TORUS:
+    cluster.topology= SURF_CLUSTER_TORUS ;
+    break;
+  default:
+    surf_parse_error("Invalid cluster topology for cluster %s",
+                     cluster.id);
+    break;
+  }
+  cluster.topo_parameters = A_surfxml_cluster_topo___parameters;
   cluster.router_id = A_surfxml_cluster_router___id;
 
   switch (AX_surfxml_cluster_sharing___policy) {