/
C++ Implementation of MASS Library C++ Implementation of MASS Library

C++ Implementation of MASS Library - PowerPoint Presentation

phoebe-click
phoebe-click . @phoebe-click
Follow
391 views
Uploaded On 2016-07-29

C++ Implementation of MASS Library - PPT Presentation

Chris Rouse CSS 497 Cooperative Education Faculty Research Internship Winter Spring 2014 MASS MultiAgent Spatial Simulation is a library that aids in parallelization of programs Allows users to distribute workload across multiple computers andor CPU cores ID: 423936

agents mass manageall agent mass agents agent manageall places func1 func2 place space exchangeall testing params kill static toggled

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "C++ Implementation of MASS Library" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

C++ Implementation of MASS Library

Chris Rouse

CSS 497 - Cooperative Education

Faculty Research Internship

Winter / Spring 2014Slide2

MASS (Multi-Agent Spatial Simulation) is a library that aids in parallelization of programs

Allows users to distribute workload across multiple computers and/or CPU cores

Computers can be connected remotely or locally

Basic MASS InformationSlide3

How does MASS help simulations?MASS has the potential to:

Lower resource usage

Increase available resourcesSpeed up large simulationsHide technical details of distributed setups

Easier programming for non-programmers

MASS PotentialSlide4

Two primary ways for MASS usage:

As a static grid of Place objects

As a static grid of Place objects with mobile Agents

MASS UsesSlide5

Simulates effects of heat over time

Places – Heat2DSlide6

Simulates an area with sugar stacks

Ants (Agents) move around area looking for sugar

Agents - SugarscapeSlide7

Two versions:Java

C++

Java:More robustMore thoroughly tested

C++

Less overhead

Current ImplementationsSlide8

December 4

IEEE CSE 2013, Sydney

8

MASS Library

Specification

Public static void main( String[ ]

args

) {

MASS.init

(

args

);

Places space = new Places( handle, “MySpace”,

params

,

xSize

,

ySize

);

Agents agents = new Agents( handle, “

MyAgents

”,

params, space, population );space.callAll( MySpace.func1, params );space.exchangeAll( MySpace.func2, neighbors );agents.exchangeAll( MyAgents.func3 );agents.manageAll( );MASS.finish( );}

func2( )

func2( )

func2( )

func2( )

func1( )

func1( )

func1( )

func1( )

func1( )

func3( )

func3( )Slide9

CallAll is responsible for calling the specified method across all Agent/Place objects

Will send to remote nodes to execute in parallel

Each node will launch as many Agents as there are threads available to launch them

Call All Method – Places & AgentsSlide10

ExchangeAll is used for Places to exchange data with neighbors

Update data of itself and/or neighbors

Done in parallel among nodes

ExchangeAll

- PlacesSlide11

ManageAll is used when the user program wants Agents to update themselves based off flags

Agents can do up to two of the following:

Each Agent can be toggled to spawn new AgentsEach Agent can be toggled to kill itself

Each Agent can be toggled to migrate to a new Place

ManageAll

Method - AgentsSlide12

Why only two of the three?

Kill and Migrate are mutually exclusive

You do not want to waste resources migrating an Agent only to kill itOnce an Agent has been killed, there is no longer any Agent to migrate

ManageAll

ContinuedSlide13

Once a ManageAll

finishes checking its flags, it needs to handle migration requests

Agent Message Packing and sendingUpon finishing sending, or if none to send, must check for incoming Agent messagesIncoming messages are unpacked and their Agent will be placed in the destination location

ManageAll

Post-ProcessingSlide14

Additional, more in-depth testing is currently taking place

CSS 534 is test running the code in a homework assignment

Another student is working on performance comparisons

Additional TestingSlide15

With the C++ MASS library in place, there are many opportunities for future students:

Many of the Java MASS methods have yet to be adopted

Further testing and debugging of the libraryAutomated unit testing

Continuing ForwardSlide16

From this project, I was able to work with technology I was unfamiliar with, in an environment I was new to

This allowed for me to gain experience similar to a new work environment

I was shown many new techniques and ways of thinking while working with professor Fukuda

Lessons Learned