Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[Lua] Renamed host 'power' to 'speed' for hosts
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Tue, 19 Jan 2016 21:22:25 +0000 (22:22 +0100)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 20 Jan 2016 18:35:58 +0000 (19:35 +0100)
examples/lua/SimSplay/platform_script.lua
examples/lua/console/platform.lua
examples/lua/splaySim/splay_platform.lua
examples/platforms/cluster_prototype.lua
examples/platforms/platform.lua
examples/platforms/routing_cluster.lua
examples/platforms/small_platform.lua
examples/simdag/platform_script.lua
src/bindings/lua/lua_platf.c

index eaf04be..2a275bc 100644 (file)
@@ -8,9 +8,9 @@ require "simgrid"
 
   simgrid.AS.new{id="AS0",mode="Full"}; 
 
 
   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"};
 
   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"};
index fdcc89a..d1312d3 100644 (file)
@@ -8,11 +8,11 @@ simgrid.platf.open();
 
 simgrid.platf.AS_open{id="AS0",mode="Full"};
 
 
 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
 
 -- create Links
 for i=10,0,-1 do
index 6707f1c..ae8ae33 100644 (file)
@@ -10,7 +10,7 @@ require "simgrid"
 
   -- create 5 Splayd (Hosts)
   for i=0,5,1 do
 
   -- 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
   end
 
     -- create Links
index 99c1f58..782a897 100644 (file)
@@ -48,7 +48,7 @@
         for _,i in pairs(args.radical) do
             local hostname = args.prefix .. i .. args.suffix
             local linkname = args.id .."_link_" .. i
         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"};
 
             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,
       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",
     id="AS0",
     bw="125MBps",
     lat="50us",
index a77bb23..52490b7 100644 (file)
@@ -2,96 +2,96 @@
  <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
  <platform version="3">
  <AS  id="AS0"  routing="Full">
  <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
  <platform version="3">
  <AS  id="AS0"  routing="Full">
