distributing Agent- based simulations Gennaro Cordasco, Rosario De - - PowerPoint PPT Presentation

distributing agent
SMART_READER_LITE
LIVE PREVIEW

distributing Agent- based simulations Gennaro Cordasco, Rosario De - - PowerPoint PPT Presentation

A Framework for distributing Agent- based simulations Gennaro Cordasco, Rosario De Chiara, Ada Mancuso, Dario Mazzeo, Vittorio Scarano and Carmine Spagnuolo Outline Agent Based Simulations (ABMs) MASON Distributed ABMs DMASON


slide-1
SLIDE 1

A Framework for distributing Agent- based simulations

Gennaro Cordasco, Rosario De Chiara, Ada Mancuso, Dario Mazzeo, Vittorio Scarano and Carmine Spagnuolo

slide-2
SLIDE 2

Outline

  • Agent Based Simulations (ABMs)
  • MASON
  • Distributed ABMs
  • DMASON

– issues – architecture

  • MASON vs DMASON
  • Tests

8/29/2011 HeteroPar'2011 2

slide-3
SLIDE 3
  • 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 …

  • Why parallel?

– Huge number of agents – Complex behaviours

Agent-based simulation

8/29/2011 HeteroPar'2011 3

slide-4
SLIDE 4

Motivation

4

Social Science Economy Science Fisics Biology Artificial Intelligence

slide-5
SLIDE 5

Alignment Cohesion Separation

An Example: 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

slide-6
SLIDE 6

Features of AB Simulation platforms

  • Flexibility

– customization of agents and their behaviors

  • Speed and efficiency

– scalable beyond millions, hundred of millions, billions – batch processing – interactive simulation rate (in the order of seconds)

  • Testing and validation suites
  • Research facilities (logging, graphing, etc.)
  • Open-source

– communities of public/private entities, users, developers, researchers are crucial to ensure long-term sustainability and deep impact on current research practices

8/29/2011 HeteroPar'2011 6

slide-7
SLIDE 7

Massive Agent-Based Simulations

  • Massive: when the simulated agents are

– extremely numerous, – complex to simulate – with non-linear, dynamic behavior

  • A Short Answer: "smart" parallelization

7 8/29/2011 HeteroPar'2011

slide-8
SLIDE 8
  • Mason is recognized to be

expressive and efficient

  • Mason structure: clear

separation between Simulation and Visualization

  • Back compatibility with

simulations already present in the framework

Why MASON ?

8/29/2011 HeteroPar'2011 8

slide-9
SLIDE 9

DMASON

Master Workers Communication Server Field Agents Regions

8/29/2011 HeteroPar'2011 9

slide-10
SLIDE 10

DMASON Issues

Work Partitioning Reproducibility Synchronization Communication

slide-11
SLIDE 11

Agents vs Space Partitioning

  • Agents Partitioning assigns a fixed number of

agents to each available worker

– Self balanced – Requires an all to all communication

  • Space Partitioning partitions the simulation space

into regions. Each region is assigned to a worker which is in charge of simulating all the agents belonging to the region

– A small amount of communication is required – Agents can migrate – Load balancing is not guaranteed

8/29/2011 HeteroPar'2011 11

slide-12
SLIDE 12

DMASON: Field Partitioning

8/29/2011 HeteroPar'2011 12

slide-13
SLIDE 13

1 2 3 4

DMASON: Field Partitioning

8/29/2011 HeteroPar'2011 13

slide-14
SLIDE 14

DMASON: Field Partitioning

  • DMASON allows to partition the field into regions
  • Neighboring regions communicate before each

simulation step

14

MASON DMASON 2D DMASON 1D

HeteroPar'2011

slide-15
SLIDE 15

DMASON: Field Partitioning

  • A portion of each

region is exchanged between neighbor workers before each simulation step

  • The size of this

portion depends on agents area of interest (AOI)

15 8/29/2011 HeteroPar'2011

Right Region Left Region

slide-16
SLIDE 16

DMASON: Synchronization

  • Local synchronization:

– The step i of region r is computed by using the states i − 1 of r’s neighborhood – The step i of a region cannot be executed until the states i − 1 of its neighborhood have been computed and delivered.

  • No central coordinator
  • Simulation speed  slowest region

speed

i i-1 i-1 i i i-1 i i i

