Initial commit

This commit is contained in:
Yentl Van Tendeloo 2016-08-04 17:38:43 +02:00
commit 66a6860316
407 changed files with 1254365 additions and 0 deletions

View file

@ -0,0 +1,44 @@
2.5 0.000220108032227 0.182104873657 0.0933950424194
9.0 0.118604183197 0.136581301689 0.125241190195
17.5 0.165875673294 0.129406796561 0.0847219361199
25.5 0.140835864203 0.14614037105 0.13109592029
34.0 0.125926589966 0.13770210743 0.121652770042
44.0 0.126041865349 0.104207253456 0.149581170082
53.0 0.128831297159 0.125356644392 0.124603033066
62.0 0.133014464378 0.125408744812 0.125269579887
72.0 0.109709835052 0.145585775375 0.125529432297
81.0 0.129592955112 0.130573868752 0.131571382284
89.5 0.126680241691 0.127730104658 0.130481031206
99.5 0.133457205512 0.128180092031 0.117670622739
109.0 0.174166560173 0.135482281446 0.0790685117245
116.5 0.144543988364 0.143870728356 0.118700027466
125.0 0.132540392876 0.143304920197 0.120068049431
134.5 0.12880982293 0.0999772018856 0.156275060442
143.0 0.131946265697 0.126756280661 0.127258718014
152.0 0.129507446289 0.123902726173 0.124925065041
162.0 0.10719139576 0.145339655876 0.126072049141
170.5 0.130162341254 0.134740591049 0.135777132852
178.5 0.122417052587 0.125319136514 0.130025757684
188.5 0.127645752647 0.125108350407 0.118008982052
198.5 0.169632699755 0.130844963921 0.0797957844204
207.0 0.135174781084 0.139287024736 0.118809878826
216.0 0.128165340424 0.135707092285 0.122222709656
225.5 0.126555071937 0.0947815577189 0.162814325756
233.5 0.139553921563 0.13077041081 0.129268407822
242.5 0.134252721613 0.129030336033 0.125064134598
253.0 0.104313850403 0.156633996964 0.126202607155
261.5 0.131185054779 0.13466320719 0.134300368173
270.0 0.129102897644 0.135208296776 0.130160236359
280.5 0.137819095091 0.13076376915 0.111695051193
289.5 0.182719639369 0.140607186726 0.0802143301283
296.5 0.138328858784 0.144302947181 0.122451611928
306.0 0.12479788065 0.127465506395 0.123253603776
316.0 0.130031466484 0.0911014676094 0.171381443739
324.0 0.137785106897 0.122457295656 0.129235833883
333.0 0.130798268318 0.121877384186 0.125465536118
343.5 0.0995916670019 0.142808524045 0.124353365465
353.0 0.122216522694 0.134111583233 0.133203417063
362.0 0.121089982986 0.121542286873 0.130439090729
372.0 0.142925906181 0.123450422287 0.107432317734
381.0 0.133375763893 0.148666679859 0.129164367914
390.0 0.123953914642 0.133184409142 0.1217908144

View file

