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.
2185 lines
93 KiB
HTML
2185 lines
93 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
"http://www.w3.org/TR/html4/loose.dtd">
|
|
<html >
|
|
<head><title>Parallel environment routines</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. 3--><div class="crosslinks"><p class="noindent">[<a
|
|
href="userhtmlse11.html" >next</a>] [<a
|
|
href="userhtmlse6.html" >prev</a>] [<a
|
|
href="userhtmlse6.html#tailuserhtmlse6.html" >prev-tail</a>] [<a
|
|
href="userhtmlse4.html#tailuserhtmlse7.html">tail</a>] [<a
|
|
href="userhtml.html#userhtmlse10.html" >up</a>] </p></div>
|
|
<h3 class="sectionHead"><span class="titlemark">7 </span> <a
|
|
id="x12-1050007"></a>Parallel environment routines</h3>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.1 </span> <a
|
|
id="x12-1060007.1"></a>psb_init — Initializes PSBLAS parallel environment</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-61">
|
|
call psb_init(ctxt, np, basectxt, ids)
|
|
</pre>
|
|
<!--l. 11--><p class="nopar" >
|
|
<!--l. 13--><p class="indent" > This subroutine initializes the PSBLAS parallel environment, defining a virtual
|
|
parallel machine.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 16--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 16--><p class="noindent" >Synchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 17--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 17--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 18--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">np</span> </dt><dd
|
|
class="description">
|
|
<!--l. 18--><p class="noindent" >Number of processes in the PSBLAS virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value.  Default: use all available processes.
|
|
</dd><dt class="description">
|
|
<!--l. 24--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">basectxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 24--><p class="noindent" >the initial communication context. The new context will be defined from
|
|
the processes participating in the initial one.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value.  Default: use MPI_COMM_WORLD.
|
|
</dd><dt class="description">
|
|
<!--l. 31--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ids</span> </dt><dd
|
|
class="description">
|
|
<!--l. 31--><p class="noindent" >Identities of the processes to use for the new context; the argument is
|
|
ignored when <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">np</span></span></span> is not specified. This allows the processes in the new
|
|
environment to be in an order different from the original one.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer array.  Default: use the indices (0<span
|
|
class="cmmi-10">…</span><span
|
|
class="cmmi-10">np </span><span
|
|
class="cmsy-10">- </span>1).</dd></dl>
|
|
|
|
|
|
|
|
<!--l. 42--><p class="indent" >
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 43--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Return</span> </dt><dd
|
|
class="description">
|
|
<!--l. 43--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 44--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 44--><p class="noindent" >the communication context identifying the virtual parallel machine, type
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_ctxt_type</span></span></span>. Note that this is always a duplicate of <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">basectxt</span></span></span>,
|
|
so that library communications are completely separated from other
|
|
communication operations.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">out</span>.<br
|
|
class="newline" />Specified as: an integer variable.</dd></dl>
|
|
<!--l. 55--><p class="noindent" ><span
|
|
class="cmbx-12">Notes</span>
|
|
<ol class="enumerate1" >
|
|
<li
|
|
class="enumerate" id="x12-106002x1">
|
|
<!--l. 57--><p class="noindent" >A call to this routine must precede any other PSBLAS call.
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-106004x2">
|
|
<!--l. 58--><p class="noindent" >It is an error to specify a value for <span
|
|
class="cmmi-10">np </span>greater than the number of processes
|
|
available in the underlying base parallel environment.</li></ol>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.2 </span> <a
|
|
id="x12-1070007.2"></a>psb_info — Return information about PSBLAS parallel environment</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-62">
|
|
call psb_info(ctxt, iam, np)
|
|
</pre>
|
|
<!--l. 69--><p class="nopar" >
|
|
<!--l. 71--><p class="indent" > This subroutine returns information about the PSBLAS parallel environment,
|
|
defining a virtual parallel machine.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 74--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 74--><p class="noindent" >Asynchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 75--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 75--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 76--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 76--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.</dd></dl>
|
|
<!--l. 84--><p class="indent" >
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 85--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Return</span> </dt><dd
|
|
class="description">
|
|
<!--l. 85--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 86--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">iam</span> </dt><dd
|
|
class="description">
|
|
<!--l. 86--><p class="noindent" >Identifier of current process in the PSBLAS virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">out</span>.<br
|
|
class="newline" />Specified as: an integer value. <span
|
|
class="cmsy-10">-</span>1 <span
|
|
class="cmsy-10">≤ </span><span
|
|
class="cmmi-10">iam </span><span
|
|
class="cmsy-10">≤ </span><span
|
|
class="cmmi-10">np </span><span
|
|
class="cmsy-10">- </span>1 
|
|
</dd><dt class="description">
|
|
<!--l. 91--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">np</span> </dt><dd
|
|
class="description">
|
|
|
|
|
|
|
|
<!--l. 91--><p class="noindent" >Number of processes in the PSBLAS virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">out</span>.<br
|
|
class="newline" />Specified as: an integer variable.  </dd></dl>
|
|
<!--l. 99--><p class="noindent" ><span
|
|
class="cmbx-12">Notes</span>
|
|
<ol class="enumerate1" >
|
|
<li
|
|
class="enumerate" id="x12-107002x1">
|
|
<!--l. 101--><p class="noindent" >For processes in the virtual parallel machine the identifier will satisfy
|
|
0 <span
|
|
class="cmsy-10">≤ </span><span
|
|
class="cmmi-10">iam </span><span
|
|
class="cmsy-10">≤ </span><span
|
|
class="cmmi-10">np </span><span
|
|
class="cmsy-10">- </span>1;
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-107004x2">
|
|
<!--l. 103--><p class="noindent" >If the user has requested on <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_init</span></span></span> a number of processes less than
|
|
the total available in the parallel execution environment, the remaining
|
|
processes will have on return <span
|
|
class="cmmi-10">iam </span>= <span
|
|
class="cmsy-10">-</span>1; the only call involving <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">ctxt</span></span></span> that
|
|
any such process may execute is to <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_exit</span></span></span>.</li></ol>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.3 </span> <a
|
|
id="x12-1080007.3"></a>psb_exit — Exit from PSBLAS parallel environment</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-63">
|
|
call psb_exit(ctxt)
|
|
call psb_exit(ctxt,close)
|
|
</pre>
|
|
<!--l. 117--><p class="nopar" >
|
|
<!--l. 119--><p class="indent" > This subroutine exits from the PSBLAS parallel virtual machine.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 121--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 121--><p class="noindent" >Synchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 122--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 122--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 123--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 123--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.
|
|
</dd><dt class="description">
|
|
<!--l. 129--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">close</span> </dt><dd
|
|
class="description">
|
|
<!--l. 129--><p class="noindent" >Whether to close all data structures related to the virtual parallel machine,
|
|
besides those associated with ctxt.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: a logical variable, default value: true.</dd></dl>
|
|
<!--l. 137--><p class="noindent" ><span
|
|
class="cmbx-12">Notes</span>
|
|
<ol class="enumerate1" >
|
|
<li
|
|
class="enumerate" id="x12-108002x1">
|
|
<!--l. 139--><p class="noindent" >This routine may be called even if a previous call to <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_info</span></span></span> has returned
|
|
with <span
|
|
class="cmmi-10">iam </span>= <span
|
|
class="cmsy-10">-</span>1; indeed, it it is the only routine that may be called with
|
|
argument <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">ctxt</span></span></span> in this situation.
|
|
|
|
|
|
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-108004x2">
|
|
<!--l. 143--><p class="noindent" >A call to this routine with <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">close=.true.</span></span></span> implies a call to <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">MPI_Finalize</span></span></span>,
|
|
after which no parallel routine may be called.
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-108006x3">
|
|
<!--l. 145--><p class="noindent" >If the user whishes to use multiple communication contexts in the
|
|
same program, or to enter and exit multiple times into the parallel
|
|
environment, this routine may be called to selectively close the contexts
|
|
with <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">close=.false.</span></span></span>, while on the last call it should be called with
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">close=.true.</span></span></span> to shutdown in a clean way the entire parallel environment.</li></ol>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.4 </span> <a
|
|
id="x12-1090007.4"></a>psb_get_mpi_comm — Get the MPI communicator</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-64">
|
|
icomm = psb_get_mpi_comm(ctxt)
|
|
</pre>
|
|
<!--l. 158--><p class="nopar" >
|
|
<!--l. 160--><p class="indent" > This function returns the MPI communicator associated with a PSBLAS
|
|
context
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 162--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 162--><p class="noindent" >Asynchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 163--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 163--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 164--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 164--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.</dd></dl>
|
|
<!--l. 172--><p class="indent" >
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 173--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Return</span> </dt><dd
|
|
class="description">
|
|
<!--l. 173--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 174--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Function value</span> </dt><dd
|
|
class="description">
|
|
<!--l. 174--><p class="noindent" >The MPI communicator associated with the PSBLAS virtual parallel
|
|
machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">out</span>.<br
|
|
class="newline" /></dd></dl>
|
|
<!--l. 180--><p class="noindent" ><span
|
|
class="cmbx-12">Notes </span>The subroutine version <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_get_mpicomm</span></span></span> is still available but is
|
|
deprecated.
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.5 </span> <a
|
|
id="x12-1100007.5"></a>psb_get_mpi_rank — Get the MPI rank</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-65">
|
|
rank = psb_get_mpi_rank(ctxt, id)
|
|
</pre>
|
|
<!--l. 188--><p class="nopar" >
|
|
<!--l. 190--><p class="indent" > This function returns the MPI rank of the PSBLAS process <span
|
|
class="cmmi-10">id</span>
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 192--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 192--><p class="noindent" >Asynchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 193--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 193--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 194--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 194--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.
|
|
</dd><dt class="description">
|
|
<!--l. 200--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">id</span> </dt><dd
|
|
class="description">
|
|
<!--l. 200--><p class="noindent" >Identifier of a process in the PSBLAS virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value. 0 <span
|
|
class="cmsy-10">≤ </span><span
|
|
class="cmmi-10">id </span><span
|
|
class="cmsy-10">≤ </span><span
|
|
class="cmmi-10">np </span><span
|
|
class="cmsy-10">- </span>1 </dd></dl>
|
|
<!--l. 207--><p class="indent" >
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 208--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Return</span> </dt><dd
|
|
class="description">
|
|
<!--l. 208--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 209--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Funciton value</span> </dt><dd
|
|
class="description">
|
|
|
|
|
|
|
|
<!--l. 209--><p class="noindent" >The MPI rank associated with the PSBLAS process <span
|
|
class="cmmi-10">id</span>.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">out</span>.<br
|
|
class="newline" /></dd></dl>
|
|
<!--l. 215--><p class="noindent" ><span
|
|
class="cmbx-12">Notes </span>The subroutine version <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_get_rank</span></span></span> is still available but is deprecated.
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.6 </span> <a
|
|
id="x12-1110007.6"></a>psb_wtime — Wall clock timing</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-66">
|
|
time = psb_wtime()
|
|
</pre>
|
|
<!--l. 225--><p class="nopar" >
|
|
<!--l. 227--><p class="indent" > This function returns a wall clock timer. The resolution of the timer is dependent
|
|
on the underlying parallel environment implementation.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 230--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 230--><p class="noindent" >Asynchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 231--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Exit</span> </dt><dd
|
|
class="description">
|
|
<!--l. 231--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 232--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Function value</span> </dt><dd
|
|
class="description">
|
|
<!--l. 232--><p class="noindent" >the elapsed time in seconds.<br
|
|
class="newline" />Returned as: a <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">real(psb_dpk_)</span></span></span> variable.</dd></dl>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.7 </span> <a
|
|
id="x12-1120007.7"></a>psb_barrier — Sinchronization point parallel environment</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-67">
|
|
call psb_barrier(ctxt)
|
|
</pre>
|
|
<!--l. 242--><p class="nopar" >
|
|
<!--l. 244--><p class="indent" > This subroutine acts as an explicit synchronization point for the PSBLAS parallel
|
|
virtual machine.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 247--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 247--><p class="noindent" >Synchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 248--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 248--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 249--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 249--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.</dd></dl>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.8 </span> <a
|
|
id="x12-1130007.8"></a>psb_abort — Abort a computation</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-68">
|
|
call psb_abort(ctxt)
|
|
</pre>
|
|
<!--l. 262--><p class="nopar" >
|
|
<!--l. 264--><p class="indent" > This subroutine aborts computation on the parallel virtual machine.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 266--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 266--><p class="noindent" >Asynchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 267--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 267--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 268--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 268--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.</dd></dl>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.9 </span> <a
|
|
id="x12-1140007.9"></a>psb_bcast — Broadcast data</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-69">
|
|
call psb_bcast(ctxt, dat [, root, mode, request])
|
|
</pre>
|
|
<!--l. 284--><p class="nopar" >
|
|
<!--l. 286--><p class="indent" > This subroutine implements a broadcast operation based on the underlying
|
|
communication library.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 289--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 289--><p class="noindent" >Synchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 290--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 290--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 291--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 291--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.
|
|
</dd><dt class="description">
|
|
<!--l. 297--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 297--><p class="noindent" >On the root process, the data to be broadcast.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />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 variable, which may be
|
|
a scalar or rank 1 array.  Type, kind, rank and size must agree on all
|
|
processes.
|
|
</dd><dt class="description">
|
|
<!--l. 305--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">root</span> </dt><dd
|
|
class="description">
|
|
<!--l. 305--><p class="noindent" >Root process holding data to be broadcast.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value 0 <span
|
|
class="cmmi-10"><</span>= <span
|
|
class="cmmi-10">root <</span>= <span
|
|
class="cmmi-10">np </span><span
|
|
class="cmsy-10">- </span>1, default 0  
|
|
|
|
|
|
|
|
</dd><dt class="description">
|
|
<!--l. 310--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">mode</span> </dt><dd
|
|
class="description">
|
|
<!--l. 310--><p class="noindent" >Whether the call is started in non-blocking mode and completed later, or
|
|
is executed synchronously.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value. The action to be taken is determined by
|
|
its bit fields, which can be set with bitwise <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">OR</span></span></span>. Basic action values are
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_collective_start_</span></span></span>, <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_collective_end_</span></span></span>. Default: both fields are
|
|
selected (i.e. require synchronous completion).<br
|
|
class="newline" />
|
|
</dd><dt class="description">
|
|
<!--l. 319--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">request</span> </dt><dd
|
|
class="description">
|
|
<!--l. 319--><p class="noindent" >A request variable to check for operation completion.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />If <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> does not specify synchronous completion, then this variable must
|
|
be present.</dd></dl>
|
|
<!--l. 328--><p class="indent" >
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 329--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Return</span> </dt><dd
|
|
class="description">
|
|
<!--l. 329--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 330--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 330--><p class="noindent" >On all processes other than root, the broadcasted data.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />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, rank
|
|
and size must agree on all processes.
|
|
</dd><dt class="description">
|
|
<!--l. 337--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">request</span> </dt><dd
|
|
class="description">
|
|
<!--l. 337--><p class="noindent" >A request variable to check for operation completion.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />If <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> does not specify synchronous completion, then this variable must
|
|
be present.</dd></dl>
|
|
<!--l. 345--><p class="noindent" ><span
|
|
class="cmbx-12">Notes</span>
|
|
<ol class="enumerate1" >
|
|
<li
|
|
class="enumerate" id="x12-114002x1">
|
|
<!--l. 347--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">dat</span></span></span> argument is both input and output, and its value may be changed
|
|
even on processes different from the final result destination.
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-114004x2">
|
|
<!--l. 350--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> argument can be built with the bitwise <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">IOR()</span></span></span> operator; in the
|
|
following example, the argument is forcing immediate completion, hence the
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">request</span></span></span> argument needs not be specified:
|
|
<div class="center"
|
|
>
|
|
<!--l. 360--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-70">
|
|
  call psb_bcast(ctxt,dat,mode=ior(psb_collective_start_,psb_collective_end_))