8/29/2011 HeteroPar'2011 16

slide-17
SLIDE 17

DMASON: Communication

  • DMASON uses the publish–subscribe design

pattern to propagate agents state information

– Current version of DMASON uses Java Message Service (JMS) for communication between workers

slide-18
SLIDE 18

DMASON: Reproducibility

  • Agents evolve

simultaneously

– each simulation step can be executed in parallel overall the agents – the order in which agents are scheduled does not affect the reproducibility of results – neighbors’ updates are always processed in the same order

Step i tmp buffer Step i+1

8/29/2011 HeteroPar'2011 18

slide-19
SLIDE 19

DMASON Architecture

  • DMASON is a new layer

which extends the MASON simulation layer.

  • The new layer does not

alter in any way existing layers

8/29/2011 HeteroPar'2011 19

slide-20
SLIDE 20

DMASON Architecture

DMASON

dmason.Engine Distributed State Distributed Schedule Remote Agent<E> dmason.Field Distributed Field DContinuous2D DSparseGrig2D DDoubleGrid2D DIntGrid2D DObjectGrid2D dmason.Util Connection Management Exception Resources

The same structure as MASON

8/29/2011 HeteroPar'2011 20

slide-21
SLIDE 21

MASON vs DMASON

DFlockers

slide-22
SLIDE 22

DMASON: System Management

Master Console Worker

8/29/2011 HeteroPar'2011 22

slide-23
SLIDE 23

Testing DMASON

  • We want to assess that DMASON…

– …is able to run simulations that are impractical or impossible to execute with MASON – …is scalable – …allows to develop reproducible simulations (independently from the number of workers) – …allows to exploit multicore CPU – …allows to exploit heterogeneous hardware

8/29/2011 HeteroPar'2011 23

slide-24
SLIDE 24

DMASON: homogeneous hosts

7 HOST : Intel i7-2600 4x3,4GHz con HT 8GB RAM JVM 32 bit

2 4 6 8 10 12 14 2000000 4000000 6000000 8000000 10000000 12000000 14000000

Avg simulation step timing (s) Agents

Mason DMASON 2x2, (1,1,1,1) DMASON 3x3, (2,2,2,2,1) DMASON 4x4, (3,3,3,3,2,2) DMASON 5x5, (4,4,4,4,3,3,3)

MASON DMASON 4 Hosts DMASON 5 Hosts DMASON 6 Hosts DMASON 7 Hosts

8/29/2011 HeteroPar'2011 24

slide-25
SLIDE 25

DMASON: heterogeneous hosts

25 8/29/2011 HeteroPar'2011

slide-26
SLIDE 26

DMASON: heterogeneous hosts

7,43 6,25 5,61 5,65 5,52 7,24 11,48 12,70 10,75 9,88 9,15 9,16 11,87 19,65

5 10 15 20 (0,0,0,0,25) (1,1,1,1,21) (1,2,2,2,18) (1,2,2,3,17) (1,2,2,4,16) (1,3,3,6,12) (5,5,5,5,5)

Avg simulation step timing (s)

Configurations (P4, Xeon, Opt, I5,I7)

3,000,000 Agents 5,000,000 Agents

slide-27
SLIDE 27

Conclusion

  • ABMs are CPU intensive applications and requires large

amount of memory

  • The need for complex simulations involving a large number of

agents is always felt by researchers and practitioners

  • DMASON allows to achieve those requirements by harvesting

the unused CPU power and Memory

8/29/2011 HeteroPar'2011 27

slide-28
SLIDE 28

Current work

  • Simulation logging and replay

Master Workers Communication Server Field Agents Regions Logger Visualizers Logging Server

slide-29
SLIDE 29

Current work

  • Visualization

Master Workers Communication Server Field Agents Regions Logger Visualizers Logging Server

slide-30
SLIDE 30

Future Development

  • Development of other distributed fields
  • Dynamic Load Balancing
  • Distributed communication

8/29/2011 HeteroPar'2011 30

slide-31
SLIDE 31
slide-32
SLIDE 32

Thanks for your attention

Gennaro Cordasco, Rosario De Chiara, Ada Mancuso, Dario Mazzeo, Vittorio Scarano and Carmine Spagnuolo

http://www.isislab.it/projects/dmason/