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.
193 lines
9.2 KiB
HTML
193 lines
9.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
"http://www.w3.org/TR/html4/loose.dtd">
|
|
<html >
|
|
<head><title>GPU example</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
|
|
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
|
|
<!-- html,3 -->
|
|
<meta name="src" content="userhtml.tex">
|
|
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
|
</head><body
|
|
>
|
|
<!--l. 420--><div class="crosslinks"><p class="noindent"><span
|
|
class="cmr-12">[</span><a
|
|
href="userhtmlsu6.html" ><span
|
|
class="cmr-12">prev</span></a><span
|
|
class="cmr-12">] [</span><a
|
|
href="userhtmlsu6.html#tailuserhtmlsu6.html" ><span
|
|
class="cmr-12">prev-tail</span></a><span
|
|
class="cmr-12">] [</span><a
|
|
href="#tailuserhtmlsu7.html"><span
|
|
class="cmr-12">tail</span></a><span
|
|
class="cmr-12">] [</span><a
|
|
href="userhtmlse4.html#userhtmlsu7.html" ><span
|
|
class="cmr-12">up</span></a><span
|
|
class="cmr-12">] </span></p></div>
|
|
<h4 class="subsectionHead"><span class="titlemark"><span
|
|
class="cmr-12">4.2 </span></span> <a
|
|
id="x16-150004.2"></a><span
|
|
class="cmr-12">GPU example</span></h4>
|
|
<!--l. 422--><p class="noindent" ><span
|
|
class="cmr-12">The code reported in Figure</span><span
|
|
class="cmr-12"> </span><a
|
|
href="#x16-15001r5"><span
|
|
class="cmr-12">5</span><!--tex4ht:ref: fig:gpu-ex1 --></a> <span
|
|
class="cmr-12">shows how to set up a program exploiting the combined</span>
|
|
<span
|
|
class="cmr-12">GPU capabilities of PSBLAS and AMG4PSBLAS.</span>
|
|
|
|
|
|
|
|
<!--l. 425--><p class="indent" > <a
|
|
id="x16-15001r5"></a><hr class="float"><div class="float"
|
|
>
|
|
|
|
|
|
|
|
<div class="center"
|
|
>
|
|
<<<<<<< HEAD
|
|
<!--l. 44--><p class="noindent" >
|
|
<!--l. 45--><p class="noindent" ><span class="lstinline"></span><span
|
|
class="cmtt-12">call</span><span
|
|
class="cmtt-12"> </span><span
|
|
class="cmtt-12">p</span><span
|
|
class="cmtt-12">%</span><span
|
|
class="cmtt-12">init</span><span
|
|
class="cmtt-12">(</span><span
|
|
class="cmtt-12">contxt</span><span
|
|
class="cmtt-12">,</span><span
|
|
class="cmtt-12">ptype</span><span
|
|
class="cmtt-12">,</span><span
|
|
class="cmtt-12">info</span><span
|
|
class="cmtt-12">)</span></div>
|
|
<!--l. 48--><p class="noindent" ><span
|
|
class="cmr-12">This method allocates and initializes the preconditioner </span><span class="lstinline"></span><span
|
|
class="cmtt-12">p</span><span
|
|
class="cmr-12">, according to the</span>
|
|
<span
|
|
class="cmr-12">preconditioner type chosen by the user.</span>
|
|
<!--l. 52--><p class="noindent" ><span
|
|
class="cmbx-12">Arguments</span>
|
|
<div class="tabular"> <table id="TBL-2" class="tabular"
|
|
cellspacing="0" cellpadding="0"
|
|
><colgroup id="TBL-2-1g"><col
|
|
id="TBL-2-1"><col
|
|
id="TBL-2-2"></colgroup><tr
|
|
style="vertical-align:baseline;" id="TBL-2-1-"><td style="white-space:normal; text-align:left;" id="TBL-2-1-1"
|
|
class="td11"><!--l. 56--><p class="noindent" ><span class="lstinline"></span><span
|
|
class="cmtt-12">contxt</span> </td> <td style="white-space:normal; text-align:left;" id="TBL-2-1-2"
|
|
class="td11"><!--l. 56--><p class="noindent" ><span class="lstinline"></span><span
|
|
class="cmtt-12">type</span><span
|
|
class="cmtt-12">(</span><span
|
|
class="cmtt-12">psb_ctxt_type</span><span
|
|
class="cmtt-12">),</span><span
|
|
class="cmtt-12"> </span><span
|
|
class="cmtt-12">intent</span><span
|
|
class="cmtt-12">(</span><span
|
|
class="cmtt-12">in</span><span
|
|
class="cmtt-12">)</span><span
|
|
class="cmr-12">.</span> </td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-2-2-"><td style="white-space:normal; text-align:left;" id="TBL-2-2-1"
|
|
class="td11"><!--l. 57--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-2-2"
|
|
class="td11"><!--l. 57--><p class="noindent" ><span
|
|
class="cmr-12">The communication context.</span> </td></tr><tr
|
|
style="vertical-align:baseline;" id="TBL-2-3-"><td style="white-space:normal; text-align:left;" id="TBL-2-3-1"
|
|
class="td11"><!--l. 58--><p class="noindent" ><span class="lstinline"></span><span
|
|
class="cmtt-12">ptype</span> </td> <td style="white-space:normal; text-align:left;" id="TBL-2-3-2"
|
|
class="td11"><!--l. 58--><p class="noindent" ><span class="lstinline"></span><span
|
|
class="cmtt-12">character</span><span
|
|
class="cmtt-12">(</span><span
|
|
class="cmtt-12">len</span><span
|
|
class="cmtt-12">=*),</span><span
|
|
class="cmtt-12"> </span><span
|
|
class="cmtt-12">intent</span><span
|
|
class="cmtt-12">(</span><span
|
|
class="cmtt-12">in</span><span
|
|
class="cmtt-12">)</span> <span
|
|
class="cmr-12">.</span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-2-4-"><td style="white-space:normal; text-align:left;" id="TBL-2-4-1"
|
|
class="td11"><!--l. 59--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-4-2"
|
|
class="td11"><!--l. 59--><p class="noindent" ><span
|
|
class="cmr-12">The type of preconditioner. Its values are specified in Table</span><span
|
|
class="cmr-12"> </span><a
|
|
href="userhtmlse4.html#x14-13015r1"><span
|
|
class="cmr-12">1</span><!--tex4ht:ref: tab:precinit --></a><span
|
|
class="cmr-12">.</span> </td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-2-5-"><td style="white-space:normal; text-align:left;" id="TBL-2-5-1"
|
|
class="td11"><!--l. 61--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-5-2"
|
|
class="td11"><!--l. 61--><p class="noindent" ><span
|
|
class="cmr-12">Note that strings are case insensitive.</span> </td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-2-6-"><td style="white-space:normal; text-align:left;" id="TBL-2-6-1"
|
|
class="td11"><!--l. 62--><p class="noindent" ><span class="lstinline"></span><span
|
|
class="cmtt-12">info</span> </td><td style="white-space:normal; text-align:left;" id="TBL-2-6-2"
|
|
class="td11"><!--l. 62--><p class="noindent" ><span class="lstinline"></span><span
|
|
class="cmtt-12">integer</span><span
|
|
class="cmtt-12">,</span><span
|
|
class="cmtt-12"> </span><span
|
|
class="cmtt-12">intent</span><span
|
|
class="cmtt-12">(</span><span
|
|
class="cmtt-12">out</span><span
|
|
class="cmtt-12">)</span><span
|
|
class="cmr-12">.</span> </td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-2-7-"><td style="white-space:normal; text-align:left;" id="TBL-2-7-1"
|
|
class="td11"><!--l. 63--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-7-2"
|
|
class="td11"><!--l. 63--><p class="noindent" ><span
|
|
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
|
|
class="cmr-12"> </span><a
|
|
href="userhtmlse7.html#x27-310007"><span
|
|
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
|
|
class="cmr-12">for details.</span> </td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-2-8-"><td style="white-space:normal; text-align:left;" id="TBL-2-8-1"
|
|
class="td11"> </td> </tr></table></div>
|
|
=======
|
|
<!--l. 437--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-10">
|
|
! build a one-level RAS with overlap 2 and ILU(0) on the local blocks.
|
|
call P%init(’AS’,info)
|
|
call P%set(’SUB_OVR’,2,info)
|
|
call P%build(A,desc_A,info)
|
|
... ...
|
|
! solve Ax=b with preconditioned BiCGSTAB
|
|
  call psb_krylov(’BICGSTAB’,A,P,b,x,tol,desc_A,info)