@ -0,0 +1,85 @@
2.5 0.000198364257812 0.180332899094 0.0928029537201
8.0 0.000294129053752 0.26751101017 0.134754856428
14.0 0.000255743662516 0.326487382253 0.0982530911764
19.5 0.000256538391113 0.341889238358 0.086644744873
24.5 0.000265216827393 0.387375926971 0.0473928928375
29.5 0.000340890884399 0.382603216171 0.0394519329071
34.0 0.000401079654694 0.428702414036 0.00031840801239
38.5 0.00035662651062 0.414940929413 0.000313663482666
43.5 0.000416994094849 0.41569814682 0.000303506851196
48.0 0.000347793102264 0.434117615223 0.000312805175781
52.5 0.000363874435425 0.422448682785 0.000289058685303
57.0 0.000356137752533 0.431815445423 0.000312626361847
61.5 0.000302886962891 0.414598655701 0.000296545028687
66.5 0.000294828414917 0.413453388214 0.000297164916992
71.5 0.000353622436523 0.412895059586 0.000292921066284
76.5 0.000322246551514 0.415892028809 0.000285768508911
81.0 0.0017454624176 0.43055254221 0.000295102596283
85.0 0.000438153743744 0.434577584267 0.000283598899841
89.5 0.000390625 0.412695503235 0.000277376174927
94.5 0.00036358833313 0.41817908287 0.000269746780396
99.5 0.000275850296021 0.408336782455 0.000273036956787
104.0 0.000257551670074 0.43680369854 0.000283539295197
108.5 0.000336933135986 0.419739675522 0.000274324417114
113.0 0.000379860401154 0.42929238081 0.000290334224701
117.0 0.000306129455566 0.437380254269 0.000284016132355
121.0 0.000362515449524 0.435981750488 0.000287711620331
125.0 0.000261425971985 0.437896251678 0.000284492969513
129.0 0.000342607498169 0.42898863554 0.000290095806122
133.0 0.000526607036591 0.437649011612 0.000289082527161
137.0 0.000451624393463 0.43560552597 0.000284433364868
141.5 0.000339603424072 0.41804523468 0.000275707244873
146.0 0.000335097312927 0.434910178185 0.000281393527985
150.5 0.000310277938843 0.411667013168 0.000270318984985
155.5 0.000287389755249 0.40929069519 0.000267601013184
160.0 0.000323474407196 0.433193743229 0.000286877155304
164.0 0.000375986099243 0.434395253658 0.00028258562088
168.0 0.000414073467255 0.432915866375 0.000284433364868
172.5 0.000313949584961 0.418871498108 0.000271892547607
177.0 0.000393867492676 0.430916726589 0.000280976295471
181.0 0.000419080257416 0.43475496769 0.000282824039459
185.0 0.000267207622528 0.434233307838 0.000282108783722
189.5 0.000256633758545 0.417384290695 0.00027904510498
194.5 0.000370311737061 0.420564222336 0.000274896621704
199.5 0.000469923019409 0.416340637207 0.000290441513062
204.0 0.000391900539398 0.439996898174 0.000295162200928
208.0 0.000433743000031 0.441814899445 0.000299215316772
212.5 0.0003098487854 0.487604475021 0.000281429290771
217.0 0.0006303191185 0.475297808647 0.000300824642181
221.0 0.000459790229797 0.44917345047 0.000307500362396
225.0 0.00039130449295 0.451607406139 0.000292181968689
229.0 0.000275909900665 0.443854808807 0.000300228595734
233.0 0.000315070152283 0.495716691017 0.000307619571686
237.0 0.000389873981476 0.486922740936 0.000292837619781
241.0 0.000397682189941 0.485219419003 0.000298500061035
245.0 0.000426411628723 0.473201155663 0.000299036502838
249.0 0.000398397445679 0.496797502041 0.000305831432343
253.0 0.000383198261261 0.46874320507 0.000302493572235
257.0 0.000388920307159 0.461508929729 0.000280439853668
261.0 0.000389039516449 0.504287958145 0.000291168689728
265.0 0.000372350215912 0.532555878162 0.000287652015686
269.0 0.000369369983673 0.47523778677 0.00029069185257
273.0 0.000374317169189 0.531225919724 0.000289559364319
277.0 0.000344038009644 0.479292154312 0.000279605388641
281.0 0.0181798934937 0.46661221981 0.000292837619781
285.0 0.0439522266388 0.4655777812 0.000290155410767
289.0 0.0484780073166 0.459563791752 0.000282287597656
293.5 0.0850533008575 0.370040512085 0.000267314910889
297.5 0.0957821210225 0.450095176697 0.000287055969238
301.5 0.121516990662 0.406671905518 0.000263500213623
306.5 0.142138147354 0.329133892059 0.000259399414062
312.0 0.167650938034 0.302305380503 0.000257571538289
317.5 0.186873579025 0.283949518204 0.000261116027832
324.5 0.206888808144 0.208883921305 0.000242842568292
334.5 0.252804127606 0.147170630368 0.000237920067527
347.0 0.302551286561 0.0832516465868 0.000235370227269
356.5 0.398879528046 0.052636384964 0.000294303894043
361.5 0.428839635849 0.0284378051758 0.000318479537964
366.0 0.469926595688 0.000254333019257 0.000322222709656
370.5 0.450931835175 0.000261306762695 0.000335550308228
375.5 0.446453285217 0.000298976898193 0.000316190719604
380.5 0.436207342148 0.000280618667603 0.000330257415771
385.5 0.430109453201 0.000281476974487 0.000316286087036
390.0 0.448146224022 0.000300049781799 0.000338792800903
394.0 0.442034482956 0.000296115875244 0.000287890434265
397.5 0.460290431976 0.000364065170288 0.00029993057251

