You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
psblas3/docs/html/node43.html

369 lines
10 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>psb_cdall -- Allocates a communication descriptor</TITLE>
<META NAME="description" CONTENT="psb_cdall -- Allocates a communication descriptor">
<META NAME="keywords" CONTENT="userhtml">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="userhtml.css">
<LINK REL="next" HREF="node44.html">
<LINK REL="previous" HREF="node42.html">
<LINK REL="up" HREF="node42.html">
<LINK REL="next" HREF="node44.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html728"
HREF="node44.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="file:/usr/share/latex2html/icons/next.png"></A>
<A NAME="tex2html724"
HREF="node42.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="file:/usr/share/latex2html/icons/up.png"></A>
<A NAME="tex2html718"
HREF="node42.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="file:/usr/share/latex2html/icons/prev.png"></A>
<A NAME="tex2html726"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="file:/usr/share/latex2html/icons/contents.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html729"
HREF="node44.html">psb_cdins Communication</A>
<B> Up:</B> <A NAME="tex2html725"
HREF="node42.html">Data management routines</A>
<B> Previous:</B> <A NAME="tex2html719"
HREF="node42.html">Data management routines</A>
&nbsp; <B> <A NAME="tex2html727"
HREF="node1.html">Contents</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00071000000000000000">
psb_cdall -- Allocates a communication descriptor</A>
</H2>
<P>
<PRE>
call psb_cdall(icontxt, desc_a, info,mg=mg,parts=parts)
call psb_cdall(icontxt, desc_a, info,vg=vg,flag=flag)
call psb_cdall(icontxt, desc_a, info,vl=vl)
call psb_cdall(icontxt, desc_a, info,nl=nl)
call psb_cdall(icontxt, desc_a, info,mg=mg,repl=.true.)
</PRE>
<P>
This subroutine initializes the communication descriptor associated
with an index space. Exactly one of the optional arguments
<code>parts</code>, <code>vg</code>, <code>vl</code>, <code>nl</code> or <code>repl</code>
must be specified, thereby choosing
the specific initialization strategy:
<DL>
<DT><STRONG><B>On Entry </B></STRONG></DT>
<DD>
</DD>
<DT><STRONG>Type:</STRONG></DT>
<DD>Synchronous.
</DD>
<DT><STRONG>icontxt</STRONG></DT>
<DD>the communication context.
<BR>
Scope:<B>global</B>.
<BR>
Type:<B>required</B>.
<BR>
Intent: <B>in</B>.
<BR>
Specified as: an integer value.
</DD>
<DT><STRONG>vg</STRONG></DT>
<DD>Data allocation: each index <!-- MATH
$i\in \{1\dots mg\}$
-->
<IMG
WIDTH="98" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img82.png"
ALT="$i\in \{1\dots mg\}$"> is allocated
to process <IMG
WIDTH="39" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img83.png"
ALT="$vg(i)$">.
Scope:<B>global</B>.
<BR>
Type:<B>optional</B>.
<BR>
Intent: <B>in</B>.
<BR>
Specified as: an integer array.
</DD>
<DT><STRONG>flag</STRONG></DT>
<DD>Specifies whether entries in <IMG
WIDTH="20" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img84.png"
ALT="$vg$"> are zero- or one-based.
Scope:<B>global</B>.
<BR>
Type:<B>optional</B>.
<BR>
Intent: <B>in</B>.
<BR>
Specified as: an integer value <IMG
WIDTH="27" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img85.png"
ALT="$0,1$">, default <IMG
WIDTH="11" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img86.png"
ALT="$0$">.
<P>
</DD>
<DT><STRONG>mg</STRONG></DT>
<DD>the (global) number of rows of the problem.
<BR>
Scope:<B>global</B>.
<BR>
Type:<B>optional</B>.
<BR>
Intent: <B>in</B>.
<BR>
Specified as: an integer value. It is required if <code>parts</code> or
<code>repl</code> is specified.
</DD>
<DT><STRONG>parts</STRONG></DT>
<DD>the subroutine that defines the partitioning scheme.
<BR>
Scope:<B>global</B>.
<BR>
Type:<B>required</B>.
<BR>
Specified as: a subroutine.
</DD>
<DT><STRONG>vl</STRONG></DT>
<DD>Data allocation: the set of global indices belonging to the
calling process.
Scope:<B>local</B>.
<BR>
Type:<B>optional</B>.
<BR>
Intent: <B>in</B>.
<BR>
Specified as: an integer array.
</DD>
<DT><STRONG>nl</STRONG></DT>
<DD>Data allocation: in a generalized block-row distribution the
number of indices belonging to the current process.
Scope:<B>local</B>.
<BR>
Type:<B>optional</B>.
<BR>
Intent: <B>in</B>.
<BR>
Specified as: an integer value.
</DD>
<DT><STRONG>repl</STRONG></DT>
<DD>Data allocation: build a replicated index space (i.e. all
processes own all indices).
Scope:<B>global</B>.
<BR>
Type:<B>optional</B>.
<BR>
Intent: <B>in</B>.
<BR>
Specified as: the logical value <code>.true.</code>
</DD>
</DL>
<P>
<DL>
<DT><STRONG><B>On Return</B></STRONG></DT>
<DD>
</DD>
<DT><STRONG>desc_a</STRONG></DT>
<DD>the communication descriptor.
<BR>
Scope:<B>local</B>.
<BR>
Type:<B>required</B>.
<BR>
Intent: <B>out</B>.
<BR>
Specified as: a structured data of type descdata<TT>psb_desc_type</TT>.
</DD>
<DT><STRONG>info</STRONG></DT>
<DD>Error code.
<BR>
Scope: <B>local</B>
<BR>
Type: <B>required</B>
<BR>
Intent: <B>out</B>.
<BR>
An integer value; 0 means no error has been detected.
</DD>
</DL>
<P>
<FONT SIZE="+1"><B>Notes</B></FONT>
<OL>
<LI>Exactly one of the optional arguments <code>parts</code>, <code>vg</code>,
<code>vl</code>, <code>nl</code> must be specified, thereby choosing the
initialization strategy as follows:
<DL>
<DT><STRONG>parts</STRONG></DT>
<DD>In this case we have a subroutine specifying the mapping
between global indices and process/local index pairs. If this
optional argument is specified, then it is mandatory to
specify the argument <code>mg</code> as well.
The subroutine must conform to the following interface:
<PRE>
interface
subroutine psb_parts(glob_index,mg,np,pv,nv)
integer, intent (in) :: glob_index,np,mg
integer, intent (out) :: nv, pv(*)
end subroutine psb_parts
end interface
</PRE>
The input arguments are:
<DL>
<DT><STRONG>glob_index</STRONG></DT>
<DD>The global index to be mapped;
</DD>
<DT><STRONG>np</STRONG></DT>
<DD>The number of processes in the mapping;
</DD>
<DT><STRONG>mg</STRONG></DT>
<DD>The total number of global rows in the mapping;
</DD>
</DL>
The output arguments are:
<DL>
<DT><STRONG>nv</STRONG></DT>
<DD>The number of entries in <code>pv</code>;
</DD>
<DT><STRONG>pv</STRONG></DT>
<DD>A vector containint the indices of the processes to
which the global index should be assigend; each entry must satisfy
<!-- MATH
$0\le pv(i) < np$
-->
<IMG
WIDTH="106" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img87.png"
ALT="$0\le pv(i) &lt; np$">; if <IMG
WIDTH="51" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img88.png"
ALT="$nv&gt;1$"> we have an index assigned to multiple
processes, i.e. we have an overlap among the subdomains.
</DD>
</DL>
</DD>
<DT><STRONG>vg</STRONG></DT>
<DD>In this case the association between an index and a process
is specified via an integer vector; the size of the index space is
equal to the size of <code>vg</code>, and each index <IMG
WIDTH="10" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
SRC="img3.png"
ALT="$i$"> is assigned to
the process <IMG
WIDTH="39" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img83.png"
ALT="$vg(i)$">. The vector <code>vg</code> must be identical on all
calling processes; its entries may have the ranges <IMG
WIDTH="94" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img89.png"
ALT="$(0\dots np-1)$">
or <IMG
WIDTH="65" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img90.png"
ALT="$(1\dots np)$"> according to the value of <code>flag</code>.
</DD>
<DT><STRONG>vl</STRONG></DT>
<DD>In this case we are specifying the list of indices assigned
to the current process; thus, the global problem size <IMG
WIDTH="27" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img91.png"
ALT="$mg$"> is given by
the sum of the sizes of the individual vectors <code>vl</code> specified
on the calling processes. The subroutine will check that each entry
in the global index space <IMG
WIDTH="70" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img92.png"
ALT="$(1\dots mg)$"> is specified exactly once.
</DD>
<DT><STRONG>nl</STRONG></DT>
<DD>In this case we are implying a generalized row-block
distribution in which each process <IMG
WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img93.png"
ALT="$I$"> gets assigned a consecutive
chunk of <IMG
WIDTH="59" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img94.png"
ALT="$N_I=nl$"> global indices.
</DD>
<DT><STRONG>repl</STRONG></DT>
<DD>In this case we are asking to replicate all indices on
all processes. This is a special purpose data allocation that is
useful in the construction of some multilevel preconditioners.
</DD>
</DL>
</LI>
<LI>On exit from this routine the descriptor is in the build state
</LI>
</OL>
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html728"
HREF="node44.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="file:/usr/share/latex2html/icons/next.png"></A>
<A NAME="tex2html724"
HREF="node42.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="file:/usr/share/latex2html/icons/up.png"></A>
<A NAME="tex2html718"
HREF="node42.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="file:/usr/share/latex2html/icons/prev.png"></A>
<A NAME="tex2html726"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="file:/usr/share/latex2html/icons/contents.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html729"
HREF="node44.html">psb_cdins Communication</A>
<B> Up:</B> <A NAME="tex2html725"
HREF="node42.html">Data management routines</A>
<B> Previous:</B> <A NAME="tex2html719"
HREF="node42.html">Data management routines</A>
&nbsp; <B> <A NAME="tex2html727"
HREF="node1.html">Contents</A></B>
<!--End of Navigation Panel-->
</BODY>
</HTML>