NAG Library Routine Document

f11mlf (direct_real_gen_norm)

1
Purpose

f11mlf computes the 1-norm, the -norm or the maximum absolute value of the elements of a real, square, sparse matrix which is held in compressed column (Harwell–Boeing) format.

2
Specification

Fortran Interface
Subroutine f11mlf ( norm, anorm, n, icolzp, irowix, a, ifail)
Integer, Intent (In):: n, icolzp(*), irowix(*)
Integer, Intent (Inout):: ifail
Real (Kind=nag_wp), Intent (In):: a(*)
Real (Kind=nag_wp), Intent (Out):: anorm
Character (1), Intent (In):: norm
C Header Interface
#include <nagmk26.h>
void  f11mlf_ (const char *norm, double *anorm, const Integer *n, const Integer icolzp[], const Integer irowix[], const double a[], Integer *ifail, const Charlen length_norm)

3
Description

f11mlf computes various quantities relating to norms of a real, sparse n by n matrix A presented in compressed column (Harwell–Boeing) format.

4
References

None.

5
Arguments

1:     norm – Character(1)Input
On entry: specifies the value to be returned in anorm.
norm='1' or 'O'
The 1-norm A1 of the matrix is computed, that is max1jni=1nAij.
norm='I'
The -norm A of the matrix is computed, that is max1in j=1n Aij.
norm='M'
The value max1i,jnAij  (not a norm).
Constraint: norm='1', 'O', 'I' or 'M'.
2:     anorm – Real (Kind=nag_wp)Output
On exit: the computed quantity relating the matrix.
3:     n – IntegerInput
On entry: n, the order of the matrix A.
Constraint: n0.
4:     icolzp* – Integer arrayInput
Note: the dimension of the array icolzp must be at least n+1.
On entry: icolzpi contains the index in A of the start of a new column. See Section 2.1.3 in the F11 Chapter Introduction.
5:     irowix* – Integer arrayInput
Note: the dimension of the array irowix must be at least icolzpn+1-1, the number of nonzeros of the sparse matrix A.
On entry: the row index array of sparse matrix A.
6:     a* – Real (Kind=nag_wp) arrayInput
Note: the dimension of the array a must be at least icolzpn+1-1, the number of nonzeros of the sparse matrix A.
On entry: the array of nonzero values in the sparse matrix A.
7:     ifail – IntegerInput/Output
On entry: ifail must be set to 0, -1 or 1. If you are unfamiliar with this argument you should refer to Section 3.4 in How to Use the NAG Library and its Documentation for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value -1 or 1 is recommended. If the output of error messages is undesirable, then the value 1 is recommended. Otherwise, if you are not familiar with this argument, the recommended value is 0. When the value -1 or 1 is used it is essential to test the value of ifail on exit.
On exit: ifail=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6
Error Indicators and Warnings

If on entry ifail=0 or -1, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
ifail=1
On entry, n=value.
Constraint: n0.
On entry, norm=value.
Constraint: norm='1', 'O', 'I' or 'M'.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 3.9 in How to Use the NAG Library and its Documentation for further information.
ifail=-399
Your licence key may have expired or may not have been installed correctly.
See Section 3.8 in How to Use the NAG Library and its Documentation for further information.
ifail=-999
Dynamic memory allocation failed.
See Section 3.7 in How to Use the NAG Library and its Documentation for further information.

7
Accuracy

Not applicable.

8
Parallelism and Performance

f11mlf makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9
Further Comments

None.

10
Example

This example computes norms and maximum absolute value of the matrix A, where
A= 2.00 1.00 0 0 0 0 0 1.00 -1.00 0 4.00 0 1.00 0 1.00 0 0 0 1.00 2.00 0 -2.00 0 0 3.00 .  

10.1
Program Text

Program Text (f11mlfe.f90)

10.2
Program Data

Program Data (f11mlfe.d)

10.3
Program Results

Program Results (f11mlfe.r)