View file

@ -0,0 +1,38 @@
class MyAllocator(object):
"""
Allocate all models at the start of the simulation. After this, model relocation is handed over to a relocator.
"""
def allocate(self, models, edges, nrnodes, totalActivities):
"""
Calculate allocations for the nodes, using the information provided.
:param models: the models to allocte
:param edges: the edges between the models
:param nrnodes: the number of nodes to allocate over. Simply an upper bound!
:param totalActivities: activity tracking information from each model
:returns: allocation that was found
"""
# Return something of the form: {0: 0, 1: 0, 2: 0, 3: 1}
# To allocate model_ids 0, 1 and 2 to node 0 and model_id 3 to node 1
avgload = sum(totalActivities.values()) / nrnodes
alloc = {}
runningload = 0.0
currentnode = 0
for node, activity in totalActivities.items():
if runningload + (activity / 2) > avgload:
currentnode = (currentnode + 1) % nrnodes
runningload = 0.0
runningload += activity
alloc[node] = currentnode
return alloc
def getTerminationTime(self):
"""
Returns the time it takes for the allocator to make an 'educated guess' of the advised allocation.
This time will not be used exactly, but as soon as the GVT passes over it. While this is not exactly
necessary, it avoids the overhead of putting such a test in frequently used code.
:returns: float -- the time at which to perform the allocations (and save them)
"""
# No need for any run time information means 0.0
return 2.0

View file

