Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
added codes for the GTNetS model.
authorkayof <kayof@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 17 May 2007 18:15:04 +0000 (18:15 +0000)
committerkayof <kayof@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 17 May 2007 18:15:04 +0000 (18:15 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3531 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/msg/environment.c
src/msg/msg_config.c

index 3513cd9..013a659 100644 (file)
@@ -77,6 +77,10 @@ void MSG_create_environment(const char *file) {
     surf_workstation_resource_init_KCCFLN05_proportionnal(file);
   } else if (!strcmp(workstation_model_name,"CLM03")) {
     surf_workstation_resource_init_CLM03(file);
+#ifdef USE_GTNETS
+  } else if (!strcmp(workstation_model_name,"GTNETS")) {
+    surf_workstation_resource_init_GTNETS(file);
+#endif
   } else {
     xbt_assert0(0,"The impossible happened (once again)");
   }
index b91b2dc..e279c55 100644 (file)
@@ -24,10 +24,18 @@ static void _msg_cfg_cb__surf_workstation_model(const char *name, int pos) {
   xbt_assert0(_msg_init_status<2, "Cannot change the model after the initialization");
   
   val = xbt_cfg_get_string (_msg_cfg_set, name);
-  
+
+#ifdef USE_GTNETS
+  xbt_assert1(!strcmp(val, "CLM03") ||
+              !strcmp(val, "KCCFLN05") ||
+             !strcmp(val, "GTNETS"),
+              "Unknown workstation model: %s (either 'CLM03', 'KCCFLN05', or 'GTNETS'",val);
+#else
   xbt_assert1(!strcmp(val, "CLM03") ||
               !strcmp(val, "KCCFLN05"),
               "Unknown workstation model: %s (either 'CLM03' or 'KCCFLN05'",val);
+#endif
+
 }
 
 /* create the config set and register what should be */