xbt_dict_t cpu_properties)
{
cpu_Cas01_t cpu = xbt_new0(s_cpu_Cas01_t, 1);
-
+ xbt_assert1(!xbt_dict_get_or_null(cpu_set, name),
+ "Host '%s' declared several times in the platform file",name);
+
cpu->model = (surf_model_t) surf_cpu_model;
cpu->name = name;
cpu->power_scale = power_scale;
}
static link_CM02_t link_new(char *name,
- double bw_initial,
- tmgr_trace_t bw_trace,
- double lat_initial,
- tmgr_trace_t lat_trace,
- e_surf_link_state_t
- state_initial,
- tmgr_trace_t state_trace,
- e_surf_link_sharing_policy_t
- policy, xbt_dict_t properties)
+ double bw_initial,
+ tmgr_trace_t bw_trace,
+ double lat_initial,
+ tmgr_trace_t lat_trace,
+ e_surf_link_state_t
+ state_initial,
+ tmgr_trace_t state_trace,
+ e_surf_link_sharing_policy_t
+ policy, xbt_dict_t properties)
{
link_CM02_t nw_link = xbt_new0(s_link_CM02_t, 1);
-
+ xbt_assert1(!xbt_dict_get_or_null(link_set, name),
+ "Link '%s' declared several times in the platform file.", name);
nw_link->model = (surf_model_t) surf_network_model;
nw_link->name = name;
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_network_gtnets, surf,
"Logging specific to the SURF network module");
-/* surf_network_model_t surf_network_model = NULL; */
-/*static xbt_dict_t link_set = NULL;*/
-
-/* xbt_dict_t network_card_set = NULL; */
-
-#if 0
-static int card_number = 0;
-static link_GTNETS_t **routing_table = NULL;
-static int *routing_table_size = NULL;
-
-#define ROUTE(i,j) routing_table[(i)+(j)*card_number]
-#define ROUTE_SIZE(i,j) routing_table_size[(i)+(j)*card_number]
-#endif
-
/** QUESTIONS for GTNetS integration
** 1. Check that we did the right thing with name_service and get_resource_name
** 2. Right now there is no "kill flow" in our GTNetS implementation. Do we
static int link_count = -1;
link_GTNETS_t gtnets_link;
- /* KF: Check that the link wasn't added before */
+ /* If link already exists, nothing to do (FIXME: check that multiple definition match?) */
if (xbt_dict_get_or_null(link_set, name)) {
return;
}
#include "xbt/dict.h"
#include "surf/surfxml_parse_private.h"
#include "surf/surf_private.h"
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(parse, surf,
- "Logging specific to the SURF module");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_parse, surf,
+ "Logging specific to the SURF parsing module");
#undef CLEANUP
#include "surfxml.c"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_workstation, surf,
"Logging specific to the SURF workstation module (KCCFLN05)");
+XBT_LOG_EXTERNAL_CATEGORY(surf_parse);
typedef enum {
SURF_WORKSTATION_RESOURCE_CPU,
xbt_dict_t cpu_properties_k)
{
cpu_KCCFLN05_t cpu = xbt_new0(s_cpu_KCCFLN05_t, 1);
+ xbt_assert1(! xbt_dict_get_or_null(workstation_set, name),
+ "Host '%s' declared several times in the platform file.",name);
+ CDEBUG8(surf_parse, "cpu_new(%s,power_scale=%.2f,power_initial=%.2f,state_init=%d,isend=%.2f,irecv=%.2f,isendrev=%.2f) -> %p",
+ name,power_scale,power_initial,state_initial,interference_send,interference_recv,interference_send_recv,cpu);
+
cpu->model = (surf_model_t) surf_workstation_model;
cpu->type = SURF_WORKSTATION_RESOURCE_CPU;
cpu->name = xbt_strdup(name);
{
int i;
+ CDEBUG0(surf_parse, "Use the KCCFKN05 model");
+
/* Adding callback functions */
surf_parse_reset_parser();
surfxml_add_callback(STag_surfxml_host_cb_list, &parse_cpu_init);
xbt_dict_t cpu_properties)
{
cpu_L07_t cpu = xbt_new0(s_cpu_L07_t, 1);
+ xbt_assert1(! xbt_dict_get_or_null(workstation_set, name),
+ "Host '%s' declared several times in the platform file.",name);
cpu->model = (surf_model_t) surf_workstation_model;
cpu->type = SURF_WORKSTATION_RESOURCE_CPU;
}
static link_L07_t link_new(char *name,
- double bw_initial,
- tmgr_trace_t bw_trace,
- double lat_initial,
- tmgr_trace_t lat_trace,
- e_surf_link_state_t
- state_initial,
- tmgr_trace_t state_trace,
- e_surf_link_sharing_policy_t
- policy, xbt_dict_t properties)
-{
+ double bw_initial,
+ tmgr_trace_t bw_trace,
+ double lat_initial,
+ tmgr_trace_t lat_trace,
+ e_surf_link_state_t
+ state_initial,
+ tmgr_trace_t state_trace,
+ e_surf_link_sharing_policy_t
+ policy, xbt_dict_t properties)
+{
link_L07_t nw_link = xbt_new0(s_link_L07_t, 1);
-
+ xbt_assert1(! xbt_dict_get_or_null(link_set, name),
+ "Link '%s' declared several times in the platform file.",name);
nw_link->model = (surf_model_t) surf_workstation_model;
nw_link->type = SURF_WORKSTATION_RESOURCE_LINK;