210 likes | 318 Views
Distributed Load Balancing for Parallel Agent-based Simulations. Biagio Cosenza* , Gennaro Cordasco , Rosario De Chiara, Vittorio Scarano ISISLab , Dipartimento di Informatica Università degli Studi di Salerno, Italy. Outline. Agent-based Simulations Reynolds’ model Agents partitioning
E N D
Distributed Load Balancing for Parallel Agent-based Simulations Biagio Cosenza* , Gennaro Cordasco, Rosario De Chiara, Vittorio ScaranoISISLab, Dipartimento di Informatica Università degli Studi di Salerno, Italy
Outline • Agent-based Simulations • Reynolds’ model • Agents partitioning • Load balancing with two processors • Generalization to multiple workers • Results
Agent-based Simulations • Simulate the actions and interactions of autonomous individual agents with a view to assessing their effects on the system as a whole • Investigated since the 1980s • Early works take inspiration from particles [R83] • Applications • Biology, economics, sociology … • Whyparallel? • Hugenumberofagents • Complexbehaviours Social interactions Aging Fly around Death Birth
Reynolds’ Model • Alignment: steer towards the average heading of local flock-mates • Cohesion: steer to move toward the average position of local flock-mates • Separation: steer to avoid crowding local flock-mates Alignment Cohesion Separation Alignment Cohesion Separation
ParallelizationofAgent-basedSimulation • SpacePartitioning • Distributed (notcentralized) • Evendistribution (loadbalancing) • Target architectureis a cluster ofworkstations
ParallelizationofAgent-basedSimulation The simulation carried out on 4 workers
Agent-based Distribution sparse distribution dense distribution
Two Processors Schema • Assumptions • the measure of the computational load of each worker is linear in the number of agents • agents are uniformly distributed along the dimension where the splittingoccurs
Two-procs SchemaRegion wide loadbalancing (Dynamic1) Assumption: agents uniformly distributed slice of space containing a single agent, under the uniformly distributed agents assumption number of agents to be moved to balance the load between the left and right processor Remarks: sr (sl ) is the number of agents in Sr (Sl)
The Oscillation Problem • Agents are usually more dense on the boundary • The oscillation is an effect of the assumption of uniformity of distribution, that underestimates the amount of agents approaching the boundary • When a large flock of agents rapidly moves between the two workers • the boundary is moved too aggressively in the attempt of balancing the flock movement and it oscillates
Two-procs Schema Mitigated region wide load balancing (Dynamic2) Remarks: sr(sl) is the number of agents in Sr (Sl) Introducing a mitigation factor k slice of space containing a single agent, under the uniformly distributed agents assumption number of agents to be moved to balance the load between the left and right processor mitigation factor (we used k=0.5)
Two-procs SchemaRestricted assumption loadbalancing (Dynamic 3) Remarks: εis the radiusofagents’ AOI sr(sl) is the number of agents in Sr (Sl) er(el ) is the number of agents in Er (El) • Relaxed assumption of uniformity of the distribution of the agents to the spaces El and Er, instead of Sl and Sr • Limit the per-step movement of the boundary to ε
Generalization to Multiple Workers • We apply the 2-workers schema to couples of neighbors workers, on alternate steps
Test Settings • Hardware • IBM HS21 Cluster available at ENEA CRESCO Project, Portici (Italy) • Each node: 2 Xeon QuadCoreClovertown E5345 at 2.33 GHz, 16 GByte RAM • Infiniband network • Software Implementation • OpenSteer, C++, Intel compiler, Message passing (MPI) • The set of tests we performed is the result of the Cartesian product: {1,000, 10,000, 100,000} × numberofagents{8, 16, 32, 64} × numberofprocessors{static, dynamic1, dynamic2, dynamic3} loadbalancingstrategy
Results Distribution of agents per worker Each color represents a different worker. x-axis indicates the simulation step (1, 000 simulation steps are depicted) while th y-axis represents the distribution of agents (a) (b) (d) (c) (a) (100,000; 8; static) (d) (100, 000; 8; dynamic3) (b) (100, 000; 8; dynamic1) (c) (100, 000; 8; dynamic2)
ResultsScalability number of steps per second number of procs A comparison between (100,000;*; static) (dotted line) and (100,000;*; dynamic3) (continuous line)
Conclusion • Agent-basedSimulation and ParallelComputing • Wellsuited • Loadbalancingischallenging • Weintroduced a newloadbalancing schema • Lightweight • Distributed • Goodscalability • Up to 1,000,000 agents • Nextsteps • 1,000,000,000 • Complexbehaviours
Thanks for your attention Questions? http://www.isislab.it/projects/DistrSteer/