+/* Copyright (c) 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved. */
-#ifndef WIN32
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#ifndef _XBT_WIN32
#include <unistd.h>
#endif
#include "simdag/simdag.h"
#include "xbt/log.h"
#include "xbt/dict.h"
+#include "xbt/ex.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(validator,
"Logging specific to this SimDag example");
xbt_dict_t props = NULL;
xbt_dict_cursor_t cursor = NULL;
char *key, *data;
+ xbt_ex_t e;
const SD_workstation_t *hosts;
const SD_link_t *links, *tmp;
platformFile = argv[1];
DEBUG1("%s", platformFile);
- SD_create_environment(platformFile);
+ TRY {
+ SD_create_environment(platformFile);
+ } CATCH(e) {
+ xbt_die(bprintf("Error while loading %s: %s",platformFile,e.msg));
+ }
+
printf("<?xml version='1.0'?>\n");
printf("<!DOCTYPE platform SYSTEM \"simgrid.dtd\">\n");
printf("<platform version=\"2\">\n");
+ printf("<AS id=\"AS0\" routing=\"Full\">\n");
totalHosts = SD_workstation_get_number();
hosts = SD_workstation_get_list();
tmp_length = SD_route_get_size(hosts[i], hosts[j]);
for (k = 0; k < tmp_length; k++) {
- printf("<link:ctn id=\"%s\"/>", SD_link_get_name(tmp[k]));
+ printf("<link_ctn id=\"%s\"/>", SD_link_get_name(tmp[k]));
}
printf("\n </route>\n");
}
}
}
+ printf("</AS>\n");
printf("</platform>\n");
SD_exit();