|
|
</pre>
|
|
<!--l. 364--><p class="nopar" > </div></div>
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-114006x3">
|
|
<!--l. 369--><p class="noindent" >When splitting the operation in two calls, the <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">dat</span></span></span> argument <span
|
|
class="cmti-10">must not </span>be
|
|
accessed between calls:
|
|
<div class="center"
|
|
>
|
|
<!--l. 380--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-71">
|
|
  call psb_bcast(ctxt,dat,mode=psb_collective_start_,request=bcast_request)
|
|
  ....... ! Do not access dat
|
|
  call psb_bcast(ctxt,dat,mode=psb_collective_end_, request=bcast_request)
|
|
</pre>
|
|
<!--l. 386--><p class="nopar" > </div></div>
|
|
</li></ol>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.10 </span> <a
|
|
id="x12-1150007.10"></a>psb_sum — Global sum</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-72">
|
|
call psb_sum(ctxt, dat [, root, mode, request])
|
|
</pre>
|
|
<!--l. 399--><p class="nopar" >
|
|
<!--l. 401--><p class="indent" > This subroutine implements a sum reduction operation based on the underlying
|
|
communication library.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 404--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 404--><p class="noindent" >Synchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 405--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 405--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 406--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 406--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.
|
|
</dd><dt class="description">
|
|
<!--l. 412--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 412--><p class="noindent" >The local contribution to the global sum.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />Specified as: an integer, real or complex variable, which may be a scalar, or
|
|
a rank 1 or 2 array.  Type, kind, rank and size must agree on all processes.
|
|
</dd><dt class="description">
|
|
<!--l. 419--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">root</span> </dt><dd
|
|
class="description">
|
|
<!--l. 419--><p class="noindent" >Process to hold the final sum, or <span
|
|
class="cmsy-10">-</span>1 to make it available on all processes.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value <span
|
|
class="cmsy-10">-</span>1 <span
|
|
class="cmmi-10"><</span>= <span
|
|
class="cmmi-10">root <</span>= <span
|
|
class="cmmi-10">np </span><span
|
|
class="cmsy-10">- </span>1, default -1.  
|
|
|
|
|
|
|
|
</dd><dt class="description">
|
|
<!--l. 425--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">mode</span> </dt><dd
|
|
class="description">
|
|
<!--l. 425--><p class="noindent" >Whether the call is started in non-blocking mode and completed later, or
|
|
is executed synchronously.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value. The action to be taken is determined by
|
|
its bit fields, which can be set with bitwise <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">OR</span></span></span>. Basic action values are
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_collective_start_</span></span></span>, <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_collective_end_</span></span></span>. Default: both fields are
|
|
selected (i.e. require synchronous completion).<br
|
|
class="newline" />
|
|
</dd><dt class="description">
|
|
<!--l. 434--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">request</span> </dt><dd
|
|
class="description">
|
|
<!--l. 434--><p class="noindent" >A request variable to check for operation completion.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />If <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> does not specify synchronous completion, then this variable must
|
|
be present.</dd></dl>
|
|
<!--l. 442--><p class="indent" >
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 443--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Return</span> </dt><dd
|
|
class="description">
|
|
<!--l. 443--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 444--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 444--><p class="noindent" >On destination process(es), the result of the sum operation.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />Specified as: an integer, real or complex variable, which may be a scalar,
|
|
or a rank 1 or 2 array. <br
|
|
class="newline" />Type, kind, rank and size must agree on all processes.
|
|
</dd><dt class="description">
|
|
<!--l. 451--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">request</span> </dt><dd
|
|
class="description">
|
|
<!--l. 451--><p class="noindent" >A request variable to check for operation completion.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />If <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> does not specify synchronous completion, then this variable must
|
|
be present.</dd></dl>
|
|
<!--l. 459--><p class="noindent" ><span
|
|
class="cmbx-12">Notes</span>
|
|
<ol class="enumerate1" >
|
|
<li
|
|
class="enumerate" id="x12-115002x1">
|
|
<!--l. 461--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">dat</span></span></span> argument is both input and output, and its value may be changed
|
|
even on processes different from the final result destination.
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-115004x2">
|
|
<!--l. 464--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> argument can be built with the bitwise <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">IOR()</span></span></span> operator; in the
|
|
following example, the argument is forcing immediate completion, hence the
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">request</span></span></span> argument needs not be specified:
|
|
<div class="center"
|
|
>
|
|
<!--l. 474--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-73">
|
|
  call psb_sum(ctxt,dat,mode=ior(psb_collective_start_,psb_collective_end_))
