]> AND Public Git Repository - simgrid.git/blobdiff - src/surf/surfxml_parse.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make cluster routing a bit more flexible, to allow adding other kinds of clusters
[simgrid.git] / src / surf / surfxml_parse.c
index 2013d9a0b3ed8ac336167aed115d3d03d9b53d6a..86635a106f3eb0eeb1a195bf8a8336998bd2c242 100644 (file)
@@ -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) {