Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Implement MPI_IN_PLACE behavior for collectives
[simgrid.git] / examples / lua / SimSplay / platform_script.lua
1 require "simgrid"
2
3   simgrid.AS.new{id="AS0",mode="Full"}; 
4
5   simgrid.AS.addHost{AS="AS0",id="Tremblay",power=98095000};
6   simgrid.AS.addHost{AS="AS0",id="Jupiter",power=76296000};
7   simgrid.AS.addHost{AS="AS0",id="Fafard",power=76296000};
8
9   simgrid.host.setProperty{host="Tremblay",prop_id="ip",prop_value="199.23.98.3"};
10   simgrid.host.setProperty{host="Tremblay",prop_id="port",prop_value="65"};
11   simgrid.host.setProperty{host="Jupiter",prop_id="ip",prop_value="199.23.98.4"};
12   simgrid.host.setProperty{host="Jupiter",prop_id="port",prop_value="83"};
13   simgrid.host.setProperty{host="Fafard",prop_id="ip",prop_value="199.23.98.5"};
14   simgrid.host.setProperty{host="Fafard",prop_id="port",prop_value="76"};
15     -- create Links
16   for i=10,0,-1 do
17     simgrid.AS.addLink{AS="AS0",id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};   
18   end
19   -- simgrid.route.new(src_id,des_id,links_nb,links_list)
20    simgrid.AS.addRoute("AS0","Tremblay","Jupiter",{"1"});
21    simgrid.AS.addRoute("AS0","Tremblay","Fafard",{"0","1","2","3","4","8"});
22
23    simgrid.AS.addRoute("AS0","Jupiter","Tremblay",{"1"});
24    simgrid.AS.addRoute("AS0","Jupiter","Fafard",{"0","1","2","3","4","8","9"});
25  
26    simgrid.AS.addRoute("AS0","Fafard","Tremblay",{"0","1","2","3","4","8"});
27    simgrid.AS.addRoute("AS0","Fafard","Jupiter",{"0","1","2","3","4","8","9"});
28   
29   
30    --Save Platform
31    simgrid.msg_register_platform();
32
33   --Set Application
34    simgrid.host.set_function{host="Tremblay",fct="SPLAYschool",args=""};
35    simgrid.host.set_function{host="Fafard",fct="SPLAYschool",args=""};
36    simgrid.host.set_function{host="Jupiter",fct="SPLAYschool",args=""};
37    
38   --Save Application 
39    simgrid.msg_register_application(); 
40
41