|
|
</pre>
|
|
<!--l. 478--><p class="nopar" > </div></div>
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-115006x3">
|
|
<!--l. 483--><p class="noindent" >When splitting the operation in two calls, the <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">dat</span></span></span> argument <span
|
|
class="cmti-10">must not </span>be
|
|
accessed between calls:
|
|
<div class="center"
|
|
>
|
|
<!--l. 494--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-74">
|
|
  call psb_sum(ctxt,dat,mode=psb_collective_start_,request=sum_request)
|
|
  ....... ! Do not access dat
|
|
  call psb_sum(ctxt,dat,mode=psb_collective_end_,request=sum_request)
|
|
</pre>
|
|
<!--l. 500--><p class="nopar" > </div></div>
|
|
</li></ol>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.11 </span> <a
|
|
id="x12-1160007.11"></a>psb_max — Global maximum</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-75">
|
|
call psb_max(ctxt, dat [, root, mode, request])
|
|
</pre>
|
|
<!--l. 512--><p class="nopar" >
|
|
<!--l. 514--><p class="indent" > This subroutine implements a maximum valuereduction operation based on the
|
|
underlying communication library.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 517--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 517--><p class="noindent" >Synchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 518--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 518--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 519--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 519--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.
|
|
</dd><dt class="description">
|
|
<!--l. 525--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 525--><p class="noindent" >The local contribution to the global maximum.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />Specified as: an integer or real variable, which may be a scalar, or a rank
|
|
1 or 2 array.  Type, kind, rank and size must agree on all processes.
|
|
</dd><dt class="description">
|
|
<!--l. 532--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">root</span> </dt><dd
|
|
class="description">
|
|
<!--l. 532--><p class="noindent" >Process to hold the final maximum, or <span
|
|
class="cmsy-10">-</span>1 to make it available on all
|
|
processes.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value <span
|
|
class="cmsy-10">-</span>1 <span
|
|
class="cmmi-10"><</span>= <span
|
|
class="cmmi-10">root <</span>= <span
|
|
class="cmmi-10">np </span><span
|
|
class="cmsy-10">- </span>1, default -1. <br
|
|
class="newline" />
|
|
|
|
|
|
|
|
</dd><dt class="description">
|
|
<!--l. 538--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">mode</span> </dt><dd
|
|
class="description">
|
|
<!--l. 538--><p class="noindent" >Whether the call is started in non-blocking mode and completed later, or
|
|
is executed synchronously.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value. The action to be taken is determined by
|
|
its bit fields, which can be set with bitwise <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">OR</span></span></span>. Basic action values are
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_collective_start_</span></span></span>, <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_collective_end_</span></span></span>. Default: both fields are
|
|
selected (i.e. require synchronous completion).<br
|
|
class="newline" />
|
|
</dd><dt class="description">
|
|
<!--l. 547--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">request</span> </dt><dd
|
|
class="description">
|
|
<!--l. 547--><p class="noindent" >A request variable to check for operation completion.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />If <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> does not specify synchronous completion, then this variable must
|
|
be present.</dd></dl>
|
|
<!--l. 556--><p class="indent" >
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 557--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Return</span> </dt><dd
|
|
class="description">
|
|
<!--l. 557--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 558--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 558--><p class="noindent" >On destination process(es), the result of the maximum operation.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer or real variable, which may be a scalar, or a rank
|
|
1 or 2 array.  Type, kind, rank and size must agree on all processes.
|
|
</dd><dt class="description">
|
|
<!--l. 565--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">request</span> </dt><dd
|
|
class="description">
|
|
<!--l. 565--><p class="noindent" >A request variable to check for operation completion.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />If <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> does not specify synchronous completion, then this variable must
|
|
be present.</dd></dl>
|
|
|
|
|
|
|
|
<!--l. 574--><p class="noindent" ><span
|
|
class="cmbx-12">Notes</span>
|
|
<ol class="enumerate1" >
|
|
<li
|
|
class="enumerate" id="x12-116002x1">
|
|
<!--l. 576--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">dat</span></span></span> argument is both input and output, and its value may be changed
|
|
even on processes different from the final result destination.
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-116004x2">
|
|
<!--l. 579--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> argument can be built with the bitwise <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">IOR()</span></span></span> operator; in the
|
|
following example, the argument is forcing immediate completion, hence the
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">request</span></span></span> argument needs not be specified:
|
|
<div class="center"
|
|
>
|
|
<!--l. 589--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-76">
|
|
  call psb_max(ctxt,dat,mode=ior(psb_collective_start_,psb_collective_end_))
