7.15 psb_nrm2 — Global 2-norm reduction

call psb_nrm2(ctxt, dat, root [, mode, request])

This subroutine implements a 2-norm value reduction operation based on the underlying communication library.

Type:
Synchronous.
On Entry
ctxt
the communication context identifying the virtual parallel machine.
Scope: global.
Type: required.
Intent: in.
Specified as: an integer variable.
dat
The local contribution to the global minimum.
Scope: local.
Type: required.
Intent: inout.
Specified as: a real variable, which may be a scalar, or a rank 1 array.  Kind, rank and size must agree on all processes.
root
Process to hold the final value, or -1 to make it available on all processes.
Scope: global.
Type: optional.
Intent: in.
Specified as: an integer value -1 <= root <= np - 1, default -1.
mode
Whether the call is started in non-blocking mode and completed later, or is executed fully.
Scope: global.
Type: optional.
Intent: in.
Specified as: an integer, with the value determined by the bitwise OR of psb_collective_start_, psb_collective_end_. Default: both fields are selected.
request
A request variable to check for operation completion.
Scope: local.
Type: optional.
Intent: inout.
If mode does not specifies immediate completion, then this variable must be present.

On Return
dat
On destination process(es), the result of the 2-norm reduction.
Scope: global.
Type: required.
Intent: inout.
Specified as: a real variable, which may be a scalar, or a rank 1 array.
Kind, rank and size must agree on all processes.
request
A request variable to check for operation completion.
Scope: local.
Type: optional.
Intent: inout.
If mode does not specifies immediate completion, then this variable must be present.

Notes

  1. This reduction is appropriate to compute the results of multiple (local) NRM2 operations at the same time.
  2. Denoting by dati the value of the variable dat on process i, the output res is equivalent to the computation of
         ∘ -------
       ∑     2
res =     dati,
         i

    with care taken to avoid unnecessary overflow.

  3. The dat argument is both input and output, and its value may be changed even on processes different from the final result destination.