Next: Methods
Up: Data Structures and Classes
Previous: Data Structures and Classes
Contents
Descriptor data structure
All the general matrix informations and elements to be
exchanged among processes are stored within a data structure of the
type descdatapsb_desc_type.
Every structure of this type is associated with a discretization
pattern and enables data communications and other operations that are
necessary for implementing the various algorithms of interest to us.
The data structure itself psb_desc_type
can be treated as an
opaque object handled via the tools routines of
Sec. 6 and 3.5;
nevertheless we include here a description for the curious
reader.
First we describe the psb_indx_map
type. This is a data
structure that keeps track of a certain number of basic issues such
as:
- The value of the communication/MPI context;
- The number of indices in the index space, i.e. global number of
rows and columns of a sparse matrix;
- The local set of indices, including:
- The number of local indices (and local rows);
- The number of halo indices (and therefore local columns);
- The global indices corresponding to the local ones.
There are many different schemes for storing these data; therefore
there are a number of types extending the base one, and the descriptor
structure holds a polymorphic object whose dynamic type can be any of
the extended types.
The methods associated with this data type answer the following
queries:
- For a given set of local indices, find the corresponding indices
in the global numbering;
- For a given set of global indices, find the corresponding
indices in the local numbering, if any, or return an invalid
- Add a global index to the set of halo indices;
- Find the process owner of each member of a set of global
indices.
All methods but the last are purely local; the last method potentially
requires communication among processes, and thus is a synchronous
method. The choice of a specific dynamic type for the index map is
made at the time the descriptor is initially allocated, according to
the mode of initialization (see also 6).
The descriptor contents are as follows:
- indxmap
- A polymorphic variable of a type that is any
extension of the indx_map type described above.
- halo_index
- A list of the halo and boundary elements for
the current process to be exchanged with other processes; for each
processes with which it is necessary to communicate:
- Process identifier;
- Number of points to be received;
- Indices of points to be received;
- Number of points to be sent;
- Indices of points to be sent;
The list may contain an arbitrary number of groups; its end is marked
by a -1.
Specified as: an allocatable integer array of rank one.
- ext_index
- A list of element indices to be exchanged to
implement the mapping between a base descriptor and a descriptor
with overlap.
- ovrlap_index
- A list of the overlap elements for the
current process, organized in groups like the previous vector:
- Process identifier;
- Number of points to be received;
- Indices of points to be received;
- Number of points to be sent;
- Indices of points to be sent;
The list may contain an arbitrary number of groups; its end is marked
by a -1.
Specified as: an allocatable integer array of rank one.
- ovr_mst_idx
- A list to retrieve the value of each
overlap element from the respective master process.
Specified as: an allocatable integer array of rank one.
- ovrlap_elem
- For all overlap points belonging to th
ecurrent process:
- Overlap point index;
- Number of processes sharing that overlap points;
- Index of a ``master'' process:
Specified as: an allocatable integer array of rank two.
- bnd_elem
- A list of all boundary points, i.e. points
that have a connection with other processes.
The Fortran 2003 declaration for psb_desc_type
structures is
as follows:
Figure 3:
The PSBLAS defined data type that
contains the communication descriptor.
|
A communication descriptor associated with a sparse matrix has a
state, which can take the following values:
- Build:
- State entered after the first allocation, and before the
first assembly; in this state it is possible to add communication
requirements among different processes.
- Assembled:
- State entered after the assembly; computations using
the associated sparse matrix, such as matrix-vector products, are
only possible in this state.
Subsections
Next: Methods
Up: Data Structures and Classes
Previous: Data Structures and Classes
Contents