mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-07 07:04:57 +00:00
psblas3:
fix documentation bug for NRM2
This commit is contained in:
+127
-129
@@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
|
||||
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Error handling</TITLE>
|
||||
<META NAME="description" CONTENT="Error handling">
|
||||
<TITLE>psb_rcv -- Receive data</TITLE>
|
||||
<META NAME="description" CONTENT="psb_rcv -- Receive data">
|
||||
<META NAME="keywords" CONTENT="userhtml">
|
||||
<META NAME="resource-type" CONTENT="document">
|
||||
<META NAME="distribution" CONTENT="global">
|
||||
@@ -18,174 +18,172 @@ original version by: Nikos Drakos, CBLU, University of Leeds
|
||||
|
||||
<LINK REL="STYLESHEET" HREF="userhtml.css">
|
||||
|
||||
<LINK REL="next" HREF="node92.html">
|
||||
<LINK REL="previous" HREF="node70.html">
|
||||
<LINK REL="up" HREF="userhtml.html">
|
||||
<LINK REL="previous" HREF="node86.html">
|
||||
<LINK REL="up" HREF="node71.html">
|
||||
<LINK REL="next" HREF="node88.html">
|
||||
</HEAD>
|
||||
|
||||
<BODY >
|
||||
<!--Navigation Panel-->
|
||||
<A NAME="tex2html1268"
|
||||
<A NAME="tex2html1270"
|
||||
HREF="node88.html">
|
||||
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
|
||||
<A NAME="tex2html1264"
|
||||
HREF="userhtml.html">
|
||||
<A NAME="tex2html1266"
|
||||
HREF="node71.html">
|
||||
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
|
||||
<A NAME="tex2html1258"
|
||||
<A NAME="tex2html1262"
|
||||
HREF="node86.html">
|
||||
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
|
||||
<A NAME="tex2html1266"
|
||||
<A NAME="tex2html1268"
|
||||
HREF="node1.html">
|
||||
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
|
||||
<BR>
|
||||
<B> Next:</B> <A NAME="tex2html1269"
|
||||
HREF="node88.html">psb_errpush Pushes</A>
|
||||
<B> Up:</B> <A NAME="tex2html1265"
|
||||
HREF="userhtml.html">userhtml</A>
|
||||
<B> Previous:</B> <A NAME="tex2html1259"
|
||||
HREF="node86.html">psb_rcv Receive</A>
|
||||
<B> <A NAME="tex2html1267"
|
||||
<B> Next:</B> <A NAME="tex2html1271"
|
||||
HREF="node88.html">Error handling</A>
|
||||
<B> Up:</B> <A NAME="tex2html1267"
|
||||
HREF="node71.html">Parallel environment routines</A>
|
||||
<B> Previous:</B> <A NAME="tex2html1263"
|
||||
HREF="node86.html">psb_snd Send</A>
|
||||
<B> <A NAME="tex2html1269"
|
||||
HREF="node1.html">Contents</A></B>
|
||||
<BR>
|
||||
<BR>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
<H1><A NAME="SECTION00090000000000000000">
|
||||
Error handling</A>
|
||||
</H1>
|
||||
<H2><A NAME="SECTION000816000000000000000">
|
||||
psb_rcv -- Receive data</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
The PSBLAS library error handling policy has been completely rewritten
|
||||
in version 2.0. The idea behind the design of this new error handling
|
||||
strategy is to keep error messages on a stack allowing the user to
|
||||
trace back up to the point where the first error message has been
|
||||
generated. Every routine in the PSBLAS-2.0 library has, as last
|
||||
non-optional argument, an integer <code>info</code> variable; whenever,
|
||||
inside the routine, an error is detected, this variable is set to a
|
||||
value corresponding to a specific error code. Then this error code is
|
||||
also pushed on the error stack and then either control is returned to
|
||||
the caller routine or the execution is aborted, depending on the users
|
||||
choice. At the time when the execution is aborted, an error message is
|
||||
printed on standard output with a level of verbosity than can be
|
||||
chosen by the user. If the execution is not aborted, then, the caller
|
||||
routine checks the value returned in the <code>info</code> variable and, if
|
||||
not zero, an error condition is raised. This process continues on all the
|
||||
levels of nested calls until the level where the user decides to abort
|
||||
the program execution.
|
||||
<PRE>
|
||||
call psb_rcv(icontxt, dat, src, m)
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
Figure <A HREF="#fig:routerr">8</A> shows the layout of a generic <code>psb_foo</code>
|
||||
routine with respect to the PSBLAS-2.0 error handling policy. It is
|
||||
possible to see how, whenever an error condition is detected, the
|
||||
<code>info</code> variable is set to the corresponding error code which is,
|
||||
then, pushed on top of the stack by means of the
|
||||
<code>psb_errpush</code>. An error condition may be directly detected inside
|
||||
a routine or indirectly checking the error code returned returned by a
|
||||
called routine. Whenever an error is encountered, after it has been
|
||||
pushed on stack, the program execution skips to a point where the
|
||||
error condition is handled; the error condition is handled either by
|
||||
returning control to the caller routine or by calling the
|
||||
<code>psb\_error</code> routine which prints the content of the error stack
|
||||
and aborts the program execution, according to the choice made by the
|
||||
user with <code>psb_set_erraction</code>. The default is to print the error
|
||||
and terminate the program, but the user may choose to handle the error
|
||||
explicitly.
|
||||
|
||||
<P>
|
||||
|
||||
<DIV ALIGN="CENTER"><A NAME="fig:routerr"></A><A NAME="6399"></A>
|
||||
<TABLE>
|
||||
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 8:</STRONG>
|
||||
The layout of a generic <TT>psb_foo</TT>
|
||||
routine with respect to PSBLAS-2.0 error handling policy.</CAPTION>
|
||||
<TR><TD>
|
||||
This subroutine receives a packet of data to a destination.
|
||||
<DL>
|
||||
<DT><STRONG>Type:</STRONG></DT>
|
||||
<DD>Synchronous: see usage notes.
|
||||
</DD>
|
||||
<DT><STRONG><B>On Entry </B></STRONG></DT>
|
||||
<DD>
|
||||
</DD>
|
||||
<DT><STRONG>icontxt</STRONG></DT>
|
||||
<DD>the communication context identifying the virtual
|
||||
parallel machine.
|
||||
<BR>
|
||||
|
||||
<DIV ALIGN="CENTER">
|
||||
<!-- MATH
|
||||
$\fbox{\TheSbox}$
|
||||
Scope: <B>global</B>.
|
||||
<BR>
|
||||
Type: <B>required</B>.
|
||||
<BR>
|
||||
Intent: <B>in</B>.
|
||||
<BR>
|
||||
Specified as: an integer variable.
|
||||
</DD>
|
||||
<DT><STRONG>src</STRONG></DT>
|
||||
<DD>Source process.
|
||||
<BR>
|
||||
Scope: <B>global</B>.
|
||||
<BR>
|
||||
Type: <B>required</B>.
|
||||
<BR>
|
||||
Intent: <B>in</B>.
|
||||
<BR>
|
||||
Specified as: an integer value <!-- MATH
|
||||
$0<= src <= np-1$
|
||||
-->
|
||||
<IMG
|
||||
WIDTH="536" HEIGHT="218" ALIGN="MIDDLE" BORDER="0"
|
||||
SRC="img19.png"
|
||||
ALT="\fbox{\TheSbox}">
|
||||
</DIV></TD></TR>
|
||||
</TABLE>
|
||||
</DIV>
|
||||
|
||||
<P>
|
||||
Figure <A HREF="#fig:errormsg">9</A> reports a sample error message generated by
|
||||
the PSBLAS-2.0 library. This error has been generated by the fact that
|
||||
the user has chosen the invalid ``FOO'' storage format to represent
|
||||
the sparse matrix. From this error message it is possible to see that
|
||||
the error has been detected inside the <code>psb_cest</code> subroutine
|
||||
called by <code>psb_spasb</code> ... by process 0 (i.e. the root process).
|
||||
|
||||
<P>
|
||||
|
||||
<DIV ALIGN="CENTER"><A NAME="fig:errormsg"></A><A NAME="6400"></A>
|
||||
<TABLE>
|
||||
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 9:</STRONG>
|
||||
A sample PSBLAS-2.0 error
|
||||
message. Process 0 detected an error condition inside the psb_cest subroutine</CAPTION>
|
||||
<TR><TD>
|
||||
WIDTH="147" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
|
||||
SRC="img135.png"
|
||||
ALT="$0<= src <= np-1$">.
|
||||
<BR></DD>
|
||||
<DT><STRONG>m</STRONG></DT>
|
||||
<DD>Number of rows.
|
||||
<BR>
|
||||
|
||||
<DIV ALIGN="CENTER">
|
||||
<!-- MATH
|
||||
$\fbox{\TheSbox}$
|
||||
Scope: <B>global</B>.
|
||||
<BR>
|
||||
Type: <B>Optional</B>.
|
||||
<BR>
|
||||
Intent: <B>in</B>.
|
||||
<BR>
|
||||
Specified as: an integer value <!-- MATH
|
||||
$0<= m <= size(dat,1)$
|
||||
-->
|
||||
<IMG
|
||||
WIDTH="536" HEIGHT="218" ALIGN="MIDDLE" BORDER="0"
|
||||
SRC="img19.png"
|
||||
ALT="\fbox{\TheSbox}">
|
||||
</DIV></TD></TR>
|
||||
</TABLE>
|
||||
</DIV>
|
||||
WIDTH="172" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
|
||||
SRC="img131.png"
|
||||
ALT="$0<= m <= size(dat,1)$">.
|
||||
<BR>
|
||||
When <IMG
|
||||
WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
||||
SRC="img132.png"
|
||||
ALT="$dat$"> is a rank 2 array, specifies the number of rows to be sent
|
||||
independently of the leading dimension <IMG
|
||||
WIDTH="83" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
|
||||
SRC="img133.png"
|
||||
ALT="$size(dat,1)$">; must have the
|
||||
same value on sending and receiving processes.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR><HR>
|
||||
<!--Table of Child-Links-->
|
||||
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
|
||||
<DL>
|
||||
<DT><STRONG><B>On Return</B></STRONG></DT>
|
||||
<DD>
|
||||
</DD>
|
||||
<DT><STRONG>dat</STRONG></DT>
|
||||
<DD>The data to be received.
|
||||
<BR>
|
||||
Scope: <B>local</B>.
|
||||
<BR>
|
||||
Type: <B>required</B>.
|
||||
<BR>
|
||||
Intent: <B>inout</B>.
|
||||
<BR>
|
||||
Specified as: an integer, real or complex variable, which may be a
|
||||
scalar, or a rank 1 or 2 array, or a character or logical scalar. Type, kind and rank must agree on sender and receiver process; if <IMG
|
||||
WIDTH="18" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
|
||||
SRC="img129.png"
|
||||
ALT="$m$"> is
|
||||
not specified, size must agree as well.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<UL>
|
||||
<LI><A NAME="tex2html1270"
|
||||
HREF="node88.html">psb_errpush -- Pushes an error code onto the error
|
||||
stack</A>
|
||||
<LI><A NAME="tex2html1271"
|
||||
HREF="node89.html">psb_error -- Prints the error stack content and aborts
|
||||
execution</A>
|
||||
<LI><A NAME="tex2html1272"
|
||||
HREF="node90.html">psb_set_errverbosity -- Sets the verbosity of error
|
||||
messages.</A>
|
||||
<LI><A NAME="tex2html1273"
|
||||
HREF="node91.html">psb_set_erraction -- Set the type of action to be
|
||||
taken upon error condition.</A>
|
||||
</UL>
|
||||
<!--End of Table of Child-Links-->
|
||||
<P>
|
||||
<FONT SIZE="+1"><B>Notes</B></FONT>
|
||||
|
||||
<OL>
|
||||
<LI>This subroutine implies a synchronization, but only between the
|
||||
calling process and the source process <IMG
|
||||
WIDTH="26" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
|
||||
SRC="img136.png"
|
||||
ALT="$src$">.
|
||||
</LI>
|
||||
</OL>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
<!--Navigation Panel-->
|
||||
<A NAME="tex2html1268"
|
||||
<A NAME="tex2html1270"
|
||||
HREF="node88.html">
|
||||
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
|
||||
<A NAME="tex2html1264"
|
||||
HREF="userhtml.html">
|
||||
<A NAME="tex2html1266"
|
||||
HREF="node71.html">
|
||||
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
|
||||
<A NAME="tex2html1258"
|
||||
<A NAME="tex2html1262"
|
||||
HREF="node86.html">
|
||||
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
|
||||
<A NAME="tex2html1266"
|
||||
<A NAME="tex2html1268"
|
||||
HREF="node1.html">
|
||||
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
|
||||
<BR>
|
||||
<B> Next:</B> <A NAME="tex2html1269"
|
||||
HREF="node88.html">psb_errpush Pushes</A>
|
||||
<B> Up:</B> <A NAME="tex2html1265"
|
||||
HREF="userhtml.html">userhtml</A>
|
||||
<B> Previous:</B> <A NAME="tex2html1259"
|
||||
HREF="node86.html">psb_rcv Receive</A>
|
||||
<B> <A NAME="tex2html1267"
|
||||
<B> Next:</B> <A NAME="tex2html1271"
|
||||
HREF="node88.html">Error handling</A>
|
||||
<B> Up:</B> <A NAME="tex2html1267"
|
||||
HREF="node71.html">Parallel environment routines</A>
|
||||
<B> Previous:</B> <A NAME="tex2html1263"
|
||||
HREF="node86.html">psb_snd Send</A>
|
||||
<B> <A NAME="tex2html1269"
|
||||
HREF="node1.html">Contents</A></B>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user