|
|
</pre>
|
|
<!--l. 593--><p class="nopar" > </div></div>
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-116006x3">
|
|
<!--l. 598--><p class="noindent" >When splitting the operation in two calls, the <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">dat</span></span></span> argument <span
|
|
class="cmti-10">must not </span>be
|
|
accessed between calls:
|
|
<div class="center"
|
|
>
|
|
<!--l. 609--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-77">
|
|
  call psb_max(ctxt,dat,mode=psb_collective_start_,request=max_request)
|
|
  ....... ! Do not access dat
|
|
  call psb_max(ctxt,dat,mode=psb_collective_end_,request=max_request)
|
|
</pre>
|
|
<!--l. 615--><p class="nopar" > </div></div>
|
|
</li></ol>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.12 </span> <a
|
|
id="x12-1170007.12"></a>psb_min — Global minimum</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-78">
|
|
call psb_min(ctxt, dat [, root, mode, request])
|
|
</pre>
|
|
<!--l. 625--><p class="nopar" >
|
|
<!--l. 627--><p class="indent" > This subroutine implements a minimum value reduction operation based on the
|
|
underlying communication library.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 630--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 630--><p class="noindent" >Synchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 631--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 631--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 632--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 632--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.
|
|
</dd><dt class="description">
|
|
<!--l. 638--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 638--><p class="noindent" >The local contribution to the global minimum.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />Specified as: an integer or real variable, which may be a scalar, or a rank
|
|
1 or 2 array.  Type, kind, rank and size must agree on all processes.
|
|
</dd><dt class="description">
|
|
<!--l. 645--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">root</span> </dt><dd
|
|
class="description">
|
|
<!--l. 645--><p class="noindent" >Process to hold the final value, or <span
|
|
class="cmsy-10">-</span>1 to make it available on all processes.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value <span
|
|
class="cmsy-10">-</span>1 <span
|
|
class="cmmi-10"><</span>= <span
|
|
class="cmmi-10">root <</span>= <span
|
|
class="cmmi-10">np </span><span
|
|
class="cmsy-10">- </span>1, default -1. <br
|
|
class="newline" />
|
|
|
|
|
|
|
|
</dd><dt class="description">
|
|
<!--l. 651--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">mode</span> </dt><dd
|
|
class="description">
|
|
<!--l. 651--><p class="noindent" >Whether the call is started in non-blocking mode and completed later, or
|
|
is executed synchronously.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value. The action to be taken is determined by
|
|
its bit fields, which can be set with bitwise <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">OR</span></span></span>. Basic action values are
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_collective_start_</span></span></span>, <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_collective_end_</span></span></span>. Default: both fields are
|
|
selected (i.e. require synchronous completion).<br
|
|
class="newline" />
|
|
</dd><dt class="description">
|
|
<!--l. 660--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">request</span> </dt><dd
|
|
class="description">
|
|
<!--l. 660--><p class="noindent" >A request variable to check for operation completion.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />If <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> does not specify synchronous completion, then this variable must
|
|
be present.</dd></dl>
|
|
<!--l. 669--><p class="indent" >
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 670--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Return</span> </dt><dd
|
|
class="description">
|
|
<!--l. 670--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 671--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 671--><p class="noindent" >On destination process(es), the result of the minimum operation.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />Specified as: an integer or real variable, which may be a scalar, or a rank
|
|
1 or 2 array. <br
|
|
class="newline" />Type, kind, rank and size must agree on all processes.
|
|
</dd><dt class="description">
|
|
<!--l. 678--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">request</span> </dt><dd
|
|
class="description">
|
|
<!--l. 678--><p class="noindent" >A request variable to check for operation completion.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />If <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> does not specify synchronous completion, then this variable must
|
|
be present.</dd></dl>
|
|
<!--l. 687--><p class="noindent" ><span
|
|
class="cmbx-12">Notes</span>
|
|
<ol class="enumerate1" >
|
|
<li
|
|
class="enumerate" id="x12-117002x1">
|
|
<!--l. 689--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">dat</span></span></span> argument is both input and output, and its value may be changed
|
|
even on processes different from the final result destination.
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-117004x2">
|
|
<!--l. 692--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> argument can be built with the bitwise <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">IOR()</span></span></span> operator; in the
|
|
following example, the argument is forcing immediate completion, hence the
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">request</span></span></span> argument needs not be specified:
|
|
<div class="center"
|
|
>
|
|
<!--l. 702--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-79">
|
|
  call psb_min(ctxt,dat,mode=ior(psb_collective_start_,psb_collective_end_))
