psb_norm1 -- 1-Norm of Vector

This function computes the 1-norm of a vector $x$.
If $x$ is a real vector it computes 1-norm as:

\begin{displaymath}asum \leftarrow \Vert x_i\Vert\end{displaymath}

else if $x$ is a complex vector then it computes 1-norm as:

\begin{displaymath}asum \leftarrow \Vert re(x)\Vert _1 + \Vert im(x)\Vert _1\end{displaymath}

psb_geasum(x, desc_a, info [,global])
psb_norm1(x, desc_a, info [,global])


Table 6: Data types
$asum$ $x$ Function
Short Precision Real Short Precision Real psb_geasum
Long Precision Real Long Precision Real psb_geasum
Short Precision Real Short Precision Complex psb_geasum
Long Precision Real Long Precision Complex psb_geasum


Type:
Synchronous.
On Entry
x
the local portion of global dense matrix $x$.
Scope: local
Type: required
Intent: in.
Specified as: a rank one or two array or an object of type vdatapsb_T_vect_type containing numbers of type specified in Table 6.
desc_a
contains data structures for communications.
Scope: local
Type: required
Intent: in.
Specified as: an object of type descdatapsb_desc_type.
global
Specifies whether the computation should include the global reduction across all processes.
Scope: global
Type: optional.
Intent: in.
Specified as: a logical scalar. Default: global=.true.

On Return
Function value
is the 1-norm of vector $x$.
Scope: global unless the optional variable global=.false. has been specified
Specified as: a long precision real number.
info
Error code.
Scope: local
Type: required
Intent: out.
An integer value; 0 means no error has been detected.

Notes

  1. The computation of a global result requires a global communication, which entails a significant overhead. It may be necessary and/or advisable to compute multiple norms at the same time; in this case, it is possible to improve the runtime efficiency by using the following scheme:
    \begin{lstlisting}
vres(1) = psb_geasum(x1,desc_a,info,global=.false.)
vres(2)...
...(x3,desc_a,info,global=.false.)
call psb_sum(ictxt,vres(1:3))
\end{lstlisting}
    In this way the global communication, which for small sizes is a latency-bound operation, is invoked only once.