-- 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.
+
+ -- This platform.lua file is equivalent to small_platform.xml
+ -- So don't change anything in here unless you change the xml file too!
+ --
require("simgrid")
simgrid.platf.open();
simgrid.platf.AS_open{id="AS0",mode="Full"};
simgrid.platf.link_new{AS="AS0",id=9,bandwidth=7209750,latency=0.001461517};
simgrid.platf.link_new{AS="AS0",id="loopback",bandwidth=498000000,latency=0.000015,policy="FATPIPE"};
+ -- Register loopback links
for i=1,5,1 do
- simgrid.platf.route_new{AS="AS0",src=simgrid.host.name(simgrid.host.at(i)),dest=simgrid.host.name(simgrid.host.at(i)),links="loopback"};
+ local hostname = simgrid.host.name(simgrid.host.at(i))
+ simgrid.platf.route_new{AS="AS0",src=hostname,dest=hostname,links="loopback"}
end
simgrid.platf.route_new{AS="AS0",src="Tremblay",dest="Jupiter",links="9"};
simgrid.platf.route_new{AS="AS0",src="Tremblay",dest="Ginette",links="4,3,5"};
simgrid.platf.route_new{AS="AS0",src="Tremblay",dest="Bourassa",links="4,3,2,0,1,6,7"};
- --simgrid.platf.route_new{AS="AS0",src="Jupiter",dest="Tremblay",links="1"};
simgrid.platf.route_new{AS="AS0",src="Jupiter",dest="Fafard",links="9,4,3,2,0,1,8"};
simgrid.platf.route_new{AS="AS0",src="Jupiter",dest="Ginette",links="9,4,3,5"};
simgrid.platf.route_new{AS="AS0",src="Jupiter",dest="Bourassa",links="9,4,3,2,0,1,6,7"};
- --simgrid.platf.route_new{AS="AS0",src="Fafard",dest="Tremblay",links="0,1,2,3,4,8"};
- --simgrid.platf.route_new{AS="AS0",src="Fafard",dest="Jupiter",links="0,1,2,3,4,8,9"};
simgrid.platf.route_new{AS="AS0",src="Fafard",dest="Ginette",links="8,1,0,2,5"};
simgrid.platf.route_new{AS="AS0",src="Fafard",dest="Bourassa",links="8,6,7"};
- --simgrid.platf.route_new{AS="AS0",src="Ginette",dest="Tremblay",links="3,4,5"};
- --simgrid.platf.route_new{AS="AS0",src="Ginette",dest="Jupiter",links="3,4,5,9"};
- --simgrid.platf.route_new{AS="AS0",src="Ginette",dest="Fafard",links="0,1,2,5,8"};
simgrid.platf.route_new{AS="AS0",src="Ginette",dest="Bourassa",links="5,2,0,1,6,7"};
- --simgrid.platf.route_new{AS="AS0",src="Bourassa",dest="Tremblay",links="0,1,3,2,4,6,7"};
- --simgrid.platf.route_new{AS="AS0",src="Bourassa",dest="Jupiter",links="0,1,2,3,4,6,7,9"};
- --simgrid.platf.route_new{AS="AS0",src="Bourassa",dest="Fafard",links="6,7,8"};
- --simgrid.platf.route_new{AS="AS0",src="Bourassa",dest="Ginette",links="0,1,2,5,6,7"};
-
simgrid.platf.AS_close();
simgrid.platf.close();
-
- --Save Platform
- --simgrid.info("start registering platform");
- --simgrid.msg_register_platform();
- --simgrid.info("platform registered");