mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-16 02:49:03 +00:00
Docs updates.
This commit is contained in:
+22
-23
@@ -18,10 +18,10 @@ href="userhtmlse5.html#tailuserhtmlse8.html">tail</a>] [<a
|
||||
href="userhtml.html#userhtmlse11.html" >up</a>] </p></div>
|
||||
<h3 class="sectionHead"><span class="titlemark">8 </span> <a
|
||||
id="x14-1240008"></a>Error handling</h3>
|
||||
<!--l. 5--><p class="noindent" >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
|
||||
<!--l. 5--><p class="noindent" >The PSBLAS library error handling policy has been defined at the time version 2.0
|
||||
was written. The idea behind the design of 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
|
||||
error message has been generated. Every routine in the PSBLAS library has, as
|
||||
last non-optional argument, an integer <span class="obeylines-h"><span class="verb"><span
|
||||
class="cmtt-10">info</span></span></span> variable; whenever, inside the
|
||||
routine, an error is detected, this variable is set to a value corresponding to a
|
||||
@@ -38,16 +38,16 @@ execution.
|
||||
<!--l. 23--><p class="indent" > Figure <a
|
||||
href="#x14-124025r5">5<!--tex4ht:ref: fig:routerr --></a> shows the layout of a generic <span class="obeylines-h"><span class="verb"><span
|
||||
class="cmtt-10">psb_foo</span></span></span> routine with respect to the
|
||||
PSBLAS-2.0 error handling policy. It is possible to see how, whenever an error
|
||||
condition is detected, the <span class="obeylines-h"><span class="verb"><span
|
||||
class="cmtt-10">info</span></span></span> variable is set to the corresponding error code which
|
||||
is, then, pushed on top of the stack by means of the <span class="obeylines-h"><span class="verb"><span
|
||||
class="cmtt-10">psb_errpush</span></span></span>. 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 <span class="obeylines-h"><span class="verb"><span
|
||||
PSBLAS error handling policy. It is possible to see how, whenever an error condition
|
||||
is detected, the <span class="obeylines-h"><span class="verb"><span
|
||||
class="cmtt-10">info</span></span></span> variable is set to the corresponding error code which is, then,
|
||||
pushed on top of the stack by means of the <span class="obeylines-h"><span class="verb"><span
|
||||
class="cmtt-10">psb_errpush</span></span></span>. 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 <span class="obeylines-h"><span class="verb"><span
|
||||
class="cmtt-10">psb\_error</span></span></span> routine which prints the content of
|
||||
the error stack and aborts the program execution, according to the choice
|
||||
made by the user with <span class="obeylines-h"><span class="verb"><span
|
||||
@@ -292,14 +292,13 @@ error handling policy.</span></div><!--tex4ht:label?: x14-124025r5 -->
|
||||
|
||||
</div><hr class="endfloat" />
|
||||
<!--l. 112--><p class="indent" > Figure <a
|
||||
href="#x14-124026r6">6<!--tex4ht:ref: fig:errormsg --></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 <span class="obeylines-h"><span class="verb"><span
|
||||
class="cmtt-10">psb_cest</span></span></span> subroutine called by <span class="obeylines-h"><span class="verb"><span
|
||||
class="cmtt-10">psb_spasb</span></span></span> ... by process 0 (i.e. the root
|
||||
process).
|
||||
href="#x14-124026r6">6<!--tex4ht:ref: fig:errormsg --></a> reports a sample error message generated by the PSBLAS 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 <span class="obeylines-h"><span class="verb"><span
|
||||
class="cmtt-10">psb_cest</span></span></span> subroutine called by
|
||||
<span class="obeylines-h"><span class="verb"><span
|
||||
class="cmtt-10">psb_spasb</span></span></span> ... by process 0 (i.e. the root process).
|
||||
|
||||
|
||||
|
||||
@@ -331,8 +330,8 @@ Aborting...
|
||||
<!--l. 156--><p class="nopar" > </div></div>
|
||||
</div>
|
||||
<br /> <div class="caption"
|
||||
><span class="id">Listing 6: </span><span
|
||||
class="content">A sample PSBLAS-3.0 error message. Process 0 detected an error
|
||||
><span class="id">Listing 6: </span><span
|
||||
class="content">A sample PSBLAS error message. Process 0 detected an error
|
||||
condition inside the psb_cest subroutine</span></div><!--tex4ht:label?: x14-124026r6 -->
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user