|
|
</pre>
|
|
<!--l. 706--><p class="nopar" > </div></div>
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-117006x3">
|
|
<!--l. 711--><p class="noindent" >When splitting the operation in two calls, the <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">dat</span></span></span> argument <span
|
|
class="cmti-10">must not </span>be
|
|
accessed between calls:
|
|
<div class="center"
|
|
>
|
|
<!--l. 722--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-80">
|
|
  call psb_min(ctxt,dat,mode=psb_collective_start_,request=min_request)
|
|
  ....... ! Do not access dat
|
|
  call psb_min(ctxt,dat,mode=psb_collective_end_,request=min_request)
|
|
</pre>
|
|
<!--l. 728--><p class="nopar" > </div></div>
|
|
</li></ol>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.13 </span> <a
|
|
id="x12-1180007.13"></a>psb_amx — Global maximum absolute value</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-81">
|
|
call psb_amx(ctxt, dat [, root, mode, request])
|
|
</pre>
|
|
<!--l. 738--><p class="nopar" >
|
|
<!--l. 740--><p class="indent" > This subroutine implements a maximum absolute value reduction operation based
|
|
on the underlying communication library.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 743--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 743--><p class="noindent" >Synchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 744--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 744--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 745--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 745--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.
|
|
</dd><dt class="description">
|
|
<!--l. 751--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 751--><p class="noindent" >The local contribution to the global maximum.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />Specified as: an integer, real or complex variable, which may be a scalar, or
|
|
a rank 1 or 2 array.  Type, kind, rank and size must agree on all processes.
|
|
</dd><dt class="description">
|
|
<!--l. 758--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">root</span> </dt><dd
|
|
class="description">
|
|
<!--l. 758--><p class="noindent" >Process to hold the final value, or <span
|
|
class="cmsy-10">-</span>1 to make it available on all processes.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value <span
|
|
class="cmsy-10">-</span>1 <span
|
|
class="cmmi-10"><</span>= <span
|
|
class="cmmi-10">root <</span>= <span
|
|
class="cmmi-10">np </span><span
|
|
class="cmsy-10">- </span>1, default -1. <br
|
|
class="newline" />
|
|
|
|
|
|
|
|
</dd><dt class="description">
|
|
<!--l. 764--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">mode</span> </dt><dd
|
|
class="description">
|
|
<!--l. 764--><p class="noindent" >Whether the call is started in non-blocking mode and completed later, or
|
|
is executed synchronously.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value. The action to be taken is determined by
|
|
its bit fields, which can be set with bitwise <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">OR</span></span></span>. Basic action values are
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_collective_start_</span></span></span>, <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_collective_end_</span></span></span>. Default: both fields are
|
|
selected (i.e. require synchronous completion).<br
|
|
class="newline" />
|
|
</dd><dt class="description">
|
|
<!--l. 773--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">request</span> </dt><dd
|
|
class="description">
|
|
<!--l. 773--><p class="noindent" >A request variable to check for operation completion.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />If <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> does not specify synchronous completion, then this variable must
|
|
be present.</dd></dl>
|
|
<!--l. 782--><p class="indent" >
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 783--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Return</span> </dt><dd
|
|
class="description">
|
|
<!--l. 783--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 784--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 784--><p class="noindent" >On destination process(es), the result of the maximum operation.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />Specified as: an integer, real or complex variable, which may be a scalar, or
|
|
a rank 1 or 2 array.  Type, kind, rank and size must agree on all processes.
|
|
</dd><dt class="description">
|
|
<!--l. 791--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">request</span> </dt><dd
|
|
class="description">
|
|
<!--l. 791--><p class="noindent" >A request variable to check for operation completion.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />If <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> does not specify synchronous completion, then this variable must
|
|
be present.</dd></dl>
|
|
|
|
|
|
|
|
<!--l. 800--><p class="noindent" ><span
|
|
class="cmbx-12">Notes</span>
|
|
<ol class="enumerate1" >
|
|
<li
|
|
class="enumerate" id="x12-118002x1">
|
|
<!--l. 802--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">dat</span></span></span> argument is both input and output, and its value may be changed
|
|
even on processes different from the final result destination.
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-118004x2">
|
|
<!--l. 805--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> argument can be built with the bitwise <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">IOR()</span></span></span> operator; in the
|
|
following example, the argument is forcing immediate completion, hence the
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">request</span></span></span> argument needs not be specified:
|
|
<div class="center"
|
|
>
|
|
<!--l. 815--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-82">
|
|
  call psb_amx(ctxt,dat,mode=ior(psb_collective_start_,psb_collective_end_))
