270 likes | 288 Views
Explore implicit serialization and representation of DEVS models with parallel components in E-DEVS. Learn about simulation mechanisms and the coordination of processor activities for advanced simulation. Discover Parallel CD++ for executing Parallel DEVS and Parallel Cell-DEVS models in parallel/distributed environments.
E N D
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
xb(5) yb(3) s’ = d ext (s,e,xb) (6a) s’ = d conf (s,e,xb) (6b) l (s) (2) s’ = d int (s) (4) s ta(s) (1) Parallel DEVS Atomic Models DEVS = < Xb, S, Yb, dint , dext , dconf , ta, l >
yb(3) l (s) (2) s’ = d int (s) (4) s ta(s) (1) Parallel DEVS Atomic models DEVS = < Xb, S, Yb, dint , dext , dconf , ta, l >
xb(5) s’ = d ext (s,e,xb) (6a) s ta(s) (1) Parallel DEVS Atomic models DEVS = < Xb, S, Yb, dint , dext , dconf , ta, l >
xb(5) s’ = d conf (s,e,xb) (6b) s ta(s) (1) Parallel DEVS Atomic models DEVS = < Xb, S, Yb, dint , dext , dconf , ta, l >
Ottawa-Toronto arrival Ottawa Fallowfield arrival Kingston departure departure passengers passengers passengers Parallel-DEVS Coupled models • Components • Couplings • Internal • External Inputs • External Outputs
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 receiving Do • ( @, t ) y =l (s); send ( y, t ) • (q, t) Add q to message bag • ( *, t ) • if t < tN s =dext; tN = ta(s) ; tL = t • if t = tN bag = s = dint ; tN = ta(s) ; tL = t • if t = tN bag s= dconf ; tN = ta(s) ; tL = t
( @, 10) ( y, 10 ) ( done, 10 ) ( y, 10) ( y, 10) ( done, 10) ( @, 10) ( @, 10) ( done, 10) y =l (s) y =l (s) Coordinator • Coordinates processor’s activities Coordinator tN = 10 tN = 20 tN = 10
( *, 10) (q, 10) (done, 15) (q, 10) ( done, 20) (q, 10) ( *, 10) (done, 15) ( *, 10) ( done, 30) (*, 10) s =dint s =dconf s =dext Coordinator Coordinator tN = 10 tN = 10 tN = 20
( @, 15) Coordinator Coordinator tN = 20 tN = 30 tN = 15
Parallel CD++ • A tool to execute Parallel DEVS and Parallel Cell-DEVS models in parallel/distributed environments • Layered architecture based on Warped Parallel CD++ Warped MPI (Message Passing Interface)
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: 1 coordinator 16 simulators Cellular model : a coupled model of 16 cell Coord. Simulator Simulator Simulator Simulator • Processors • Simulator: Atomic model • Coordinator: Coupled model • Processor hierarchy= model hierarchy
CD++ Parallel simulator CPU 1 CPU 2 Coord. Coord. Simulator Simulator Simulator 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
Parallel simulation mechanism (@,10) (done,10) (@,10) (@,10) (@,10) (y,10) (done,10) (y,10) (done,10) (y,10) (done,10) Simulator Simulator Simulator Simulator CPU 1 CPU 2 Slave coord. Master coord.
(*,10) (done, min tN) (*,10) (q,10) (*,10) (q,10) (*,10) (done,tN) (done,tN) (done,tN) simulator simulator simulator simulator Parallel simulation mechanism CPU 1 CPU 2 Slave coord. Master coord.
RADS (Carleton University) • Alpha network and Gamma network
Simulation Results GPT in queue Generator out done in arrive solved out processor throughput transducer cpuusage • 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,1 10000
Results • Heat diffusion - Linux cluster
Results • Heat diffusion - 4 processors SMP