@ -0,0 +1,115 @@
import random
import sys
sys.path.append("../../src/")
from DEVS import AtomicDEVS, CoupledDEVS
from mpi4py import MPI
class CircleNodeState(object):
def __init__(self):
self.event = None
self.queue = []
self.nr = 0
self.generated = 0
def copy(self):
a = CircleNodeState()
a.event = self.event
a.queue = list(self.queue)
a.nr = self.nr
a.generated = self.generated
return a
def __hash__(self):
return self.event + sum(self.queue)
def __eq__(self, other):
# For memoization
if self.event == other.event and self.queue == other.queue and self.nr == other.nr and self.generated == other.generated:
return True
else:
return False
def __str__(self):
return "%s (%s)" % (self.event, self.queue)
class CircleNode(AtomicDEVS):
def __init__(self, nr, count, multiplier):
AtomicDEVS.__init__(self, "CircleNode" + str(nr))
self.inport = self.addInPort("input")
self.outport = self.addOutPort("output")
self.state = CircleNodeState()
#self.state.event = random.randint(2, 100)
self.state.nr = nr
self.state.generated = 0
self.state.event = nr
self.count = count
self.multiplier = multiplier
def intTransition(self):
if 0.6 * self.count < self.state.nr < 0.7 * self.count:
for _ in xrange(self.state.nr*self.multiplier):
pass
if self.state.queue:
self.state.event = self.state.queue.pop()
else:
self.state.event = None
self.state.generated += 1
if self.state.generated == 10:
self.state.nr = (self.state.nr + 1) % self.count
self.state.generated = 0
return self.state
def extTransition(self, inputs):
if self.state.event is None:
self.state.event = inputs[self.inport][0]
else:
self.state.queue.append(inputs[self.inport][0])
return self.state
def timeAdvance(self):
if self.state.event is None:
return float('inf')
else:
#return self.state.event
return 1.0
def outputFnc(self):
return {self.outport: [self.state.event]}
class MovingCircle(CoupledDEVS):
def __init__(self, count, multiplier):
import math
CoupledDEVS.__init__(self, "Circle")
nodes = []
try:
from mpi4py import MPI
pernode = float(count) / MPI.COMM_WORLD.Get_size()
except ImportError:
pernode = float(count)
for i in range(count):
nodes.append(self.addSubModel(CircleNode(i, count, multiplier), math.floor(i/pernode)))
for index in range(len(nodes)):
self.connectPorts(nodes[index-1].outport, nodes[index].inport)
if __name__ == "__main__":
random.seed(1)
from simulator import Simulator
model = MovingCircle(int(sys.argv[1]), int(sys.argv[2]))
sim = Simulator(model)
sim.setTerminationTime(int(sys.argv[3]))
#sim.setVerbose(True)
sim.setMessageCopy('none')
sim.setStateSaving('custom')
sim.setGVTInterval(1 if int(argv[1]) < 500 else 5)
from allocator import MyAllocator
sim.setInitialAllocator(MyAllocator())
#sim.setDrawModel(True, 'model.dot', True)
if sys.argv[4] == "True":
sim.setActivityRelocatorBasicBoundary(1.1)
sim.setMemoization(True)
sim.setSchedulerSortedList()
#sim.setActivityTracking(True)
#sim.setShowProgress()
sim.simulate()

View file

@ -0,0 +1,32 @@
reset
set terminal postscript enhanced colour portrait size 6,6
set key top left
set out 'dist_activity_synthetic.eps'
set title "Simple activity relocation vs. no relocation (5 nodes)"
set xlabel "Microseconds artificial load"
set ylabel "Speedup"
plot '/tmp/result_5_True' using (($1)/54):(($6)/(($2+$3+$4)/3)) title 'With activity relocation' w l, '/tmp/result_5_False' using (($1)/54):($6/(($2+$3+$4))) title 'Without activity relocation' w l
set out 'dist_activity_synthetic_load_NO.eps'
set title 'Synthetic load without relocation'
set xlabel 'Simulation time'
set ylabel 'Observed activity (s)'
plot 'dist_activity_synthetic/activity-log_NO' using 1:($2) title 'Node 1' w l lw 5, '' using 1:($3) title 'Node 2' w l lw 5, '' using 1:($4) title 'Node 3' w l lw 5
set out 'dist_activity_synthetic_load_AT.eps'
set title 'Synthetic load with activity tracking'
set xlabel 'Simulation time'
set ylabel 'Observed activity (s)'
plot 'dist_activity_synthetic/activity-log_AT' using 1:($2) title 'Node 1' w l lw 5, '' using 1:($3) title 'Node 2' w l lw 5, '' using 1:($4) title 'Node 3' w l lw 5
set out 'dist_activity_synthetic_speedup.eps'
set title "Speedup with and without activity relocation"
set xlabel "Computation nodes"
set ylabel "Speedup"
plot 'dist_activity_synthetic/result_nodes_True' using 1:(5371/(($2+$3+$4)/3)) title 'Activity relocation' w l lw 5, 'dist_activity_synthetic/result_nodes_False' using 1:(5371/(($2+$3+$4)/3)) title 'No relocation' w l lw 5
set out 'dist_activity_synthetic_50.eps'
set title "Simple activity relocation vs. no relocation (50 nodes)"
set xlabel "Microseconds artificial load"
set ylabel "Speedup"
plot '/tmp/result_50_True' using (($1)/54):((($6+$7+$8)/3)/(($2+$3+$4)/3)) title 'With activity relocation' w l, '/tmp/result_50_False' using (($1)/54):((($6+$7+$8)/3)/(($2+$3+$4))) title 'Without activity relocation' w l

