Parallel Sorting ona Spatial Computer21 October 2012RACES workshop at SPLASH’12Max Orhai and Andrew P. BlackPortland State UniversityMaseeh College ofEngineering andComputer ScienceUndergraduate Researchand Mentoring ProgramSupported bya gift fromIBM Research
what is a spatial computer?a networked system of computing devicesdistributed through a physical space, in which:1. the difﬁculty of moving information betweenany two devices depends on the physicaldistance between them, and2. the functional goals of the system are deﬁnedin terms of the system’s spatial structure.(deﬁnition based on 2012 Spatial Computing Workshop)the ‘problem’the ‘solution’2
a spatial computer isa networked system of computing devicesdistributed through a physical space, in which:1. the difﬁculty of moving information betweenany two devices depends on the physicaldistance between them, and2. the functional goals of the system are deﬁnedin terms of the system’s spatial structure.the ‘problem’the ‘solution’4
spatial computing offers real insights into1. the costs and constraints ofcommunication in large parallelcomputer arrays2. how to design algorithms that respectthese costs and constraintsmatch the communicationstructure of the program tothe physical structure of thecomputer networkmessage of this talk5
our example: collision sortspace ∼particles ∼collisions ∼orderdatacomparisonssimulation physics computing machinerygoal:arrange particles by color➡distributed computation of aglobal solution using onlylocal information andminimal communicationapproach:an entropy-reducingparticle system6darker lighter
collision sort: mechanismspace ∼particles ∼collisions ∼orderdatacomparisonsphysics computation7multi-way collisions quantize time‘boundarycollisions’always causerebounda b c din a single step, the color ofparticle b is compared withthe average color ofoverlapping particles a and c(a + c) / 2 b
collision sort: mechanismspace ∼particles ∼collisions ∼patches of space ∼motion between patches ∼orderdatacomparisonsprocessorsmessage-passingphysics computationloop (one step):• accept incoming particlesfrom neighbors• detect collisions and altervelocities accordingly• increment positions,sending outgoing particlesto neighbors8patches quantize spacecollisions across patchesare not detected!
040stepstimecollision sort: worst case?200particlesin two sortedsubsequencesproportionalspeedsmaximumspeed:0.9patch-widthsper step14
collision sort: in 2D1000particleseach withboth blue andgreen valuesproportionalspeedsmaximumspeed:0.9patch-widthsper step per axis15darker lighterdarkerlighter
the total cost of any parallelalgorithm is a combination oflocal computation costs andcommunication costsfor simplicity, we assume thatlocal computation is cheap,and focus on thecost of communicationbetween system componentscollision sort: performance16
because each processor need only• receive at most one and• send at most one messageper neighbor during each loop cycle,communication cost is the minimum possible,under these assumptions:• a one-patch-per-step information speed limit• message cost independent of message size• local computation is freeABmessages mayconvey multipleparticlescollision sort: performance17
what about component failure?if messages are acknowledged, thenany ‘undeliverable’ particles cansimply have their velocities reversed,just as in a boundary collision:particle bounce ↜ message bouncefault tolerance is an ‘emergentproperty’ of this rule!collision sort: performance18
research efforts:• MIT CSAIL amorphous computingproject, c. 2000↝ BBN Proto language• Laboratoire IBISC (ComputerScience, Systems Biology andComplex Systems) at U. d’Evry↝ MGS topologicalsimulation language• abstract geometric computation(continuous signal machines)D. Duchier, J. Durand-Lose,M. Senot at U. d’Orleansapplication domains:• large-scale sensor networks• distributed control systems• mobile robot swarms• biological modeling• computability theoryrelated work: spatial computing20
conclusionlarge-scale parallel computer arrayscan be spatial computer systems, ifprogrammed in a way that respectsphysical distances.spatial computing gives us a cost modelthat approximates the physics ofinformation transmission, and thatleverages our intuition about physicalobjects to design concurrent algorithms.Tilera processor arrays21references:• http://www.spatial-computing.org• http://www.greenarraychips.com/• http://www.tilera.com/• http://www.xmos.com/• Abelson et al. Amorphous computing. Communications of the ACM 2000.• Gershernfeld et al. Reconﬁgurable asynchronous logic automata (RALA).POPL 2010.• Macias & Durbeck. The Cell Matrix: an architecture for nanocomputing.Nanotechnology 2001.• Duchier, Durand-Lose, and Senot. Solving Q-SAT in bounded space and timeby geometrical computation. 7th Intl. Conf. Computability in Europe 2011.