150 likes | 274 Views
Distributed mega-scale Agent Management in MASS: diffusion, guarded migration, merger and termination. Cherie Wasous CSS_700 Thesis – Winter 2014 ( Feb . 6). O verall MASS Framework.
E N D
Distributedmega-scale Agent Managementin MASS:diffusion, guarded migration,merger and termination Cherie Wasous CSS_700 Thesis – Winter 2014 (Feb. 6)
Overall MASS Framework from: Romanus, css497 summer2013, “Developing and Extending the MASS Library (Java)Places.exchangeBoundary( )” • Places • Maintain & Manages the Place locations • Manages exchange between the Place locations • Place • Maintains Place location data • Provides a user software interface • Agents • Maintains & Manages the Agent units • Manages the exchange and migration of Agent units • Agent • Maintains the Agent data • Provides a user software interface callMethod( ) {User created functions} callAll( ) callSome( ) exchangeAll( ) exchangeBoundary( ) callAll( ) manageAll( ) migrate( ) spawn( ) kill( ) callMethod( ) {User created functions}
MASS execution model from: Chuang, MS Thesis, “Design and Qualitative/Quantative Analysis of Multi-Agent Spatial Simulation Library”
Current state of “Climate” app for Evaluation Places:timeSlots X numberOfDays Each Place Element: a 123(XRANGE) x 162(YRANGE) grid of the Pacific NW Place Compute:(bogus) moisture_flux, direction for each grid location, find max
a made-up/bogus “Climate” app for evaluations Place elements of climate related data for the Pacific NW Agents who search the place elements looking for a maximum value As agents complete their job, they put the max they found into Vector at first place element for this node User App then collects these values, and then looks for the overall max value
Current state of “Climate” app for Evaluation Agents: create one agent at each timeSlot for Day Zero Agent: if finds new max, copy it; migrate to the next Day (same timeSlot); when do last Day, deposit max found into Vector maxSeen& prepare to kill Self
Current state of “Climate” app for Evaluation Place Collect:searches Vector maxSeen and returns max value for this node
Current state of “Climate” app for Evaluation Finally, back in User Application: does final search of each node’s returned value to find the overallMax
Summary of “Climate” app for Evaluation Places:timeSlots X numberOfDays Each Place Element: a 123x162 grid of the Pacific NW Place Compute:(bogus) moisture_flux, direction for each grid location, find max Agents: create one agent at each timeSlot for Day Zero Agent: if finds new max, copy it; migrate to the next Day (same timeSlot) Agent:when do last Day, deposit max found into Vector at place 0,0 & killSelf Place Collect:first place element on each node searches thru Vector and returns the max value for that node Finally, in user app.: final search of returned values to find the overallMax
Next Steps Add to current “Climate” app: runMode=0: only use Places (so each place sends its max to main, then main sorts) runMode=2: spawn more Agents, once startup Scripts to gather & present performance data for various # proc/th/runModes Begin Agent Enhancements in MASS code, re-eval. with “Climate” app
“diffusion, guarded migration, merger, and termination” Modify Agents Overload Constructor: Agents( byte inject, byte guardedMigration, int handle, String className, Object argument, Places places ) Instantiates a set of agents from the “className” class according to the technique indicated by “inject”: 0 = chaotic (nThreads*nProc agent elements), 1 = controlled (nThreads*nProc agent elements), 2 = one-way scan ( size[0] in 1D, size[1] in 2D, size[2] in 3D These agent elements migrate per “guardedMigration” algorithm: 0 = naive (collisions are not a concern, unlimited agents per place) 1 = greedy (only 1 agent per place maximum) 2 = best-effort at greedy ( try not to have more than 1 agent per place, but on occasion there will be more than 1 )
“diffusion, guarded migration, merger, and termination” Modify Agent abstract class Overload version of migrate: public boolean migrate( byte diffusion ) Initiates an agent migration upon a next call to Agents.manageAll( ). diffusion indicates technique of migration to use: 0 = chaotic, 1 = controlled, 2 = one-way scan
MASS code base known problems: Congestion (seen in SugarScape app) – when use multi-threaded multi-process MASS. Workaround for now: when using multi-process, use single-thread (1/24/14 email) Hang – when 2 processes, single-thread, and agents try to cross over to other node. Testbed provided dslab on hercules: /cherie/ClimateNew4/testrun/runClimate.sh (2/4/14) Agents Object[] callSome() does not have implementation code Currently just return null. This function was desired to be used by agent code of bionetworks & climate in Fall 2013. minor: change “ERROR” to “WARNING” re: missing DLB config file (so users do not “panic”) (this problem still seen in code base of .new4) When totally delete DLB.properties file you can see this message.