View file

@ -0,0 +1,5 @@
paste dist_activity_synthetic/result_5_True dist_activity_synthetic/result_5_local > /tmp/result_5_True
paste dist_activity_synthetic/result_5_False dist_activity_synthetic/result_5_local > /tmp/result_5_False
#paste dist_activity_synthetic/result_50_True dist_activity_synthetic/result_50_local > /tmp/result_50_True
#paste dist_activity_synthetic/result_50_False dist_activity_synthetic/result_50_local > /tmp/result_50_False
gnuplot dist_activity_synthetic/plot

View file

@ -0,0 +1,7 @@
5000 86.203
6000 93.045
7000 106.477
8000 127.103
9000 135.101
10000 149.617
11000 163.985

View file

@ -0,0 +1,25 @@
5000 218.341068029 216.212660074 203.043926954
6000 228.164988995 240.031370878 245.418283939
7000 242.678237915 237.08642602 256.299677134
8000 269.475946903 271.335959911 279.749504089
9000 317.391763926 319.570595026 327.26787281
10000 363.669466972 346.766951084 378.399319887
11000 418.942600965 351.455626011 382.85464716
12000 416.027841091 473.278229952 468.135915041
13000 449.811432123 447.030043125 499.784992933
14000 426.773957014 436.791079044 456.843092203
15000 471.596997023 490.20233202 469.973987103
16000 568.360106945 570.828665018 592.151080132
17000 609.02011919 636.027021885 558.649226904
18000 591.986929178 570.548024893 636.018925905
19000 724.873071909 633.345487118 670.312558889
20000 696.164077044 731.268852949 738.524857998
21000 708.669167042 901.074270964 796.767655134
22000 837.204790115 810.063322783 804.391721964
23000 877.223140955 883.115068913 912.659464836
24000 987.032071114 950.803104877 809.835482836
25000 972.32427001 873.315254927 987.653218985
26000 1035.62710595 1057.3292861 908.812786818
27000 1126.41887593 1090.99641705 1033.9324801
28000 1006.83631587 1134.34893298 990.460991144
29000 1029.56464005 965.422312975 1228.69492888

View file

@ -0,0 +1,25 @@
5000 102.695871115 107.243849039 111.732126236
6000 115.442557096 111.420768023 112.225580931
7000 120.275017977 122.954688072 120.855772972
8000 134.226042032 134.55546999 130.992986202
9000 168.095864058 151.617656946 157.353914976
10000 183.619045019 175.969532967 160.52740097
11000 172.00357604 168.750247955 205.86146903
12000 190.136723995 196.606661081 198.955000162
13000 209.808018923 205.941678047 210.749876022
14000 217.684717894 217.657816887 217.051644087
15000 243.39921689 228.640567064 237.087605953
16000 310.600727081 336.055822849 275.531701088
17000 277.205467939 289.704303026 266.073758841
18000 304.756576061 314.5514009 330.593177795
19000 303.476767063 288.312615871 329.120454073
20000 321.194902897 338.904273987 331.487878084
21000 335.848731995 340.775434971 342.598091841
22000 371.049196005 338.384214878 331.422207832
23000 371.430547953 365.973088026 368.522454977
24000 375.869647026 340.855777979 398.241880894
25000 374.258087873 423.801176071 374.586101055
26000 393.735162973 388.167378902 408.29076004
27000 442.523834944 440.859385014 419.44006896
28000 479.117385864 448.958978891 449.737302065
29000 459.473080873 470.553967953 447.952148914