|
|
</pre>
|
|
<!--l. 448--><p class="nopar" ></div></div>
|
|
<br /> <div class="caption"
|
|
><span class="id">Listing 5: </span><span
|
|
class="content">setup of a one-level Schwarz preconditioner.</span></div><!--tex4ht:label?: x16-15001r5 -->
|
|
>>>>>>> development
|
|
|
|
|
|
|
|
</div><hr class="endfloat" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--l. 1--><div class="crosslinks"><p class="noindent"><span
|
|
class="cmr-12">[</span><a
|
|
href="userhtmlsu6.html" ><span
|
|
class="cmr-12">prev</span></a><span
|
|
class="cmr-12">] [</span><a
|
|
href="userhtmlsu6.html#tailuserhtmlsu6.html" ><span
|
|
class="cmr-12">prev-tail</span></a><span
|
|
class="cmr-12">] [</span><a
|
|
href="userhtmlsu7.html" ><span
|
|
class="cmr-12">front</span></a><span
|
|
class="cmr-12">] [</span><a
|
|
href="userhtmlse4.html#userhtmlsu7.html" ><span
|
|
class="cmr-12">up</span></a><span
|
|
class="cmr-12">] </span></p></div>
|
|
<!--l. 1--><p class="indent" > <a
|
|
id="tailuserhtmlsu7.html"></a>
|
|
</body></html>
|