From aa06b844975857bf46e5425f96a3242cdbde834b Mon Sep 17 00:00:00 2001 From: kayof Date: Thu, 17 May 2007 18:15:04 +0000 Subject: [PATCH] added codes for the GTNetS model. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3531 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/msg/environment.c | 4 ++++ src/msg/msg_config.c | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/msg/environment.c b/src/msg/environment.c index 3513cd907c..013a65998a 100644 --- a/src/msg/environment.c +++ b/src/msg/environment.c @@ -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)"); } diff --git a/src/msg/msg_config.c b/src/msg/msg_config.c index b91b2dc338..e279c55842 100644 --- a/src/msg/msg_config.c +++ b/src/msg/msg_config.c @@ -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 */ -- 2.20.1