View file

@ -0,0 +1,25 @@
5000 34.4594130516 31.4607920647 30.4732069969
6000 33.4877820015 34.448143959 33.5143198967
7000 39.5065279007 39.4688968658 40.4722709656
8000 43.4737179279 43.5581908226 43.6300210953
9000 53.9117820263 50.5273449421 52.4511311054
10000 53.4646649361 58.5445141792 63.5273649693
11000 62.5262110233 66.5227880478 64.5572211742
12000 64.5455029011 63.5429551601 65.5100572109
13000 68.53039217 73.5626821518 68.549726963
14000 70.5430650711 75.6022388935 68.5590240955
15000 76.5949099064 73.5367929935 73.5393631458
16000 82.5783178806 84.6070218086 91.5773670673
17000 91.5737822056 96.5969350338 92.7038650513
18000 98.6441698074 96.6009509563 89.5730550289
19000 102.634485006 99.5864470005 95.6460490227
20000 100.604066849 126.719990015 102.672016144
21000 113.620511055 124.599315882 124.629219055
22000 110.595020056 121.614670038 113.631548166
23000 117.628712893 119.656537056 128.742251873
24000 133.665678978 123.630280972 148.665294886
25000 147.753806114 147.837951899 146.838895082
26000 155.69064188 139.720133066 169.715267181
27000 143.071497917 160.730426073 161.385114908
28000 141.710097075 175.609637022 171.79659605
29000 170.719704866 191.761321068 189.790666819

View file

@ -0,0 +1,25 @@
5000 22.2201480865 17.0561318398 13.5076010227
6000 13.4857251644 13.4715950489 20.550041914
7000 16.4697830677 15.4974398613 16.4930779934
8000 16.4887831211 26.73310709 16.4469017982
9000 18.4488711357 18.5473411083 19.4462409019
10000 19.5175302029 20.5533599854 20.5331959724
11000 21.5333490372 20.5401849747 20.5193390846
12000 22.4718999863 21.5305941105 22.5029790401
13000 23.5173139572 22.479818821 22.4744920731
14000 24.5449099541 24.5228471756 24.5222129822
15000 26.5563490391 26.6209299564 25.5407831669
16000 28.5111989975 28.4782249928 28.4577240944
17000 29.8100838661 28.5639929771 29.4549248219
18000 30.6574878693 31.4998011589 30.4345400333
19000 32.8209748268 32.8542709351 33.4620950222
20000 35.580726862 35.5575320721 34.7901921272
21000 35.5810959339 36.4791989326 35.5518209934
22000 37.4578101635 37.4913098812 37.5916750431
23000 40.902037859 40.8046050072 38.5237767696
24000 40.6817550659 39.6165440083 39.6099259853
25000 41.7899069786 41.757338047 45.7717058659
26000 48.5678489208 47.9609799385 44.8357579708
27000 47.0299091339 46.6856648922 46.6797540188
28000 47.586714983 46.5418570042 46.6314740181
29000 48.7777400017 49.799695015 45.5380129814

View file

@ -0,0 +1,25 @@
5000 25.670385917
6000 30.6078152657
7000 39.8227510452
8000 40.6569390297
9000 45.6739039421
10000 50.7487792174
11000 59.2882963022
12000 60.5404839516
13000 70.6515260537
14000 71.303308328
15000 76.490140756
16000 80.7307026386
17000 88.9916319847
18000 92.5959153175
19000 95.6301827431
20000 104.214085976
21000 105.539106607
22000 110.70279034
23000 115.461031357
24000 120.521068176
25000 131.760390282
26000 130.691040357
27000 150.080423594
28000 140.586358309
29000 149.057772716

View file