|
|
</pre>
|
|
<!--l. 819--><p class="nopar" > </div></div>
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-118006x3">
|
|
<!--l. 824--><p class="noindent" >When splitting the operation in two calls, the <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">dat</span></span></span> argument <span
|
|
class="cmti-10">must not </span>be
|
|
accessed between calls:
|
|
<div class="center"
|
|
>
|
|
<!--l. 835--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-83">
|
|
  call psb_amx(ctxt,dat,mode=psb_collective_start_,request=amx_request)
|
|
  ....... ! Do not access dat
|
|
  call psb_amx(ctxt,dat,mode=psb_collective_end_,request=amx_request)
|
|
</pre>
|
|
<!--l. 841--><p class="nopar" > </div></div>
|
|
</li></ol>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.14 </span> <a
|
|
id="x12-1190007.14"></a>psb_amn — Global minimum absolute value</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-84">
|
|
call psb_amn(ctxt, dat [, root, mode, request])
|
|
</pre>
|
|
<!--l. 851--><p class="nopar" >
|
|
<!--l. 853--><p class="indent" > This subroutine implements a minimum absolute value reduction operation based
|
|
on the underlying communication library.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 856--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 856--><p class="noindent" >Synchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 857--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 857--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 858--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 858--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.
|
|
</dd><dt class="description">
|
|
<!--l. 864--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 864--><p class="noindent" >The local contribution to the global minimum.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />Specified as: an integer, real or complex variable, which may be a scalar, or
|
|
a rank 1 or 2 array.  Type, kind, rank and size must agree on all processes.
|
|
</dd><dt class="description">
|
|
<!--l. 871--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">root</span> </dt><dd
|
|
class="description">
|
|
<!--l. 871--><p class="noindent" >Process to hold the final value, or <span
|
|
class="cmsy-10">-</span>1 to make it available on all processes.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value <span
|
|
class="cmsy-10">-</span>1 <span
|
|
class="cmmi-10"><</span>= <span
|
|
class="cmmi-10">root <</span>= <span
|
|
class="cmmi-10">np </span><span
|
|
class="cmsy-10">- </span>1, default -1. <br
|
|
class="newline" />
|
|
|
|
|
|
|
|
</dd><dt class="description">
|
|
<!--l. 877--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">mode</span> </dt><dd
|
|
class="description">
|
|
<!--l. 877--><p class="noindent" >Whether the call is started in non-blocking mode and completed later, or
|
|
is executed synchronously.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value. The action to be taken is determined by
|
|
its bit fields, which can be set with bitwise <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">OR</span></span></span>. Basic action values are
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_collective_start_</span></span></span>, <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_collective_end_</span></span></span>. Default: both fields are
|
|
selected (i.e. require synchronous completion).<br
|
|
class="newline" />
|
|
</dd><dt class="description">
|
|
<!--l. 886--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">request</span> </dt><dd
|
|
class="description">
|
|
<!--l. 886--><p class="noindent" >A request variable to check for operation completion.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />If <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> does not specify synchronous completion, then this variable must
|
|
be present.</dd></dl>
|
|
<!--l. 895--><p class="indent" >
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 896--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Return</span> </dt><dd
|
|
class="description">
|
|
<!--l. 896--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 897--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 897--><p class="noindent" >On destination process(es), the result of the minimum operation.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />Specified as: an integer, real or complex variable, which may be a scalar,
|
|
or a rank 1 or 2 array. <br
|
|
class="newline" />Type, kind, rank and size must agree on all processes.
|
|
</dd><dt class="description">
|
|
<!--l. 904--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">request</span> </dt><dd
|
|
class="description">
|
|
<!--l. 904--><p class="noindent" >A request variable to check for operation completion.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />If <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> does not specify synchronous completion, then this variable must
|
|
be present.</dd></dl>
|
|
<!--l. 913--><p class="noindent" ><span
|
|
class="cmbx-12">Notes</span>
|
|
<ol class="enumerate1" >
|
|
<li
|
|
class="enumerate" id="x12-119002x1">
|
|
<!--l. 915--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">dat</span></span></span> argument is both input and output, and its value may be changed
|
|
even on processes different from the final result destination.
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-119004x2">
|
|
<!--l. 918--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> argument can be built with the bitwise <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">IOR()</span></span></span> operator; in the
|
|
following example, the argument is forcing immediate completion, hence the
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">request</span></span></span> argument needs not be specified:
|
|
<div class="center"
|
|
>
|
|
<!--l. 928--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-85">
|
|
  call psb_amn(ctxt,dat,mode=ior(psb_collective_start_,psb_collective_end_))
