From: Christian Heinrich Date: Mon, 13 Apr 2015 12:22:17 +0000 (+0200) Subject: Lua: Changed latency attribute to lat and others. X-Git-Tag: v3_13~1644^2~33 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/aeec134fb5bb089e9df3b6b51fe5b84ea9dab198 Lua: Changed latency attribute to lat and others. - For instance, state_trace is now called state_file, latency_trace = latency_file etc. --- diff --git a/examples/lua/console/platform.lua b/examples/lua/console/platform.lua index be57b8e0ff..fdcc89a86f 100644 --- a/examples/lua/console/platform.lua +++ b/examples/lua/console/platform.lua @@ -16,7 +16,7 @@ simgrid.platf.host_new{id="Bourassa",power=48492000}; -- create Links for i=10,0,-1 do - simgrid.platf.link_new{id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087}; + simgrid.platf.link_new{id=i,bandwidth=252750+ i*768,lat=0.000270544+i*0.087}; end simgrid.platf.route_new{src="Tremblay",dest="Jupiter",links="1"}; diff --git a/examples/platforms/platform.lua b/examples/platforms/platform.lua index 84db0e240f..a77bb235c5 100644 --- a/examples/platforms/platform.lua +++ b/examples/platforms/platform.lua @@ -92,198 +92,198 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/platforms/routing_cluster.lua b/examples/platforms/routing_cluster.lua index 2b2826f32b..f7086b06d3 100644 --- a/examples/platforms/routing_cluster.lua +++ b/examples/platforms/routing_cluster.lua @@ -8,41 +8,41 @@ simgrid.platf.AS_open{id="AS0",mode="Full"} simgrid.platf.router_new{id="router1"} simgrid.platf.host_new{id="host1",power="1Gf"}; - simgrid.platf.link_new{id="l1_UP",bandwidth="125MBps",latency="100us"}; - simgrid.platf.link_new{id="l1_DOWN",bandwidth="125MBps",latency="100us"}; + simgrid.platf.link_new{id="l1_UP",bandwidth="125MBps",lat="100us"}; + simgrid.platf.link_new{id="l1_DOWN",bandwidth="125MBps",lat="100us"}; simgrid.platf.host_link_new{id="host1",up="l1_UP",down="l1_DOWN"}; simgrid.platf.host_new{id="host2",power="1Gf"}; - simgrid.platf.link_new{id="l2",bandwidth="125MBps",latency="100us",sharing_policy="FULLDUPLEX"}; + simgrid.platf.link_new{id="l2",bandwidth="125MBps",lat="100us",sharing_policy="FULLDUPLEX"}; simgrid.platf.host_link_new{id="host2",up="l2_UP",down="l2_DOWN"}; simgrid.platf.host_new{id="host3",power="1Gf"}; - simgrid.platf.link_new{id="l3",bandwidth="125MBps",latency="100us"}; + simgrid.platf.link_new{id="l3",bandwidth="125MBps",lat="100us"}; simgrid.platf.host_link_new{id="host3",up="l3",down="l3"}; - simgrid.platf.backbone_new{id="backbone1",bandwidth="2.25GBps",latency="500us"}; + simgrid.platf.backbone_new{id="backbone1",bandwidth="2.25GBps",lat="500us"}; simgrid.platf.AS_close() simgrid.platf.AS_open{id="my_cluster2",mode="Cluster"} simgrid.platf.router_new{id="router2"} simgrid.platf.host_new{id="host4",power="1Gf"}; - simgrid.platf.link_new{id="l4_UP",bandwidth="125MBps",latency="100us"}; - simgrid.platf.link_new{id="l4_DOWN",bandwidth="125MBps",latency="100us"}; + simgrid.platf.link_new{id="l4_UP",bandwidth="125MBps",lat="100us"}; + simgrid.platf.link_new{id="l4_DOWN",bandwidth="125MBps",lat="100us"}; simgrid.platf.host_link_new{id="host4",up="l4_UP",down="l4_DOWN"}; simgrid.platf.host_new{id="host5",power="1Gf"}; - simgrid.platf.link_new{id="l5",bandwidth="125MBps",latency="100us",sharing_policy="FULLDUPLEX"}; + simgrid.platf.link_new{id="l5",bandwidth="125MBps",lat="100us",sharing_policy="FULLDUPLEX"}; simgrid.platf.host_link_new{id="host5",up="l5_UP",down="l5_DOWN"}; simgrid.platf.host_new{id="host6",power="1Gf"}; - simgrid.platf.link_new{id="l6",bandwidth="125MBps",latency="100us"}; + simgrid.platf.link_new{id="l6",bandwidth="125MBps",lat="100us"}; simgrid.platf.host_link_new{id="host6",up="l6",down="l6"}; - simgrid.platf.backbone_new{id="backbone2",bandwidth="2.25GBps",latency="500us"} + simgrid.platf.backbone_new{id="backbone2",bandwidth="2.25GBps",lat="500us"} simgrid.platf.AS_close() - simgrid.platf.link_new{id="link1-2",bandwidth="2.25GBps",latency="500us"}; + simgrid.platf.link_new{id="link1-2",bandwidth="2.25GBps",lat="500us"}; simgrid.platf.ASroute_new{src="my_cluster1", dst="my_cluster2", gw_src="router1", gw_dst="router2", links="link1-2",symmetrical="YES"} diff --git a/examples/platforms/small_platform.lua b/examples/platforms/small_platform.lua index d38facf5ee..ef22c73b8e 100644 --- a/examples/platforms/small_platform.lua +++ b/examples/platforms/small_platform.lua @@ -19,17 +19,17 @@ simgrid.platf.host_new{AS="AS0",id="Bourassa",power=48492000}; -- create Links - simgrid.platf.link_new{AS="AS0",id=0,bandwidth=41279125,latency=0.000059904}; - simgrid.platf.link_new{AS="AS0",id=1,bandwidth=34285625,latency=0.000514433}; - simgrid.platf.link_new{AS="AS0",id=2,bandwidth=118682500,latency=0.000136931}; - simgrid.platf.link_new{AS="AS0",id=3,bandwidth=34285625,latency=0.000514433}; - simgrid.platf.link_new{AS="AS0",id=4,bandwidth=10099625,latency=0.00047978}; - simgrid.platf.link_new{AS="AS0",id=5,bandwidth=27946250,latency=0.000278066}; - simgrid.platf.link_new{AS="AS0",id=6,bandwidth=41279125,latency=0.000059904}; - simgrid.platf.link_new{AS="AS0",id=7,bandwidth=11618875,latency=0.00018998}; - simgrid.platf.link_new{AS="AS0",id=8,bandwidth=8158000,latency=0.000270544}; - 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,sharing_policy="FATPIPE"}; + simgrid.platf.link_new{AS="AS0",id=0,bandwidth=41279125,lat=0.000059904}; + simgrid.platf.link_new{AS="AS0",id=1,bandwidth=34285625,lat=0.000514433}; + simgrid.platf.link_new{AS="AS0",id=2,bandwidth=118682500,lat=0.000136931}; + simgrid.platf.link_new{AS="AS0",id=3,bandwidth=34285625,lat=0.000514433}; + simgrid.platf.link_new{AS="AS0",id=4,bandwidth=10099625,lat=0.00047978}; + simgrid.platf.link_new{AS="AS0",id=5,bandwidth=27946250,lat=0.000278066}; + simgrid.platf.link_new{AS="AS0",id=6,bandwidth=41279125,lat=0.000059904}; + simgrid.platf.link_new{AS="AS0",id=7,bandwidth=11618875,lat=0.00018998}; + simgrid.platf.link_new{AS="AS0",id=8,bandwidth=8158000,lat=0.000270544}; + simgrid.platf.link_new{AS="AS0",id=9,bandwidth=7209750,lat=0.001461517}; + simgrid.platf.link_new{AS="AS0",id="loopback",bandwidth=498000000,lat=0.000015,sharing_policy="FATPIPE"}; -- Register loopback links for i=1,5,1 do diff --git a/examples/simdag/platform_script.lua b/examples/simdag/platform_script.lua index f72f9b3231..8aaea8942e 100644 --- a/examples/simdag/platform_script.lua +++ b/examples/simdag/platform_script.lua @@ -16,7 +16,7 @@ require "simgrid" -- create Links for i=0,11 do - simgrid.link.new{id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087}; + simgrid.link.new{id=i,bandwidth=252750+ i*768,lat=0.000270544+i*0.087}; end -- simgrid.route.new(src_id,des_id,links_nb,links_list) simgrid.route.new("Tremblay","Jupiter",{"1"}); diff --git a/src/bindings/lua/lua_platf.c b/src/bindings/lua/lua_platf.c index f286729937..9e71141239 100644 --- a/src/bindings/lua/lua_platf.c +++ b/src/bindings/lua/lua_platf.c @@ -92,7 +92,7 @@ int console_add_backbone(lua_State *L) { link.bandwidth = surf_parse_get_bandwidth(lua_tostring(L, -1)); lua_pop(L, 1); - lua_pushstring(L, "latency"); + lua_pushstring(L, "lat"); lua_gettable(L, -2); link.latency = surf_parse_get_time(lua_tostring(L, -1)); lua_pop(L, 1); @@ -183,20 +183,20 @@ int console_add_host(lua_State *L) { lua_pop(L, 1); //get power_scale - lua_pushstring(L, "power_scale"); + lua_pushstring(L, "availability"); lua_gettable(L, -2); if(!lua_isnumber(L,-1)) host.power_scale = 1;// Default value else host.power_scale = lua_tonumber(L, -1); lua_pop(L, 1); //get power_trace - lua_pushstring(L, "power_trace"); + lua_pushstring(L, "availability_file"); lua_gettable(L, -2); host.power_trace = tmgr_trace_new_from_file(lua_tostring(L, -1)); lua_pop(L, 1); //get state initial - lua_pushstring(L, "state_initial"); + lua_pushstring(L, "state"); lua_gettable(L, -2); if(!lua_isnumber(L,-1)) state = 1;// Default value else state = lua_tonumber(L, -1); @@ -208,7 +208,7 @@ int console_add_host(lua_State *L) { host.initial_state = SURF_RESOURCE_OFF; //get trace state - lua_pushstring(L, "state_trace"); + lua_pushstring(L, "state_file"); lua_gettable(L, -2); host.state_trace = tmgr_trace_new_from_file(lua_tostring(L, -1)); lua_pop(L, 1); @@ -242,7 +242,7 @@ int console_add_link(lua_State *L) { lua_pop(L, 1); //get latency value - lua_pushstring(L, "latency"); + lua_pushstring(L, "lat"); lua_gettable(L, -2); link.latency = surf_parse_get_time(lua_tostring(L, -1)); lua_pop(L, 1); @@ -250,25 +250,25 @@ int console_add_link(lua_State *L) { /*Optional Arguments */ //get bandwidth_trace value - lua_pushstring(L, "bandwidth_trace"); + lua_pushstring(L, "bandwidth_file"); lua_gettable(L, -2); link.bandwidth_trace = tmgr_trace_new_from_file(lua_tostring(L, -1)); lua_pop(L, 1); //get latency_trace value - lua_pushstring(L, "latency_trace"); + lua_pushstring(L, "latency_file"); lua_gettable(L, -2); link.latency_trace = tmgr_trace_new_from_file(lua_tostring(L, -1)); lua_pop(L, 1); //get state_trace value - lua_pushstring(L, "state_trace"); + lua_pushstring(L, "state_file"); lua_gettable(L, -2); link.state_trace = tmgr_trace_new_from_file(lua_tostring(L, -1)); lua_pop(L, 1); //get state_initial value - lua_pushstring(L, "state_initial"); + lua_pushstring(L, "state"); lua_gettable(L, -2); if (!lua_isnumber(L,-1) || lua_tonumber(L, -1)) link.state = SURF_RESOURCE_ON;