@ -0,0 +1,47 @@
3 2235.98525786 2241.42061186 2239.67296195
4 1782.18455887 1800.66092014 1796.343894
5 1528.93880296 1533.69088888 1531.458179
6 1347.07484007 1400.34278607 1358.05674505
7 1217.38951993 1224.75188208 1224.06127
8 1127.93082905 1118.38119292 1121.95066381
9 1044.40165997 1044.90843916 1044.70410013
10 972.478423834 978.36395812 980.011813164
11 953.171442986 962.681335211 958.002044916
12 890.266263962 897.619251966 881.590488911
13 898.308667183 919.957244873 894.709556103
14 880.075351954 918.575129986 873.080352068
15 823.534873962 818.33447504 822.653439999
16 783.83154583 797.901921034 790.65171504
17 844.721904039 849.948559046 788.453416824
18 793.828963995 792.450037003 783.425228119
19 1019.10114312 954.266947985 926.440397978
20 730.99761796 733.40286994 771.666358948
21 711.567430973 719.261476994 722.87690711
22 827.496927977 819.792718887 752.737488031
23 819.655396223 811.851325989 696.378617048
24 811.515040159 829.748548985 822.623125076
25 644.116644859 664.48943305 647.902778864
26 660.260432959 671.761432886 673.970871925
27 731.901946068 699.967737913 679.328577042
28 772.239542961 767.50296402 766.367325068
29 827.918077946 779.621546984 790.543331146
30 618.497306108 618.995031118 619.600656033
31 618.316702843 618.791949034 614.689287901
32 641.600099802 631.657710075 638.723675966
33 1082.70427084 997.808056831 780.564347029
34 752.240505934 784.642968893 756.460554838
35 859.94204998 934.661706924 708.610443115
36 687.981174946 677.111431837 695.405463934
37 839.875807047 775.421059132 795.388407946
38 587.735980034 584.99642992 583.80658102
39 592.995794058 595.538363934 589.576745033
40 582.203334093 572.52503705 582.944280863
41 575.389398098 600.894745827 576.240563869
42 740.132120848 759.151836157 690.578798056
43 1167.24468994 997.345279932 859.175218105
44 804.965612888 749.376142979 696.427149057
45 894.825032949 1009.91834998 1033.5712769
46 636.853390932 639.539700985 655.667721033
47 935.723767042 1324.06477284 1459.582232
48 1136.40104604 802.571983099 741.184875011
49 807.181529045 857.782059193 806.392597198

View file

@ -0,0 +1,47 @@
3 2065.55057192 2106.66153097 2060.32605696
4 1571.38654804 1584.24099612 1541.85230803
5 1328.71150899 1324.6962831 1330.12855601
6 1196.03027797 1176.08151293 1171.57790208
7 1066.73643398 1063.84630418 1051.88459206
8 938.543613911 896.526536942 938.319551945
9 804.971308947 825.758994818 823.592407942
10 724.556020021 702.909558058 707.98572278
11 652.542535067 715.642948866 665.939933062
12 661.910281897 660.609669924 650.465514898
13 641.672753096 628.31748414 643.891709089
14 607.7389431 609.387393951 603.338206053
15 550.664175987 546.948400021 551.858085155
16 499.901604891 531.86310792 505.888711929
17 481.812021971 487.174235106 535.432266951
18 514.505225897 485.970355034 471.389649868
19 463.912137032 446.220653057 445.303132057
20 585.340610981 504.351191998 430.4313941
21 415.15883112 418.940163136 414.140968084
22 433.408858061 452.65240097 402.858666897
23 493.704683065 510.783208132 502.247362137
24 404.829730988 411.036066055 392.949627876
25 360.64490509 362.724755049 397.624545097
26 395.104635954 392.797114849 354.422852039
27 415.383952141 498.844250917 540.211887836
28 451.76489687 446.811604023 461.132509947
29 410.061361074 448.258038044 442.754074812
30 357.71787405 335.118900776 333.155451059
31 354.120200157 412.825281143 412.123919964
32 461.571337938 454.244483232 457.274065018
33 445.594099998 469.389147997 363.542243004
34 541.019289017 467.399881124 413.021318913
35 504.647050858 447.936398983 509.98646903
36 433.837987185 466.232741833 440.111504078
37 432.017230988 376.286370993 363.180318117
38 351.21725893 348.609113216 353.288779974
39 373.832436085 379.789690018 375.467037916
40 386.761991024 369.891330004 359.447088003
41 367.534579992 386.925626993 384.62681222
42 428.960325956 453.192011118 409.949900866
43 500.127605915 460.878421068 441.614582062
44 481.777785063 520.298825979 533.261512995
45 571.883930922 590.947868109 563.585054874
46 554.468532085 547.386512995 515.662167072
47 558.503210068 526.180685997 557.399966955
48 428.449804068 449.556237936 413.312390089
49 413.848536968 394.904416084 405.24755311

