Mpi.txt_ Bloc de Notas
-
Upload
montufar-jj -
Category
Documents
-
view
235 -
download
0
Transcript of Mpi.txt_ Bloc de Notas
-
8/11/2019 Mpi.txt_ Bloc de Notas
1/31
mpi.txt
MPI
- spawn/attach- communicators
- pt2pt requests
- collective
- RMA
- error (handling, FT,reporting)
MPID
- messages - tradition MPI message
- one-sided operations
- control?
- streams- process management (via BNR)
Pgina 1
-
8/11/2019 Mpi.txt_ Bloc de Notas
2/31
mpi.txt
Communication Methods- TCP
- VIA
- Shared Memory
- Loopback
- IMPI
================================
================================
===============
MPI layer
--------------------
Operations
Pgina 2
-
8/11/2019 Mpi.txt_ Bloc de Notas
3/31
mpi.txt
- point-to-point - requests
- datatypes
- communicators
- status
- errors
- collective
- datatypes
- communicators - errors
- process management
- communicators
- info - errors
Pgina 3
-
8/11/2019 Mpi.txt_ Bloc de Notas
4/31
mpi.txt
- RMA - datatypes
- windows
- communicators
- groups
- epoch - errors
- I/O
- depends on - files
- datatypes
- requests
- info
- status - errors
Pgina 4
-
8/11/2019 Mpi.txt_ Bloc de Notas
5/31
mpi.txt
* implemented via ROMIO
- dependent only on MPIfunctions
- future enhancements may
use low-level interfaces
- topology - communicators
- errors
* can be implemented entirely
at the MPI layer
- generalized requests
- errors
* can be implemented entirely
at the MPI layer
Pgina 5
-
8/11/2019 Mpi.txt_ Bloc de Notas
6/31
mpi.txt
--------------------
Structures
- requests
- datatypes
- communicators - groups
- groups
* are groups modified or
augmented by low layers?- windows
- files
* defined and implemented via
ROMIO
- future enhancements mayrequire access lower layers
Pgina 6
-
8/11/2019 Mpi.txt_ Bloc de Notas
7/31
mpi.txt
- status
- errors- attributes
* can be defined and
operations implemented entirely
at the MPI layer
- communicator - datatypes
- windows
- info * can be defined and
operations implemented entirely
at the MPI layer
================================================================
Pgina 7
-
8/11/2019 Mpi.txt_ Bloc de Notas
8/31
mpi.txt
===============
MPID
--------------------
Operations
- point-to-point
- collective operations
- process management
- RMA
- generalized requests
Pgina 8
-
8/11/2019 Mpi.txt_ Bloc de Notas
9/31
mpi.txt
Structures
--------------------
Concepts
- MPI buffer movement (moving
buffers defined by an address,count and
datatype)
- internal buffer management
- Connection management
Pgina 9
-
8/11/2019 Mpi.txt_ Bloc de Notas
10/31
mpi.txt
- virtual connectionstructures
- low-level connnection
management (sockets, etc.)
should be handled entirely by the device and
probably driven by a state
machine
================================
================================
===============
Multi-method design
Pgina 10
-
8/11/2019 Mpi.txt_ Bloc de Notas
11/31
mpi.txt
--------------------
Device-level objects
- group
- data structures
- methods
- set_connection(group,
rank, vc_ptr) - associate
pointer to virtual
connection structure with
a (group,rank)
Pgina 11
-
8/11/2019 Mpi.txt_ Bloc de Notas
12/31
mpi.txt
- get_connection(group,
rank) - returns pointer tovirtual connection
structure associated with
(group,rank)
- communicators
- data structures
- group
- methods
- set_connection(dcomm,
rank, vc_ptr) - associatepointer to virtual
Pgina 12
-
8/11/2019 Mpi.txt_ Bloc de Notas
13/31
mpi.txt
connection structure with
a (dcomm,rank)
- get_connection(dcomm,
rank) - returns pointer to
virtual connection
structure associated with(dcomm,rank)
- virtual connections
- alloc() - returns a pointer
to a virtual connection
structure
- add_ref(vc) - increments thereference count (atomically)
Pgina 13
-
8/11/2019 Mpi.txt_ Bloc de Notas
14/31
mpi.txt
- release() - decrements thereference count; if the
reference count reaches
zero, the structure is freed
NOTE: It may be useful to beable to locate a virtual
connection based on a
process group ID and rank, in
part so we can detect whenmultiple virtual
connections might be formed
between a pair of processes.
Pgina 14
-
8/11/2019 Mpi.txt_ Bloc de Notas
15/31
mpi.txt
can connect/accept be called
multiple times between a set ofprocesses?
--------------------
Method-level functions
Method descriptors are strings
that are used to describe the
capabilities ofthe methods. These descriptors
can then be used to determine if
two processes
miight be capable of "talking"
using the method in question.We say "might be
Pgina 15
-
8/11/2019 Mpi.txt_ Bloc de Notas
16/31
mpi.txt
capable" because in the case of
a method like VIA, it may beimpossible provide
enough information in the
descriptor to determine in two
processes can talk.
It may be necessary to simplyattempt to form the connection.
This implies
that binding to a particular
protocol may need to be deferreduntil we are
ready to form a real connection.
However, some methods, such as
shared memory,
can provide enough informationand thus can be bound
Pgina 16
-
8/11/2019 Mpi.txt_ Bloc de Notas
17/31
mpi.txt
immediately.
- query/get_descriptor()
- match_descriptors()
================================================================
===============
MPI_Init()
- create basic datatypes
MPIR_Datatype_init() {
Pgina 17
-
8/11/2019 Mpi.txt_ Bloc de Notas
18/31
mpi.txt
foreach dt (all basic
datatypes) {
MPID_Datatype_init(dt,
...)
}
}
- initialize device
- BNR initialization
BNR_Init()
BNR_Get_group(&my_bnr_group)
BNR_Get_size(my_bnr_group,&size)
Pgina 18
-
8/11/2019 Mpi.txt_ Bloc de Notas
19/31
mpi.txt
BNR_Get_rank(my_bnr_group,
&rank)
BNR_Get_parent(&parent_bnr_group
)
BNR_Merge(my_bnr_group,
parent_bnr_group,&inter_bnr_group)
- loop through methods
- initialize method
- query for descriptor of
method's capabilities
Q: what about dymanicly
Pgina 19
-
8/11/2019 Mpi.txt_ Bloc de Notas
20/31
mpi.txt
loaded methods? do they have to
be initialized now or can they be added later?
- publish capabilities of all
known methods
- initialize AQ, buffer
management, etc.
- establish MPI_COMM_WORLD
- create MPI_GROUP_WORLD
(internal) from BNR my_group,
etc.
stores BNR info in group
Pgina 20
-
8/11/2019 Mpi.txt_ Bloc de Notas
21/31
mpi.txt
structure
allocates virtual connectionstructures
initializes virtual
connections to stubs
- create MPI_COMM_WORLD fromMPI_GROUP_WORLD
- establish inter-communicator
with parent (if parent exists)
- create inter_group from
inter_bnr_group
- create inter-communicatorfrom inter_group
Pgina 21
-
8/11/2019 Mpi.txt_ Bloc de Notas
22/31
mpi.txt
- create inter_group frominter_bnr_gorup
- create inter-communicator from
inter_group
MPI_Spawn()
{
BNR_Open_group(my_bnr_group,&new_bnr_group)
BNR_Spawn(remote_bnr_group,
N, ..., func)
BNR_Close(remote_bnr_group)
BNR_Merge(my_bnr_group,remote_bnr_group,
Pgina 22
-
8/11/2019 Mpi.txt_ Bloc de Notas
23/31
mpi.txt
&inter_bnr_group);
}
need a BNR_Group_ID which isglobally unique in order to
implement MPI_Connect/Attach
--------------------------------
--------------------------------
--------
Structures that cross layers
Pgina 23
-
8/11/2019 Mpi.txt_ Bloc de Notas
24/31
mpi.txt
- many of the information
structures that are passedthrough the layers contain
data sections from multiple
layers
- ne option is to include device(and method) include files in
the MPICH layer
include file. Rob and Brian
feel this would be bad.
- David suggests that the
structure definitions be
supplied by the device
header files and that methodspecific information be included
Pgina 24
-
8/11/2019 Mpi.txt_ Bloc de Notas
25/31
mpi.txt
in those
definition using unions. Roband Brian feel this is ugly
(from a software
engineering standpoint).
- Rob and Brian suggest havingeach layer define their own
portion of the
structure. The definitions of
the higher layers are known tothe lower
layers, but not vice versa.
To increase cache locality and
reduce memory
allocation, the device (andmethods) report the amount of
Pgina 25
-
8/11/2019 Mpi.txt_ Bloc de Notas
26/31
mpi.txt
space they need in
these structures so that thehighest layer can allocate
sufficient space.
pointer arithmatic, etc.
Virtual connection
- used by MM implementation to
allow late binding to a method
this implies that the VC
contains a pointer to either the
function pointer
table for the method to which
it is bound or the functionpointer to table to
Pgina 26
-
8/11/2019 Mpi.txt_ Bloc de Notas
27/31
mpi.txt
a set of functions that
perform the binding to such amethod
- one-to-one correspondence
between a virtual connection and
a real connection
- Contains
- state of binding
- method specific information - function pointer table?
----------
Communicators- Contains
Pgina 27
-
8/11/2019 Mpi.txt_ Bloc de Notas
28/31
mpi.txt
- communication group
- local group(inter-communicator only)
- send and receive context IDs
- same for intra-communicator
- attributes
- reference count - error handlers
- device specific information
(needed for MPICH-G2)
----------
Groups
- Contains
- virtual connection table - my rank
Pgina 28
-
8/11/2019 Mpi.txt_ Bloc de Notas
29/31
mpi.txt
- reference count
- device specific information(???)
----------
Requests- probably allocated and
partially initialized above ADI
- initialization complete by
device/method
- Request contains
- Immutable after
initialization
- type of request - persistent request flag
Pgina 29
-
8/11/2019 Mpi.txt_ Bloc de Notas
30/31
mpi.txt
- send, bsend, rsend,
ssend, recv, generalized - buffer
- count
- datatype
- rank (src or dest
depending on type of request) - tag
- comm
----------
Connection resolution
- needs to talk to with BNR
----------
Pgina 30
-
8/11/2019 Mpi.txt_ Bloc de Notas
31/31
mpi.txt
Communication agent
Pgina 31