|
|
</pre>
|
|
<!--l. 932--><p class="nopar" > </div></div>
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-119006x3">
|
|
<!--l. 937--><p class="noindent" >When splitting the operation in two calls, the <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">dat</span></span></span> argument <span
|
|
class="cmti-10">must not </span>be
|
|
accessed between calls:
|
|
<div class="center"
|
|
>
|
|
<!--l. 948--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-86">
|
|
  call psb_amn(ctxt,dat,mode=psb_collective_start_,request=amn_request)
|
|
  ....... ! Do not access dat
|
|
  call psb_amn(ctxt,dat,mode=psb_collective_end_,request=amn_request)
|
|
</pre>
|
|
<!--l. 954--><p class="nopar" > </div></div>
|
|
</li></ol>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.15 </span> <a
|
|
id="x12-1200007.15"></a>psb_nrm2 — Global 2-norm reduction</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-87">
|
|
call psb_nrm2(ctxt, dat [, root, mode, request])
|
|
</pre>
|
|
<!--l. 964--><p class="nopar" >
|
|
<!--l. 966--><p class="indent" > This subroutine implements a 2-norm value reduction operation based on the
|
|
underlying communication library.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 969--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 969--><p class="noindent" >Synchronous.
|
|
</dd><dt class="description">
|
|
<!--l. 970--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 970--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 971--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 971--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.
|
|
</dd><dt class="description">
|
|
<!--l. 977--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 977--><p class="noindent" >The local contribution to the global minimum.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />Specified as: a real variable, which may be a scalar, or a rank 1 array.
|
|
 Kind, rank and size must agree on all processes.
|
|
</dd><dt class="description">
|
|
<!--l. 984--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">root</span> </dt><dd
|
|
class="description">
|
|
<!--l. 984--><p class="noindent" >Process to hold the final value, or <span
|
|
class="cmsy-10">-</span>1 to make it available on all processes.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value <span
|
|
class="cmsy-10">-</span>1 <span
|
|
class="cmmi-10"><</span>= <span
|
|
class="cmmi-10">root <</span>= <span
|
|
class="cmmi-10">np </span><span
|
|
class="cmsy-10">- </span>1, default -1. <br
|
|
class="newline" />
|
|
|
|
|
|
|
|
</dd><dt class="description">
|
|
<!--l. 990--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">mode</span> </dt><dd
|
|
class="description">
|
|
<!--l. 990--><p class="noindent" >Whether the call is started in non-blocking mode and completed later, or
|
|
is executed synchronously.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value. The action to be taken is determined by
|
|
its bit fields, which can be set with bitwise <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">OR</span></span></span>. Basic action values are
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_collective_start_</span></span></span>, <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">psb_collective_end_</span></span></span>. Default: both fields are
|
|
selected (i.e. require synchronous completion).<br
|
|
class="newline" />
|
|
</dd><dt class="description">
|
|
<!--l. 999--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">request</span> </dt><dd
|
|
class="description">
|
|
<!--l. 999--><p class="noindent" >A request variable to check for operation completion.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />If <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> does not specify synchronous completion, then this variable must
|
|
be present.</dd></dl>
|
|
<!--l. 1008--><p class="indent" >
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 1009--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Return</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1009--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 1010--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1010--><p class="noindent" >On destination process(es), the result of the 2-norm reduction.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />Specified as: a real variable, which may be a scalar, or a rank 1 array. <br
|
|
class="newline" />Kind, rank and size must agree on all processes.
|
|
</dd><dt class="description">
|
|
<!--l. 1017--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">request</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1017--><p class="noindent" >A request variable to check for operation completion.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />If <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> does not specify synchronous completion, then this variable must
|
|
be present.</dd></dl>
|
|
|
|
|
|
|
|
<!--l. 1026--><p class="noindent" ><span
|
|
class="cmbx-12">Notes</span>
|
|
<ol class="enumerate1" >
|
|
<li
|
|
class="enumerate" id="x12-120002x1">
|
|
<!--l. 1028--><p class="noindent" >This reduction is appropriate to compute the results of multiple (local)
|
|
NRM2 operations at the same time.
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-120004x2">
|
|
<!--l. 1030--><p class="noindent" >Denoting by <span
|
|
class="cmmi-10">dat</span><sub><span
|
|
class="cmmi-7">i</span></sub> the value of the variable <span
|
|
class="cmmi-10">dat </span>on process <span
|
|
class="cmmi-10">i</span>, the output <span
|
|
class="cmmi-10">res</span>
|
|
is equivalent to the computation of
|
|
<div class="math-display" >
|
|
<img
|
|
src="userhtml29x.png" alt=" ∘ ∑------
|
|
res = dat2i,
|
|
i
|
|
" class="math-display" ></div>
|
|
<!--l. 1032--><p class="nopar" > with care taken to avoid unnecessary overflow.
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-120006x3">
|
|
<!--l. 1034--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">dat</span></span></span> argument is both input and output, and its value may be changed
|
|
even on processes different from the final result destination.
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-120008x4">
|
|
<!--l. 1037--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">mode</span></span></span> argument can be built with the bitwise <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">IOR()</span></span></span> operator; in the
|
|
following example, the argument is forcing immediate completion, hence the
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">request</span></span></span> argument needs not be specified:
|
|
<div class="center"
|
|
>
|
|
<!--l. 1047--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-88">
|
|
  call psb_nrm2(ctxt,dat,mode=ior(psb_collective_start_,psb_collective_end_))
|
|
</pre>
|
|
<!--l. 1051--><p class="nopar" > </div></div>
|
|
</li>
|
|
<li
|
|
class="enumerate" id="x12-120010x5">
|
|
<!--l. 1056--><p class="noindent" >When splitting the operation in two calls, the <span class="obeylines-h"><span class="verb"><span
|
|
class="cmtt-10">dat</span></span></span> argument <span
|
|
class="cmti-10">must not </span>be
|
|
accessed between calls:
|
|
|
|
|
|
|
|
<div class="center"
|
|
>
|
|
<!--l. 1067--><p class="noindent" >
|
|
<div class="minipage"><pre class="verbatim" id="verbatim-89">
|
|
  call psb_nrm2(ctxt,dat,mode=psb_collective_start_,request=nrm2_request)
|
|
  ....... ! Do not access dat
|
|
  call psb_nrm2(ctxt,dat,mode=psb_collective_end_,request=nrm2_request)