View file

@ -0,0 +1 @@
2701

View file

@ -0,0 +1,78 @@
#!/bin/env python
import sys
sys.path.append("../../src/")
import time
sys.setrecursionlimit(10000)
loads = range(5000, 30000, 1000)
termination_time = 200
iters = int(sys.argv[1])
import subprocess
output = open('/tmp/output', 'w')
for nodes, models in [(5, 150), (50, 900)]:
for relocator in [True, False]:
f = open("dist_activity_synthetic/result_%i_%s" % (nodes, relocator), 'w')
for load in loads:
f.write(str(load))
for _ in range(iters):
command = "mpirun -np %i -machinefile ~/machines python dist_activity_synthetic/movingcircle.py %i %i %i %s"
command = (command % (nodes, models, load, termination_time, relocator))
start = time.time()
subprocess.check_output(command, shell=True, stderr=output)
f.write(" %s" % (time.time() - start))
print("%i %s" % (load, time.time() - start))
f.write("\n")
f.close()
f = open("dist_activity_synthetic/result_%i_local" % nodes, 'w')
for load in loads:
f.write(str(load))
for _ in range(iters):
command = "python dist_activity_synthetic/movingcircle.py %i %i %i False"
command = (command % (models, load, termination_time))
start = time.time()
subprocess.check_output(command, shell=True, stderr=output)
f.write(" %s" % (time.time() - start))
print("%i %s" % (load, time.time() - start))
f.write("\n")
f.close()
for relocator in [True, False]:
load = 10000
models = 1500
termination_time = 200
f = open("dist_activity_synthetic/result_nodes_%s" % relocator, 'w')
for nodes in range(3, 50):
for _ in range(iters):
command = "mpirun -np %i -machinefile ~/machines python dist_activity_synthetic/movingcircle.py %i %i %i %s"
command = (command % (nodes, models, load, termination_time, relocator))
start = time.time()
subprocess.check_output(command, shell=True, stderr=output)
f.write(" %s" % (time.time() - start))
print("%i %s" % (nodes, time.time() - start))
f.write("\n")
f.close()
f = open("dist_activity_synthetic/result_nodes_local", 'w')
f.write("1")
for _ in range(iters):
command = "python dist_activity_synthetic/movingcircle.py %i %i %i False"
command = (command % (models, load, termination_time))
start = time.time()
subprocess.check_output(command, shell=True, stderr=output)
f.write(" %s" % (time.time() - start))
print("1 %s" % (time.time() - start))
f.write("\n")
f.close()
for relocator in [True, False]:
try:
import os
os.remove("activity-log")
except OSError:
pass
# Put the load rather high, to create a nice 'bad' distribution
subprocess.check_output("mpirun -np 3 -machinefile ~/machines python dist_activity_synthetic/movingcircle.py 100 30000 400 " + str(relocator), shell=True, stderr=output)
import shutil
shutil.move("activity-log", "dist_activity_synthetic/activity-log_" + str("AT" if relocator else "NO"))