Escolar Documentos
Profissional Documentos
Cultura Documentos
Felix C. G. Santos
Eduardo R. R. Brito Jr.
José Maria B. Silva
Loops / adaptive iterations Kernel
Articulation of solvers Blocks
Solvers Groups
Phenomenon Phenomenon
1. SANTOS, F. C. G., LENCASTRE, MariaAn Approach for FEM Simulator Development. Journal of
Computational and Applied Mathematics., v.185, p.326 346, 2006.
2. SANTOS, F. C. G., VIEIRA, Mardoqueu Souza, LENCASTRE, Maria Workflow for Simulators Based on
Finite Element Method. Lecture Notes in Computer Science. , v.2658, p.555 564, 2003
3. SANTOS, F. C. G., LENCASTRE, Maria FEM Computational Phenomenon In: The Fourth Latin American
Conference on Pattern Languages of Programming SugarLoafPloP'2004, 2004, Porto das Dunas.
SugarLoafPloP Proceedings. , 2004. p.11 22
Layer representation in MPhyScasS
DAGs Workflows
Dataprogrammable Kernel
Procedures
Large Data Structs
BLAS, Solvers Blocks
Groups
K(i,j)=K(i,j)+r(m,n)
Layers behavior in MPhyScasS
Layers behavior in MPhyScasS
Layers behavior in MPhyScasS
Phenomena
share States
(matrices, vectors
and scalars)
2. The Problem:
How to develop parallel simulators using a structure
as close as possible to the structure of the sequential
simulator.
Objective:
To reduce reprogramming without compromising
too much the simulator performance
3. A solution – the structure of MPhyScasP:
Use the structural tree hierarchy of the simulator
Parallelize the hierarchy, starting with one process in the higher level,
ending up with all processes working in the lower level (tree of processes)
Move storage of matrices and vectors from the Group Level to the
Phenomenon Level (special Phenomenon objects will manage them and
associated communicators)
Move solvers for linear systems from the Group Level to the Phenomenon
Level (same special Phen objects where data structures are storaged)
Establish a control communication protocol between Coordinator
processes and the clone processes through connectors
Establish a data transfer communication protocol between processes,
which have common boundaries, where coupled information should be
exchanged, through connectors
Layer representation in MPhyScasP
DAGs Workflows
Dataprogrammable Kernel
Procedures
Data Struct Description
Blocks
Groups
Kernel
Block i
Block j
Group j Group k
Group k
Ph r
Ph r Ph s Ph m Ph n Ph s
Ph m Ph n Ph q Ph o Ph p
DSr1
DSr2 qrx
Solver DSm1 Solver
DSm1 DSr1 DSm2
qrx
DSm2 DSr2
Solver
Special Phens
Block Level
Block i
Block j
Group j Group k
Group k
Ph r
Ph r Ph s Ph m Ph n Ph s
Ph m Ph n Ph q Ph o Ph p
DSr1
DSr2 qrx
Solver DSm1 Solver
DSm1 DSr1 DSm2
qrx
DSm2 DSr2
Solver
Group Level
Group j Group k
Group k
Ph r
Ph r Ph s Ph m Ph n Ph s
Ph m Ph n Ph q Ph o Ph p
DSr1
DSr2 qrx
Solver DSm1 Solver
DSm1 DSr1 DSm2
qrx
DSm2 DSr2
Solver
Phenomenon Level
Ph r
Ph r Ph s Ph m Ph n Ph s
Ph m Ph n Ph q Ph o Ph p
DSr1
DSr2 qrx
Solver DSm1 Solver
DSm1 DSr1 DSm2
qrx
DSm2 DSr2
Solver
Simulator Parallel Structure
Simulator Parallel Structure
Interactions to be
Kernel Level Taken care of
Block Level
Group Level
Phenomenon Level
Kernel Level Process
Block Level Processes
Group Level Processes
Phenomenon Level Processes
4. A solution – coordinating and connecting
parallel pieces
What are software connectors:
prefabricated, heterogeneous components that provide complex
functionality and engage in complex interactions.
Although components have been the predominant focus of researchers
and practitioners, they address only one aspect of largescale development.
Another important aspect, particularly magnified by the emergence of the
Internet and the growing need for distribution, is interaction among
components. Component interaction is embodied in the notion of software
connectors.
Ref.: Nikunj R. Mehta, Nenad Medvidovic,Sandeep Phadke, “Towards a
Taxonomy of Software Connectors”
What are software connectors (cont.):
Connectors manifest themselves in a software system as shared variable
accesses, table entries, buffers, instructions to a linker, procedure calls,
networking protocols, pipes, SQL links between a database and an
application, and so forth. In large, and especially distributed systems,
connectors become key determinants of system properties, such as
performance, resource utilization, global rates of flow, scalability,
reliability, security, evolvability, and so forth.
They typically separate computation (components) from interaction
(connectors) in a system. All software connectors comprise one or more
ducts, interaction channels with no associated behavior; furthermore, all
connectors, regardless of their complexity, provide mechanisms for
transferring data and/or control along a duct.
Ref.: Nikunj R. Mehta, Nenad Medvidovic,Sandeep Phadke, “Towards a
Taxonomy of Software Connectors”, Proceedings of the 22nd international
conference on Software engineering, pag 178 – 187, 2000
Connector
Node: KernelNode, BlockNode, DerivedClass: KernelConn,
GroupNode, PhenNode BlockConn, GroupConn, PhenConn
Purpose is procedure call (communication and coordination services) with one
dimension with values Kernel, Block, Group and Phenomenon.
Kernel Level
Kernel
Block j Block i
Group j Group k
Group k
Ph r
Ph r Ph s Ph s
Ph m Ph n
Ph q Ph p
Ph m Ph n
Kernel Level
Kernel
External call
(local)
Clone processes
Clone processes
Block j Block i
Group j Group k
Group k
Ph r
Ph r Ph s Ph s
Ph m Ph n
Ph q Ph o Ph p
Ph m Ph n
Clone processes
Block Level
External call
(Remote)
Clone processes
Block j Block i
Group j Group k
Group k
Ph r
Ph r Ph s Ph s
Ph m Ph n
Ph q Ph o Ph p
Ph m Ph n
Clone processes
Group Level
External call
(Remote)
Group j Group k
Group k
Ph r
Ph r Ph s Ph s
Ph m Ph n
Ph q Ph o Ph p
Ph m Ph n
Clone processes
Phenomenon Level
External call
(Remote)
Ph r
Ph r Ph s Ph s
Ph m Ph n
Ph q Ph o Ph p
Ph m Ph n
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
Process a – Level L_0
MasterProces Processes c_0c_n – Level_1
s CloneProcesses
Process b – Level_0 Processes d_0d_m – Level_2
CloneProcesses
...
... ...
... ...
5. Final remarks:
• The structure of MPhyScas-S (sequential simulators) was presented
together with the problem of its parallelization
• A solution to this problem was described, which kept the hierarchical
structure of MPhyScas-S in a parallel fashion.
• Special connectors were used in order to bind the pieces of code
distributed among many processes
• Other type of connector is also used (for coupled data transfer between
processes), but was not described.
• Stage of project: prototype still under construction. It will allow for three
more levels, totalling 7 levels.
• Main benefits expected:
– loose (local only) hierarchical coordination of processes allows for more
asynchronous processing.
– Legacy code was almost completely used without modification (all properties of
MPhyScas-S are inherited)
– No control communication is needed in the lower levels of computation
– Hierarchical refinement produces more locality awareness
– Allows for dynamic scheduling
• Difficulties:
– Preprocessing is problematic, because the data for each process should
resemble the data for the sequential simulators, eventhough it is partitioned
– The use of the hierarchy for data distribution is good because only few
processes are involved at a time. However, book keeping is not so trivial.