|
|
</pre>
|
|
<!--l. 1073--><p class="nopar" > </div></div>
|
|
</li></ol>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.16 </span> <a
|
|
id="x12-1210007.16"></a>psb_snd — Send data</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-90">
|
|
call psb_snd(ctxt, dat, dst, m)
|
|
</pre>
|
|
<!--l. 1085--><p class="nopar" >
|
|
<!--l. 1087--><p class="indent" > This subroutine sends a packet of data to a destination.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 1089--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1089--><p class="noindent" >Synchronous: see usage notes.
|
|
</dd><dt class="description">
|
|
<!--l. 1090--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1090--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 1091--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1091--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.
|
|
</dd><dt class="description">
|
|
<!--l. 1097--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1097--><p class="noindent" >The data to be sent.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />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 <span
|
|
class="cmmi-10">m </span>is not specified, size
|
|
must agree as well.
|
|
</dd><dt class="description">
|
|
<!--l. 1105--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dst</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1105--><p class="noindent" >Destination process.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value 0 <span
|
|
class="cmmi-10"><</span>= <span
|
|
class="cmmi-10">dst <</span>= <span
|
|
class="cmmi-10">np </span><span
|
|
class="cmsy-10">- </span>1. <br
|
|
class="newline" />
|
|
|
|
|
|
|
|
</dd><dt class="description">
|
|
<!--l. 1110--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">m</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1110--><p class="noindent" >Number of rows.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">Optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value 0 <span
|
|
class="cmmi-10"><</span>= <span
|
|
class="cmmi-10">m <</span>= <span
|
|
class="cmmi-10">size</span>(<span
|
|
class="cmmi-10">dat,</span>1). <br
|
|
class="newline" />When <span
|
|
class="cmmi-10">dat </span>is a rank 2 array, specifies the number of rows to be sent
|
|
independently of the leading dimension <span
|
|
class="cmmi-10">size</span>(<span
|
|
class="cmmi-10">dat,</span>1); must have the same
|
|
value on sending and receiving processes.</dd></dl>
|
|
<!--l. 1121--><p class="indent" >
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 1122--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Return</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1122--><p class="noindent" ></dd></dl>
|
|
<!--l. 1125--><p class="noindent" ><span
|
|
class="cmbx-12">Notes</span>
|
|
<ol class="enumerate1" >
|
|
<li
|
|
class="enumerate" id="x12-121002x1">
|
|
<!--l. 1127--><p class="noindent" >This subroutine implies a synchronization, but only between the calling
|
|
process and the destination process <span
|
|
class="cmmi-10">dst</span>.</li></ol>
|
|
|
|
|
|
|
|
<h4 class="subsectionHead"><span class="titlemark">7.17 </span> <a
|
|
id="x12-1220007.17"></a>psb_rcv — Receive data</h4>
|
|
|
|
|
|
|
|
<pre class="verbatim" id="verbatim-91">
|
|
call psb_rcv(ctxt, dat, src, m)
|
|
</pre>
|
|
<!--l. 1136--><p class="nopar" >
|
|
<!--l. 1138--><p class="indent" > This subroutine receives a packet of data to a destination.
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 1140--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">Type:</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1140--><p class="noindent" >Synchronous: see usage notes.
|
|
</dd><dt class="description">
|
|
<!--l. 1141--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Entry</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1141--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 1142--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">ctxt</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1142--><p class="noindent" >the communication context identifying the virtual parallel machine.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer variable.
|
|
</dd><dt class="description">
|
|
<!--l. 1148--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">src</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1148--><p class="noindent" >Source process.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value 0 <span
|
|
class="cmmi-10"><</span>= <span
|
|
class="cmmi-10">src <</span>= <span
|
|
class="cmmi-10">np </span><span
|
|
class="cmsy-10">- </span>1. <br
|
|
class="newline" />
|
|
</dd><dt class="description">
|
|
<!--l. 1153--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">m</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1153--><p class="noindent" >Number of rows.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">global</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">Optional</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">in</span>.<br
|
|
class="newline" />Specified as: an integer value 0 <span
|
|
class="cmmi-10"><</span>= <span
|
|
class="cmmi-10">m <</span>= <span
|
|
class="cmmi-10">size</span>(<span
|
|
class="cmmi-10">dat,</span>1). <br
|
|
class="newline" />When <span
|
|
class="cmmi-10">dat </span>is a rank 2 array, specifies the number of rows to be sent
|
|
independently of the leading dimension <span
|
|
class="cmmi-10">size</span>(<span
|
|
class="cmmi-10">dat,</span>1); must have the same
|
|
value on sending and receiving processes.</dd></dl>
|
|
|
|
|
|
|
|
<!--l. 1164--><p class="indent" >
|
|
<dl class="description"><dt class="description">
|
|
<!--l. 1165--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">On Return</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1165--><p class="noindent" >
|
|
</dd><dt class="description">
|
|
<!--l. 1166--><p class="noindent" >
|
|
<span
|
|
class="cmbx-10">dat</span> </dt><dd
|
|
class="description">
|
|
<!--l. 1166--><p class="noindent" >The data to be received.<br
|
|
class="newline" />Scope: <span
|
|
class="cmbx-10">local</span>.<br
|
|
class="newline" />Type: <span
|
|
class="cmbx-10">required</span>.<br
|
|
class="newline" />Intent: <span
|
|
class="cmbx-10">inout</span>.<br
|
|
class="newline" />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 <span
|
|
class="cmmi-10">m </span>is not specified, size
|
|
must agree as well.</dd></dl>
|
|
<!--l. 1176--><p class="noindent" ><span
|
|
class="cmbx-12">Notes</span>
|
|
<ol class="enumerate1" >
|
|
<li
|
|
class="enumerate" id="x12-122002x1">
|
|
<!--l. 1178--><p class="noindent" >This subroutine implies a synchronization, but only between the calling
|
|
process and the source process <span
|
|
class="cmmi-10">src</span>.</li></ol>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--l. 3--><div class="crosslinks"><p class="noindent">[<a
|
|
href="userhtmlse11.html" >next</a>] [<a
|
|
href="userhtmlse6.html" >prev</a>] [<a
|
|
href="userhtmlse6.html#tailuserhtmlse6.html" >prev-tail</a>] [<a
|
|
href="userhtmlse7.html" >front</a>] [<a
|
|
href="userhtml.html#userhtmlse10.html" >up</a>] </p></div>
|
|
<!--l. 3--><p class="indent" > <a
|
|
id="tailuserhtmlse7.html"></a>
|
|
</body></html>
|