From: Christian Heinrich Date: Tue, 19 Jan 2016 21:22:25 +0000 (+0100) Subject: [Lua] Renamed host 'power' to 'speed' for hosts X-Git-Tag: v3_13~1181 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/767d7bdbc801f6ec69833f72c66ae1975dc8c754 [Lua] Renamed host 'power' to 'speed' for hosts --- diff --git a/examples/lua/SimSplay/platform_script.lua b/examples/lua/SimSplay/platform_script.lua index eaf04bec8e..2a275bcf87 100644 --- a/examples/lua/SimSplay/platform_script.lua +++ b/examples/lua/SimSplay/platform_script.lua @@ -8,9 +8,9 @@ require "simgrid" simgrid.AS.new{id="AS0",mode="Full"}; - simgrid.AS.addHost{AS="AS0",id="Tremblay",power=98095000}; - simgrid.AS.addHost{AS="AS0",id="Jupiter",power=76296000}; - simgrid.AS.addHost{AS="AS0",id="Fafard",power=76296000}; + simgrid.AS.addHost{AS="AS0",id="Tremblay",speed=98095000}; + simgrid.AS.addHost{AS="AS0",id="Jupiter",speed=76296000}; + simgrid.AS.addHost{AS="AS0",id="Fafard",speed=76296000}; simgrid.host.setProperty{host="Tremblay",prop_id="ip",prop_value="199.23.98.3"}; simgrid.host.setProperty{host="Tremblay",prop_id="port",prop_value="65"}; diff --git a/examples/lua/console/platform.lua b/examples/lua/console/platform.lua index fdcc89a86f..d1312d301e 100644 --- a/examples/lua/console/platform.lua +++ b/examples/lua/console/platform.lua @@ -8,11 +8,11 @@ simgrid.platf.open(); simgrid.platf.AS_open{id="AS0",mode="Full"}; -simgrid.platf.host_new{id="Tremblay",power=98095000}; -simgrid.platf.host_new{id="Jupiter",power=76296000}; -simgrid.platf.host_new{id="Fafard",power=76296000}; -simgrid.platf.host_new{id="Ginette",power=48492000}; -simgrid.platf.host_new{id="Bourassa",power=48492000}; +simgrid.platf.host_new{id="Tremblay",speed=98095000}; +simgrid.platf.host_new{id="Jupiter",speed=76296000}; +simgrid.platf.host_new{id="Fafard",speed=76296000}; +simgrid.platf.host_new{id="Ginette",speed=48492000}; +simgrid.platf.host_new{id="Bourassa",speed=48492000}; -- create Links for i=10,0,-1 do diff --git a/examples/lua/splaySim/splay_platform.lua b/examples/lua/splaySim/splay_platform.lua index 6707f1caf7..ae8ae33ec2 100644 --- a/examples/lua/splaySim/splay_platform.lua +++ b/examples/lua/splaySim/splay_platform.lua @@ -10,7 +10,7 @@ require "simgrid" -- create 5 Splayd (Hosts) for i=0,5,1 do - simgrid.AS.addHost{AS="AS0",id="Splayd_"..i,power= 7000000+i*1000000} + simgrid.AS.addHost{AS="AS0",id="Splayd_"..i,speed= 7000000+i*1000000} end -- create Links diff --git a/examples/platforms/cluster_prototype.lua b/examples/platforms/cluster_prototype.lua index 99c1f58255..782a897a3e 100644 --- a/examples/platforms/cluster_prototype.lua +++ b/examples/platforms/cluster_prototype.lua @@ -48,7 +48,7 @@ for _,i in pairs(args.radical) do local hostname = args.prefix .. i .. args.suffix local linkname = args.id .."_link_" .. i - simgrid.platf.host_new{id=hostname, power=args.power,core=args.core,power_trace=args.availability_file,state_trace=args.state_file}; + simgrid.platf.host_new{id=hostname, speed=args.power,core=args.core,power_trace=args.availability_file,state_trace=args.state_file}; simgrid.platf.link_new{id=linkname, bandwidth=args.bw,latency=args.lat, sharing_policy=args.sharing_sharing_policy}; simgrid.platf.host_link_new{id=hostname,up=linkname.."_UP",down=linkname.."_DOWN"}; @@ -65,7 +65,7 @@ if hostno % 2 == 0 then return "blabla" end if hostno % 2 == 1 then return "blublub" end end, - power="1Gf", + speed="1Gf", id="AS0", bw="125MBps", lat="50us", diff --git a/examples/platforms/platform.lua b/examples/platforms/platform.lua index a77bb235c5..52490b7e7b 100644 --- a/examples/platforms/platform.lua +++ b/examples/platforms/platform.lua @@ -2,96 +2,96 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/platforms/routing_cluster.lua b/examples/platforms/routing_cluster.lua index f7086b06d3..8ef183f911 100644 --- a/examples/platforms/routing_cluster.lua +++ b/examples/platforms/routing_cluster.lua @@ -7,16 +7,16 @@ simgrid.platf.AS_open{id="AS0",mode="Full"} simgrid.platf.AS_open{id="my_cluster1",mode="Cluster"} simgrid.platf.router_new{id="router1"} - simgrid.platf.host_new{id="host1",power="1Gf"}; + simgrid.platf.host_new{id="host1",speed="1Gf"}; 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.host_new{id="host2",speed="1Gf"}; 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.host_new{id="host3",speed="1Gf"}; simgrid.platf.link_new{id="l3",bandwidth="125MBps",lat="100us"}; simgrid.platf.host_link_new{id="host3",up="l3",down="l3"}; @@ -26,16 +26,16 @@ simgrid.platf.AS_open{id="AS0",mode="Full"} 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.host_new{id="host4",speed="1Gf"}; 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.host_new{id="host5",speed="1Gf"}; 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.host_new{id="host6",speed="1Gf"}; simgrid.platf.link_new{id="l6",bandwidth="125MBps",lat="100us"}; simgrid.platf.host_link_new{id="host6",up="l6",down="l6"}; diff --git a/examples/platforms/small_platform.lua b/examples/platforms/small_platform.lua index ef22c73b8e..9696c2434a 100644 --- a/examples/platforms/small_platform.lua +++ b/examples/platforms/small_platform.lua @@ -12,11 +12,11 @@ simgrid.platf.open(); simgrid.platf.AS_open{id="AS0",mode="Full"}; - simgrid.platf.host_new{AS="AS0",id="Tremblay",power=98095000}; - simgrid.platf.host_new{AS="AS0",id="Jupiter",power=76296000}; - simgrid.platf.host_new{AS="AS0",id="Fafard",power=76296000}; - simgrid.platf.host_new{AS="AS0",id="Ginette",power=48492000}; - simgrid.platf.host_new{AS="AS0",id="Bourassa",power=48492000}; + simgrid.platf.host_new{AS="AS0",id="Tremblay",speed=98095000}; + simgrid.platf.host_new{AS="AS0",id="Jupiter",speed=76296000}; + simgrid.platf.host_new{AS="AS0",id="Fafard",speed=76296000}; + simgrid.platf.host_new{AS="AS0",id="Ginette",speed=48492000}; + simgrid.platf.host_new{AS="AS0",id="Bourassa",speed=48492000}; -- create Links simgrid.platf.link_new{AS="AS0",id=0,bandwidth=41279125,lat=0.000059904}; diff --git a/examples/simdag/platform_script.lua b/examples/simdag/platform_script.lua index 8aaea8942e..4d159d43a3 100644 --- a/examples/simdag/platform_script.lua +++ b/examples/simdag/platform_script.lua @@ -8,11 +8,11 @@ require "simgrid" simgrid.AS.new{id="AS0",mode="Full"}; - simgrid.host.new{id="Tremblay",power=98095000}; - simgrid.host.new{id="Jupiter",power=76296000}; - simgrid.host.new{id="Fafard",power=76296000}; - simgrid.host.new{id="Ginette",power=48492000}; - simgrid.host.new{id="Bourassa",power=48492000}; + simgrid.host.new{id="Tremblay",speed=98095000}; + simgrid.host.new{id="Jupiter",speed=76296000}; + simgrid.host.new{id="Fafard",speed=76296000}; + simgrid.host.new{id="Ginette",speed=48492000}; + simgrid.host.new{id="Bourassa",speed=48492000}; -- create Links for i=0,11 do diff --git a/src/bindings/lua/lua_platf.c b/src/bindings/lua/lua_platf.c index d953dfc228..221e59708f 100644 --- a/src/bindings/lua/lua_platf.c +++ b/src/bindings/lua/lua_platf.c @@ -177,10 +177,10 @@ int console_add_host(lua_State *L) { lua_pop(L, 1); // get power value - lua_pushstring(L, "power"); + lua_pushstring(L, "speed"); type = lua_gettable(L, -2); if (type != LUA_TSTRING && type != LUA_TNUMBER) { - XBT_ERROR("Attribute 'power' must be specified for host and must either be a string (in the correct format; check documentation) or a number."); + XBT_ERROR("Attribute 'speed' must be specified for host and must either be a string (in the correct format; check documentation) or a number."); } host.speed_peak = xbt_dynar_new(sizeof(double), NULL); xbt_dynar_push_as(host.speed_peak, double, get_cpu_speed(lua_tostring(L, -1)));