From 3b40ca80fe6291385e8e5e16afbfb5c67b31b79f Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 28 Mar 2016 21:13:12 +0200 Subject: [PATCH] lua: rename the platf module to 'engine' to align on s4u --- examples/platforms/cluster_prototype.lua | 18 +++---- examples/platforms/routing_cluster.lua | 68 ++++++++++++------------ examples/platforms/small_platform.lua | 62 ++++++++++----------- src/bindings/lua/lua_platf.cpp | 2 +- 4 files changed, 75 insertions(+), 75 deletions(-) diff --git a/examples/platforms/cluster_prototype.lua b/examples/platforms/cluster_prototype.lua index 19c45e0e45..51f4dc48a6 100644 --- a/examples/platforms/cluster_prototype.lua +++ b/examples/platforms/cluster_prototype.lua @@ -31,27 +31,27 @@ -- Check the mode = Cluster here return function() - simgrid.platf.AS_open{id=args.id,mode=args.topology}; + simgrid.engine.AS_open{id=args.id,mode=args.topology}; if args.bb_bw ~= nil and args.bb_lat ~= nil then - simgrid.platf.backbone_new{id=args.id .. "-bb",bandwidth=args.bb_bw,latency=args.bb_lat,sharing_policy=args.bb_sharing_sharing_policy} + simgrid.engine.backbone_new{id=args.id .. "-bb",bandwidth=args.bb_bw,latency=args.bb_lat,sharing_policy=args.bb_sharing_sharing_policy} end 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, speed=args.speed,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.engine.host_new{id=hostname, speed=args.speed,core=args.core,power_trace=args.availability_file,state_trace=args.state_file}; + simgrid.engine.link_new{id=linkname, bandwidth=args.bw,latency=args.lat, sharing_policy=args.sharing_sharing_policy}; + simgrid.engine.host_link_new{id=hostname,up=linkname.."_UP",down=linkname.."_DOWN"}; if args.loopback_bw ~= nil and args.loopback_lat ~= nil then - simgrid.platf.link_new{id=linkname .. "_loopback",bandwidth=args.loopback_bw,latency=args.loopback_lat,sharing_policy="FATPIPE"} + simgrid.engine.link_new{id=linkname .. "_loopback",bandwidth=args.loopback_bw,latency=args.loopback_lat,sharing_policy="FATPIPE"} end end - simgrid.platf.AS_seal() + simgrid.engine.AS_seal() end end - simgrid.platf.open(); + simgrid.engine.open(); cluster_factory = my_cluster{prefix="node-", suffix=".acme.org", radical=seq(0,262144), host_factory = function(hostno) if hostno % 2 == 0 then return "blabla" end if hostno % 2 == 1 then return "blublub" end @@ -64,4 +64,4 @@ }() --my_cluster{prefix="node2-", suffix=".acme.org", radical=seq(0,44) } - simgrid.platf.close(); + simgrid.engine.close(); diff --git a/examples/platforms/routing_cluster.lua b/examples/platforms/routing_cluster.lua index b70de8d65d..954d4ec79c 100644 --- a/examples/platforms/routing_cluster.lua +++ b/examples/platforms/routing_cluster.lua @@ -2,50 +2,50 @@ -- require "simgrid" -simgrid.platf.open() -simgrid.platf.AS_open{id="AS0",mode="Full"} - simgrid.platf.AS_open{id="my_cluster1",mode="Cluster"} - simgrid.platf.router_new{id="router1"} +simgrid.engine.open() +simgrid.engine.AS_open{id="AS0",mode="Full"} + simgrid.engine.AS_open{id="my_cluster1",mode="Cluster"} + simgrid.engine.router_new{id="router1"} - 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.engine.host_new{id="host1",speed="1Gf"}; + simgrid.engine.link_new{id="l1_UP",bandwidth="125MBps",lat="100us"}; + simgrid.engine.link_new{id="l1_DOWN",bandwidth="125MBps",lat="100us"}; + simgrid.engine.host_link_new{id="host1",up="l1_UP",down="l1_DOWN"}; - 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.engine.host_new{id="host2",speed="1Gf"}; + simgrid.engine.link_new{id="l2",bandwidth="125MBps",lat="100us",sharing_policy="FULLDUPLEX"}; + simgrid.engine.host_link_new{id="host2",up="l2_UP",down="l2_DOWN"}; - 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.engine.host_new{id="host3",speed="1Gf"}; + simgrid.engine.link_new{id="l3",bandwidth="125MBps",lat="100us"}; + simgrid.engine.host_link_new{id="host3",up="l3",down="l3"}; - simgrid.platf.backbone_new{id="backbone1",bandwidth="2.25GBps",lat="500us"}; + simgrid.engine.backbone_new{id="backbone1",bandwidth="2.25GBps",lat="500us"}; - simgrid.platf.AS_seal() - simgrid.platf.AS_open{id="my_cluster2",mode="Cluster"} - simgrid.platf.router_new{id="router2"} + simgrid.engine.AS_seal() + simgrid.engine.AS_open{id="my_cluster2",mode="Cluster"} + simgrid.engine.router_new{id="router2"} - 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.engine.host_new{id="host4",speed="1Gf"}; + simgrid.engine.link_new{id="l4_UP",bandwidth="125MBps",lat="100us"}; + simgrid.engine.link_new{id="l4_DOWN",bandwidth="125MBps",lat="100us"}; + simgrid.engine.host_link_new{id="host4",up="l4_UP",down="l4_DOWN"}; - 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.engine.host_new{id="host5",speed="1Gf"}; + simgrid.engine.link_new{id="l5",bandwidth="125MBps",lat="100us",sharing_policy="FULLDUPLEX"}; + simgrid.engine.host_link_new{id="host5",up="l5_UP",down="l5_DOWN"}; - 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.engine.host_new{id="host6",speed="1Gf"}; + simgrid.engine.link_new{id="l6",bandwidth="125MBps",lat="100us"}; + simgrid.engine.host_link_new{id="host6",up="l6",down="l6"}; - simgrid.platf.backbone_new{id="backbone2",bandwidth="2.25GBps",lat="500us"} + simgrid.engine.backbone_new{id="backbone2",bandwidth="2.25GBps",lat="500us"} - simgrid.platf.AS_seal() - simgrid.platf.link_new{id="link1-2",bandwidth="2.25GBps",lat="500us"}; + simgrid.engine.AS_seal() + simgrid.engine.link_new{id="link1-2",bandwidth="2.25GBps",lat="500us"}; - simgrid.platf.ASroute_new{src="my_cluster1", dst="my_cluster2", + simgrid.engine.ASroute_new{src="my_cluster1", dst="my_cluster2", gw_src="router1", gw_dst="router2", links="link1-2"} -simgrid.platf.AS_seal() -simgrid.platf.close() +simgrid.engine.AS_seal() +simgrid.engine.close() diff --git a/examples/platforms/small_platform.lua b/examples/platforms/small_platform.lua index aa88cc313b..615e58d92d 100644 --- a/examples/platforms/small_platform.lua +++ b/examples/platforms/small_platform.lua @@ -9,48 +9,48 @@ -- 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.engine.open(); + simgrid.engine.AS_open{id="AS0",mode="Full"}; - 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}; + simgrid.engine.host_new{AS="AS0",id="Tremblay",speed=98095000}; + simgrid.engine.host_new{AS="AS0",id="Jupiter",speed=76296000}; + simgrid.engine.host_new{AS="AS0",id="Fafard",speed=76296000}; + simgrid.engine.host_new{AS="AS0",id="Ginette",speed=48492000}; + simgrid.engine.host_new{AS="AS0",id="Bourassa",speed=48492000}; -- create Links - 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"}; + simgrid.engine.link_new{AS="AS0",id=0,bandwidth=41279125,lat=0.000059904}; + simgrid.engine.link_new{AS="AS0",id=1,bandwidth=34285625,lat=0.000514433}; + simgrid.engine.link_new{AS="AS0",id=2,bandwidth=118682500,lat=0.000136931}; + simgrid.engine.link_new{AS="AS0",id=3,bandwidth=34285625,lat=0.000514433}; + simgrid.engine.link_new{AS="AS0",id=4,bandwidth=10099625,lat=0.00047978}; + simgrid.engine.link_new{AS="AS0",id=5,bandwidth=27946250,lat=0.000278066}; + simgrid.engine.link_new{AS="AS0",id=6,bandwidth=41279125,lat=0.000059904}; + simgrid.engine.link_new{AS="AS0",id=7,bandwidth=11618875,lat=0.00018998}; + simgrid.engine.link_new{AS="AS0",id=8,bandwidth=8158000,lat=0.000270544}; + simgrid.engine.link_new{AS="AS0",id=9,bandwidth=7209750,lat=0.001461517}; + simgrid.engine.link_new{AS="AS0",id="loopback",bandwidth=498000000,lat=0.000015,sharing_policy="FATPIPE"}; -- Register loopback links for i=1,5,1 do local hostname = simgrid.host.name(simgrid.host.at(i)) - simgrid.platf.route_new{AS="AS0",src=hostname,dest=hostname,links="loopback"} + simgrid.engine.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="Fafard",links="4,3,2,0,1,8"}; - 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.engine.route_new{AS="AS0",src="Tremblay",dest="Jupiter",links="9"}; + simgrid.engine.route_new{AS="AS0",src="Tremblay",dest="Fafard",links="4,3,2,0,1,8"}; + simgrid.engine.route_new{AS="AS0",src="Tremblay",dest="Ginette",links="4,3,5"}; + simgrid.engine.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="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.engine.route_new{AS="AS0",src="Jupiter",dest="Fafard",links="9,4,3,2,0,1,8"}; + simgrid.engine.route_new{AS="AS0",src="Jupiter",dest="Ginette",links="9,4,3,5"}; + simgrid.engine.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="Ginette",links="8,1,0,2,5"}; - simgrid.platf.route_new{AS="AS0",src="Fafard",dest="Bourassa",links="8,6,7"}; + simgrid.engine.route_new{AS="AS0",src="Fafard",dest="Ginette",links="8,1,0,2,5"}; + simgrid.engine.route_new{AS="AS0",src="Fafard",dest="Bourassa",links="8,6,7"}; - simgrid.platf.route_new{AS="AS0",src="Ginette",dest="Bourassa",links="5,2,0,1,6,7"}; + simgrid.engine.route_new{AS="AS0",src="Ginette",dest="Bourassa",links="5,2,0,1,6,7"}; - simgrid.platf.AS_seal(); + simgrid.engine.AS_seal(); - simgrid.platf.close(); + simgrid.engine.close(); diff --git a/src/bindings/lua/lua_platf.cpp b/src/bindings/lua/lua_platf.cpp index 4c4c123c04..9d52127c65 100644 --- a/src/bindings/lua/lua_platf.cpp +++ b/src/bindings/lua/lua_platf.cpp @@ -22,7 +22,7 @@ extern "C" { XBT_LOG_NEW_DEFAULT_CATEGORY(lua_platf, "Lua bindings (platform module)"); -#define PLATF_MODULE_NAME "simgrid.platf" +#define PLATF_MODULE_NAME "simgrid.engine" #define AS_FIELDNAME "__simgrid_as" /* ********************************************************************************* */ -- 2.20.1