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.
amg4psblas/docs/html/userhtmlsu7.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">&#x00A0;</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"
>
4 years ago
<div class="center"
>
<<<<<<< HEAD
4 years ago
<!--l. 44--><p class="noindent" >
<!--l. 45--><p class="noindent" ><span class="lstinline"></span><span
4 years ago
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;</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>
4 years ago
<!--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
4 years ago
class="cmr-12">, according to the</span>
<span
class="cmr-12">preconditioner type chosen by the user.</span>
4 years ago
<!--l. 52--><p class="noindent" ><span
4 years ago
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"
4 years ago
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"
4 years ago
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">&#x00A0;</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>
4 years ago
</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"
4 years ago
class="td11"><!--l. 57--><p class="noindent" ><span
4 years ago
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"
4 years ago
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"
4 years ago
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">&#x00A0;</span><span
class="cmtt-12">intent</span><span
class="cmtt-12">(</span><span
class="cmtt-12">in</span><span
class="cmtt-12">)</span> <span
4 years ago
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"
4 years ago
class="td11"><!--l. 59--><p class="noindent" ><span
4 years ago
class="cmr-12">The type of preconditioner. Its values are specified in Table</span><span
class="cmr-12">&#x00A0;</span><a
4 years ago
href="userhtmlse4.html#x14-13015r1"><span
4 years ago
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"
4 years ago
class="td11"><!--l. 61--><p class="noindent" ><span
class="cmr-12">Note that strings are case insensitive.</span> </td>
4 years ago
</tr><tr
style="vertical-align:baseline;" id="TBL-2-6-"><td style="white-space:normal; text-align:left;" id="TBL-2-6-1"
4 years ago
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"
4 years ago
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">&#x00A0;</span><span
class="cmtt-12">intent</span><span
class="cmtt-12">(</span><span
class="cmtt-12">out</span><span
class="cmtt-12">)</span><span
4 years ago
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"
4 years ago
class="td11"><!--l. 63--><p class="noindent" ><span
4 years ago
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
class="cmr-12">&#x00A0;</span><a
4 years ago
href="userhtmlse7.html#x27-310007"><span
4 years ago
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"
4 years ago
class="td11"> </td> </tr></table></div>
=======
<!--l. 437--><p class="noindent" >
<div class="minipage"><pre class="verbatim" id="verbatim-10">
!&#x00A0;build&#x00A0;a&#x00A0;one-level&#x00A0;RAS&#x00A0;with&#x00A0;overlap&#x00A0;2&#x00A0;and&#x00A0;ILU(0)&#x00A0;on&#x00A0;the&#x00A0;local&#x00A0;blocks.
call&#x00A0;P%init(&#8217;AS&#8217;,info)
call&#x00A0;P%set(&#8217;SUB_OVR&#8217;,2,info)
call&#x00A0;P%build(A,desc_A,info)
...&#x00A0;...
!&#x00A0;solve&#x00A0;Ax=b&#x00A0;with&#x00A0;preconditioned&#x00A0;BiCGSTAB
&#x00A0;&#x00A0;call&#x00A0;psb_krylov(&#8217;BICGSTAB&#8217;,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>