void STag_surfxml_platform(void) { XBT_ATTRIB_UNUSED double version = surf_parse_get_double(A_surfxml_platform_version); xbt_assert((version >= 1.0), "******* BIG FAT WARNING *********\n " "You're using an ancient XML file.\n" "Since SimGrid 3.1, units are Bytes, Flops, and seconds " "instead of MBytes, MFlops and seconds.\n" "Use simgrid_update_xml to update your file automatically. " "This program is installed automatically with SimGrid, or " "available in the tools/ directory of the source archive.\n" "Please check also out the SURF section of the ChangeLog for " "the 3.1 version for more information. \n" "Last, do not forget to also update your values for " "the calls to MSG_task_create (if any)."); xbt_assert((version >= 3.0), "******* BIG FAT WARNING *********\n " "You're using an old XML file.\n" "Use simgrid_update_xml to update your file automatically. " "This program is installed automatically with SimGrid, or " "available in the tools/ directory of the source archive."); xbt_assert((version >= 4.0), "******* FILE %s IS TOO OLD (v:%.1f) *********\n " "Changes introduced in SimGrid 3.13:\n" " - 'power' attribute of hosts (and others) got renamed to 'speed'.\n" " - In <trace_connect>, attribute kind=\"POWER\" is now kind=\"SPEED\".\n" " - DOCTYPE now point to the rignt URL: http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd\n" " - speed, bandwidth and latency attributes now MUST have an explicit unit (f, Bps, s by default)" "\n\n" "Use simgrid_update_xml to update your file automatically. " "This program is installed automatically with SimGrid, or " "available in the tools/ directory of the source archive.",surf_parsed_filename, version); sg_platf_begin(); }
void STag_surfxml_platform(void) { _XBT_GNUC_UNUSED double version = surf_parse_get_double(A_surfxml_platform_version); xbt_assert((version >= 1.0), "******* BIG FAT WARNING *********\n " "You're using an ancient XML file.\n" "Since SimGrid 3.1, units are Bytes, Flops, and seconds " "instead of MBytes, MFlops and seconds.\n" "Use simgrid_update_xml to update your file automatically. " "This program is installed automatically with SimGrid, or " "available in the tools/ directory of the source archive.\n" "Please check also out the SURF section of the ChangeLog for " "the 3.1 version for more information. \n" "Last, do not forget to also update your values for " "the calls to MSG_task_create (if any)."); xbt_assert((version >= 3.0), "******* BIG FAT WARNING *********\n " "You're using an old XML file.\n" "Use simgrid_update_xml to update your file automatically. " "This program is installed automatically with SimGrid, or " "available in the tools/ directory of the source archive."); sg_platf_begin(); }
int console_open(lua_State *L) { sg_platf_init(); sg_platf_begin(); storage_register_callbacks(); return 0; }
static int surf_parse_bypass_platform(void) { sg_platf_begin(); s_sg_platf_AS_cbarg_t AS = SG_PLATF_AS_INITIALIZER; AS.id = "AS0"; AS.routing = A_surfxml_AS_routing_Full; sg_platf_new_AS_begin(&AS); s_sg_platf_host_cbarg_t bob = SG_PLATF_HOST_INITIALIZER; bob.id = "bob"; bob.power_peak = xbt_dynar_new(sizeof(double), NULL); xbt_dynar_push_as(bob.power_peak, double, 98095000.0); sg_platf_new_host(&bob); s_sg_platf_host_cbarg_t alice = SG_PLATF_HOST_INITIALIZER; alice.id = "alice"; alice.power_peak = xbt_dynar_new(sizeof(double), NULL); xbt_dynar_push_as(alice.power_peak, double, 98095000.0); sg_platf_new_host(&alice); s_sg_platf_link_cbarg_t link = SG_PLATF_LINK_INITIALIZER; link.id = "link1"; link.latency = 0.000278066; link.bandwidth = 27946250; sg_platf_new_link(&link); s_sg_platf_route_cbarg_t route= SG_PLATF_ROUTE_INITIALIZER; route.src = "bob"; route.dst = "alice"; sg_platf_route_begin(&route); sg_platf_route_add_link("link1", &route); sg_platf_route_end(&route); sg_platf_new_AS_end(); sg_platf_end(); sg_platf_exit(); return 0; }