--- Copyright (c) 2011, 2014. The SimGrid Team.
+-- Copyright (c) 2011-2016. The SimGrid Team.
-- All rights reserved.
-- This program is free software; you can redistribute it and/or modify it
function my_cluster(args)
-- args is a table with the following keys
-- -
- local required_args = {"id", "prefix", "suffix", "radical", "power", "bw", "lat" }
+ local required_args = {"id", "prefix", "suffix", "radical", "speed", "bw", "lat" }
for _,val in pairs(required_args) do
if args[val] == nil then simgrid.critical("Must specify '" .. val .. "' attribute. See docs for details.") end
end
if args.topology ~= "TORUS" and args.topology ~= "FAT_TREE" then
args.topology = "Cluster"
end
- --if args.core==nil then args.core = 1 end
- --if args.core==nil then args.core = 1 end
- --if args.core==nil then args.core = 1 end
- --if args.core==nil then args.core = 1 end
- --if args.core==nil then args.core = 1 end
- --if args.core==nil then args.core = 1 end
- --if args.core==nil then args.core = 1 end
- --if args.core==nil then args.core = 1 end
- --if args.core==nil then args.core = 1 end
-- Check the mode = Cluster here
return function()
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.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"};
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",