Modeling with Parallel DEVS
Serialization in DEVS models Select function Implicit serialization of parallel models E-DEVS: internal transition first, external transition after Inadequate representation of DEVS models with parallel components
Parallel DEVS Atomic Models ta(s) (1) s DEVS = < X b, S, Y b, int, ext, conf, ta, s y b (3) s ’ = int s x b (5) s ’ = ext ( s,e,x b ) (6a) (6a) s ’ = conf ( s,e,x b ) (6b)
Parallel DEVS Atomic models ta(s) (1) s DEVS = < X b, S, Y b, int, ext, conf, ta, s y b (3) s ’ = int s
Parallel DEVS Atomic models ta(s) (1) s DEVS = < X b, S, Y b, int, ext, conf, ta, x b (5) s ’ = ext ( s,e,x b ) (6a) (6a)
Parallel DEVS Atomic models ta(s) (1) s DEVS = < X b, S, Y b, int, ext, conf, ta, x b (5) s ’ = conf ( s,e,x b ) (6b)
Parallel-DEVS Coupled models Components Couplings –Internal –External Inputs –External Outputs FallowfieldKingstonOttawa departure arrival departure arrival passengers Ottawa-Toronto
Simulation mechanism Simulation advanced through message exchange –Synchronization messages TypeAction t ) Output execution ( *, t )State transition ( done, t )End of action –Content messages ( y, t )Output event ( q, t )External event
Simulator Drives atomic models State tN = time of next transition tL = time of last transition message bag Upon receivingDo y = s send ( y, t ) t ) y = s send ( y, t ) Add q to message bag –(q, t) Add q to message bag –( *, t ) s ext ; tN = ta(s) ; tL = t if t < tN s ext ; tN = ta(s) ; tL = t s int ; tN = ta(s) ; tL = t if t = tN bag = s int ; tN = ta(s) ; tL = t s conf ; tN = ta(s) ; tL = t if t = tN bag s conf ; tN = ta(s) ; tL = t
Coordinator Coordinates processor’s activities Coordinator tN = 10 tN = 20 10) ( y, 10) y = s ( done, 10) ( y, 10 )
Coordinator tN = 10 tN = 20 ( *, 10) (q, 10) s = int s = ext s = conf ( done, 30) ( done, 20) (done, 15) ( *, 10)
Coordinator tN = 30 tN = 20 tN = 15 15)
Parallel CD++ A tool to execute Parallel DEVS and Parallel Cell-DEVS models in parallel/distributed environments Layered architecture based on Warped MPI (Message Passing Interface) Warped Parallel CD++
Parallel - DEVS simulation Independent of the modelling technique Different simulators can be applied according to the needs. Examples of existing simulators: –Hierarchical –Flat –Centralized –Distributed –Real-Time
Parallel DEVS simulation Processors –Simulator:Atomic model –Coordinator:Coupled model Processor hierarchy = model hierarchy Cellular model : a coupled model of 16 cell Coord. Simulator Processors: 1 coordinator 16 simulators Simulator
CD++ Parallel simulator Model partitioned among available CPUs –Atomic models Each atomic model assigned to a CPU –Coupled models Coordinator is placed on each CPU where there is a component CPU 1CPU 2 Coord. Simulator Coord. Simulator
Parallel simulation mechanism CPU 1CPU 2 Simulator Master coord. Simulator Slave coord. (y,10) (done,10) (y,10) (done,10)
Parallel simulation mechanism CPU 1CPU 2 simulator Master coord. simulator Slave coord. (*,10) (done,tN) (done, min tN) (q,10) (done,tN) (*,10)
Extensions to CD++
Extensions (cont.)
Partition Files
RADS (Carleton University) – Alpha network and Gamma network
Simulation Results GPT Generator transducer queue processor throughput cpuusage out arrive in done solvedout Generator- Processor-Transducer –Multiple instances (12, 48 and 96) –1 to 12 CPUs(different machines)
Results Generator - Processor - Transducer
Results Heat diffusion model –100 x 100 surface –Each cell holds a temperature value –Temperature is update periodically Partitions –1, 2, 4 and 8 CPUs Quantization –Quantum sizes: 0 ; 0,001 ; 0,01 y 0,
Results Heat diffusion - Linux cluster
Results Heat diffusion - 4 processors SMP