-   <host id="Jacquelin" power="137.333Mf"/>
-   <host id="Boivin" power="98.095Mf"/>
-   <host id="Jean_Yves" power="98.095Mf"/>
-   <host id="TeX" power="68.667Mf"/>
-   <host id="Geoff" power="42.917Mf"/>
-   <host id="Disney" power="114.444Mf"/>
-   <host id="iRMX" power="68.667Mf"/>
-   <host id="McGee" power="42.917Mf"/>
-   <host id="Gatien" power="114.444Mf"/>
-   <host id="Laroche" power="98.095Mf"/>
-   <host id="Tanguay" power="68.667Mf"/>
-   <host id="Morin" power="85.833Mf"/>
-   <host id="Ethernet" power="98.095Mf"/>
-   <host id="Bellemarre" power="34.333Mf"/>
-   <host id="Kuenning" power="85.833Mf"/>
-   <host id="Gaston" power="98.095Mf"/>
-   <host id="Harry" power="42.917Mf"/>
-   <host id="Bousquet" power="42.917Mf"/>
-   <host id="Paul" power="76.296Mf"/>
-   <host id="St_Jean" power="76.296Mf"/>
-   <host id="Jill" power="114.444Mf"/>
-   <host id="Marcel" power="171.667Mf"/>
-   <host id="Wright" power="48.492Mf"/>
-   <host id="Jackson" power="48.492Mf"/>
-   <host id="Fernand" power="22.151Mf"/>
-   <host id="Soucy" power="137.333Mf"/>
-   <host id="Ste_Julie" power="85.833Mf"/>
-   <host id="Victoria" power="85.833Mf"/>
-   <host id="Lessard" power="85.833Mf"/>
-   <host id="Florient" power="114.444Mf"/>
-   <host id="Marcoux" power="98.095Mf"/>
-   <host id="Gavrel" power="85.833Mf"/>
-   <host id="Bescherelle" power="137.333Mf"/>
-   <host id="Pierre" power="114.444Mf"/>
-   <host id="Jamie" power="76.296Mf"/>
-   <host id="Rubin" power="42.917Mf"/>
-   <host id="Olivier" power="114.444Mf"/>
-   <host id="Boucherville" power="48.492Mf"/>
-   <host id="Pointe_Claire" power="48.492Mf"/>
-   <host id="Kansas" power="137.333Mf"/>
-   <host id="King" power="114.444Mf"/>
-   <host id="Lapointe" power="68.667Mf"/>
-   <host id="Julian" power="114.444Mf"/>
-   <host id="Lafontaine" power="68.667Mf"/>
-   <host id="Gordon" power="76.296Mf"/>
-   <host id="Drouin" power="42.917Mf"/>
-   <host id="Robert" power="137.333Mf"/>
-   <host id="Jocelyne" power="34.333Mf"/>
-   <host id="Stephen" power="68.667Mf"/>
-   <host id="Provost" power="137.333Mf"/>
-   <host id="Juneau" power="22.151Mf"/>
-   <host id="Casavant" power="48.492Mf"/>
-   <host id="St_Antoine" power="34.333Mf"/>
-   <host id="Louis" power="98.095Mf"/>
-   <host id="Julien" power="22.151Mf"/>
-   <host id="St_Paul" power="114.444Mf"/>
-   <host id="Mathematica" power="137.333Mf"/>
-   <host id="LaTeX" power="85.833Mf"/>
-   <host id="Sirois" power="114.444Mf"/>
-   <host id="Monique" power="114.444Mf"/>
-   <host id="Audy" power="34.333Mf"/>
-   <host id="Bourassa" power="85.833Mf"/>
-   <host id="OHara" power="42.917Mf"/>
-   <host id="Boston" power="42.917Mf"/>
-   <host id="Papineau" power="85.833Mf"/>
-   <host id="Fraser" power="98.095Mf"/>
-   <host id="Browne" power="137.333Mf"/>
-   <host id="SunOS" power="34.333Mf"/>
-   <host id="Varennes" power="68.667Mf"/>
-   <host id="Jacques" power="98.095Mf"/>
-   <host id="Thierry" power="137.333Mf"/>
-   <host id="Lachapelle" power="42.917Mf"/>
-   <host id="kV" power="68.667Mf"/>
-   <host id="Yolande" power="42.917Mf"/>
-   <host id="Pronovost" power="114.444Mf"/>
-   <host id="SPICE" power="68.667Mf"/>
-   <host id="Europe" power="48.492Mf"/>
-   <host id="Roy" power="34.333Mf"/>
-   <host id="Amadeus" power="114.444Mf"/>
-   <host id="Intel" power="137.333Mf"/>
-   <host id="Cambridge" power="114.444Mf"/>
-   <host id="Tremblay" power="171.667Mf"/>
-   <host id="UNIX" power="76.296Mf"/>
-   <host id="Domey" power="76.296Mf"/>
-   <host id="St_Bruno" power="42.917Mf"/>
-   <host id="Jean_Claude" power="85.833Mf"/>
-   <host id="Doyon" power="68.667Mf"/>
-   <host id="Fafard" power="137.333Mf"/>
-   <host id="Croteau" power="42.917Mf"/>
-   <host id="Dodge" power="114.444Mf"/>
+   <host id="Jacquelin" speed="137.333Mf"/>
+   <host id="Boivin" speed="98.095Mf"/>
+   <host id="Jean_Yves" speed="98.095Mf"/>
+   <host id="TeX" speed="68.667Mf"/>
+   <host id="Geoff" speed="42.917Mf"/>
+   <host id="Disney" speed="114.444Mf"/>
+   <host id="iRMX" speed="68.667Mf"/>
+   <host id="McGee" speed="42.917Mf"/>
+   <host id="Gatien" speed="114.444Mf"/>
+   <host id="Laroche" speed="98.095Mf"/>
+   <host id="Tanguay" speed="68.667Mf"/>
+   <host id="Morin" speed="85.833Mf"/>
+   <host id="Ethernet" speed="98.095Mf"/>
+   <host id="Bellemarre" speed="34.333Mf"/>
+   <host id="Kuenning" speed="85.833Mf"/>
+   <host id="Gaston" speed="98.095Mf"/>
+   <host id="Harry" speed="42.917Mf"/>
+   <host id="Bousquet" speed="42.917Mf"/>
+   <host id="Paul" speed="76.296Mf"/>
+   <host id="St_Jean" speed="76.296Mf"/>
+   <host id="Jill" speed="114.444Mf"/>
+   <host id="Marcel" speed="171.667Mf"/>
+   <host id="Wright" speed="48.492Mf"/>
+   <host id="Jackson" speed="48.492Mf"/>
+   <host id="Fernand" speed="22.151Mf"/>
+   <host id="Soucy" speed="137.333Mf"/>
+   <host id="Ste_Julie" speed="85.833Mf"/>
+   <host id="Victoria" speed="85.833Mf"/>
+   <host id="Lessard" speed="85.833Mf"/>
+   <host id="Florient" speed="114.444Mf"/>
+   <host id="Marcoux" speed="98.095Mf"/>
+   <host id="Gavrel" speed="85.833Mf"/>
+   <host id="Bescherelle" speed="137.333Mf"/>
+   <host id="Pierre" speed="114.444Mf"/>
+   <host id="Jamie" speed="76.296Mf"/>
+   <host id="Rubin" speed="42.917Mf"/>
+   <host id="Olivier" speed="114.444Mf"/>
+   <host id="Boucherville" speed="48.492Mf"/>
+   <host id="Pointe_Claire" speed="48.492Mf"/>
+   <host id="Kansas" speed="137.333Mf"/>
+   <host id="King" speed="114.444Mf"/>
+   <host id="Lapointe" speed="68.667Mf"/>
+   <host id="Julian" speed="114.444Mf"/>
+   <host id="Lafontaine" speed="68.667Mf"/>
+   <host id="Gordon" speed="76.296Mf"/>
+   <host id="Drouin" speed="42.917Mf"/>
+   <host id="Robert" speed="137.333Mf"/>
+   <host id="Jocelyne" speed="34.333Mf"/>
+   <host id="Stephen" speed="68.667Mf"/>
+   <host id="Provost" speed="137.333Mf"/>
+   <host id="Juneau" speed="22.151Mf"/>
+   <host id="Casavant" speed="48.492Mf"/>
+   <host id="St_Antoine" speed="34.333Mf"/>
+   <host id="Louis" speed="98.095Mf"/>
+   <host id="Julien" speed="22.151Mf"/>
+   <host id="St_Paul" speed="114.444Mf"/>
+   <host id="Mathematica" speed="137.333Mf"/>
+   <host id="LaTeX" speed="85.833Mf"/>
+   <host id="Sirois" speed="114.444Mf"/>
+   <host id="Monique" speed="114.444Mf"/>
+   <host id="Audy" speed="34.333Mf"/>
+   <host id="Bourassa" speed="85.833Mf"/>
+   <host id="OHara" speed="42.917Mf"/>
+   <host id="Boston" speed="42.917Mf"/>
+   <host id="Papineau" speed="85.833Mf"/>
+   <host id="Fraser" speed="98.095Mf"/>
+   <host id="Browne" speed="137.333Mf"/>
+   <host id="SunOS" speed="34.333Mf"/>
+   <host id="Varennes" speed="68.667Mf"/>
+   <host id="Jacques" speed="98.095Mf"/>
+   <host id="Thierry" speed="137.333Mf"/>
+   <host id="Lachapelle" speed="42.917Mf"/>
+   <host id="kV" speed="68.667Mf"/>
+   <host id="Yolande" speed="42.917Mf"/>
+   <host id="Pronovost" speed="114.444Mf"/>
+   <host id="SPICE" speed="68.667Mf"/>
+   <host id="Europe" speed="48.492Mf"/>
+   <host id="Roy" speed="34.333Mf"/>
+   <host id="Amadeus" speed="114.444Mf"/>
+   <host id="Intel" speed="137.333Mf"/>
+   <host id="Cambridge" speed="114.444Mf"/>
+   <host id="Tremblay" speed="171.667Mf"/>
+   <host id="UNIX" speed="76.296Mf"/>
+   <host id="Domey" speed="76.296Mf"/>
+   <host id="St_Bruno" speed="42.917Mf"/>
+   <host id="Jean_Claude" speed="85.833Mf"/>
+   <host id="Doyon" speed="68.667Mf"/>
+   <host id="Fafard" speed="137.333Mf"/>
+   <host id="Croteau" speed="42.917Mf"/>
+   <host id="Dodge" speed="114.444Mf"/>
    <link id="127" bandwidth="3.430125MBps" lat="536.941us"/>
    <link id="32" bandwidth="11.618875MBps" lat="189.98us"/>
    <link id="90" bandwidth="10.314625MBps" lat="6.932556ms"/>
    <link id="127" bandwidth="3.430125MBps" lat="536.941us"/>
    <link id="32" bandwidth="11.618875MBps" lat="189.98us"/>
    <link id="90" bandwidth="10.314625MBps" lat="6.932556ms"/>
index f7086b0..8ef183f 100644 (file)
@@ -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.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.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.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"};
 
     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.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.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.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"};
 
     simgrid.platf.link_new{id="l6",bandwidth="125MBps",lat="100us"};
     simgrid.platf.host_link_new{id="host6",up="l6",down="l6"};
 
index ef22c73..9696c24 100644 (file)
   simgrid.platf.open();
   simgrid.platf.AS_open{id="AS0",mode="Full"};
 
   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};
 
   -- create Links
   simgrid.platf.link_new{AS="AS0",id=0,bandwidth=41279125,lat=0.000059904};
index 8aaea89..4d159d4 100644 (file)
@@ -8,11 +8,11 @@ require "simgrid"
 
   simgrid.AS.new{id="AS0",mode="Full"};
 
 
   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
 
     -- create Links
   for i=0,11 do
index d953dfc..221e597 100644 (file)
@@ -177,10 +177,10 @@ int console_add_host(lua_State *L) {
   lua_pop(L, 1);
 
   // get power value
   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) {
   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)));
   }
   host.speed_peak = xbt_dynar_new(sizeof(double), NULL);
   xbt_dynar_push_as(host.speed_peak, double, get_cpu_speed(lua_tostring(L, -1)));