This is
+ the normal situation when the pattern of the sparse matrix is
+ symmetric, which is equivalent to say that the interaction between
+ two variables is reciprocal. If the matrix pattern is non-symmetric
+ we may have one-way interactions, and these could cause a situation
+ in which a boundary point is not a halo point for its neighbour.
+
+
the system sparse matrix.
+Scope: local
+
+Type: required
+
+Intent: in, target.
+
+Specified as: a sparse matrix data structure spdatapsb_spmat_type.
+
+
prec
+
the preconditioner.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: an already initialized precondtioner data structure precdatapsb_prec_type
+
+
desc_a
+
the problem communication descriptor.
+Scope: local
+
+Type: required
+
+Intent: in, target.
+
+Specified as: a communication descriptor data structure descdatapsb_desc_type.
+
+
+
+
+
+
On Return
+
+
+
prec
+
the preconditioner.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a precondtioner data structure precdatapsb_prec_type
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
the preconditioner.
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a preconditioner data structure precdatapsb_prec_type.
+
+
x
+
the source vector.
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a double precision array.
+
+
desc_a
+
the problem communication descriptor.
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a communication data structure descdatapsb_desc_type.
+
+
trans
+
Scope:
+
+Type: optional
+
+Intent: in.
+
+Specified as: a character.
+
+
work
+
an optional work space
+Scope: local
+
+Type: optional
+
+Intent: inout.
+
+Specified as: a double precision array.
+
+
+
+
+
+
On Return
+
+
+
y
+
the destination vector.
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a double precision array.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+In this chapter we provide routines for preconditioners and iterative
+methods. The interfaces for Krylov subspace methods are available in
+the module psb_krylov_mod.
+
+
+This subroutine is a driver that provides a general interface for all
+the Krylov-Subspace family methods implemented in PSBLAS version 2.
+
+
+The stopping criterion is the normwise backward error, in the infinity
+norm, i.e. the iteration is stopped when
+
+
+
+
+
+
+
+
+or the 2-norm residual reduction
+
+
+
+
+
+
+
+
+according to the value passed through the istop argument (see
+later). In the above formulae, is the tentative solution and
+ the corresponding residual at the -th iteration.
+
+
a string that defines the iterative method to be
+ used. Supported values are:
+
+
CG:
+
the Conjugate Gradient method;
+
+
+
CGS:
+
the Conjugate Gradient Stabilized method;
+
+
+
+
BICG:
+
the Bi-Conjugate Gradient method;
+
+
+
BICGSTAB:
+
the Bi-Conjugate Gradient Stabilized method;
+
+
+
BICGSTABL:
+
the Bi-Conjugate Gradient Stabilized method with restarting;
+
+
+
RGMRES:
+
the Generalized Minimal Residual method with restarting.
+
+
+
+
+
a
+
the local portion of global sparse matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
prec
+
The data structure containing the preconditioner.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type precdatapsb_prec_type.
+
+
b
+
The RHS vector.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a rank one array.
+
+
x
+
The initial guess.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one array.
+
+
eps
+
The stopping tolerance.
+
+Scope: global
+
+Type: required
+
+Intent: in.
+
+Specified as: a real number.
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
itmax
+
The maximum number of iterations to perform.
+
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+Default: .
+
+Specified as: an integer variable .
+
+
itrace
+
If print out an informational message about
+ convergence every iterations.
+
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+
irst
+
An integer specifying the restart parameter.
+
+Scope: global
+
+Type: optional.
+
+Intent: in.
+
+Values: . This is employed for the BiCGSTABL or RGMRES
+methods, otherwise it is ignored.
+
+
+
+
istop
+
An integer specifying the stopping criterion.
+
+Scope: global
+
+Type: optional.
+
+Intent: in.
+
+Values: 1: use the normwise backward error, 2: use the scaled 2-norm
+of the residual. Default: 2.
+
+
On Return
+
+
+
x
+
The computed solution.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one array.
+
+
iter
+
The number of iterations performed.
+
+Scope: global
+
+Type: optional
+
+Intent: out.
+
+Returned as: an integer variable.
+
+
err
+
The convergence estimate on exit.
+
+Scope: global
+
+Type: optional
+
+Intent: out.
+
+Returned as: a real number.
+
+
cond
+
An estimate of the condition number of matrix ; only
+ available with the method.
+
+Scope: global
+
+Type: optional
+
+Intent: out.
+
+Returned as: a real number.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+G. Bella, S. Filippone, A. De Maio and M. Testa,
+A Simulation Model for Forest Fires,
+in J. Dongarra, K. Madsen, J. Wasniewski, editors,
+Proceedings of PARA 04 Workshop on State of the Art
+in Scientific Computing, pp. 546-553, Lecture Notes in Computer Science,
+Springer, 2005.
+
A. Buttari, D. di Serafino, P. D'Ambra, S. Filippone,
+2LEV-D2P4: a package of high-performance preconditioners,
+Applicable Algebra in Engineering, Communications and Computing,
+Volume 18, Number 3, May, 2007, pp. 223-239
+
P. D'Ambra, S. Filippone, D. Di Serafino
+On the Development of PSBLAS-based Parallel Two-level Schwarz Preconditioners
+
+Applied Numerical Mathematics, Elsevier Science,
+Volume 57, Issues 11-12, November-December 2007, Pages 1181-1196.
+
+
+ Dongarra, J. J., DuCroz, J., Hammarling, S. and Hanson, R.,
+An Extended Set of Fortran Basic Linear Algebra Subprograms,
+ACM Trans. Math. Softw. vol. 14, 1-17, 1988.
+
+ Dongarra, J., DuCroz, J., Hammarling, S. and Duff, I.,
+A Set of level 3 Basic Linear Algebra Subprograms,
+ACM Trans. Math. Softw. vol. 16, 1-17, 1990.
+
+J. J. Dongarra and R. C. Whaley,
+A User's Guide to the BLACS v. 1.1,
+Lapack Working Note 94, Tech. Rep. UT-CS-95-281, University of
+Tennessee, March 1995 (updated May 1997).
+
+I. Duff, M. Marrone, G. Radicati and C. Vittoli,
+Level 3 Basic Linear Algebra Subprograms for Sparse Matrices:
+a User Level Interface,
+ACM Transactions on Mathematical Software, 23(3), pp. 379-401, 1997.
+
+I. Duff, M. Heroux and R. Pozo,
+An Overview of the Sparse Basic Linear
+Algebra Subprograms: the New Standard from the BLAS Technical Forum,
+ACM Transactions on Mathematical Software, 28(2), pp. 239-267, 2002.
+
+S. Filippone and M. Colajanni,
+PSBLAS: A Library for Parallel Linear Algebra
+Computation on Sparse Matrices,
+
+ACM Transactions on Mathematical Software, 26(4), pp. 527-550, 2000.
+
+S. Filippone, P. D'Ambra, M. Colajanni,
+Using a Parallel Library of Sparse Linear Algebra in a Fluid Dynamics
+Applications Code on Linux Clusters,
+in G. Joubert, A. Murli, F. Peters, M. Vanneschi, editors,
+Parallel Computing - Advances & Current Issues,
+pp. 441-448, Imperial College Press, 2002.
+
+Karypis, G. and Kumar, V.,
+METIS: Unstructured Graph Partitioning and Sparse Matrix
+ Ordering System.
+Minneapolis, MN 55455: University of Minnesota, Department of
+ Computer Science, 1995.
+Internet Address: http://www.cs.umn.edu/~karypis.
+
+Machiels, L. and Deville, M.
+Fortran 90: An entry to object-oriented programming for the solution
+ of partial differential equations.
+ACM Trans. Math. Softw. vol. 23, 32-49.
+
+M. Snir, S. Otto, S. Huss-Lederman, D. Walker and J. Dongarra,
+MPI: The Complete Reference. Volume 1 - The MPI Core, second edition,
+MIT Press, 1998.
+
+ifstarssyntaxsyntaxcall psb_precinitprec, ptype, info
+
+
+
+
Type:
+
Asynchronous.
+
+
On Entry
+
+
+
ptype
+
the type of preconditioner.
+Scope: global
+
+Type: required
+
+Intent: in.
+
+Specified as: a character string, see usage notes.
+
+
On Exit
+
+
+
prec
+
Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a preconditioner data structure precdatapsb_prec_type.
+
+
info
+
Scope: global
+
+Type: required
+
+Intent: out.
+
+Error code: if no error, 0 is returned.
+
+
+Notes
+Legal inputs to this subroutine are interpreted depending on the
+ string as follows3:
+
+
NONE
+
No preconditioning, i.e. the preconditioner is just a copy
+ operator.
+
+
DIAG
+
Diagonal scaling; each entry of the input vector is
+ multiplied by the reciprocal of the sum of the absolute values of
+ the coefficients in the corresponding row of matrix ;
+
+
BJAC
+
Precondition by a factorization of the
+ block-diagonal of matrix , where block boundaries are determined
+ by the data allocation boundaries for each process; requires no
+ communication. Only the incomplete factorization is
+ currently implemented.
+
+ifstarssyntaxsyntaxcall psb_precblda, desc_a, prec, info
+
+
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
a
+
the system sparse matrix.
+Scope: local
+
+Type: required
+
+Intent: in, target.
+
+Specified as: a sparse matrix data structure spdatapsb_spmat_type.
+
+
prec
+
the preconditioner.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: an already initialized precondtioner data structure precdatapsb_prec_type
+
+
desc_a
+
the problem communication descriptor.
+Scope: local
+
+Type: required
+
+Intent: in, target.
+
+Specified as: a communication descriptor data structure descdatapsb_desc_type.
+
+
+
+
+
+
On Return
+
+
+
prec
+
the preconditioner.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a precondtioner data structure precdatapsb_prec_type
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
the preconditioner.
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a preconditioner data structure precdatapsb_prec_type.
+
+
x
+
the source vector.
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a double precision array.
+
+
desc_a
+
the problem communication descriptor.
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a communication data structure descdatapsb_desc_type.
+
+
trans
+
Scope:
+
+Type: optional
+
+Intent: in.
+
+Specified as: a character.
+
+
work
+
an optional work space
+Scope: local
+
+Type: optional
+
+Intent: inout.
+
+Specified as: a double precision array.
+
+
+
+
+
+
On Return
+
+
+
y
+
the destination vector.
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a double precision array.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+The spdatapsb_spmat_type data structure
+contains all information about local portion of the sparse matrix and
+its storage mode. Most of these fields are set by the tools
+routines when inserting a new sparse matrix; the user needs only
+choose, if he/she so whishes, a specific matrix storage mode.
+
+
aspk
+
Contains values of the local distributed sparse
+matrix.
+
+Specified as: an allocatable array of rank one of type corresponding
+to matrix entries type.
+
+
ia1
+
Holds integer information on distributed sparse
+matrix. Actual information will depend on data format used.
+
+Specified as: an allocatable integer array of rank one.
+
+
ia2
+
Holds integer information on distributed sparse
+matrix. Actual information will depend on data format used.
+
+Specified as: an allocatable integer array of rank one.
+
+
infoa
+
On entry can hold auxiliary information on distributed sparse
+matrix. Actual information will depend on data format used.
+
+Specified as: an integer array of length psb_ifasize_.
+
+
fida
+
Defines the format of the distributed sparse matrix.
+
+Specified as: a string of length 5
+
+
descra
+
Describe the characteristic of the distributed sparse matrix.
+
+Specified as: array of character of length 9.
+
+
pl
+
Specifies the local row permutation of distributed sparse
+matrix. If pl(1) is equal to 0, then there isn't row permutation.
+
+Specified as: an allocatable integer array of dimension equal to number of local row (matrix_data[psb_n_row_])
+
+
pr
+
Specifies the local column permutation of distributed sparse
+matrix. If PR(1) is equal to 0, then there isn't columnm permutation.
+
+Specified as: an allocatable integer array of dimension equal to number of
+local row (matrix_data[psb_n_col_])
+
+
m
+
Number of rows; if row indices are stored explicitly,
+as in Coordinate Storage, should be greater than or equal to the
+maximum row index actually present in the sparse matrix.
+Specified as: integer variable.
+
+
k
+
Number of columns; if column indices are stored explicitly,
+as in Coordinate Storage or Compressed Sparse Rows, should be greater
+than or equal to the maximum column index actually present in the sparse matrix.
+Specified as: integer variable.
+
+
+The Fortran 95 interface for distributed sparse matrices containing
+double precision real entries is defined as shown in
+figure 4. The definitions for single precision and
+complex data are identical except for the real declaration and
+for the kind type parameter.
+
+
+
+
Figure 4:
+ The PSBLAS defined data type that
+ contains a sparse matrix.
+
+
+
+
+
+
+
+
+
+
+
+The following two cases are among the most commonly used:
+
+
fida=``CSR''
+
Compressed storage by rows. In this case the
+following should hold:
+
+
+
ia2(i) contains the index of the first element of row
+i; the last element of the sparse matrix is thus stored at
+index . It should contain m+1 entries in
+nondecreasing order (strictly increasing, if there are no empty rows).
+
+
ia1(j) contains the column index and aspk(j)
+contains the corresponding coefficient value, for all
+.
+
+
+
+
fida=``COO''
+
Coordinate storage. In this case the following
+should hold:
+
+
+
infoa(1) contains the number of nonzero elements in the
+matrix;
+
+
For all
+, the coefficient, row index and
+column index are stored into apsk(j), ia1(j) and
+ia2(j) respectively.
+
+
+
+
+A sparse matrix has an associated state, which can take the following
+values:
+
+
Build:
+
State entered after the first allocation, and before the
+ first assembly; in this state it is possible to add nonzero entries.
+
+
Assembled:
+
State entered after the assembly; computations using
+ the sparse matrix, such as matrix-vector products, are only possible
+ in this state;
+
+
Update:
+
State entered after a reinitalization; this is used to
+ handle applications in which the same sparsity pattern is used
+ multiple times with different coefficients. In this state it is only
+ possible to enter coefficients for already existing nonzero entries.
+
+In this chapter we provide routines for preconditioners and iterative
+methods. The interfaces for Krylov subspace methods are available in
+the module psb_krylov_mod.
+
+
+This subroutine is a driver that provides a general interface for all
+the Krylov-Subspace family methods implemented in PSBLAS version 2.
+
+
+The stopping criterion is the normwise backward error, in the infinity
+norm, i.e. the iteration is stopped when
+
+
+
+
+
+
+
+
+or the 2-norm residual reduction
+
+
+
+
+
+
+
+
+according to the value passed through the istop argument (see
+later). In the above formulae, is the tentative solution and
+ the corresponding residual at the -th iteration.
+
+
a string that defines the iterative method to be
+ used. Supported values are:
+
+
CG:
+
the Conjugate Gradient method;
+
+
+
CGS:
+
the Conjugate Gradient Stabilized method;
+
+
+
+
BICG:
+
the Bi-Conjugate Gradient method;
+
+
+
BICGSTAB:
+
the Bi-Conjugate Gradient Stabilized method;
+
+
+
BICGSTABL:
+
the Bi-Conjugate Gradient Stabilized method with restarting;
+
+
+
RGMRES:
+
the Generalized Minimal Residual method with restarting.
+
+
+
+
+
a
+
the local portion of global sparse matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
prec
+
The data structure containing the preconditioner.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type precdatapsb_prec_type.
+
+
b
+
The RHS vector.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a rank one array.
+
+
x
+
The initial guess.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one array.
+
+
eps
+
The stopping tolerance.
+
+Scope: global
+
+Type: required
+
+Intent: in.
+
+Specified as: a real number.
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
itmax
+
The maximum number of iterations to perform.
+
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+Default: .
+
+Specified as: an integer variable .
+
+
itrace
+
If print out an informational message about
+ convergence every iterations.
+
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+
irst
+
An integer specifying the restart parameter.
+
+Scope: global
+
+Type: optional.
+
+Intent: in.
+
+Values: . This is employed for the BiCGSTABL or RGMRES
+methods, otherwise it is ignored.
+
+
+
+
istop
+
An integer specifying the stopping criterion.
+
+Scope: global
+
+Type: optional.
+
+Intent: in.
+
+Values: 1: use the normwise backward error, 2: use the scaled 2-norm
+of the residual. Default: 2.
+
+
On Return
+
+
+
x
+
The computed solution.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one array.
+
+
iter
+
The number of iterations performed.
+
+Scope: global
+
+Type: optional
+
+Intent: out.
+
+Returned as: an integer variable.
+
+
err
+
The convergence estimate on exit.
+
+Scope: global
+
+Type: optional
+
+Intent: out.
+
+Returned as: a real number.
+
+
cond
+
An estimate of the condition number of matrix ; only
+ available with the method.
+
+Scope: global
+
+Type: optional
+
+Intent: out.
+
+Returned as: a real number.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+G. Bella, S. Filippone, A. De Maio and M. Testa,
+A Simulation Model for Forest Fires,
+in J. Dongarra, K. Madsen, J. Wasniewski, editors,
+Proceedings of PARA 04 Workshop on State of the Art
+in Scientific Computing, pp. 546-553, Lecture Notes in Computer Science,
+Springer, 2005.
+
A. Buttari, D. di Serafino, P. D'Ambra, S. Filippone,
+2LEV-D2P4: a package of high-performance preconditioners,
+Applicable Algebra in Engineering, Communications and Computing,
+Volume 18, Number 3, May, 2007, pp. 223-239
+
P. D'Ambra, S. Filippone, D. Di Serafino
+On the Development of PSBLAS-based Parallel Two-level Schwarz Preconditioners
+
+Applied Numerical Mathematics, Elsevier Science,
+Volume 57, Issues 11-12, November-December 2007, Pages 1181-1196.
+
+
+ Dongarra, J. J., DuCroz, J., Hammarling, S. and Hanson, R.,
+An Extended Set of Fortran Basic Linear Algebra Subprograms,
+ACM Trans. Math. Softw. vol. 14, 1-17, 1988.
+
+ Dongarra, J., DuCroz, J., Hammarling, S. and Duff, I.,
+A Set of level 3 Basic Linear Algebra Subprograms,
+ACM Trans. Math. Softw. vol. 16, 1-17, 1990.
+
+J. J. Dongarra and R. C. Whaley,
+A User's Guide to the BLACS v. 1.1,
+Lapack Working Note 94, Tech. Rep. UT-CS-95-281, University of
+Tennessee, March 1995 (updated May 1997).
+
+I. Duff, M. Marrone, G. Radicati and C. Vittoli,
+Level 3 Basic Linear Algebra Subprograms for Sparse Matrices:
+a User Level Interface,
+ACM Transactions on Mathematical Software, 23(3), pp. 379-401, 1997.
+
+I. Duff, M. Heroux and R. Pozo,
+An Overview of the Sparse Basic Linear
+Algebra Subprograms: the New Standard from the BLAS Technical Forum,
+ACM Transactions on Mathematical Software, 28(2), pp. 239-267, 2002.
+
+S. Filippone and M. Colajanni,
+PSBLAS: A Library for Parallel Linear Algebra
+Computation on Sparse Matrices,
+
+ACM Transactions on Mathematical Software, 26(4), pp. 527-550, 2000.
+
+S. Filippone, P. D'Ambra, M. Colajanni,
+Using a Parallel Library of Sparse Linear Algebra in a Fluid Dynamics
+Applications Code on Linux Clusters,
+in G. Joubert, A. Murli, F. Peters, M. Vanneschi, editors,
+Parallel Computing - Advances & Current Issues,
+pp. 441-448, Imperial College Press, 2002.
+
+Karypis, G. and Kumar, V.,
+METIS: Unstructured Graph Partitioning and Sparse Matrix
+ Ordering System.
+Minneapolis, MN 55455: University of Minnesota, Department of
+ Computer Science, 1995.
+Internet Address: http://www.cs.umn.edu/~karypis.
+
+Machiels, L. and Deville, M.
+Fortran 90: An entry to object-oriented programming for the solution
+ of partial differential equations.
+ACM Trans. Math. Softw. vol. 23, 32-49.
+
+M. Snir, S. Otto, S. Huss-Lederman, D. Walker and J. Dongarra,
+MPI: The Complete Reference. Volume 1 - The MPI Core, second edition,
+MIT Press, 1998.
+
+In this chapter we provide routines for preconditioners and iterative
+methods. The interfaces for Krylov subspace methods are available in
+the module psb_krylov_mod.
+
+
+This subroutine is a driver that provides a general interface for all
+the Krylov-Subspace family methods implemented in PSBLAS version 2.
+
+
+The stopping criterion is the normwise backward error, in the infinity
+norm, i.e. the iteration is stopped when
+
+
+
+
+
+
+
+
+or the 2-norm residual reduction
+
+
+
+
+
+
+
+
+according to the value passed through the istop argument (see
+later). In the above formulae, is the tentative solution and
+ the corresponding residual at the -th iteration.
+
+
a string that defines the iterative method to be
+ used. Supported values are:
+
+
CG:
+
the Conjugate Gradient method;
+
+
+
CGS:
+
the Conjugate Gradient Stabilized method;
+
+
+
+
BICG:
+
the Bi-Conjugate Gradient method;
+
+
+
BICGSTAB:
+
the Bi-Conjugate Gradient Stabilized method;
+
+
+
BICGSTABL:
+
the Bi-Conjugate Gradient Stabilized method with restarting;
+
+
+
RGMRES:
+
the Generalized Minimal Residual method with restarting.
+
+
+
+
+
a
+
the local portion of global sparse matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
prec
+
The data structure containing the preconditioner.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type precdatapsb_prec_type.
+
+
b
+
The RHS vector.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a rank one array.
+
+
x
+
The initial guess.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one array.
+
+
eps
+
The stopping tolerance.
+
+Scope: global
+
+Type: required
+
+Intent: in.
+
+Specified as: a real number.
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
itmax
+
The maximum number of iterations to perform.
+
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+Default: .
+
+Specified as: an integer variable .
+
+
itrace
+
If print out an informational message about
+ convergence every iterations.
+
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+
irst
+
An integer specifying the restart parameter.
+
+Scope: global
+
+Type: optional.
+
+Intent: in.
+
+Values: . This is employed for the BiCGSTABL or RGMRES
+methods, otherwise it is ignored.
+
+
+
+
istop
+
An integer specifying the stopping criterion.
+
+Scope: global
+
+Type: optional.
+
+Intent: in.
+
+Values: 1: use the normwise backward error, 2: use the scaled 2-norm
+of the residual. Default: 2.
+
+
On Return
+
+
+
x
+
The computed solution.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one array.
+
+
iter
+
The number of iterations performed.
+
+Scope: global
+
+Type: optional
+
+Intent: out.
+
+Returned as: an integer variable.
+
+
err
+
The convergence estimate on exit.
+
+Scope: global
+
+Type: optional
+
+Intent: out.
+
+Returned as: a real number.
+
+
cond
+
An estimate of the condition number of matrix ; only
+ available with the method.
+
+Scope: global
+
+Type: optional
+
+Intent: out.
+
+Returned as: a real number.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+G. Bella, S. Filippone, A. De Maio and M. Testa,
+A Simulation Model for Forest Fires,
+in J. Dongarra, K. Madsen, J. Wasniewski, editors,
+Proceedings of PARA 04 Workshop on State of the Art
+in Scientific Computing, pp. 546-553, Lecture Notes in Computer Science,
+Springer, 2005.
+
A. Buttari, D. di Serafino, P. D'Ambra, S. Filippone,
+2LEV-D2P4: a package of high-performance preconditioners,
+Applicable Algebra in Engineering, Communications and Computing,
+Volume 18, Number 3, May, 2007, pp. 223-239
+
P. D'Ambra, S. Filippone, D. Di Serafino
+On the Development of PSBLAS-based Parallel Two-level Schwarz Preconditioners
+
+Applied Numerical Mathematics, Elsevier Science,
+Volume 57, Issues 11-12, November-December 2007, Pages 1181-1196.
+
+
+ Dongarra, J. J., DuCroz, J., Hammarling, S. and Hanson, R.,
+An Extended Set of Fortran Basic Linear Algebra Subprograms,
+ACM Trans. Math. Softw. vol. 14, 1-17, 1988.
+
+ Dongarra, J., DuCroz, J., Hammarling, S. and Duff, I.,
+A Set of level 3 Basic Linear Algebra Subprograms,
+ACM Trans. Math. Softw. vol. 16, 1-17, 1990.
+
+J. J. Dongarra and R. C. Whaley,
+A User's Guide to the BLACS v. 1.1,
+Lapack Working Note 94, Tech. Rep. UT-CS-95-281, University of
+Tennessee, March 1995 (updated May 1997).
+
+I. Duff, M. Marrone, G. Radicati and C. Vittoli,
+Level 3 Basic Linear Algebra Subprograms for Sparse Matrices:
+a User Level Interface,
+ACM Transactions on Mathematical Software, 23(3), pp. 379-401, 1997.
+
+I. Duff, M. Heroux and R. Pozo,
+An Overview of the Sparse Basic Linear
+Algebra Subprograms: the New Standard from the BLAS Technical Forum,
+ACM Transactions on Mathematical Software, 28(2), pp. 239-267, 2002.
+
+S. Filippone and M. Colajanni,
+PSBLAS: A Library for Parallel Linear Algebra
+Computation on Sparse Matrices,
+
+ACM Transactions on Mathematical Software, 26(4), pp. 527-550, 2000.
+
+S. Filippone, P. D'Ambra, M. Colajanni,
+Using a Parallel Library of Sparse Linear Algebra in a Fluid Dynamics
+Applications Code on Linux Clusters,
+in G. Joubert, A. Murli, F. Peters, M. Vanneschi, editors,
+Parallel Computing - Advances & Current Issues,
+pp. 441-448, Imperial College Press, 2002.
+
+Karypis, G. and Kumar, V.,
+METIS: Unstructured Graph Partitioning and Sparse Matrix
+ Ordering System.
+Minneapolis, MN 55455: University of Minnesota, Department of
+ Computer Science, 1995.
+Internet Address: http://www.cs.umn.edu/~karypis.
+
+Machiels, L. and Deville, M.
+Fortran 90: An entry to object-oriented programming for the solution
+ of partial differential equations.
+ACM Trans. Math. Softw. vol. 23, 32-49.
+
+M. Snir, S. Otto, S. Huss-Lederman, D. Walker and J. Dongarra,
+MPI: The Complete Reference. Volume 1 - The MPI Core, second edition,
+MIT Press, 1998.
+
+Our base library offers support for simple well known preconditioners
+like Diagonal Scaling or Block Jacobi with incomplete
+factorization ILU(0).
+
+
+A preconditioner is held in the precdata psb_prec_type data structure reported in
+figure 5. The psb_prec_type
+data type may contain a simple preconditioning matrix with the
+associated communication descriptor.The values contained in
+the iprcparm and rprcparm define tha type of
+preconditioner along with all the parameters related to it; thus,
+iprcparm and rprcparm define how the other records have
+to be interpreted. This data structure is the basis of more complex
+preconditioning strategies, which are the subject of further
+research.
+
+
+
+
Figure 5:
+The PSBLAS defined data type that contains a preconditioner.
the communication descriptor.
+
+Scope: local.
+
+Type: required.
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
+
+
+
+
On Return
+
+
+
Function value
+
The number of local rows, i.e. the number of
+ rows owned by the current process; as explained in 1,
+ it is equal to
+. The returned value is
+ specific to the calling process.
+
+
+
+
+
+
+
+
diff --git a/docs/html/node16.html b/docs/html/node16.html
new file mode 100644
index 00000000..80d3248a
--- /dev/null
+++ b/docs/html/node16.html
@@ -0,0 +1,112 @@
+
+
+
+
+
+psb_cd_get_local_cols -- Get number of local cols
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Next:psb_cd_get_global_rows Get
+ Up:Data structure query routines
+ Previous:psb_cd_get_local_rows Get
+ Contents
+
+
+
+
+
the communication descriptor.
+
+Scope: local.
+
+Type: required.
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
+
+
+
+
On Return
+
+
+
Function value
+
The number of local cols, i.e. the number of
+ indices used by the current process, including both local and halo
+ indices; as explained in 1,
+ it is equal to
+. The
+ returned value is specific to the calling process.
+
+
+
+
+
+
+
+
diff --git a/docs/html/node17.html b/docs/html/node17.html
new file mode 100644
index 00000000..79c5050a
--- /dev/null
+++ b/docs/html/node17.html
@@ -0,0 +1,102 @@
+
+
+
+
+
+psb_cd_get_global_rows -- Get number of global rows
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Next:psb_cd_get_global_cols Get
+ Up:Data structure query routines
+ Previous:psb_cd_get_local_cols Get
+ Contents
+
+
+
+
+
+The PSBLAS library, developed with the aim to facilitate the
+parallelization of computationally intensive scientific applications,
+is designed to address parallel implementation of iterative solvers
+for sparse linear systems through the distributed memory paradigm. It
+includes routines for multiplying sparse matrices by dense matrices,
+solving block diagonal systems with triangular diagonal entries,
+preprocessing sparse matrices, and contains additional routines for
+dense matrix operations. The current implementation of PSBLAS
+addresses a distributed memory execution model operating with message
+passing.
+
+
+The PSBLAS library is internally implemented in
+ the Fortran 95 [14] programming language, with reuse and/or
+ adaptation of some existing Fortran 77 software, and a handful of C
+ routines.
+A similar approach has been advocated by a number of authors,
+e.g. [13]. Moreover, the Fortran 95 facilities for dynamic
+memory management and interface overloading greatly enhance the
+usability of the PSBLAS
+subroutines. In this way, the library can take care of runtime memory
+requirements that are quite difficult or even impossible to predict at
+implementation or compilation time.
+In the current release we rely on the availability of the so-called
+allocatable extensions, specified in TR 15581. Strictly speaking they
+are outside the Fortran 95 standard; however they have been included
+in the Fortran 2003 language standard, and are available in
+practically all Fortran 95 compilers on the market, including the GNU
+Fortran compiler from the Free Software Foundation (as of version 4.2).
+The presentation of the
+PSBLAS library follows the general structure of the proposal for
+serial Sparse BLAS [7,8], which in its turn is based on the
+proposal for BLAS on dense matrices [12,4,5].
+
+
+The applicability of sparse iterative solvers to many different areas
+causes some terminology problems because the same concept may be
+denoted through different names depending on the application area. The
+PSBLAS features presented in this document will be discussed referring
+to a finite difference discretization of a Partial Differential
+Equation (PDE). However, the scope of the library is wider than
+that: for example, it can be applied to finite element discretizations
+of PDEs, and even to different classes of problems such as nonlinear
+optimization, for example in optimal control problems.
+
+
+The design of a solver for sparse linear systems is driven by many
+conflicting objectives, such as limiting occupation of storage
+resources, exploiting regularities in the input data, exploiting
+hardware characteristics of the parallel platform. To achieve an
+optimal communication to computation ratio on distributed memory
+machines it is essential to keep the data locality as high as
+possible; this can be done through an appropriate data allocation
+strategy. The choice of the preconditioner is another very important
+factor that affects efficiency of the implemented application. Optimal
+data distribution requirements for a given preconditioner may conflict
+with distribution requirements of the rest of the solver. Finding the
+optimal trade-off may be very difficult because it is application
+dependent. Possible solutions to these problems and other important
+inputs to the development of the PSBLAS software package have come from
+an established experience in applying the PSBLAS solvers to
+computational fluid dynamics applications.
+
+
the new threshold for communication descriptors.
+
+Scope: global.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer value greater than zero.
+
+
+Note: the threshold value is only queried by the library at the time a
+call to psb_cdall is executed, therefore changing the threshold
+has no effect on communication descriptors that have already been initialized.
+
+
the sparse matrix
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
+
+
+
+
On Return
+
+
+
Function value
+
The number of nonzero elements stored in sparse matrix a.
+
+
+
+
+Notes
+
+
+
The function value is specific to the storage format of matrix
+ a; some storage formats employ padding, thus the returned
+ value for the same matrix may be different for different storage choices.
+
+This subroutine is an interface to the computational kernel for
+dense matrix sum:
+
+
+
+
+
+
+
+
+
+
+
+call psb_geaxpby(alpha, x, beta, y, desc_a, info)
+
+
+
+
+
+
+
Table 1:
+Data types
+
+
+
+
, , ,
+
Subroutine
+
+
Short Precision Real
+
psb_geaxpby
+
+
Long Precision Real
+
psb_geaxpby
+
+
Short Precision Complex
+
psb_geaxpby
+
+
Long Precision Complex
+
psb_geaxpby
+
+
+
+
+
+
+
+
+
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
alpha
+
the scalar .
+
+Scope: global
+
+Type: required
+
+Intent: in.
+
+Specified as: a number of the data type indicated in Table 1.
+
+
x
+
the local portion of global dense matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a rank one or two array
+containing numbers of type
+specified in Table 1. The rank of must be the same of .
+
+
beta
+
the scalar .
+
+Scope: global
+
+Type: required
+
+Intent: in.
+
+Specified as: a number of the data type indicated in Table 1.
+
+
y
+
the local portion of the global dense matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one or two array containing numbers of the type
+indicated in Table 1. The rank of must be the same of .
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
+
+
+
+
+
+
On Return
+
+
+
y
+
the local portion of result submatrix .
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one or two array containing numbers of the type
+indicated in Table 1.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+This function computes dot product between two vectors and
+.
+
+If and are real vectors
+it computes dot-product as:
+
+
+
+
+
+
+
+
+Else if and are complex vectors then it computes dot-product as:
+
+
+
+
+
+
+
+
+
+
+
+psb_gedot(x, y, desc_a, info)
+
+
+
+
+
Table 2:
+Data types
+
+
+
+
, ,
+
Function
+
+
Short Precision Real
+
psb_gedot
+
+
Long Precision Real
+
psb_gedot
+
+
Short Precision Complex
+
psb_gedot
+
+
Long Precision Complex
+
psb_gedot
+
+
+
+
+
+
+
+
+
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
x
+
the local portion of global dense matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: an array of rank one or two
+containing numbers of type specified in
+Table 2. The rank of must be the same of .
+
+
y
+
the local portion of global dense matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: an array of rank one or two
+containing numbers of type specified in
+Table 2. The rank of must be the same of .
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
+
+
On Return
+
+
+
Function value
+
is the dot product of subvectors and .
+
+Scope: global
+
+Specified as: a number of the data type indicated in Table 2.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+This subroutine computes a series of dot products among the columns of
+two dense matrices and :
+
+
+
+
+
+
+
+
+If the matrices are complex, then the
+usual convention applies, i.e. the conjugate transpose of is
+used. If and are of rank one, then is a scalar, else it
+is a rank one array.
+
+
+
+call psb_gedots(res, x, y, desc_a, info)
+
+
+
+
+
Table 3:
+Data types
+
+
+
+
, ,
+
Subroutine
+
+
Short Precision Real
+
psb_gedots
+
+
Long Precision Real
+
psb_gedots
+
+
Short Precision Complex
+
psb_gedots
+
+
Long Precision Complex
+
psb_gedots
+
+
+
+
+
+
+
+
+
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
x
+
the local portion of global dense matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: an array of rank one or two
+containing numbers of type specified in
+Table 3. The rank of must be the same of .
+
+
y
+
the local portion of global dense matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: an array of rank one or two
+containing numbers of type specified in
+Table 3. The rank of must be the same of .
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
On Return
+
+
+
res
+
is the dot product of subvectors and .
+
+Scope: global
+
+Intent: out.
+
+Specified as: a number or a rank-one array of the data type indicated
+in Table 2.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+This function computes
+ the infinity-norm of a vector .
+
+If is a real vector
+it computes infinity norm as:
+
+
+
+
+
+
+
+
+else if is a complex vector then it computes infinity-norm as:
+
+
+
+
+
+
+
+
+
+
+
+psb_geamax(x, desc_a, info)
+
+
+
+
+
+
+
Table 4:
+Data types
+
+
+
+
+
+
Function
+
+
Short Precision Real
+
Short Precision Real
+
psb_geamax
+
+
Long Precision Real
+
Long Precision Real
+
psb_geamax
+
+
Short Precision Real
+
Short Precision Complex
+
psb_geamax
+
+
Long Precision Real
+
Long Precision Complex
+
psb_geamax
+
+
+
+
+
+
+
+
+
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
x
+
the local portion of global dense matrix
+.
+
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a rank one or two array
+containing numbers of type specified in
+Table 4.
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
+
+
On Return
+
+
+
Function value
+
is the infinity norm of subvector .
+
+Scope: global
+
+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.
+
+The PSBLAS library is designed to handle the implementation of
+iterative solvers for sparse linear systems on distributed memory
+parallel computers. The system coefficient matrix must be square;
+it may be real or complex, nonsymmetric, and its sparsity pattern
+needs not to be symmetric. The serial computation parts are based on
+the serial sparse BLAS, so that any extension made to the data
+structures of the serial kernels is available to the parallel
+version. The overall design and parallelization strategy have been
+influenced by the structure of the ScaLAPACK parallel
+library. The layered structure of the PSBLAS library
+is shown in figure 1; lower layers of the library
+indicate an encapsulation relationship with upper layers. The ongoing
+discussion focuses on the Fortran 95 layer immediately below the
+application layer.
+The serial parts of the computation on each process are executed through
+calls to the serial sparse BLAS subroutines. In a similar way, the
+inter-process message exchanges are implemented through the Basic
+Linear Algebra Communication Subroutines (BLACS) library [6]
+that guarantees a portable and efficient communication layer. The
+Message Passing Interface code is encapsulated within the BLACS
+layer. However, in some cases, MPI routines are directly used either
+to improve efficiency or to implement communication patterns for which
+the BLACS package doesn't provide any method.
+
+
+In any case we provide wrappers around the BLACS routines so that the
+user does not need to delve into their details (see Sec. 7).
+
+
+
+
+
+
Figure 1:
+PSBLAS library components hierarchy.
+
+
+
+
+
+
+
+
+
+The type of linear system matrices that we address typically arise in the
+numerical solution of PDEs; in such a context,
+it is necessary to pay special attention to the
+structure of the problem from which the application originates.
+The nonzero pattern of a matrix arising from the
+discretization of a PDE is influenced by various factors, such as the
+shape of the domain, the discretization strategy, and
+the equation/unknown ordering. The matrix itself can be interpreted as
+the adjacency matrix of the graph associated with the discretization
+mesh.
+
+
+The distribution of the coefficient matrix for the linear system is
+based on the ``owner computes'' rule:
+the variable associated to each mesh point is assigned to a process
+that will own the corresponding row in the coefficient matrix and
+will carry out all related computations. This allocation strategy
+is equivalent to a partition of the discretization mesh into sub-domains.
+Our library supports any distribution that keeps together
+the coefficients of each matrix row; there are no other constraints on
+the variable assignment.
+This choice is consistent with data distributions commonly used in
+ScaLAPACK such as CYCLIC(N) and BLOCK,
+as well as completely arbitrary assignments of
+equation indices to processes. In particular it is consistent with the
+usage of graph partitioning tools commonly available in the
+literature, e.g. METIS [11].
+Dense vectors conform to sparse
+matrices, that is, the entries of a vector follow the same distribution
+of the matrix rows.
+
+
+We assume that the sparse matrix is built in parallel, where each
+process generates its own portion. We never require that the entire
+matrix be available on a single node. However, it is possible
+to hold the entire matrix in one process and distribute it
+explicitly1, even though the resulting
+bottleneck would make this option unattractive in most cases.
+
+
+This subroutine computes a series of infinity norms on the columns of
+a dense matrix :
+
+
+
+
+
+
+
+
+
+
+
+call psb_geamaxs(res, x, desc_a, info)
+
+
+
+
+
+
+
Table 5:
+Data types
+
+
+
+
+
+
Subroutine
+
+
Short Precision Real
+
Short Precision Real
+
psb_geamaxs
+
+
Long Precision Real
+
Long Precision Real
+
psb_geamaxs
+
+
Short Precision Real
+
Short Precision Complex
+
psb_geamaxs
+
+
Long Precision Real
+
Long Precision Complex
+
psb_geamaxs
+
+
+
+
+
+
+
+
+
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
x
+
the local portion of global dense matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a rank one or two array
+containing numbers of type specified in
+Table 5.
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
On Return
+
+
+
res
+
is the infinity norm of the columns of .
+
+Scope: global
+
+Intent: out.
+
+Specified as: a number or a rank-one array of long precision real numbers.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+This function computes the 1-norm of a vector .
+
+If is a real vector
+it computes 1-norm as:
+
+
+
+
+
+
+
+
+else if is a vector then it computes 1-norm as:
+
+
+
+
+
+
+
+
+
+
+
+psb_geasum(x, desc_a, info)
+
+
+
+
+
+
+
Table 6:
+Data types
+
+
+
+
+
+
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
+.
+
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a rank one or two array
+containing numbers of type specified in
+Table 6.
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
+
+
On Return
+
+
+
Function value
+
is the 1-norm of vector .
+
+Scope: global
+
+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.
+
+This subroutine computes a series of 1-norms on the columns of
+a dense matrix :
+
+
+
+
+
+
+
+
+This function computes the 1-norm of a vector .
+
+If is a real vector
+it computes 1-norm as:
+
+
+
+
+
+
+
+
+else if is a complex vector then it computes 1-norm as:
+
+
+
+
+
+
+
+
+
+
+
+call psb_geasums(res, x, desc_a, info)
+
+
+
+
+
+
+
Table 7:
+Data types
+
+
+
+
+
+
Subroutine
+
+
Short Precision Real
+
Short Precision Real
+
psb_geasums
+
+
Long Precision Real
+
Long Precision Real
+
psb_geasums
+
+
Short Precision Real
+
Short Precision Complex
+
psb_geasums
+
+
Long Precision Real
+
Long Precision Complex
+
psb_geasums
+
+
+
+
+
+
+
+
+
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
x
+
the local portion of global dense matrix
+.
+
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a rank one or two array
+containing numbers of type specified in
+Table 7.
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
+
+
On Return
+
+
+
res
+
contains the 1-norm of (the columns of) .
+
+Scope: global
+
+Intent: out.
+
+Short as: a long precision real number.
+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.
+
+
+
+
+ifstarsubroutinesubroutinepsb_genrm22-Norm of Vector
+
+
+This function computes the 2-norm of a vector .
+
+If is a double precision real vector
+it computes 2-norm as:
+
+
+
+
+
+
+
+
+else if is double precision complex vector then it computes 2-norm as:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table 8:
+Data types
+
+
+
+
+
+
Function
+
+
Short Precision Real
+
Short Precision Real
+
psb_genrm2
+
+
Long Precision Real
+
Long Precision Real
+
psb_genrm2
+
+
Short Precision Real
+
Short Precision Complex
+
psb_genrm2
+
+
Long Precision Real
+
Long Precision Complex
+
psb_genrm2
+
+
+
+
+
+
+
+
+
+
+psb_genrm2(x, desc_a, info)
+
+
+
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
x
+
the local portion of global dense matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a rank one or two array
+containing numbers of type specified in
+Table 8.
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
+
+
On Return
+
+
+
Function Value
+
is the 2-norm of subvector .
+
+Scope: global
+
+Type: required
+
+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.
+
+This subroutine computes a series of 1-norms on the columns of
+a dense matrix :
+
+
+
+
+
+
+
+
+This function computes the 1-norm of a vector .
+
+If is a real vector
+it computes 1-norm as:
+
+
+
+
+
+
+
+
+else if is a complex vector then it computes 1-norm as:
+
+
+
+
+
+
+
+
+
+
+
+call psb_genrm2s(res, x, desc_a, info)
+
+
+
+
+
+
+
Table 9:
+Data types
+
+
+
+
+
+
Subroutine
+
+
Short Precision Real
+
Short Precision Real
+
psb_genrm2s
+
+
Long Precision Real
+
Long Precision Real
+
psb_genrm2s
+
+
Short Precision Real
+
Short Precision Complex
+
psb_genrm2s
+
+
Long Precision Real
+
Long Precision Complex
+
psb_genrm2s
+
+
+
+
+
+
+
+
+
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
x
+
the local portion of global dense matrix
+.
+
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a rank one or two array
+containing numbers of type specified in
+Table 9.
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
+
+
On Return
+
+
+
res
+
contains the 1-norm of (the columns of) .
+
+Scope: global
+
+Intent: out.
+
+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.
+
+This function computes the infinity-norm of a matrix :
+
+
+
+
+
+
+
+
+
+
+where:
+
+
+
represents the global matrix
+
+
+
+
+
+
+
+
Table 10:
+Data types
+
+
+
+
+
Function
+
+
Short Precision Real
+
psb_spnrmi
+
+
Long Precision Real
+
psb_spnrmi
+
+
Short Precision Complex
+
psb_spnrmi
+
+
Long Precision Complex
+
psb_spnrmi
+
+
+
+
+
+
+
+
+
+
+psb_spnrmi(A, desc_a, info)
+
+
+
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
a
+
the local portion of the global sparse matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
On Return
+
+
+
Function value
+
is the infinity-norm of sparse submatrix .
+
+Scope: global
+
+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.
+
+This subroutine computes the Sparse Matrix by Dense Matrix Product:
+
+
+
+
+
+
+
+
+
+(1)
+
+
+
+
+
+
+
+
+
+(2)
+
+
+
+
+
+
+
+
+
+(3)
+
+
+
+
+where:
+
+
+
is the global dense submatrix
+
+
+
is the global dense submatrix
+
+
+
is the global sparse submatrix
+
+
+
are the permutation matrices.
+
+
+
+
+
+
+
+
Table 11:
+Data types
+
+
+
+
, , , ,
+
Subroutine
+
+
Short Precision Real
+
psb_spmm
+
+
Long Precision Real
+
psb_spmm
+
+
Short Precision Complex
+
psb_spmm
+
+
Long Precision Complex
+
psb_spmm
+
+
+
+
+
+
+
+
+
+
+call psb_spmm(alpha, a, x, beta, y, desc_a, info)
+call psb_spmm(alpha, a, x, beta, y,desc_a, info, &
+ & trans, work)
+
+
+
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
alpha
+
the scalar .
+
+Scope: global
+
+Type: required
+
+Intent: in.
+
+Specified as: a number of the data type indicated in
+Table 11.
+
+
a
+
the local portion of the sparse matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
x
+
the local portion of global dense matrix
+.
+
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a rank one or two array
+containing numbers of type specified in
+Table 11. The rank of must be the same of .
+
+
beta
+
the scalar .
+
+Scope: global
+
+Type: required
+
+Intent: in.
+
+Specified as: a number of the data type indicated in Table 11.
+
+
y
+
the local portion of global dense matrix
+.
+
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one or two array
+containing numbers of type specified in
+Table 11. The rank of must be the same of .
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+Default:
+
+Specified as: a character variable.
+
+
+
+
work
+
work array.
+
+Scope: local
+
+Type: optional
+
+Intent: inout.
+
+Specified as: a rank one array of the same type of and with
+the TARGET attribute.
+
+
+
+
On Return
+
+
+
y
+
the local portion of result submatrix .
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: an array of rank one or two
+containing numbers of type specified in
+Table 11.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+This subroutine computes the Triangular System Solve:
+
+
+
+
+
+
+
+
+
+where:
+
+
+
is the global dense submatrix
+
+
+
is the global dense submatrix
+
+
+
is the global sparse block triangular submatrix
+
+
+
is the scaling diagonal matrix.
+
+
+
are the permutation matrices.
+
+
+
+
+
+call psb_spsm(alpha, t, x, beta, y, desc_a, info)
+call psb_spsm(alpha, t, x, beta, y, desc_a, info,&
+ & trans, unit, choice, diag, work)
+
+
+
+
+
+
+
Table 12:
+Data types
+
+
+
+
, , , , ,
+
Subroutine
+
+
Short Precision Real
+
psb_spsm
+
+
Long Precision Real
+
psb_spsm
+
+
Short Precision Complex
+
psb_spsm
+
+
Long Precision Complex
+
psb_spsm
+
+
+
+
+
+
+
+
+
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
alpha
+
the scalar .
+
+Scope: global
+
+Type: required
+
+Intent: in.
+
+Specified as: a number of the data type indicated in
+Table 12.
+
+
t
+
the global portion of the sparse matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data type specified in
+§ 3.
+
+
x
+
the local portion of global dense matrix
+.
+
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a rank one or two array
+containing numbers of type specified in
+Table 12. The rank of must be the same of .
+
+
beta
+
the scalar .
+
+Scope: global
+
+Type: required
+
+Intent: in.
+
+Specified as: a number of the data type indicated in Table 12.
+
+
y
+
the local portion of global dense matrix
+.
+
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one or two array
+containing numbers of type specified in
+Table 12. The rank of must be the same of .
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
trans
+
specify with unitd the operation to perform.
+
+
trans = 'N'
+
the operation is with no transposed matrix
+
+
trans = 'T'
+
the operation is with transposed matrix.
+
+
trans = 'C'
+
the operation is with conjugate transposed matrix.
+
+
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+Default:
+
+Specified as: a character variable.
+
+
unitd
+
specify with trans the operation to perform.
+
+
unitd = 'U'
+
the operation is with no scaling
+
+
unitd = 'L'
+
the operation is with left scaling
+
+
unitd = 'R'
+
the operation is with right scaling.
+
+
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+Default:
+
+Specified as: a character variable.
+
+
choice
+
specifies the update of overlap elements to be performed
+ on exit:
+
+
+
psb_none_
+
+
+
psb_sum_
+
+
+
psb_avg_
+
+
+
psb_square_root_
+
+
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+Default: psb_avg_
+
+Specified as: an integer variable.
+
+
diag
+
the diagonal scaling matrix.
+
+Scope: local
+
+Type: optional
+
+Intent: in.
+
+Default:
+
+
+Specified as: a rank one array containing numbers of the type
+indicated in Table 12.
+
+
work
+
a work array.
+
+Scope: local
+
+Type: optional
+
+Intent: inout.
+
+Specified as: a rank one array of the same type of with the
+TARGET attribute.
+
+
+
+
On Return
+
+
+
y
+
the local portion of global dense matrix
+.
+
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: an array of rank one or two
+containing numbers of type specified in
+Table 12.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+The routines in this chapter implement various global communication operators
+on vectors associated with a discretization mesh. For auxiliary communication
+routines not tied to a discretization space see 6.
+
+
global dense matrix .
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one or two array with the TARGET attribute
+containing numbers of type specified in
+Table 13.
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
alpha
+
the scalar .
+
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+Default:
+
+Specified as: a number of the data type indicated in Table 13.
+
+
work
+
the work array.
+
+Scope: local
+
+Type: optional
+
+Intent: inout.
+
+Specified as: a rank one array of the same type of with the
+POINTER attribute.
+
+
data
+
index list selector.
+
+Scope: global
+
+Type: optional
+
+Specified as: an integer. Values:psb_comm_halo_,psb_comm_mov_,
+psb_comm_ext_, default: psb_comm_halo_. Chooses the
+index list on which to base the data exchange.
+
+
+
+
On Return
+
+
+
x
+
global dense result matrix .
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Returned as: a rank one or two array
+containing numbers of type specified in
+Table 13.
+
+
info
+
the local portion of result submatrix .
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value that contains an error code.
+
+
+
+
+
+
Figure 6:
+Sample discretization mesh.
+
+
+
+
+
+
+
+
+
+Usage Example
+Consider the discretization mesh depicted in fig. 6,
+partitioned among two processes as shown by the dashed line; the data
+distribution is such that each process will own 32 entries in the
+index space, with a halo made of 8 entries placed at local indices 33
+through 40. If process 0 assigns an initial value of 1 to its entries
+in the vector, and process 1 assigns a value of 2, then after a
+call to psb_halo the contents of the local vectors will be the
+following:
+
+
global dense matrix .
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one or two array
+containing numbers of type specified in
+Table 14.
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
update
+
Update operator.
+
+
update = psb_none_
+
Do nothing;
+
+
update = psb_add_
+
Sum overlap entries, i.e. apply ;
+
+
update = psb_avg_
+
Average overlap entries, i.e. apply ;
+
+
+Scope: global
+
+Intent: in.
+
+Default:
+
+
+Scope: global
+
+Specified as: a integer variable.
+
+
work
+
the work array.
+
+Scope: local
+
+Type: optional
+
+Intent: inout.
+
+Specified as: a one dimensional array of the same type of .
+
+
+
+
On Return
+
+
+
x
+
global dense result matrix .
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: an array of rank one or two
+containing numbers of type specified in
+Table 14.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+
+
+
+Notes
+
+
+
If there is no overlap in the data distribution associated with
+ the descriptor, no operations are performed;
+
+
The operator performs the reduction sum of overlap
+elements; it is a ``prolongation'' operator that
+replicates overlap elements, accounting for the physical replication
+of data;
+
+
The operator performs a scaling on the overlap elements by
+the amount of replication; thus, when combined with the reduction
+operator, it implements the average of replicated elements over all of
+their instances.
+
+
+
+
+
+
+
+
Figure 7:
+Sample discretization mesh.
+
+
+
+
+
+
+
+
+Example of use
+Consider the discretization mesh depicted in fig. 7,
+partitioned among two processes as shown by the dashed lines, with an
+overlap of 1 extra layer with respect to the partition of
+fig. 6; the data
+distribution is such that each process will own 40 entries in the
+index space, with an overlap of 16 entries placed at local indices 25
+through 40; the halo will run from local index 41 through local index 48.. If process 0 assigns an initial value of 1 to its entries
+in the vector, and process 1 assigns a value of 2, then after a
+call to psb_ovrl with psb_avg_ and a call to
+psb_halo_ the contents of the local vectors will be the
+following (showing a transition among the two subdomains)
+
+
+Our computational model implies that the data allocation on the
+parallel distributed memory machine is guided by the structure of the
+physical model, and specifically by the discretization mesh of the
+PDE.
+
+
+Each point of the discretization mesh will have (at least) one
+associated equation/variable, and therefore one index. We say that
+point depends on point if the equation for a
+variable associated with contains a term in , or equivalently
+if .
+After the partition of the discretization mesh into sub-domains
+assigned to the parallel processes,
+we classify the points of a given sub-domain as following.
+
+
Internal.
+
An internal point of
+ a given domain depends only on points of the
+same domain.
+If all points of a domain are assigned to one
+process, then a computational step (e.g., a
+matrix-vector product) of the
+equations associated with the internal points requires no data
+items from other domains and no communications.
+
+
+
+
Boundary.
+
A point of
+a given domain is a boundary point if it depends on points
+belonging to other domains.
+
+
+
+
Halo.
+
A halo point for a given domain is a point belonging to
+another domain such that there is a boundary point which depends
+on it. Whenever performing a computational step, such as a
+matrix-vector product, the values associated with halo points are
+requested from other domains. A boundary point of a given
+domain is usually a halo point for some other domain2; therefore
+the cardinality of the boundary points set denotes the amount of data
+ sent to other domains.
+
+
Overlap.
+
An overlap point is a boundary point assigned to
+multiple domains. Any operation that involves an overlap point
+has to be replicated for each assignment.
+
+
+Overlap points do not usually exist in the basic data
+distributions; however they are a feature of Domain Decomposition
+Schwarz preconditioners which are the subject of related research
+work [3,2].
+
+
+We denote the sets of internal, boundary and halo points for a given
+subdomain by , and .
+Each subdomain is assigned to one process; each process usually
+owns one subdomain, although the user may choose to assign more than
+one subdomain to a process. If each process owns one
+subdomain, the number of rows in the local sparse matrix is
+
+, and the number of local columns
+(i.e. those for which there exists at least one non-zero entry in the
+local rows) is
+.
+
+
+
+
+
+
Figure 2:
+Point classfication.
+
+
+
+
+
+
+
+
+
+This classification of mesh points guides the naming scheme that we
+adopted in the library internals and in the data structures. We
+explicitly note that ``Halo'' points are also often called ``ghost''
+points in the literature.
+
+
the local portion of global dense matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a rank one or two array containing numbers of the type
+indicated in Table 15.
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
root
+
The process that holds the global copy. If all
+ the processes will have a copy of the global vector.
+
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+Specified as: an integer variable
+, default .
+
+
On Return
+
+
+
glob_x
+
The array where the local parts must be gathered.
+
+Scope: global
+
+Type: required
+
+Intent: out.
+
+Specified as: a rank one or two array.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
The array that must be scattered into local pieces.
+
+Scope: global
+
+Type: required
+
+Intent: in.
+
+Specified as: a rank one or two array.
+
+
desc_a
+
contains data structures for communications.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
root
+
The process that holds the global copy. If all
+ the processes have a copy of the global vector.
+
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+Specified as: an integer variable
+, default .
+
+
On Return
+
+
+
loc_x
+
the local portion of global dense matrix
+.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+Specified as: a rank one or two array containing numbers of the type
+indicated in Table 16.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+This subroutine initializes the communication descriptor associated
+with an index space. Exactly one of the optional arguments
+parts, vg, vl, nl or repl
+must be specified, thereby choosing
+the specific initialization strategy:
+
+
On Entry
+
+
+
Type:
+
Synchronous.
+
+
icontxt
+
the communication context.
+
+Scope:global.
+
+Type:required.
+
+Intent: in.
+
+Specified as: an integer value.
+
+
vg
+
Data allocation: each index
+ is allocated
+ to process .
+Scope:global.
+
+Type:optional.
+
+Intent: in.
+
+Specified as: an integer array.
+
+
flag
+
Specifies whether entries in are zero- or one-based.
+Scope:global.
+
+Type:optional.
+
+Intent: in.
+
+Specified as: an integer value , default .
+
+
+
+
mg
+
the (global) number of rows of the problem.
+
+Scope:global.
+
+Type:optional.
+
+Intent: in.
+
+Specified as: an integer value. It is required if parts or
+repl is specified.
+
+
parts
+
the subroutine that defines the partitioning scheme.
+
+Scope:global.
+
+Type:required.
+
+Specified as: a subroutine.
+
+
vl
+
Data allocation: the set of global indices belonging to the
+ calling process.
+Scope:local.
+
+Type:optional.
+
+Intent: in.
+
+Specified as: an integer array.
+
+
nl
+
Data allocation: in a generalized block-row distribution the
+ number of indices belonging to the current process.
+Scope:local.
+
+Type:optional.
+
+Intent: in.
+
+Specified as: an integer value.
+
+
repl
+
Data allocation: build a replicated index space (i.e. all
+ processes own all indices).
+Scope:global.
+
+Type:optional.
+
+Intent: in.
+
+Specified as: the logical value .true.
+
+
+
+
+
+
On Return
+
+
+
desc_a
+
the communication descriptor.
+
+Scope:local.
+
+Type:required.
+
+Intent: out.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+
+
+
+Notes
+
+
+
Exactly one of the optional arguments parts, vg,
+ vl, nl must be specified, thereby choosing the
+ initialization strategy as follows:
+
+
parts
+
In this case we have a subroutine specifying the mapping
+ between global indices and process/local index pairs. If this
+ optional argument is specified, then it is mandatory to
+ specify the argument mg as well.
+ The subroutine must conform to the following interface:
+
The total number of global rows in the mapping;
+
+
+
+ The output arguments are:
+
+
nv
+
The number of entries in pv;
+
+
+
pv
+
A vector containint the indices of the processes to
+ which the global index should be assigend; each entry must satisfy
+
+; if we have an index assigned to multiple
+ processes, i.e. we have an overlap among the subdomains.
+
+
+
+
+
vg
+
In this case the association between an index and a process
+ is specified via an integer vector; the size of the index space is
+ equal to the size of vg, and each index is assigned to
+ the process . The vector vg must be identical on all
+ calling processes; its entries may have the ranges
+ or according to the value of flag.
+
+
vl
+
In this case we are specifying the list of indices assigned
+ to the current process; thus, the global problem size is given by
+ the sum of the sizes of the individual vectors vl specified
+ on the calling processes. The subroutine will check that each entry
+ in the global index space is specified exactly once.
+
+
nl
+
In this case we are implying a generalized row-block
+ distribution in which each process gets assigned a consecutive
+ chunk of global indices.
+
+
repl
+
In this case we are asking to replicate all indices on
+ all processes. This is a special purpose data allocation that is
+ useful in the construction of some multilevel preconditioners.
+
+
+
+
On exit from this routine the descriptor is in the build state
+
+This subroutine examines the edges of the graph associated with the
+discretization mesh (and isomorphic to the sparsity pattern of a
+linear system coefficient matrix), storing them as necessary into the
+communication descriptor.
+
+
+
+
Type:
+
Asynchronous.
+
+
On Entry
+
+
+
nz
+
the number of points being inserted.
+
+Scope: local.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer value.
+
+
ia
+
the indices of the starting vertex of the edges being inserted.
+
+Scope: local.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer array of length .
+
+
ja
+
the indices of the end vertex of the edges being inserted.
+
+Scope: local.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer array of length .
+
+
+
+
+
+
On Return
+
+
+
desc_a
+
the updated communication descriptor.
+
+Scope:local.
+
+Type:required.
+
+Intent: inout.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+
+Notes
+
+
+
This routine may only be called if the descriptor is in the
+ build state;
+
+
This routine automatically ignores edges that do not
+insist on the current process, i.e. edges for which neither the starting
+nor the end vertex belong to the current process.
+
the communication descriptor.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
+
+
+
+
+
+
On Return
+
+
+
desc_out
+
the communication descriptor copy.
+
+Scope:local.
+
+Type:required.
+
+Intent: out.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
the communication descriptor to be freed.
+
+Scope:local.
+
+Type:required.
+
+Intent: inout.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
+
+
+
+
On Return
+
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+This subroutine builds an extended communication descriptor, based on
+the input descriptor desc_a and on the stencil specified
+through the input sparse matrix a.
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
a
+
A sparse matrix
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: a structured data type.
+
+
desc_a
+
the communication descriptor.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
nl
+
the number of additional layers desired.
+
+Scope:global.
+
+Type:required.
+
+Intent: in.
+
+Specified as: an integer value .
+
+
extype
+
the kind of estension required.
+
+Scope:global.
+
+Type:optional .
+
+Intent: in.
+
+Specified as: an integer value
+psb_ovt_xhal_, psb_ovt_asov_, default: psb_ovt_xhal_
+
+
+
+
+
+
+
+
On Return
+
+
+
desc_out
+
the extended communication descriptor.
+
+Scope:local.
+
+Type:required.
+
+Intent: inout.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+
+
+
+Notes
+
+
+
Specifying psb_ovt_xhal_ for the extype argument
+ the user will obtain a descriptor for a domain partition in which
+ the additional layers are fetched as part of an (extended) halo;
+ however the index-to-process mapping is identical to that of the
+ base descriptor;
+
+
Specifying psb_ovt_asov_ for the extype argument
+ the user will obtain a descriptor with an overlapped decomposition:
+ the additional layer is aggregated to the local subdomain (and thus
+ is an overlap), and a new halo extending beyond the last additional
+ layer is formed.
+
the communication descriptor.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
nnz
+
An estimate of the number of nonzeroes in the local
+ part of the assembled matrix.
+
+Scope: global.
+
+Type: optional.
+
+Intent: in.
+
+Specified as: an integer value.
+
+
+
+
+
+
On Return
+
+
+
a
+
the matrix to be allocated.
+
+Scope:local
+
+Type:required
+
+Intent: out.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+
+Notes
+
+
+
On exit from this routine the sparse matrix is in the build
+ state.
+
+
The descriptor may be in either the build or assembled state.
+
+
Providing a good estimate for the number of nonzeroes in
+ the assembled matrix may substantially improve performance in the
+ matrix build phase, as it will reduce or eliminate the need for
+ (potentially multiple) data reallocations.
+
+The PSBLAS library consists of various classes of subroutines:
+
+
Computational routines
+
comprising:
+
+
+
Sparse matrix by dense matrix product;
+
+
Sparse triangular
+systems solution for block diagonal matrices;
+
+
Vector and matrix norms;
+
+
Dense matrix sums;
+
+
Dot products.
+
+
+
+
Communication routines
+
handling halo and overlap
+ communications;
+
+
Data management and auxiliary routines
+
including:
+
+
+
Parallel environment management
+
+
Communication descriptors allocation;
+
+
Dense and sparse matrix allocation;
+
+
Dense and sparse matrix build and update;
+
+
Sparse matrix and data distribution preprocessing.
+
+
+
+
Preconditioner routines
+
+
+
Iterative methods
+
a subset of Krylov subspace iterative
+ methods
+
+
+The following naming scheme has been adopted for all the symbols
+internally defined in the PSBLAS software package:
+
+
+
all the symbols (i.e. subroutine names, data types...) are
+ prefixed by psb_
+
+
all the data type names are suffixed by _type
+
+
all the constant values are suffixed by _
+
+
all the subroutine names follow the rule psb_xxname where
+ xx can be either:
+
+
+
ge: the routine is related to dense data,
+
+
sp: the routine is related to sparse data,
+
+
cd: the routine is related to communication descriptor
+ (see 3).
+
+
+
+ For example the psb_geins, psb_spins and
+ psb_cdins perform the same action (see 6) on
+ dense matrices, sparse matrices and communication descriptors
+ respectively.
+ Interface overloading allows the usage of the same subroutine
+ interfaces for both real and complex data.
+
+
+In the description of the subroutines, arguments or argument entries
+are classified as:
+
+
global
+
For input arguments, the value must be the same on all processes
+ participating in the subroutine call; for output arguments the value
+ is guaranteed to be the same.
+
+
local
+
Each process has its own value(s) independently.
+
+call psb_spins(nz, ia, ja, val, a, desc_a, info)
+
+
+
+
+
Type:
+
Asynchronous.
+
+
On Entry
+
+
+
nz
+
the number of elements to be inserted.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: an integer scalar.
+
+
ia
+
the row indices of the elements to be inserted.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: an integer array of size .
+
+
ja
+
the column indices of the elements to be inserted.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: an integer array of size .
+
+
val
+
the elements to be inserted.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: an array of size . Must be of the same type and kind
+of the aspk component of the sparse matrix .
+
+
desc_a
+
The communication descriptor.
+
+Scope: local.
+
+Type: required.
+
+Intent: inout.
+
+Specified as: a variable of type descdatapsb_desc_type.
+
+
+
+
+
+
On Return
+
+
+
a
+
the matrix into which elements will be inserted.
+
+Scope:local
+
+Type:required
+
+Intent: inout.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
desc_a
+
The communication descriptor.
+
+Scope: local.
+
+Type: required.
+
+Intent: inout.
+
+Specified as: a variable of type descdatapsb_desc_type.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+
+
+
+Notes
+
+
+
On entry to this routine the descriptor may be in either the
+ build or assembled state.
+
+
On entry to this routine the sparse matrix may be in either the
+ build or update state.
+
+
If the descriptor is in the build state, then the sparse matrix
+ must also be in the build state; the action of the routine is to
+ (implicitly) call psb_cdins to add entries to the sparsity
+ pattern; each sparse matrix entry implicitly defines a graph edge,
+ that is passed to the descriptor routine for the appropriate
+ processing.
+
+
Any coefficients from matrix rows not assigned to the calling
+ process are silently ignored;
+
+
If the descriptor is in the assembled state, then any entries in
+ the sparse matrix that would generate additional communication
+ requirements will be ignored;
+
+
If the matrix is in the update state, any entries in positions
+ that were not present in the original matrix will be ignored.
+
the communication descriptor.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
afmt
+
the storage format for the sparse matrix.
+
+Scope: global.
+
+Type: optional.
+
+Intent: in.
+
+Specified as: an array of characters. Defalt: 'CSR'.
+
+
upd
+
Provide for updates to the matrix coefficients.
+
+Scope: global.
+
+Type: optional.
+
+Intent: in.
+
+Specified as: integer, possible values: psb_upd_srch_, psb_upd_perm_
+
+
dupl
+
How to handle duplicate coefficients.
+
+Scope: global.
+
+Type: optional.
+
+Intent: in.
+
+Specified as: integer, possible values: psb_dupl_ovwrt_,
+psb_dupl_add_, psb_dupl_err_.
+
+
+
+
+
+
On Return
+
+
+
a
+
the matrix to be assembled.
+
+Scope:local
+
+Type:required
+
+Intent: inout.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+
+
+
+Notes
+
+
+
On entry to this routine the descriptor must be in the
+ assembled state, i.e. psb_cdasb must already have been called.
+
+
The sparse matrix may be in either the build or update state;
+
+
Duplicate entries are detected and handled in both build and
+ update state, with the exception of the error action that is only
+ taken in the build state, i.e. on the first assembly;
+
+
If the update choice is psb_upd_perm_, then subsequent
+ calls to psb_spins to update the matrix must be arranged in
+ such a way as to produce exactly the same sequence of coefficient
+ values as encountered at the first assembly;
+
+
On exit from this routine the matrix is in the assembled state,
+ and thus is suitable for the computational routines.
+
The communication descriptor.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a variable of type descdatapsb_desc_type.
+
+
n
+
The number of columns of the dense matrix to be allocated.
+
+Scope: local
+
+Type: optional
+
+Intent: in.
+
+Specified as: Integer scalar, default . It is not a valid argument if is a
+rank-1 array.
+
+
lb
+
The lower bound for the column index range of the dense matrix to be allocated.
+
+Scope: local
+
+Type: optional
+
+Intent: in.
+
+Specified as: Integer scalar, default . It is not a valid argument if is a
+rank-1 array.
+
+
+
+
+
+
On Return
+
+
+
x
+
The dense matrix to be allocated.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+Specified as: a rank one or two array with the ALLOCATABLE
+attribute, of type real, complex or integer.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
Number of rows in to be inserted.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: an integer value.
+
+
irw
+
Indices of the rows to be inserted. Specifically, row
+ of will be inserted into the local row corresponding to the
+ global row index .
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: an integer array.
+
+
val
+
the dense submatrix to be inserted.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: a rank 1 or 2 array.
+Specified as: an integer value.
+
+
desc_a
+
the communication descriptor.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
dupl
+
How to handle duplicate coefficients.
+
+Scope: global.
+
+Type: optional.
+
+Intent: in.
+
+Specified as: integer, possible values: psb_dupl_ovwrt_,
+psb_dupl_add_.
+
+
+
+
+
+
On Return
+
+
+
x
+
the output dense matrix.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one or two array with the ALLOCATABLE
+attribute, of type real, complex or integer.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+
+
+
+Notes
+
+
+
Dense vectors/matrices do not have an associated state;
+
+
Duplicate entries are either overwritten or added, there is no
+ provision for raising an error condition.
+
The communication descriptor.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a variable of type descdatapsb_desc_type.
+
+
+
+
+
+
On Return
+
+
+
x
+
The dense matrix to be assembled.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one or two array with the ALLOCATABLE
+attribute, of type real, complex or integer.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
The dense matrix to
+ be freed.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one or two array with the ALLOCATABLE
+attribute, of type real, complex or integer.
+
+
+
+
desc_a
+
The communication descriptor.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a variable of type descdatapsb_desc_type.
+
+
+
+
+
+
On Return
+
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
A character that specifies whether to permute or .
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: a single character with value 'N' for or 'T' for .
+
+
iperm
+
An integer array containing permutation information.
+
+Scope: local
+
+Type: required
+
+Intent: in.
+
+Specified as: an integer one-dimensional array.
+
+
x
+
The dense matrix to be permuted.
+
+Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a one or two dimensional array.
+
+
+
+
+
+
On Return
+
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
An integer vector of indices to be converted.
+
+Scope: local
+
+Type: required
+
+Intent: in, inout.
+
+Specified as: a rank one integer array.
+
+
desc_a
+
the communication descriptor.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
iact
+
specifies action to be taken in case of range errors.
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+Specified as: a character variable Ignore, Warning or
+Abort, default Ignore.
+
+
owned
+
Specfies valid range of input
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+If true, then only indices strictly owned by the current process are
+considered valid, if false then halo indices are also
+accepted. Default: false.
+
+
+
+
+
+
On Return
+
+
+
x
+
If is not present,
+ then is overwritten with the translated integer indices.
+Scope: global
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one integer array.
+
+
y
+
If is present,
+ then is overwritten with the translated integer indices, and
+ is left unchanged.
+Scope: global
+
+Type: optional
+
+Intent: out.
+
+Specified as: a rank one integer array.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+
+
+
+Notes
+
+
+
If an input index is out of range, then the corresponding output
+ index is set to a negative number;
+
+
The default Ignore means that the negative output is the
+ only action taken on an out-of-range input.
+
+The main underlying principle of the PSBLAS library is that the
+library objects are created and exist with reference to a discretized
+space to which there corresponds an index space and a matrix sparsity
+pattern. As an example, consider a cell-centered finite-volume
+discretization of the Navier-Stokes equations on a simulation domain;
+the index space is isomorphic to the set of cell centers,
+whereas the pattern of the associated linear system matrix is
+isomorphic to the adjacency graph imposed on the discretization mesh
+by the discretization stencil.
+
+
+Thus the first order of business is to establish an index space, and
+this is done with a call to psb_cdall in which we specify the
+size of the index space and the allocation of the elements of the
+index space to the various processes making up the MPI (virtual)
+parallel machine.
+
+
+The index space is partitioned among processes, and this creates a
+mapping from the ``global'' numbering to a numbering
+``local'' to each process; each process will own a certain subset
+
+, each element of which corresponds to a certain
+element of . The user does not set explicitly this mapping;
+when the application needs to indicate to which element of the index
+space a certain item is related, such as the row and column index of a
+matrix coefficient, it does so in the ``global'' numbering, and the
+library will translate into the appropriate ``local'' numbering.
+
+
+For a given index space there are many possible associated
+topologies, i.e. many different discretization stencils; thus the
+description of the index space is not completed until the user has
+defined a sparsity pattern, either explicitly through psb_cdins
+or implicitly through psb_spins. The descriptor is finalized
+with a call to psb_cdasb and a sparse matrix with a call to
+psb_spasb. After psb_cdasb each process will have
+defined a set of ``halo'' (or ``ghost'') indices
+
+, denoting elements of the index
+space that are not assigned to process ; however the
+variables associated with them are needed to complete computations
+associated with the sparse matrix , and thus they have to be
+fetched from (neighbouring) processes. The descriptor of the index
+space is built exactly for the purpose of properly sequencing the
+communication steps required to achieve this objective.
+
+
+A simple application structure will walk through the index space
+allocation, matrix/vector creation and linear system solution as
+follows:
+
+
+
Initialize parallel environment with psb_init
+
+
Initialize index space with psb_cdall
+
+
Allocate sparse matrix and dense vectors with psb_spall
+ and psb_geall
+
+
Loop over all local rows, generate matrix and vector entries,
+ and insert them with psb_spins and psb_geins
+
+
Assemble the various entities:
+
+
+
psb_cdasb
+
+
psb_spasb
+
+
psb_geasb
+
+
+
+
Choose the preconditioner to be used with psb_precset and
+ build it with psb_precbld
+
+
Call the iterative method of choice, e.g. psb_bicgstab
+
+
+This is the structure of the sample program
+test/pargen/ppde90.f90.
+
+
+For a simulation in which the same discretization mesh is used over
+multiple time steps, the following structure may be more appropriate:
+
+
+
Initialize parallel environment with psb_init
+
+
Initialize index space with psb_cdall
+
+
Loop over the topology of the discretization mesh and build the
+ descriptor with psb_cdins
+
+
Assemble the descriptor with psb_cdasb
+
+
Allocate the sparse matrices and dense vectors with
+ psb_spall and psb_geall
+
+
Loop over the time steps:
+
+
+
If after first time step,
+ reinitialize the sparse matrix with psb_sprn; also zero out
+ the dense vectors;
+
+
Loop over the mesh, generate the coefficients and insert/update
+ them with psb_spins and psb_geins
+
+
Assemble with psb_spasb and psb_geasb
+
+
Choose and build preconditioner with psb_precset and
+ psb_precbld
+
+
Call the iterative method of choice, e.g. psb_bicgstab
+
+
+
+
+
+The insertion routines will be called as many times as needed;
+they only need to be called on the data that is actually
+allocated to the current process, i.e. each process generates its own
+data.
+
+
+In principle there is no specific order in the calls to
+psb_spins, nor is there a requirement to build a matrix row in
+its entirety before calling the routine; this allows the application
+programmer to walk through the discretization mesh element by element,
+generating the main part of a given matrix row but also contributions
+to the rows corresponding to neighbouring elements.
+
+
+From a functional point of view it is even possible to execute one
+call for each nonzero coefficient; however this would have a
+substantial computational overhead. It is therefore advisable to pack
+a certain amount of data into each call to the insertion routine, say
+touching on a few tens of rows; the best performng value would depend
+on both the architecture of the computer being used and on the problem
+structure.
+At the opposite extreme, it would be possible to generate the entire
+part of a coefficient matrix residing on a process and pass it in a
+single call to psb_spins; this, however, would entail a
+doubling of memory occupation, and thus would be almost always far
+from optimal.
+
+
An integer vector of indices to be converted.
+
+Scope: local
+
+Type: required
+
+Intent: in, inout.
+
+Specified as: a rank one integer array.
+
+
desc_a
+
the communication descriptor.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
iact
+
specifies action to be taken in case of range errors.
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+Specified as: a character variable Ignore, Warning or
+Abort, default Ignore.
+
+
+
+
+
+
On Return
+
+
+
x
+
If is not present,
+ then is overwritten with the translated integer indices.
+Scope: global
+
+Type: required
+
+Intent: inout.
+
+Specified as: a rank one integer array.
+
+
y
+
If is not present,
+ then is overwritten with the translated integer indices, and
+ is left unchanged.
+Scope: global
+
+Type: optional
+
+Intent: out.
+
+Specified as: a rank one integer array.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
Integer indices.
+
+Scope: local
+
+Type: required
+
+Intent: in, inout.
+
+Specified as: a scalar or a rank one integer array.
+
+
desc_a
+
the communication descriptor.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
iact
+
specifies action to be taken in case of range errors.
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+Specified as: a character variable Ignore, Warning or
+Abort, default Ignore.
+
+
+
+
+
+
On Return
+
+
+
y
+
A logical mask which is true for all corresponding entries of
+ that are owned by the current process
+Scope: local
+
+Type: required
+
+Intent: out.
+
+Specified as: a scalar or rank one logical array.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+
+
+
+Notes
+
+
+
This routine returns a .true. value for those indices
+ that are strictly owned by the current process, excluding the halo
+ indices
+
Integer indices.
+
+Scope: local
+
+Type: required
+
+Intent: in, inout.
+
+Specified as: a scalar or a rank one integer array.
+
+
desc_a
+
the communication descriptor.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
iact
+
specifies action to be taken in case of range errors.
+Scope: global
+
+Type: optional
+
+Intent: in.
+
+Specified as: a character variable Ignore, Warning or
+Abort, default Ignore.
+
+
+
+
+
+
On Return
+
+
+
y
+
A logical mask which is true for all corresponding entries of
+ that are local to the current process
+Scope: local
+
+Type: required
+
+Intent: out.
+
+Specified as: a scalar or rank one logical array.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+
+
+
+Notes
+
+
+
This routine returns a .true. value for those indices
+ that are local to the current process, including the halo
+ indices.
+
the communication descriptor.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
+
+
+
+
On Return
+
+
+
bndel
+
The list of boundary elements on the calling process, in
+ local numbering.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+Specified as: a rank one array with the ALLOCATABLE
+attribute, of type integer.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+
+
+
+Notes
+
+
+
If there are no boundary elements (i.e., if the local part of
+ the connectivity graph is self-contained) the output vector is set
+ to the ``not allocated'' state.
+
+
Otherwise the size of bndel will be exactly equal to the
+ number of boundary elements.
+
the communication descriptor.
+
+Scope:local.
+
+Type:required.
+
+Intent: in.
+
+Specified as: a structured data of type descdatapsb_desc_type.
+
+
+
+
+
+
On Return
+
+
+
ovrel
+
The list of overlap elements on the calling process, in
+ local numbering.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+Specified as: a rank one array with the ALLOCATABLE
+attribute, of type integer.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+
+
+
+Notes
+
+
+
If there are no overlap elements the output vector is set
+ to the ``not allocated'' state.
+
+
Otherwise the size of ovrel will be exactly equal to the
+ number of overlap elements.
+
The (first) row to be extracted.
+
+Scope:local
+
+Type:required
+
+Intent: in.
+
+Specified as: an integer .
+
+
a
+
the matrix from which to get rows.
+
+Scope:local
+
+Type:required
+
+Intent: in.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
append
+
Whether to append or overwrite existing output.
+
+Scope:local
+
+Type:optional
+
+Intent: in.
+
+Specified as: a logical value default: false (overwrite).
+
+
nzin
+
Input size to be appended to.
+
+Scope:local
+
+Type:optional
+
+Intent: in.
+
+Specified as: an integer . When append is true, specifies how many
+entries in the output vectors are already filled.
+
+
lrw
+
The last row to be extracted.
+
+Scope:local
+
+Type:optional
+
+Intent: in.
+
+Specified as: an integer , default: .
+
+
+
+
+
+
+
+
On Return
+
+
+
nz
+
the number of elements returned by this call.
+
+Scope:local.
+
+Type:required.
+
+Intent: out.
+
+Returned as: an integer scalar.
+
+
ia
+
the row indices.
+
+Scope:local.
+
+Type:required.
+
+Intent: inout.
+
+Specified as: an integer array with the ALLOCATABLE attribute.
+
+
ja
+
the column indices of the elements to be inserted.
+
+Scope:local.
+
+Type:required.
+
+Intent: inout.
+
+Specified as: an integer array with the ALLOCATABLE attribute.
+
+
val
+
the elements to be inserted.
+
+Scope:local.
+
+Type:required.
+
+Intent: inout.
+
+Specified as: a real array with the ALLOCATABLE attribute.
+
+
info
+
Error code.
+
+Scope: local
+
+Type: required
+
+Intent: out.
+
+An integer value; 0 means no error has been detected.
+
+
+
+
+Notes
+
+
+
The output is always the size of the output generated by
+ the current call; thus, if append=.true., the total output
+ size will be , with the newly extracted coefficients stored in
+ entries nzin+1:nzin+nz of the array arguments;
+
+
When append=.true. the output arrays are reallocated as
+ necessary;
+
+
The row and column indices are returned in the local numbering
+ scheme; if the global numbering is desired, the user may employ the
+ psb_loc_to_glob routine on the output.
+
+These serial routines sort a sequence into ascending or
+descending order. The argument meaning is identical for the three
+calls; the only difference is the algorithm used to accomplish the
+task (see Usage Notes below).
+
+
Type:
+
Asynchronous.
+
+
On Entry
+
+
+
x
+
The sequence to be sorted.
+
+Type:required.
+
+Specified as: an integer, real or complex array of rank 1.
+
+
ix
+
A vector of indices.
+
+Type:optional.
+
+Specified as: an integer array of (at least) the same size as .
+
+
dir
+
The desired ordering.
+
+Type:optional.
+
+Specified as: an integer value: psb_sort_up_,
+psb_sort_down_, psb_asort_up_, psb_asort_down_;
+default psb_sort_up_.
+
+
flag
+
Whether to keep the original values in .
+
+Type:optional.
+
+Specified as: an integer value psb_sort_ovw_idx_ or
+psb_sort_keep_idx_; default psb_sort_ovw_idx_.
+
+
+
+
+
+
+
+
On Return
+
+
+
x
+
The sequence of values, in the chosen ordering.
+
+Type:required.
+
+Specified as: an integer, real or complex array of rank 1.
+
+
ix
+
A vector of indices.
+
+Type: Optional
+
+An integer array of rank 1, whose entries are moved to the same
+position as the corresponding entries in .
+
+
+
+
+
+
+Notes
+
+
+
The sorting can be performed in the up/down direction, on the
+ natural or absolute values; for complex data the sorting can only
+ be done on the absolute values;
+
+
The routines return the items in the chosen ordering; the
+ output difference is the handling of ties (i.e. items with an
+ equal value) in the original input. With the merge-sort algorithm
+ ties are preserved in the same relative order as they had in the
+ original sequence, while this is not guaranteed for quicksort or
+ heapsort;
+
+
If
+ then the entries in
+ where is the size of are initialized to
+; thus, upon return from the subroutine, for each
+ index we have in the position that the item
+ occupied in the original data sequence;
+
+
If
+ the routine will assume that
+ the entries in have already been initialized by the user;
+
+
The three sorting algorithms have a similar expected
+ running time; in the average case quicksort will be the
+ fastest and merge-sort the slowest. However note that:
+
+
+
The worst case running time for quicksort is ; the algorithm
+ implemented here follows the well-known median-of-three heuristics,
+ but the worst case may still apply;
+
+
The worst case running time for merge-sort and heap-sort is
+ as the average case;
+
+
The merge-sort algorithm is implemented to take advantage of
+ subsequences that may be already in the desired ordering prior to
+ the subroutine call; this situation is relatively common when
+ dealing with groups of indices of sparse matrix entries, thus
+ merge-sort is often the preferred choice when a sorting is needed
+ by other routines in the library.
+
+The PSBLAS librarary is based on the Single Program Multiple Data
+(SPMD) programming model: each process participating in the
+computation performs the same actions on a chunk of data. Parallelism
+is thus data-driven.
+
+
+Because of this structure, many subroutines coordinate their action
+across the various processes, thus providing an implicit
+synchronization point, and therefore must be
+called simultaneously by all processes participating in the
+computation. This is certainly true for the data allocation and
+assembly routines, for all the computational routines and for some of
+the tools routines.
+
+
+However there are many cases where no synchronization, and indeed no
+communication among processes, is implied; for instance, all the routines in
+sec. 3.4 are only acting on the local data structures,
+and thus may be called independently. The most important case is that
+of the coefficient insertion routines: since the number of
+coefficients in the sparse and dense matrices varies among the
+processors, and since the user is free to choose an arbitrary order in
+builiding the matrix entries, these routines cannot imply a
+synchronization.
+
+
+Throughout this user's guide each subroutine will be clearly indicated
+as:
+
+
Synchronous:
+
must be called simultaneously by all the
+ processes in the relevant communication context;
+
Number of processes in the PSBLAS virtual parallel machine.
+
+Scope: global.
+
+Type: optional.
+
+Intent: in.
+
+Specified as: an integer value. Default: use all available processes provided by the underlying
+parallel environment.
+
+
+
+
+
+
On Return
+
+
+
icontxt
+
the communication context identifying the virtual
+ parallel machine.
+
+Scope: global.
+
+Type: required.
+
+Intent: out.
+
+Specified as: an integer variable.
+
+
+
+
+Notes
+
+
+
A call to this routine must precede any other PSBLAS call.
+
+
It is an error to specify a value for greater than the
+ number of processes available in the underlying parallel execution
+ environment.
+
+This subroutine returns information about the PSBLAS parallel environment, defining
+a virtual parallel machine.
+
+
Type:
+
Asynchronous.
+
+
On Entry
+
+
+
icontxt
+
the communication context identifying the virtual
+ parallel machine.
+
+Scope: global.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer variable.
+
+
+
+
+
+
On Return
+
+
+
iam
+
Identifier of current process in the PSBLAS virtual parallel machine.
+
+Scope: local.
+
+Type: required.
+
+Intent: out.
+
+Specified as: an integer value.
+
+
np
+
Number of processes in the PSBLAS virtual parallel machine.
+
+Scope: global.
+
+Type: required.
+
+Intent: out.
+
+Specified as: an integer variable.
+
+
+
+Notes
+
+
+
For processes in the virtual parallel machine the identifier
+ will satisfy
+;
+
+
If the user has requested on psb_init a number of
+ processes less than the total available in the parallel execution
+ environment, the remaining processes will have on return ;
+ the only call involving icontxt that any such process may
+ execute is to psb_exit.
+
+This subroutine exits from the PSBLAS parallel virtual machine.
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
icontxt
+
the communication context identifying the virtual
+ parallel machine.
+
+Scope: global.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer variable.
+
+
close
+
Whether to close all data structures related to the
+ virtual parallel machine, besides those associated with icontxt.
+
+Scope: global.
+
+Type: optional.
+
+Intent: in.
+
+Specified as: a logical variable, default value: true.
+
+
+
+
+Notes
+
+
+
This routine may be called even if a previous call to
+ psb_info has returned with ; indeed, it it is the only
+ routine that may be called with argument icontxt in this
+ situation.
+
+
A call to this routine with close=.true. implies a call
+ to MPI_Finalize, after which no parallel routine may be called.
+
+
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 close=.false., while on
+ the last call it should be called with close=.true. to
+ shutdown in a clean way the entire parallel environment.
+
+This subroutine returns the MPI communicator associated with a PSBLAS context
+
+
Type:
+
Asynchronous.
+
+
On Entry
+
+
+
icontxt
+
the communication context identifying the virtual
+ parallel machine.
+
+Scope: global.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer variable.
+
+
+
+
+
+
On Return
+
+
+
icomm
+
The MPI communicator associated with the PSBLAS virtual parallel machine.
+
+Scope: global.
+
+Type: required.
+
+Intent: out.
+
+This subroutine returns the MPI rank of the PSBLAS process
+
+
Type:
+
Asynchronous.
+
+
On Entry
+
+
+
icontxt
+
the communication context identifying the virtual
+ parallel machine.
+
+Scope: global.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer variable.
+
+
id
+
Identifier of a process in the PSBLAS virtual parallel machine.
+
+Scope: local.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer value.
+
+
+
+
+
+
On Return
+
+
+
rank
+
The MPI rank associated with the PSBLAS process .
+
+Scope: local.
+
+Type: required.
+
+Intent: out.
+
+This subroutine acts as an explicit synchronization point for the PSBLAS
+parallel virtual machine.
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
icontxt
+
the communication context identifying the virtual
+ parallel machine.
+
+Scope: global.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer variable.
+
+This subroutine aborts computation on the parallel virtual machine.
+
+
Type:
+
Asynchronous.
+
+
On Entry
+
+
+
icontxt
+
the communication context identifying the virtual
+ parallel machine.
+
+Scope: global.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer variable.
+
+This subroutine implements a broadcast operation based on the
+underlying communication library.
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
icontxt
+
the communication context identifying the virtual
+ parallel machine.
+
+Scope: global.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer variable.
+
+
dat
+
On the root process, the data to be broadcast.
+
+Scope: global.
+
+Type: required.
+
+Intent: inout.
+
+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.
+
+
root
+
Root process holding data to be broadcast.
+
+Scope: global.
+
+Type: optional.
+
+Intent: in.
+
+Specified as: an integer value
+, default 0
+
+
+
+
+
On Return
+
+
+
dat
+
On processes other than root, the data to be broadcast.
+
+Scope: global.
+
+Type: required.
+
+Intent: inout.
+
+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.
+
+In this chapter we illustrate the data structures used for definition of
+routines interfaces. They include data structures for sparse matrices,
+communication descriptors and preconditioners.
+
+All the data types and the basic subroutine interfaces are defined in
+the module psb_base_mod; this will have to be included by every
+user subroutine that makes use of the library.
+
+
+Real and complex data types are parametrized with a kind type defined
+in the library as follows:
+
+
psb_spk_
+
Kind parameter for short precision real and complex
+ data; corresponds to a REAL declaration and is
+ normally 4 bytes.
+
+
psb_dpk_
+
Kind parameter for long precision real and complex
+ data; corresponds to a DOUBLE PRECISION declaration and is
+ normally 8 bytes.
+
+This subroutine implements a sum reduction operation based on the
+underlying communication library.
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
icontxt
+
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 sum.
+
+Scope: global.
+
+Type: required.
+
+Intent: inout.
+
+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.
+
+
root
+
Process to hold the final sum, or to make it available
+ on all processes.
+
+Scope: global.
+
+Type: optional.
+
+Intent: in.
+
+Specified as: an integer value
+, default -1.
+
+
+
+
+
On Return
+
+
+
dat
+
On destination process(es), the result of the sum operation.
+
+Scope: global.
+
+Type: required.
+
+Intent: inout.
+
+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.
+
+
+
+
+Notes
+
+
+
The dat argument is both input and output, and its
+ value may be changed even on processes different from the final
+ result destination.
+
+This subroutine implements a maximum valuereduction
+operation based on the underlying communication library.
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
icontxt
+
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 maximum.
+
+Scope: local.
+
+Type: required.
+
+Intent: inout.
+
+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.
+
+
root
+
Process to hold the final maximum, or to make it available
+ on all processes.
+
+Scope: global.
+
+Type: optional.
+
+Intent: in.
+
+Specified as: an integer value
+, default -1.
+
+
+
+
+
+
On Return
+
+
+
dat
+
On destination process(es), the result of the maximum operation.
+
+Scope: global.
+
+Type: required.
+
+Intent: in.
+
+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.
+
+
+
+
+Notes
+
+
+
The dat argument is both input and output, and its
+ value may be changed even on processes different from the final
+ result destination.
+
+This subroutine implements a minimum value reduction
+operation based on the underlying communication library.
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
icontxt
+
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: 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.
+
+
root
+
Process to hold the final value, or to make it available
+ on all processes.
+
+Scope: global.
+
+Type: optional.
+
+Intent: in.
+
+Specified as: an integer value
+, default -1.
+
+
+
+
+
+
On Return
+
+
+
dat
+
On destination process(es), the result of the minimum operation.
+
+Scope: global.
+
+Type: required.
+
+Intent: inout.
+
+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.
+
+
+
+
+Notes
+
+
+
The dat argument is both input and output, and its
+ value may be changed even on processes different from the final
+ result destination.
+
+This subroutine implements a maximum absolute value reduction
+operation based on the underlying communication library.
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
icontxt
+
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 maximum.
+
+Scope: local.
+
+Type: required.
+
+Intent: inout.
+
+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.
+
+
root
+
Process to hold the final value, or to make it available
+ on all processes.
+
+Scope: global.
+
+Type: optional.
+
+Intent: in.
+
+Specified as: an integer value
+, default -1.
+
+
+
+
+
+
On Return
+
+
+
dat
+
On destination process(es), the result of the maximum operation.
+
+Scope: global.
+
+Type: required.
+
+Intent: inout.
+
+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.
+
+
+
+
+Notes
+
+
+
The dat argument is both input and output, and its
+ value may be changed even on processes different from the final
+ result destination.
+
+This subroutine implements a minimum absolute value reduction
+operation based on the underlying communication library.
+
+
Type:
+
Synchronous.
+
+
On Entry
+
+
+
icontxt
+
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: 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.
+
+
root
+
Process to hold the final value, or to make it available
+ on all processes.
+
+Scope: global.
+
+Type: optional.
+
+Intent: in.
+
+Specified as: an integer value
+, default -1.
+
+
+
+
+
+
On Return
+
+
+
dat
+
On destination process(es), the result of the minimum operation.
+
+Scope: global.
+
+Type: required.
+
+Intent: inout.
+
+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.
+
+
+
+
+Notes
+
+
+
The dat argument is both input and output, and its
+ value may be changed even on processes different from the final
+ result destination.
+
+This subroutine sends a packet of data to a destination.
+
+
Type:
+
Synchronous: see usage notes.
+
+
On Entry
+
+
+
icontxt
+
the communication context identifying the virtual
+ parallel machine.
+
+Scope: global.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer variable.
+
+
dat
+
The data to be sent.
+
+Scope: local.
+
+Type: required.
+
+Intent: in.
+
+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 is
+not specified, size must agree as well.
+
+
dst
+
Destination process.
+
+Scope: global.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer value
+.
+
+
m
+
Number of rows.
+
+Scope: global.
+
+Type: Optional.
+
+Intent: in.
+
+Specified as: an integer value
+.
+
+When is a rank 2 array, specifies the number of rows to be sent
+independently of the leading dimension ; must have the
+same value on sending and receiving processes.
+
+
+
+
+
+
On Return
+
+
+
+
+
+Notes
+
+
+
This subroutine implies a synchronization, but only between the
+ calling process and the destination process .
+
+This subroutine receives a packet of data to a destination.
+
+
Type:
+
Synchronous: see usage notes.
+
+
On Entry
+
+
+
icontxt
+
the communication context identifying the virtual
+ parallel machine.
+
+Scope: global.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer variable.
+
+
src
+
Source process.
+
+Scope: global.
+
+Type: required.
+
+Intent: in.
+
+Specified as: an integer value
+.
+
+
m
+
Number of rows.
+
+Scope: global.
+
+Type: Optional.
+
+Intent: in.
+
+Specified as: an integer value
+.
+
+When is a rank 2 array, specifies the number of rows to be sent
+independently of the leading dimension ; must have the
+same value on sending and receiving processes.
+
+
+
+
+
+
On Return
+
+
+
dat
+
The data to be received.
+
+Scope: local.
+
+Type: required.
+
+Intent: inout.
+
+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 is
+not specified, size must agree as well.
+
+
+
+
+Notes
+
+
+
This subroutine implies a synchronization, but only between the
+ calling process and the source process .
+
+The PSBLAS library error handling policy has been completely rewritten
+in version 2.0. The idea behind the design of this new error handling
+strategy is to keep error messages on a stack allowing the user to
+trace back up to the point where the first error message has been
+generated. Every routine in the PSBLAS-2.0 library has, as last
+non-optional argument, an integer info variable; whenever,
+inside the routine, an error is detected, this variable is set to a
+value corresponding to a specific error code. Then this error code is
+also pushed on the error stack and then either control is returned to
+the caller routine or the execution is aborted, depending on the users
+choice. At the time when the execution is aborted, an error message is
+printed on standard output with a level of verbosity than can be
+chosen by the user. If the execution is not aborted, then, the caller
+routine checks the value returned in the info variable and, if
+not zero, an error condition is raised. This process continues on all the
+levels of nested calls until the level where the user decides to abort
+the program execution.
+
+
+Figure 8 shows the layout of a generic psb_foo
+routine with respect to the PSBLAS-2.0 error handling policy. It is
+possible to see how, whenever an error condition is detected, the
+info variable is set to the corresponding error code which is,
+then, pushed on top of the stack by means of the
+psb_errpush. An error condition may be directly detected inside
+a routine or indirectly checking the error code returned returned by a
+called routine. Whenever an error is encountered, after it has been
+pushed on stack, the program execution skips to a point where the
+error condition is handled; the error condition is handled either by
+returning control to the caller routine or by calling the
+psb\_error routine which prints the content of the error stack
+and aborts the program execution, according to the choice made by the
+user with psb_set_erraction. The default is to print the error
+and terminate the program, but the user may choose to handle the error
+explicitly.
+
+
+
+
+
+
Figure 8:
+The layout of a generic psb_foo
+ routine with respect to PSBLAS-2.0 error handling policy.
+
+
+
+
+
+
+
+
+
+
+
+Figure 9 reports a sample error message generated by
+the PSBLAS-2.0 library. This error has been generated by the fact that
+the user has chosen the invalid ``FOO'' storage format to represent
+the sparse matrix. From this error message it is possible to see that
+the error has been detected inside the psb_cest subroutine
+called by psb_spasb ... by process 0 (i.e. the root process).
+
+
+
+
+
+
Figure 9:
+A sample PSBLAS-2.0 error
+ message. Process 0 detected an error condition inside the psb_cest subroutine
+All the general matrix informations and elements to be
+exchanged among processes are stored within a data structure of the
+type descdatapsb_desc_type.
+Every structure of this type is associated to a sparse matrix, it
+contains data about general matrix informations and elements to be
+exchanged among processes.
+
+
+It is not necessary for the user to know the internal structure of
+psb_desc_type, it is set in a transparent mode by the tools
+routines of Sec. 6, and its fields may be accessed
+if necessary via the routines of sec. 3.4;
+nevertheless we include a description for the curious
+reader:
+
+
matrix_data
+
includes general information about matrix and
+process grid, such as the communication context, the size of the
+global matrix, the size of the portion of matrix stored on the current
+process, and so on.
+Specified as: an allocatable integer array of dimension psb_mdata_size_.
+
+
halo_index
+
A list of the halo and boundary elements for
+the current process to be exchanged with other processes; for each
+processes with which it is necessary to communicate:
+
+
+
Process identifier;
+
+
Number of points to be received;
+
+
Indices of points to be received;
+
+
Number of points to be sent;
+
+
Indices of points to be sent;
+
+
+The list may contain an arbitrary number of groups; its end is marked
+by a -1.
+
+Specified as: an allocatable integer array of rank one.
+
+
ext_index
+
A list of element indices to be exchanged to
+ implement the mapping between a base descriptor and a descriptor
+ with overlap.
+
+
ovrlap_index
+
A list of the overlap elements for the
+current process, organized in groups like the previous vector:
+
+
+
Process identifier;
+
+
Number of points to be received;
+
+
Indices of points to be received;
+
+
Number of points to be sent;
+
+
Indices of points to be sent;
+
+
+The list may contain an arbitrary number of groups; its end is marked
+by a -1.
+
+Specified as: an allocatable integer array of rank one.
+
+
ovr_mst_idx
+
A list to retrieve the value of each
+ overlap element from the respective master process.
+
+Specified as: an allocatable integer array of rank one.
+
+
ovrlap_elem
+
For all overlap points belonging to th
+ecurrent process:
+
+
+
Overlap point index;
+
+
Number of processes sharing that overlap points;
+
+
Index of a ``master'' process:
+
+
+Specified as: an allocatable integer array of rank two.
+
+
loc_to_glob
+
each element of this array contains
+global identifier of the local variable .
+
+Specified as: an allocatable integer array of rank one.
+
+
glob_to_loc, glb_lc, hashv
+
Contain a mapping from
+ global to local indices.
+
+
+The Fortran 95 definition for psb_desc_type structures is
+as follows:
+
+
+
+
Figure 3:
+The PSBLAS defined data type that
+ contains the communication descriptor.
+
+
+
+
+
+
+
+
+
+
+
+A communication descriptor associated with a sparse matrix has a
+state, which can take the following values:
+
+
Build:
+
State entered after the first allocation, and before the
+ first assembly; in this state it is possible to add communication
+ requirements among different processes.
+
+
Assembled:
+
State entered after the assembly; computations using
+ the associated sparse matrix, such as matrix-vector products, are
+ only possible in this state.
+
+
+The global to local index mapping may be stored in two different
+formats: the first is simpler but more expensive, as it requires on
+each process an amount of memory proportional to the global size of
+the index space; the second is more complex, but only requires memory
+proportional to the local index space size. The choice is made at the
+time of the initialization according to a threshold; this threshold
+may be queried and set using the functions in
+sec. 3.4.
+
+
+We have some utitlities available for input and output of
+sparsematrices; the interfaces to these routines are available in the
+module psb_util_mod.
+
+
The name of the file to be read.
+
+Type:optional.
+
+Specified as: a character variable containing a valid file name, or
+-, in which case the default input unit 5 (i.e. standard input
+in Unix jargon) is used. Default: -.
+
+
iunit
+
The Fortran file unit number.
+
+Type:optional.
+
+Specified as: an integer value. Only meaningful if filename is not -.
+
+
+
+
+
+
On Return
+
+
+
a
+
the sparse matrix read from file.
+
+Type:required.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
b
+
Rigth hand side(s).
+
+Type: Optional
+
+An array of type real or complex, rank 2 and having the ALLOCATABLE
+attribute; will be allocated and filled in if the input file contains
+a right hand side, otherwise will be left in the UNALLOCATED state.
+
+
mtitle
+
Matrix title.
+
+Type: Optional
+
+A charachter variable of length 72 holding a copy of the
+matrix title as specified by the Harwell-Boeing format and contained
+in the input file.
+
+
iret
+
Error code.
+
+Type: required
+
+An integer value; 0 means no error has been detected.
+
the sparse matrix to be written.
+
+Type:required.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
b
+
Rigth hand side.
+
+Type: Optional
+
+An array of type real or complex, rank 1 and having the ALLOCATABLE
+attribute; will be allocated and filled in if the input file contains
+a right hand side.
+
+
filename
+
The name of the file to be written to.
+
+Type:optional.
+
+Specified as: a character variable containing a valid file name, or
+-, in which case the default output unit 6 (i.e. standard output
+in Unix jargon) is used. Default: -.
+
+
iunit
+
The Fortran file unit number.
+
+Type:optional.
+
+Specified as: an integer value. Only meaningful if filename is not -.
+
+
key
+
Matrix key.
+
+Type: Optional
+
+A charachter variable of length 8 holding the
+matrix key as specified by the Harwell-Boeing format and to be
+written to file.
+
+
mtitle
+
Matrix title.
+
+Type: Optional
+
+A charachter variable of length 72 holding the
+matrix title as specified by the Harwell-Boeing format and to be
+written to file.
+
+
+
+
+
+
On Return
+
+
+
iret
+
Error code.
+
+Type: required
+
+An integer value; 0 means no error has been detected.
+
The name of the file to be read.
+
+Type:optional.
+
+Specified as: a character variable containing a valid file name, or
+-, in which case the default input unit 5 (i.e. standard input
+in Unix jargon) is used. Default: -.
+
+
iunit
+
The Fortran file unit number.
+
+Type:optional.
+
+Specified as: an integer value. Only meaningful if filename is not -.
+
+
+
+
+
+
On Return
+
+
+
a
+
the sparse matrix read from file.
+
+Type:required.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
iret
+
Error code.
+
+Type: required
+
+An integer value; 0 means no error has been detected.
+
The name of the file to be read.
+
+Type:optional.
+
+Specified as: a character variable containing a valid file name, or
+-, in which case the default input unit 5 (i.e. standard input
+in Unix jargon) is used. Default: -.
+
+
iunit
+
The Fortran file unit number.
+
+Type:optional.
+
+Specified as: an integer value. Only meaningful if filename is not -.
+
+
+
+
+
+
On Return
+
+
+
b
+
Rigth hand side(s).
+
+Type: required
+
+An array of type real or complex, rank 2 and having the ALLOCATABLE
+attribute; will be allocated and filled in if the input file contains
+a right hand side, otherwise will be left in the UNALLOCATED state.
+
+
iret
+
Error code.
+
+Type: required
+
+An integer value; 0 means no error has been detected.
+
+
+
+
+
+
+
+
diff --git a/docs/html/node97.html b/docs/html/node97.html
new file mode 100644
index 00000000..d834c807
--- /dev/null
+++ b/docs/html/node97.html
@@ -0,0 +1,123 @@
+
+
+
+
+
+mm_mat_write -- Write a sparse matrix to a file in the MatrixMarket format
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Next:Preconditioner routines
+ Up:Utilities
+ Previous:mm_vet_read Read
+ Contents
+
+
+
+
+
the sparse matrix to be written.
+
+Type:required.
+
+Specified as: a structured data of type spdatapsb_spmat_type.
+
+
mtitle
+
Matrix title.
+
+Type: required
+
+A charachter variable holding a descriptive title for the matrix to be
+ written to file.
+
+
filename
+
The name of the file to be written to.
+
+Type:optional.
+
+Specified as: a character variable containing a valid file name, or
+-, in which case the default output unit 6 (i.e. standard output
+in Unix jargon) is used. Default: -.
+
+
iunit
+
The Fortran file unit number.
+
+Type:optional.
+
+Specified as: an integer value. Only meaningful if filename is not -.
+
+
+
+
+
+
On Return
+
+
+
iret
+
Error code.
+
+Type: required
+
+An integer value; 0 means no error has been detected.
+
the type of preconditioner.
+Scope: global
+
+Type: required
+
+Intent: in.
+
+Specified as: a character string, see usage notes.
+
+
On Exit
+
+
+
prec
+
Scope: local
+
+Type: required
+
+Intent: inout.
+
+Specified as: a preconditioner data structure precdatapsb_prec_type.
+
+
info
+
Scope: global
+
+Type: required
+
+Intent: out.
+
+Error code: if no error, 0 is returned.
+
+
+Notes
+Legal inputs to this subroutine are interpreted depending on the
+ string as follows3:
+
+
NONE
+
No preconditioning, i.e. the preconditioner is just a copy
+ operator.
+
+
DIAG
+
Diagonal scaling; each entry of the input vector is
+ multiplied by the reciprocal of the sum of the absolute values of
+ the coefficients in the corresponding row of matrix ;
+
+
BJAC
+
Precondition by a factorization of the
+ block-diagonal of matrix , where block boundaries are determined
+ by the data allocation boundaries for each process; requires no
+ communication. Only the incomplete factorization is
+ currently implemented.
+
+
+
+
+
+
diff --git a/docs/pdf/Makefile b/docs/pdf/Makefile
index e9da3a0d..6a224157 100644
--- a/docs/pdf/Makefile
+++ b/docs/pdf/Makefile
@@ -84,6 +84,7 @@
#
TOPFILE = userguide.tex
+HTMLFILE = userhtml.tex
SECFILE = title.tex intro.tex commrout.tex datastruct.tex psbrout.tex toolsrout.tex\
methods.tex precs.tex penv.tex error.tex util.tex
FIGDIR = figures
@@ -110,6 +111,8 @@ DATE = $(shell date +%Y-%m-%d)
##
## Programs
#
+LATEX = latex
+LTX2HTML = latex2html
PDFLATEX = pdflatex
ACRO = evince
XPDF = xpdf
@@ -126,7 +129,7 @@ CLEANIDX = ../bin/cleanidx
##
## Files
#
-TEXFILES = $(TOPFILE) $(SECFILE)
+TEXFILES = $(TOPFILE) $(SECFILE) $(HTMLFILE)
RCSFILES = $(TEXFILES) Makefile
BASEFILE = $(patsubst %.tex,%,$(TOPFILE))
@@ -135,6 +138,10 @@ PDF = $(join $(BASEFILE),.pdf)
PS = $(join $(BASEFILE),.ps)
GXS = $(join $(BASEFILE),.gxs)
GLX = $(join $(BASEFILE),.glx)
+BASEHTML = $(patsubst %.tex,%,$(HTMLFILE))
+HTML = $(join $(HTMLFILE),.html)
+HTMLDIR = ../html
+HTMLFLAGS = -noaddress
FIGURES = $(sort $(wildcard $(FIGDIR)/*))
GLOFILES:= $(sort $(wildcard lib/*.gdf))
@@ -150,8 +157,10 @@ TEXLNFIL = $(addprefix $(PWD)/,$(TEXFILES))
#============================================================================
-all: $(PDF)
- @echo $(PDF)
+all: pdf html
+
+pdf: $(PDF)
+html: $(HTML)
$(PDF): $(TEXFILES) $(LIBFILES) $(FIGURES) Makefile
$(header)
@@ -169,6 +178,22 @@ $(PDF): $(TEXFILES) $(LIBFILES) $(FIGURES) Makefile
$(pdflatex-filter)
$(finish)
+$(HTML): $(TEXFILES) $(LIBFILES) $(FIGURES) Makefile
+ $(header)
+ $(initialize)
+ $(latex-filter)
+ ifneq ($(BIBFILES),)
+ $(bibtex)
+ $(latex-filter)
+ endif
+ ifneq ($(GLOFILES),)
+ $(glosstex)
+ $(latex-filter)
+ endif
+# $(makeindex)
+ $(latex-filter)
+ $(ltx2html-filter)
+
$(PS): $(PDF)
$(PDF2PS) $< $(PS)
@@ -269,6 +294,14 @@ define pdflatex
cd tmp; $(PDFLATEX) $(TOPFILE)
endef
+define latex
+ @echo
+ @echo "----- latex -------------------------------------------------------"
+ @echo -n "Starting: "; date
+ @echo
+ cd tmp; $(LATEX) $(HTMLFILE)
+endef
+
#----------------------------------------------------------------------------
define pdflatex-filter
@@ -279,6 +312,22 @@ define pdflatex-filter
cd tmp; ($(PDFLATEX) $(TOPFILE) 2>&1) | $(FILTER)
endef
+define latex-filter
+ @echo
+ @echo "----- latex -------------------------------------------------------"
+ @echo -n "Starting: "; date
+ @echo
+ cd tmp; ($(LATEX) $(HTMLFILE) 2>&1) | $(FILTER)
+endef
+
+define ltx2html-filter
+ @echo
+ @echo "----- latex -------------------------------------------------------"
+ @echo -n "Starting: "; date
+ @echo
+ cd tmp; ($(LTX2HTML) $(HTMLFLAGS) -dir ../$(HTMLDIR) $(HTMLFILE) 2>&1) | $(FILTER)
+endef
+
#----------------------------------------------------------------------------
define bibtex
@@ -323,4 +372,14 @@ define finish
@echo -n "Target: "
endef
+define ltx2html-finish
+ @ln -sf tmp/$@ .
+ @echo
+ @echo "----- finish ---------------------------------------------------------"
+ @echo -n "Start: "$(START); echo
+ @echo -n "Finish: "; date
+ @echo -n "Output: "; ls -l -o tmp/$@
+ @echo -n "Target: "
+endef
+
diff --git a/docs/pdf/commrout.tex b/docs/pdf/commrout.tex
index 74ecd37d..88d30464 100644
--- a/docs/pdf/commrout.tex
+++ b/docs/pdf/commrout.tex
@@ -8,7 +8,8 @@ The routines in this chapter implement various global communication operators
on vectors associated with a discretization mesh. For auxiliary communication
routines not tied to a discretization space see~\ref{sec:toolsrout}.
-\subroutine{psb\_halo}{Halo Data Communication}
+\clearpage\subsection*{psb\_halo --- Halo Data Communication}
+\addcontentsline{toc}{subsection}{psb\_halo}
These subroutines gathers the values of the halo
elements, and (optionally) scale the result:
@@ -36,8 +37,10 @@ Long Precision Complex & psb\_halo \\
\caption{Data types\label{tab:f90halo}}
\end{table}
-\syntax{call psb\_halo}{x, desc\_a, info}
-\syntax*{call psb\_halo}{x, desc\_a, info, alpha, work, data}
+\begin{verbatim}
+call psb_halo(x, desc_a, info)
+call psb_halo(x, desc_a, info, alpha, work, data)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -93,7 +96,8 @@ An integer value that contains an error code.
\end{center}
\caption{Sample discretization mesh.\label{fig:try8x8}}
\end{figure}
-\section*{Example of use}
+
+{\par\noindent\large\bfseries Usage Example}
Consider the discretization mesh depicted in fig.~\ref{fig:try8x8},
partitioned among two processes as shown by the dashed line; the data
distribution is such that each process will own 32 entries in the
@@ -159,7 +163,8 @@ following:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subroutine{psb\_ovrl}{Overlap Update}
+\clearpage\subsection*{psb\_ovrl --- Overlap Update}
+\addcontentsline{toc}{subsection}{psb\_ovrl}
These subroutines applies an overlap operator to the input vector:
@@ -187,8 +192,10 @@ Long Precision Complex & psb\_ovrl \\
\caption{Data types\label{tab:f90ovrl}}
\end{table}
-\syntax{call psb\_ovrl}{x, desc\_a, info}
-\syntax*{call psb\_ovrl}{x, desc\_a, info, update=update\_type, work=work}
+\begin{verbatim}
+call psb_ovrl(x, desc_a, info)
+call psb_ovrl(x, desc_a, info, update=update_type, work=work)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -239,7 +246,7 @@ An integer value; 0 means no error has been detected.
\end{description}
-\section*{Usage notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item If there is no overlap in the data distribution associated with
the descriptor, no operations are performed;
@@ -263,7 +270,7 @@ their instances.
\end{center}
\caption{Sample discretization mesh.\label{fig:try8x8_ov}}
\end{figure}
-\section*{Example of use}
+{\par\noindent\large\bfseries Example of use}
Consider the discretization mesh depicted in fig.~\ref{fig:try8x8_ov},
partitioned among two processes as shown by the dashed lines, with an
overlap of 1 extra layer with respect to the partition of
@@ -343,7 +350,8 @@ following (showing a transition among the two subdomains)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subroutine{psb\_gather}{Gather Global Dense Matrix}
+\clearpage\subsection*{psb\_gather --- Gather Global Dense Matrix}
+\addcontentsline{toc}{subsection}{psb\_gather}
These subroutines collect the portions of global dense matrix
distributed over all process into one single array stored on one
@@ -375,8 +383,10 @@ Long Precision Complex & psb\_gather \\
\caption{Data types\label{tab:gather}}
\end{table}
-\syntax{call psb\_gather}{glob\_x, loc\_x, desc\_a, info, root}
-\syntax{call psb\_gather}{glob\_x, loc\_x, desc\_a, info, root}
+\begin{verbatim}
+call psb_gather(glob_x, loc_x, desc_a, info, root)
+call psb_gather(glob_x, loc_x, desc_a, info, root)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -442,7 +452,8 @@ An integer value; 0 means no error has been detected.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subroutine{psb\_scatter}{Scatter Global Dense Matrix}
+\clearpage\subsection*{psb\_scatter --- Scatter Global Dense Matrix}
+\addcontentsline{toc}{subsection}{psb\_scatter}
These subroutines scatters the portions of global dense matrix owned
by a process to all the processes in the processes grid.
@@ -473,8 +484,10 @@ Long Precision Complex & psb\_scatter \\
\caption{Data types\label{tab:scatter}}
\end{table}
-\syntax{call psb\_scatter}{glob\_x, loc\_x, desc\_a, info, root}
-\syntax{call psb\_scatter}{glob\_x, loc\_x, desc\_a, info, root}
+\begin{verbatim}
+call psb_scatter(glob_x, loc_x, desc_a, info, root)
+call psb_scatter(glob_x, loc_x, desc_a, info, root)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
diff --git a/docs/pdf/datastruct.tex b/docs/pdf/datastruct.tex
index a86555d0..6a82d3a0 100644
--- a/docs/pdf/datastruct.tex
+++ b/docs/pdf/datastruct.tex
@@ -450,9 +450,12 @@ research.
\subsection{Data structure query routines}
\label{sec:dataquery}
-\subsubroutine{psb\_cd\_get\_local\_rows}{Get number of local rows}
+\subsubsection*{psb\_cd\_get\_local\_rows --- Get number of local rows}
+\addcontentsline{toc}{subsubsection}{psb\_cd\_get\_local\_rows }
-\syntax{nr = psb\_cd\_get\_local\_rows}{desc}
+\begin{verbatim}
+nr = psb_cd_get_local_rows(desc)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -473,9 +476,12 @@ Specified as: a structured data of type \descdata.
\end{description}
-\subsubroutine{psb\_cd\_get\_local\_cols}{Get number of local cols}
+\subsubsection*{psb\_cd\_get\_local\_cols --- Get number of local cols}
+\addcontentsline{toc}{subsubsection}{psb\_cd\_get\_local\_cols }
-\syntax{nc = psb\_cd\_get\_local\_cols}{desc}
+\begin{verbatim}
+nc = psb_cd_get_local_cols(desc)
+\end{verbatim}
\begin{description}
\item[\bf On Entry]
@@ -497,9 +503,12 @@ Specified as: a structured data of type \descdata.
\end{description}
-\subsubroutine{psb\_cd\_get\_global\_rows}{Get number of global rows}
+\subsubsection*{psb\_cd\_get\_global\_rows --- Get number of global rows}
+\addcontentsline{toc}{subsubsection}{psb\_cd\_get\_global\_rows }
-\syntax{nr = psb\_cd\_get\_global\_rows}{desc}
+\begin{verbatim}
+nr = psb_cd_get_global_rows(desc)
+\end{verbatim}
\begin{description}
\item[\bf On Entry]
@@ -516,9 +525,12 @@ Specified as: a structured data of type \descdata.
\item[Function value] The number of global rows in the mesh
\end{description}
-\subsubroutine{psb\_cd\_get\_global\_cols}{Get number of global cols}
+\subsubsection*{psb\_cd\_get\_global\_cols --- Get number of global cols}
+\addcontentsline{toc}{subsubsection}{psb\_cd\_get\_global\_cols }
-\syntax{nr = psb\_cd\_get\_global\_cols}{desc}
+\begin{verbatim}
+nr = psb_cd_get_global_cols(desc)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -537,7 +549,9 @@ Specified as: a structured data of type \descdata.
\subsubroutine{psb\_cd\_get\_context}{Get communication context}
-\syntax{ictxt = psb\_cd\_get\_context}{desc}
+\begin{verbatim}
+ictxt = psb_cd_get_context(desc)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -555,9 +569,12 @@ Specified as: a structured data of type \descdata.
\end{description}
-\subsubroutine{psb\_cd\_get\_large\_threshold}{Get threshold for
+\subsubsection*{psb\_cd\_get\_large\_threshold --- Get threshold for
index mapping switch}
-\syntax{ith = psb\_cd\_get\_large\_threshold}{}
+\addcontentsline{toc}{subsubsection}{psb\_cd\_get\_large\_threshold}
+\begin{verbatim}
+ith = psb_cd_get_large_threshold()
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -568,9 +585,12 @@ Specified as: a structured data of type \descdata.
-\subsubroutine{psb\_cd\_set\_large\_threshold}{Set threshold for
+\subsubsection*{psb\_cd\_set\_large\_threshold --- Set threshold for
index mapping switch}
-\syntax{call psb\_cd\_set\_large\_threshold}{ith}
+\addcontentsline{toc}{subsubsection}{psb\_cd\_set\_large\_threshold}
+\begin{verbatim}
+call psb_cd_set_large_threshold(ith)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -585,9 +605,13 @@ Note: the threshold value is only queried by the library at the time a
call to \verb|psb_cdall| is executed, therefore changing the threshold
has no effect on communication descriptors that have already been initialized.
-\subsubroutine{psb\_sp\_get\_nrows}{Get number of rows in a sparse matrix}
+\subsubsection*{psb\_sp\_get\_nrows --- Get number of rows in a sparse
+ matrix}
+\addcontentsline{toc}{subsubsection}{ psb\_sp\_get\_nrows}
-\syntax{nr = psb\_sp\_get\_nrows}{a}
+\begin{verbatim}
+nr = psb_sp_get_nrows(a)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -605,9 +629,13 @@ Specified as: a structured data of type \spdata.
\end{description}
-\subsubroutine{psb\_sp\_get\_ncols}{Get number of columns in a sparse matrix}
+\subsubsection*{psb\_sp\_get\_ncols --- Get number of columns in a
+ sparse matrix}
+\addcontentsline{toc}{subsubsection}{psb\_sp\_get\_ncols}
-\syntax{nr = psb\_sp\_get\_ncols}{a}
+\begin{verbatim}
+nr = psb_sp_get_ncols(a)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -625,9 +653,13 @@ Specified as: a structured data of type \spdata.
\end{description}
-\subsubroutine{psb\_sp\_get\_nnzeros}{Get number of nonzero elements in a sparse matrix}
+\subsubsection*{psb\_sp\_get\_nnzeros --- Get number of nonzero elements
+ in a sparse matrix}
+\addcontentsline{toc}{subsubsection}{psb\_sp\_get\_nnzeros}
-\syntax{nr = psb\_sp\_get\_nnzeros}{a}
+\begin{verbatim}
+nr = psb_sp_get_nnzeros(a)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -644,7 +676,7 @@ Specified as: a structured data of type \spdata.
\item[Function value] The number of nonzero elements stored in sparse matrix \verb|a|.
\end{description}
-\subsubsection*{Notes}
+{\par\noindent\bfseries Notes}
\begin{enumerate}
\item The function value is specific to the storage format of matrix
\verb|a|; some storage formats employ padding, thus the returned
diff --git a/docs/pdf/error.tex b/docs/pdf/error.tex
index 49d89178..a7abe497 100644
--- a/docs/pdf/error.tex
+++ b/docs/pdf/error.tex
@@ -119,9 +119,13 @@ Aborting...
\end{figure}
-\subroutine{psb\_errpush}{Pushes an error code onto the error stack}
+\clearpage\subsection*{psb\_errpush --- Pushes an error code onto the error
+ stack}
+\addcontentsline{toc}{subsection}{psb\_errpush}
-\syntax{call psb\_errpush}{err\_c, r\_name, i\_err, a\_err}
+\begin{verbatim}
+call psb_errpush(err_c, r_name, i_err, a_err)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -146,9 +150,13 @@ Type: {\bf optional}\\
Specified as: a string.\\
\end{description}
-\subroutine{psb\_error}{Prints the error stack content and aborts execution}
+\clearpage\subsection*{psb\_error --- Prints the error stack content and aborts
+ execution}
+\addcontentsline{toc}{subsection}{psb\_error}
-\syntax{call psb\_error}{icontxt}
+\begin{verbatim}
+call psb_error(icontxt)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -162,9 +170,13 @@ Specified as: an integer.
-\subroutine{psb\_set\_errverbosity}{Sets the verbosity of error messages.}
+\clearpage\subsection*{psb\_set\_errverbosity --- Sets the verbosity of error
+ messages.}
+\addcontentsline{toc}{subsection}{psb\_set\_errverbosity}
-\syntax{call psb\_set\_errverbosity}{v}
+\begin{verbatim}
+call psb_set_errverbosity(v)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -176,10 +188,14 @@ Intent: {\bf in}.\\
Specified as: an integer.
\end{description}
-\subroutine{psb\_set\_erraction}{Set the type of action to be taken
- upon error condition.}
+\clearpage\subsection*{psb\_set\_erraction --- Set the type of action to be
+ taken upon error condition.}
+\addcontentsline{toc}{subsection}{psb\_set\_erraction}
-\syntax{call psb\_set\_erraction}{err\_act}
+
+\begin{verbatim}
+call psb_set_erraction(err_act)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -194,9 +210,12 @@ Specified as: an integer. Possible values: \verb|psb_act_ret|,
-%% \subroutine{psb\_errcomm}{Error communication routine}
+%% \clearpage\subsection*{psb\_errcomm --- Error communication routine}
+%\addcontentsline{toc}{subsection}{psb\_errcomm}
-%% \syntax{call psb\_errcomm}{icontxt, err}
+\begin{verbatim}
+call psb_errcomm(icontxt, err)
+\end{verbatim}
%% \begin{description}
%% \item[\bf On Entry]
diff --git a/docs/pdf/methods.tex b/docs/pdf/methods.tex
index a529b6a1..9d271c3d 100644
--- a/docs/pdf/methods.tex
+++ b/docs/pdf/methods.tex
@@ -11,7 +11,9 @@ the module \verb|psb_krylov_mod|.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subroutine{psb\_krylov \label{krylov}}{Krylov Methods Driver Routine}
+\clearpage\subsection*{psb\_krylov \label{krylov} --- Krylov Methods Driver
+ Routine}
+\addcontentsline{toc}{subsection}{krylov}
This subroutine is a driver that provides a general interface for all
the Krylov-Subspace family methods implemented in PSBLAS version 2.
@@ -26,7 +28,10 @@ later). In the above formulae, $x_i$ is the tentative solution and
$r_i=b-Ax_i$ the corresponding residual at the $i$-th iteration.
-\syntax{call psb\_krylov}{method,a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,irst,istop,cond}
+\begin{verbatim}
+call psb_krylov(method,a,prec,b,x,eps,desc_a,info,&
+ & itmax,iter,err,itrace,irst,istop,cond)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -126,481 +131,6 @@ Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
\end{description}
-%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %
-%% % CG
-%% %
-%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%% \subroutine{psb\_cg \label{cg}}{CG Iterative Method}
-
-%% This subroutine implements the CG method with restarting. The
-%% stopping criterion is the normwise backward error, in the infinity
-%% norm, i.e. the iteration is stopped when
-%% \[ \frac{\|r\|}{(\|A\|\|x\|+\|b\|)} < eps \]
-%% or
-%% \[ \frac{\|r_i\|}{\|b\|_2} < eps \]
-%% according to the value passed through the istop argument (see later).
-
-
-%% \syntax{call psb\_cg}{a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,istop}
-
-%% \begin{description}
-%% \item[\bf On Entry]
-%% \item[a] the local portion of global sparse matrix
-%% $A$. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \spdata.
-%% \item[prec] The data structure containing the preconditioner.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \precdata.
-%% \item[b] The RHS vector. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[x] The initial guess. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[eps] The stopping tolerance. \\
-%% Scope: {\bf global} \\
-%% Type: {\bf required}\\
-%% Specified as: a real number.
-%% \item[desc\_a] contains data structures for communications.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \descdata.
-%% \item[itmax] The maximum number of iterations to perform.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Default: $itmax = 1000$.\\
-%% Specified as: an integer variable $itmax \ge 1$.
-%% \item[itrace] If $>0$ print out an informational message about
-%% convergence every $itrace$ iterations.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% \item[istop] An integer specifying the stopping criterion.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-
-%% \item[\bf On Return]
-%% \item[x] The computed solution. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[iter] The number of iterations performed.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Returned as: an integer variable.
-%% \item[err] The error estimate on exit.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Returned as: a real number.
-%% \item[info] Error code.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required} \\
-%% An integer value; 0 means no error has been detected.
-%% \end{description}
-%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %
-%% % CGS
-%% %
-%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%% \subroutine{psb\_cgs \label{cgs}}{CGS Iterative Method}
-
-%% This subroutine implements the CGS method with restarting. The
-%% stopping criterion is the normwise backward error, in the infinity
-%% norm, i.e. the iteration is stopped when
-%% \[ \frac{\|r\|}{(\|A\|\|x\|+\|b\|)} < eps \]
-%% or
-%% \[ \frac{\|r_i\|}{\|b\|_2} < eps \]
-%% according to the value passed through the istop argument (see later).
-
-
-%% \syntax{call psb\_cgs}{a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,istop}
-
-%% \begin{description}
-%% \item[\bf On Entry]
-%% \item[a] the local portion of global sparse matrix
-%% $A$. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \spdata.
-%% \item[prec] The data structure containing the preconditioner.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \precdata.
-%% \item[b] The RHS vector. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[x] The initial guess. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[eps] The stopping tolerance. \\
-%% Scope: {\bf global} \\
-%% Type: {\bf required}\\
-%% Specified as: a real number.
-%% \item[desc\_a] contains data structures for communications.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \descdata.
-%% \item[itmax] The maximum number of iterations to perform.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Default: $itmax = 1000$.\\
-%% Specified as: an integer variable $itmax \ge 1$.
-%% \item[itrace] If $>0$ print out an informational message about
-%% convergence every $itrace$ iterations.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% \item[istop] An integer specifying the stopping criterion.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-
-%% \item[\bf On Return]
-%% \item[x] The computed solution. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[iter] The number of iterations performed.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Returned as: an integer variable.
-%% \item[err] The error estimate on exit.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Returned as: a real number.
-%% \item[info] Error code.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required} \\
-%% An integer value; 0 means no error has been detected.
-%% \end{description}
-
-%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %
-%% % BiCG
-%% %
-%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% \subroutine{psb\_bicg \label{bicg}}{BiCG Iterative Method}
-
-%% This subroutine implements the BiCG method with restarting. The
-%% stopping criterion is the normwise backward error, in the infinity
-%% norm, i.e. the iteration is stopped when
-%% \[ \frac{\|r\|}{(\|A\|\|x\|+\|b\|)} < eps \]
-%% or
-%% \[ \frac{\|r_i\|}{\|b\|_2} < eps \]
-%% according to the value passed through the istop argument (see later).
-
-
-%% \syntax{call psb\_bicg}{a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,istop}
-
-%% \begin{description}
-%% \item[\bf On Entry]
-%% \item[a] the local portion of global sparse matrix
-%% $A$. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \spdata.
-%% \item[prec] The data structure containing the preconditioner.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \precdata.
-%% \item[b] The RHS vector. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[x] The initial guess. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[eps] The stopping tolerance. \\
-%% Scope: {\bf global} \\
-%% Type: {\bf required}\\
-%% Specified as: a real number.
-%% \item[desc\_a] contains data structures for communications.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \descdata.
-%% \item[itmax] The maximum number of iterations to perform.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Default: $itmax = 1000$.\\
-%% Specified as: an integer variable $itmax \ge 1$.
-%% \item[itrace] If $>0$ print out an informational message about
-%% convergence every $itrace$ iterations.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% \item[istop] An integer specifying the stopping criterion.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-
-%% \item[\bf On Return]
-%% \item[x] The computed solution. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[iter] The number of iterations performed.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Returned as: an integer variable.
-%% \item[err] The error estimate on exit.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Returned as: a real number.
-%% \item[info] Error code.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required} \\
-%% An integer value; 0 means no error has been detected.
-%% \end{description}
-
-
-%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %
-%% % BiCGSTAB
-%% %
-%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% \subroutine{psb\_bicgstab \label{bicgstab}}{BiCGSTAB Iterative Method}
-
-%% This subroutine implements the BiCGSTAB method with restarting. The
-%% stopping criterion is the normwise backward error, in the infinity
-%% norm, i.e. the iteration is stopped when
-%% \[ \frac{\|r\|}{(\|A\|\|x\|+\|b\|)} < eps \]
-%% or
-%% \[ \frac{\|r_i\|}{\|b\|_2} < eps \]
-%% according to the value passed through the istop argument (see later).
-
-
-%% \syntax{call psb\_bicgstab}{a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,istop}
-
-%% \begin{description}
-%% \item[\bf On Entry]
-%% \item[a] the local portion of global sparse matrix
-%% $A$. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \spdata.
-%% \item[prec] The data structure containing the preconditioner.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \precdata.
-%% \item[b] The RHS vector. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[x] The initial guess. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[eps] The stopping tolerance. \\
-%% Scope: {\bf global} \\
-%% Type: {\bf required}\\
-%% Specified as: a real number.
-%% \item[desc\_a] contains data structures for communications.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \descdata.
-%% \item[itmax] The maximum number of iterations to perform.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Default: $itmax = 1000$.\\
-%% Specified as: an integer variable $itmax \ge 1$.
-%% \item[itrace] If $>0$ print out an informational message about
-%% convergence every $itrace$ iterations.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% \item[istop] An integer specifying the stopping criterion.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-
-%% \item[\bf On Return]
-%% \item[x] The computed solution. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[iter] The number of iterations performed.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Returned as: an integer variable.
-%% \item[err] The error estimate on exit.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Returned as: a real number.
-%% \item[info] Error code.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required} \\
-%% An integer value; 0 means no error has been detected.
-%% \end{description}
-
-
-%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %
-%% % BiCGSTAB(L)
-%% %
-%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% \subroutine{psb\_bicgstabl \label{bicgstabl}}{BiCGSTAB-$l$ Iterative Method}
-
-%% This subroutine implements the BiCGSTAB-$l$ method with restarting. The
-%% stopping criterion is the normwise backward error, in the infinity
-%% norm, i.e. the iteration is stopped when
-%% \[ \frac{\|r\|}{(\|A\|\|x\|+\|b\|)} < eps \]
-%% or
-%% \[ \frac{\|r_i\|}{\|b\|_2} < eps \]
-%% according to the value passed through the istop argument (see later).
-
-
-%% \syntax{call psb\_bicgstab}{a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,irst,istop}
-
-%% \begin{description}
-%% \item[\bf On Entry]
-%% \item[a] the local portion of global sparse matrix
-%% $A$. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \spdata.
-%% \item[prec] The data structure containing the preconditioner.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \precdata.
-%% \item[b] The RHS vector. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[x] The initial guess. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[eps] The stopping tolerance. \\
-%% Scope: {\bf global} \\
-%% Type: {\bf required}\\
-%% Specified as: a real number.
-%% \item[desc\_a] contains data structures for communications.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \descdata.
-%% \item[itmax] The maximum number of iterations to perform.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Default: $itmax = 1000$.\\
-%% Specified as: an integer variable $itmax \ge 1$.
-%% \item[itrace] If $>0$ print out an informational message about
-%% convergence every $itrace$ iterations.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% \item[irst] An integer specifying the restarting iteration.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% \item[istop] An integer specifying the stopping criterion.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-
-%% \item[\bf On Return]
-%% \item[x] The computed solution. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[iter] The number of iterations performed.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Returned as: an integer variable.
-%% \item[err] The error estimate on exit.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Returned as: a real number.
-%% \item[info] Error code.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required} \\
-%% An integer value; 0 means no error has been detected.
-%% \end{description}
-
-
-%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %
-%% % GMRES
-%% %
-%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% \subroutine{psb\_gmres \label{gmres}}{GMRES Iterative Method}
-
-%% This subroutine implements the GMRES method with restarting. The
-%% stopping criterion is the normwise backward error, in the infinity
-%% norm, i.e. the iteration is stopped when
-%% \[ \frac{\|r\|}{(\|A\|\|x\|+\|b\|)} < eps \]
-%% or
-%% \[ \frac{\|r_i\|}{\|b\|_2} < eps \]
-%% according to the value passed through the istop argument (see later).
-
-
-%% \syntax{call psb\_gmres}{a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,irst,istop}
-
-%% \begin{description}
-%% \item[\bf On Entry]
-%% \item[a] the local portion of global sparse matrix
-%% $A$. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \spdata.
-%% \item[prec] The data structure containing the preconditioner.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \precdata.
-%% \item[b] The RHS vector. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[x] The initial guess. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[eps] The stopping tolerance. \\
-%% Scope: {\bf global} \\
-%% Type: {\bf required}\\
-%% Specified as: a real number.
-%% \item[desc\_a] contains data structures for communications.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a structured data of type \descdata.
-%% \item[itmax] The maximum number of iterations to perform.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Default: $itmax = 1000$.\\
-%% Specified as: an integer variable $itmax \ge 1$.
-%% \item[itrace] If $>0$ print out an informational message about
-%% convergence every $itrace$ iterations.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% \item[irst] An integer specifying the restart iteration.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% \item[istop] An integer specifying the stopping criterion.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-
-%% \item[\bf On Return]
-%% \item[x] The computed solution. \\
-%% Scope: {\bf local} \\
-%% Type: {\bf required}\\
-%% Specified as: a rank one array.
-%% \item[iter] The number of iterations performed.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Returned as: an integer variable.
-%% \item[err] The error estimate on exit.\\
-%% Scope: {\bf global} \\
-%% Type: {\bf optional}\\
-%% Returned as: a real number.
-%% \item[info] Error code.\\
-%% Scope: {\bf local} \\
-%% Type: {\bf required} \\
-%% An integer value; 0 means no error has been detected.
-%% \end{description}
-
-
-
-
%%% Local Variables:
%%% mode: latex
diff --git a/docs/pdf/penv.tex b/docs/pdf/penv.tex
index 9394a2fd..a233b9ec 100644
--- a/docs/pdf/penv.tex
+++ b/docs/pdf/penv.tex
@@ -2,9 +2,12 @@
\section{Parallel environment routines}
\label{sec:parenv}
-\subroutine{psb\_init}{Initializes PSBLAS parallel environment}
+\clearpage\subsection*{psb\_init --- Initializes PSBLAS parallel environment}
+\addcontentsline{toc}{subsection}{psb\_init}
-\syntax{call psb\_init}{icontxt, np}
+\begin{verbatim}
+call psb_init(icontxt, np)
+\end{verbatim}
This subroutine initializes the PSBLAS parallel environment, defining
a virtual parallel machine.
@@ -31,7 +34,7 @@ Specified as: an integer variable.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item A call to this routine must precede any other PSBLAS call.
\item It is an error to specify a value for $np$ greater than the
@@ -40,9 +43,13 @@ Specified as: an integer variable.
\end{enumerate}
-\subroutine{psb\_info}{Return information about PSBLAS parallel environment}
+\clearpage\subsection*{psb\_info --- Return information about PSBLAS parallel
+ environment}
+\addcontentsline{toc}{subsection}{psb\_info}
-\syntax{call psb\_info}{icontxt, iam, np}
+\begin{verbatim}
+call psb_info(icontxt, iam, np)
+\end{verbatim}
This subroutine returns information about the PSBLAS parallel environment, defining
a virtual parallel machine.
@@ -72,7 +79,7 @@ Specified as: an integer variable. \
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item For processes in the virtual parallel machine the identifier
will satisfy $0 \le iam \le np-1$;
@@ -84,10 +91,13 @@ Specified as: an integer variable. \
\end{enumerate}
-\subroutine{psb\_exit}{Exit from PSBLAS parallel environment}
+\clearpage\subsection*{psb\_exit --- Exit from PSBLAS parallel environment}
+\addcontentsline{toc}{subsection}{psb\_exit}
-\syntax{call psb\_exit}{icontxt}
-\syntax*{call psb\_exit}{icontxt,close}
+\begin{verbatim}
+call psb_exit(icontxt)
+call psb_exit(icontxt,close)
+\end{verbatim}
This subroutine exits from the PSBLAS parallel virtual machine.
\begin{description}
@@ -107,7 +117,7 @@ Intent: {\bf in}.\\
Specified as: a logical variable, default value: true.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item This routine may be called even if a previous call to
\verb|psb_info| has returned with $iam=-1$; indeed, it it is the only
@@ -124,9 +134,12 @@ Specified as: a logical variable, default value: true.
\end{enumerate}
-\subroutine{psb\_get\_mpicomm}{Get the MPI communicator}
+\clearpage\subsection*{psb\_get\_mpicomm --- Get the MPI communicator}
+\addcontentsline{toc}{subsection}{psb\_get\_mpicomm}
-\syntax{call psb\_get\_mpicomm}{icontxt, icomm}
+\begin{verbatim}
+call psb_get_mpicomm(icontxt, icomm)
+\end{verbatim}
This subroutine returns the MPI communicator associated with a PSBLAS context
\begin{description}
@@ -149,9 +162,12 @@ Intent: {\bf out}.\\
\end{description}
-\subroutine{psb\_get\_rank}{Get the MPI rank}
+\clearpage\subsection*{psb\_get\_rank --- Get the MPI rank}
+\addcontentsline{toc}{subsection}{psb\_get\_rank}
-\syntax{call psb\_get\_rank}{rank, icontxt, id}
+\begin{verbatim}
+call psb_get_rank(rank, icontxt, id)
+\end{verbatim}
This subroutine returns the MPI rank of the PSBLAS process $id$
\begin{description}
@@ -181,9 +197,12 @@ Intent: {\bf out}.\\
-\subroutine{psb\_wtime}{Wall clock timing}
+\clearpage\subsection*{psb\_wtime --- Wall clock timing}
+\addcontentsline{toc}{subsection}{psb\_wtime}
-\syntax{time = psb\_wtime}{}
+\begin{verbatim}
+time = psb_wtime()
+\end{verbatim}
This function returns a wall clock timer. The resolution of the timer
is dependent on the underlying parallel environment implementation.
@@ -195,9 +214,13 @@ Returned as: a \verb|real(psb_dpk_)| variable.
\end{description}
-\subroutine{psb\_barrier}{Sinchronization point parallel environment}
+\clearpage\subsection*{psb\_barrier --- Sinchronization point parallel
+ environment}
+\addcontentsline{toc}{subsection}{psb\_barrier}
-\syntax{call psb\_barrier}{icontxt}
+\begin{verbatim}
+call psb_barrier(icontxt)
+\end{verbatim}
This subroutine acts as an explicit synchronization point for the PSBLAS
parallel virtual machine.
@@ -213,9 +236,12 @@ Specified as: an integer variable.
\end{description}
-\subroutine{psb\_abort}{Abort a computation}
+\clearpage\subsection*{psb\_abort --- Abort a computation}
+\addcontentsline{toc}{subsection}{psb\_abort}
-\syntax{call psb\_abort}{icontxt}
+\begin{verbatim}
+call psb_abort(icontxt)
+\end{verbatim}
This subroutine aborts computation on the parallel virtual machine.
\begin{description}
@@ -233,9 +259,12 @@ Specified as: an integer variable.
-\subroutine{psb\_bcast}{Broadcast data}
+\clearpage\subsection*{psb\_bcast --- Broadcast data}
+\addcontentsline{toc}{subsection}{psb\_bcast}
-\syntax{call psb\_bcast}{icontxt, dat, root}
+\begin{verbatim}
+call psb_bcast(icontxt, dat, root)
+\end{verbatim}
This subroutine implements a broadcast operation based on the
underlying communication library.
@@ -276,9 +305,12 @@ Type, kind, rank and size must agree on all processes.
\end{description}
-\subroutine{psb\_sum}{Global sum}
+\clearpage\subsection*{psb\_sum --- Global sum}
+\addcontentsline{toc}{subsection}{psb\_sum}
-\syntax{call psb\_sum}{icontxt, dat, root}
+\begin{verbatim}
+call psb_sum(icontxt, dat, root)
+\end{verbatim}
This subroutine implements a sum reduction operation based on the
underlying communication library.
@@ -318,7 +350,7 @@ scalar, or a rank 1 or 2 array. \\
Type, kind, rank and size must agree on all processes.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item The \verb|dat| argument is both input and output, and its
value may be changed even on processes different from the final
@@ -327,9 +359,12 @@ Type, kind, rank and size must agree on all processes.
-\subroutine{psb\_max}{Global maximum}
+\clearpage\subsection*{psb\_max --- Global maximum}
+\addcontentsline{toc}{subsection}{psb\_max}
-\syntax{call psb\_max}{icontxt, dat, root}
+\begin{verbatim}
+call psb_max(icontxt, dat, root)
+\end{verbatim}
This subroutine implements a maximum valuereduction
operation based on the underlying communication library.
@@ -370,16 +405,19 @@ Type, kind, rank and size must agree on all processes.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item The \verb|dat| argument is both input and output, and its
value may be changed even on processes different from the final
result destination.
\end{enumerate}
-\subroutine{psb\_min}{Global minimum}
+\clearpage\subsection*{psb\_min --- Global minimum}
+\addcontentsline{toc}{subsection}{psb\_min}
-\syntax{call psb\_min}{icontxt, dat, root}
+\begin{verbatim}
+call psb_min(icontxt, dat, root)
+\end{verbatim}
This subroutine implements a minimum value reduction
operation based on the underlying communication library.
@@ -420,16 +458,19 @@ Type, kind, rank and size must agree on all processes.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item The \verb|dat| argument is both input and output, and its
value may be changed even on processes different from the final
result destination.
\end{enumerate}
-\subroutine{psb\_amx}{Global maximum absolute value}
+\clearpage\subsection*{psb\_amx --- Global maximum absolute value}
+\addcontentsline{toc}{subsection}{psb\_amx}
-\syntax{call psb\_amx}{icontxt, dat, root}
+\begin{verbatim}
+call psb_amx(icontxt, dat, root)
+\end{verbatim}
This subroutine implements a maximum absolute value reduction
operation based on the underlying communication library.
@@ -470,16 +511,19 @@ Type, kind, rank and size must agree on all processes.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item The \verb|dat| argument is both input and output, and its
value may be changed even on processes different from the final
result destination.
\end{enumerate}
-\subroutine{psb\_amn}{Global minimum absolute value}
+\clearpage\subsection*{psb\_amn --- Global minimum absolute value}
+\addcontentsline{toc}{subsection}{psb\_amn}
-\syntax{call psb\_amn}{icontxt, dat, root}
+\begin{verbatim}
+call psb_amn(icontxt, dat, root)
+\end{verbatim}
This subroutine implements a minimum absolute value reduction
operation based on the underlying communication library.
@@ -520,7 +564,7 @@ Type, kind, rank and size must agree on all processes.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item The \verb|dat| argument is both input and output, and its
value may be changed even on processes different from the final
@@ -528,9 +572,12 @@ Type, kind, rank and size must agree on all processes.
\end{enumerate}
-\subroutine{psb\_snd}{Send data}
+\clearpage\subsection*{psb\_snd --- Send data}
+\addcontentsline{toc}{subsection}{psb\_snd}
-\syntax{call psb\_snd}{icontxt, dat, dst, m}
+\begin{verbatim}
+call psb_snd(icontxt, dat, dst, m)
+\end{verbatim}
This subroutine sends a packet of data to a destination.
\begin{description}
@@ -570,16 +617,19 @@ same value on sending and receiving processes.
\item[\bf On Return]
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item This subroutine implies a synchronization, but only between the
calling process and the destination process $dst$.
\end{enumerate}
-\subroutine{psb\_rcv}{Receive data}
+\clearpage\subsection*{psb\_rcv --- Receive data}
+\addcontentsline{toc}{subsection}{psb\_rcv}
-\syntax{call psb\_rcv}{icontxt, dat, src, m}
+\begin{verbatim}
+call psb_rcv(icontxt, dat, src, m)
+\end{verbatim}
This subroutine receives a packet of data to a destination.
\begin{description}
@@ -619,7 +669,7 @@ Type, kind and rank must agree on sender and receiver process; if $m$ is
not specified, size must agree as well.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item This subroutine implies a synchronization, but only between the
calling process and the source process $src$.
diff --git a/docs/pdf/precs.tex b/docs/pdf/precs.tex
index df922810..c41247d6 100644
--- a/docs/pdf/precs.tex
+++ b/docs/pdf/precs.tex
@@ -24,9 +24,12 @@ module \verb|psb_prec_mod|.
-\subroutine{psb\_precinit}{Initialize a preconditioner}
+\clearpage\subsection*{psb\_precinit --- Initialize a preconditioner}
+\addcontentsline{toc}{subsection}{psb\_precinit}
-\syntax{call psb\_precinit}{prec, ptype, info}
+\begin{verbatim}
+call psb_precinit(prec, ptype, info)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -57,7 +60,7 @@ Type: {\bf required}\\
Intent: {\bf out}.\\
Error code: if no error, 0 is returned.
\end{description}
-\subsection*{Usage Notes}
+{\par\noindent\large\bfseries Notes}
%% The PSBLAS 2.0 contains a number of preconditioners, ranging from a
%% simple diagonal scaling to 2-level domain decomposition. These
%% preconditioners may use the SuperLU or the UMFPACK software, if
@@ -78,9 +81,12 @@ $ptype$ string as follows\footnote{The string is case-insensitive}:
\end{description}
-\subroutine{psb\_precbld}{Builds a preconditioner}
+\clearpage\subsection*{psb\_precbld --- Builds a preconditioner}
+\addcontentsline{toc}{subsection}{psb\_precbld}
-\syntax{call psb\_precbld}{a, desc\_a, prec, info}
+\begin{verbatim}
+call psb_precbld(a, desc_a, prec, info)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -123,10 +129,13 @@ An integer value; 0 means no error has been detected.
-\subroutine{psb\_precaply}{Preconditioner application routine}
+\clearpage\subsection*{psb\_precaply --- Preconditioner application routine}
+\addcontentsline{toc}{subsection}{psb\_precaply}
-\syntax{call psb\_precaply}{prec,x,y,desc\_a,info,trans,work}
-\syntax*{call psb\_precaply}{prec,x,desc\_a,info,trans}
+\begin{verbatim}
+call psb_precaply(prec,x,y,desc_a,info,trans,work)
+call psb_precaply(prec,x,desc_a,info,trans)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -174,10 +183,14 @@ An integer value; 0 means no error has been detected.
-\subroutine{psb\_precdescr}{Prints a description of current preconditioner}
+\clearpage\subsection*{psb\_precdescr --- Prints a description of current
+ preconditioner}
+\addcontentsline{toc}{subsection}{psb\_precdescr}
-\syntax{call psb\_precdescr}{prec}
-\syntax*{call psb\_precdescr}{prec, iout}
+\begin{verbatim}
+call psb_precdescr(prec)
+call psb_precdescr(prec, iout)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
diff --git a/docs/pdf/psbrout.tex b/docs/pdf/psbrout.tex
index c864256a..03c29c23 100644
--- a/docs/pdf/psbrout.tex
+++ b/docs/pdf/psbrout.tex
@@ -5,7 +5,8 @@
% DENSE MATRIX SUM
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subroutine{psb\_geaxpby}{General Dense Matrix Sum}
+\clearpage\subsection*{psb\_geaxpby --- General Dense Matrix Sum}
+\addcontentsline{toc}{subsection}{psb\_geaxpby}
This subroutine is an interface to the computational kernel for
dense matrix sum:
@@ -16,7 +17,9 @@ dense matrix sum:
%% \item[$y$] represents the global dense submatrix $y_{:, :}$
%% \end{description}
-\syntax{call psb\_geaxpby}{alpha, x, beta, y, desc\_a, info}
+\begin{verbatim}
+call psb_geaxpby(alpha, x, beta, y, desc_a, info)
+\end{verbatim}
%% \syntax*{call psb\_geaxpby}{alpha, x, beta, y, desc\_a, info, n, jx, jy}
%( calculating y <- alpha*x+beta*y )
@@ -111,7 +114,8 @@ An integer value; 0 means no error has been detected.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subroutine{psb\_gedot}{Dot Product}
+\clearpage\subsection*{psb\_gedot --- Dot Product}
+\addcontentsline{toc}{subsection}{psb\_gedot}
This function computes dot product between two vectors $x$ and
$y$.\\
@@ -126,7 +130,9 @@ Else if $x$ and $y$ are complex vectors then it computes dot-product as:
%% \item[$y$] represents the global subvector $y_{:,jy}$
%% \end{description}
-\syntax{psb\_gedot}{x, y, desc\_a, info}
+\begin{verbatim}
+psb_gedot(x, y, desc_a, info)
+\end{verbatim}
%% \syntax*{psb\_gedot}{x, y, desc\_a, info, jx, jy}
\begin{table}[h]
\begin{center}
@@ -200,7 +206,8 @@ An integer value; 0 means no error has been detected.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subroutine{psb\_gedots}{Generalized Dot Product}
+\clearpage\subsection*{psb\_gedots --- Generalized Dot Product}
+\addcontentsline{toc}{subsection}{psb\_gedots}
This subroutine computes a series of dot products among the columns of
two dense matrices $x$ and $y$:
@@ -210,7 +217,9 @@ usual convention applies, i.e. the conjugate transpose of $x$ is
used. If $x$ and $y$ are of rank one, then $res$ is a scalar, else it
is a rank one array.
-\syntax{call psb\_gedots}{res, x, y, desc\_a, info}
+\begin{verbatim}
+call psb_gedots(res, x, y, desc_a, info)
+\end{verbatim}
\begin{table}[h]
\begin{center}
\begin{tabular}{ll}
@@ -271,7 +280,8 @@ An integer value; 0 means no error has been detected.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subroutine{psb\_geamax}{Infinity-Norm of Vector}
+\clearpage\subsection*{psb\_geamax --- Infinity-Norm of Vector}
+\addcontentsline{toc}{subsection}{psb\_geamax}
This function computes
the infinity-norm of a vector $x$.\\
@@ -285,7 +295,9 @@ else if $x$ is a complex vector then it computes infinity-norm as:
%% \item[$x$] represents the global subvector $x_{:,jx}$
%% \end{description}
-\syntax{psb\_geamax}{x, desc\_a, info}
+\begin{verbatim}
+psb_geamax(x, desc_a, info)
+\end{verbatim}
%% \syntax*{psb\_geamax}{x, desc\_a, info, jx}
\begin{table}[h]
@@ -346,13 +358,17 @@ An integer value; 0 means no error has been detected.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subroutine{psb\_geamaxs}{Generalized Infinity Norm}
+\clearpage\subsection*{psb\_geamaxs --- Generalized Infinity Norm}
+\addcontentsline{toc}{subsection}{psb\_geamaxs}
This subroutine computes a series of infinity norms on the columns of
a dense matrix $x$:
\[ res(i) \leftarrow \max_k |x(k,i)| \]
-\syntax{call psb\_geamaxs}{res, x, desc\_a, info}
+\begin{verbatim}
+call psb_geamaxs(res, x, desc_a, info)
+\end{verbatim}
+
\begin{table}[h]
\begin{center}
\begin{tabular}{lll}
@@ -404,7 +420,8 @@ An integer value; 0 means no error has been detected.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subroutine{psb\_geasum}{1-Norm of Vector}
+\clearpage\subsection*{psb\_geasum --- 1-Norm of Vector}
+\addcontentsline{toc}{subsection}{psb\_geasum}
This function computes the 1-norm of a vector $x$.\\
If $x$ is a real vector
@@ -414,7 +431,9 @@ else if $x$ is a vector then it computes 1-norm as:
\[ asum \leftarrow \|re(x)\|_1 + \|im(x)\|_1\]
-\syntax{psb\_geasum}{x, desc\_a, info}
+\begin{verbatim}
+psb_geasum(x, desc_a, info)
+\end{verbatim}
\begin{table}[h]
\begin{center}
@@ -463,7 +482,8 @@ An integer value; 0 means no error has been detected.
\end{description}
-\subroutine{psb\_geasums}{Generalized 1-Norm of Vector}
+\clearpage\subsection*{psb\_geasums --- Generalized 1-Norm of Vector}
+\addcontentsline{toc}{subsection}{psb\_geasums}
This subroutine computes a series of 1-norms on the columns of
a dense matrix $x$:
@@ -476,7 +496,9 @@ else if $x$ is a complex vector then it computes 1-norm as:
\[ res(i) \leftarrow \|re(x)\|_1 + \|im(x)\|_1\]
-\syntax{call psb\_geasums}{res, x, desc\_a, info}
+\begin{verbatim}
+call psb_geasums(res, x, desc_a, info)
+\end{verbatim}
\begin{table}[h]
\begin{center}
@@ -563,8 +585,11 @@ Long Precision Real&Long Precision Complex & psb\_genrm2 \\
\caption{Data types\label{tab:f90nrm2}}
\end{table}
-\syntax{psb\_genrm2}{x, desc\_a, info}
+\begin{verbatim}
+psb_genrm2(x, desc_a, info)
+\end{verbatim}
%% \syntax*{psb\_genrm2}{x, desc\_a, info, jx}
+
\begin{description}
\item[Type:] Synchronous.
\item[\bf On Entry]
@@ -604,7 +629,8 @@ An integer value; 0 means no error has been detected.
-\subroutine{psb\_genrm2s}{Generalized 1-Norm of Vector}
+\clearpage\subsection*{psb\_genrm2s --- Generalized 1-Norm of Vector}
+\addcontentsline{toc}{subsection}{psb\_genrm2s}
This subroutine computes a series of 1-norms on the columns of
a dense matrix $x$:
@@ -617,7 +643,9 @@ else if $x$ is a complex vector then it computes 1-norm as:
\[ res(i) \leftarrow \sqrt{x^H x}\]
-\syntax{call psb\_genrm2s}{res, x, desc\_a, info}
+\begin{verbatim}
+call psb_genrm2s(res, x, desc_a, info)
+\end{verbatim}
\begin{table}[h]
\begin{center}
@@ -675,7 +703,8 @@ An integer value; 0 means no error has been detected.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subroutine{psb\_spnrmi}{Infinity Norm of Sparse Matrix}
+\clearpage\subsection*{psb\_spnrmi --- Infinity Norm of Sparse Matrix}
+\addcontentsline{toc}{subsection}{psb\_spnrmi}
This function computes the infinity-norm of a matrix $A$:\\
@@ -701,7 +730,9 @@ Long Precision Complex & psb\_spnrmi \\
\caption{Data types\label{tab:f90nrmi}}
\end{table}
-\syntax{psb\_spnrmi}{A, desc\_a, info}
+\begin{verbatim}
+psb_spnrmi(A, desc_a, info)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -736,7 +767,8 @@ An integer value; 0 means no error has been detected.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subroutine{psb\_spmm}{Sparse Matrix by Dense Matrix Product}
+\clearpage\subsection*{psb\_spmm --- Sparse Matrix by Dense Matrix Product}
+\addcontentsline{toc}{subsection}{psb\_spmm}
This subroutine computes the Sparse Matrix by Dense Matrix Product:
@@ -777,9 +809,11 @@ Long Precision Complex & psb\_spmm \\
\caption{Data types\label{tab:f90spmm}}
\end{table}
-\syntax{call psb\_spmm}{alpha, a, x, beta, y, desc\_a, info}
-\syntax*{call psb\_spmm}{alpha, a, x, beta, y,desc\_a, info,
-trans, work}
+\begin{verbatim}
+call psb_spmm(alpha, a, x, beta, y, desc_a, info)
+call psb_spmm(alpha, a, x, beta, y,desc_a, info, &
+ & trans, work)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -886,7 +920,8 @@ An integer value; 0 means no error has been detected.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subroutine{psb\_spsm}{Triangular System Solve}
+\clearpage\subsection*{psb\_spsm --- Triangular System Solve}
+\addcontentsline{toc}{subsection}{psb\_spsm}
This subroutine computes the Triangular System Solve:
@@ -912,9 +947,11 @@ where:
\item[$P_r, P_c$] are the permutation matrices.
\end{description}
-\syntax{call psb\_spsm}{alpha, t, x, beta, y, desc\_a, info}
-\syntax*{call psb\_spsm}{alpha, t, x, beta, y, desc\_a, info,
-trans, unit, choice, diag, work}
+\begin{verbatim}
+call psb_spsm(alpha, t, x, beta, y, desc_a, info)
+call psb_spsm(alpha, t, x, beta, y, desc_a, info,&
+ & trans, unit, choice, diag, work)
+\end{verbatim}
\begin{table}[h]
\begin{center}
diff --git a/docs/pdf/toolsrout.tex b/docs/pdf/toolsrout.tex
index 8e4808ae..0ef5c9b4 100644
--- a/docs/pdf/toolsrout.tex
+++ b/docs/pdf/toolsrout.tex
@@ -5,17 +5,20 @@
%
%% psb_cdall %%
%
-\subroutine{psb\_cdall}{Allocates a communication descriptor}
+\subsection*{psb\_cdall --- Allocates a communication descriptor}
+\addcontentsline{toc}{subsection}{psb\_cdall}
-\syntax{call psb\_cdall}{icontxt, desc\_a, info,mg=mg,parts=parts}
-\syntax*{call psb\_cdall}{icontxt, desc\_a, info,vg=vg,flag=flag}
-\syntax*{call psb\_cdall}{icontxt, desc\_a, info,vl=vl}
-\syntax*{call psb\_cdall}{icontxt, desc\_a, info,nl=nl}
-\syntax*{call psb\_cdall}{icontxt, desc\_a, info,mg=mg,repl=.true.}
+\begin{verbatim}
+call psb_cdall(icontxt, desc_a, info,mg=mg,parts=parts)
+call psb_cdall(icontxt, desc_a, info,vg=vg,flag=flag)
+call psb_cdall(icontxt, desc_a, info,vl=vl)
+call psb_cdall(icontxt, desc_a, info,nl=nl)
+call psb_cdall(icontxt, desc_a, info,mg=mg,repl=.true.)
+\end{verbatim}
This subroutine initializes the communication descriptor associated
with an index space. Exactly one of the optional arguments
-\verb|parts|, \verb|vg|, \verb|vl| or \verb|nl|
+\verb|parts|, \verb|vg|, \verb|vl|, \verb|nl| or \verb|repl|
must be specified, thereby choosing
the specific initialization strategy:
\begin{description}
@@ -82,7 +85,7 @@ Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item Exactly one of the optional arguments \verb|parts|, \verb|vg|,
\verb|vl|, \verb|nl| must be specified, thereby choosing the
@@ -140,9 +143,12 @@ An integer value; 0 means no error has been detected.
%
%% psb_cdins %%
%
-\subroutine{psb\_cdins}{Communication descriptor insert routine}
+\clearpage\subsection*{psb\_cdins --- Communication descriptor insert routine}
+\addcontentsline{toc}{subsection}{psb\_cdins}
-\syntax{call psb\_cdins}{nz, ia, ja, desc\_a, info}
+\begin{verbatim}
+call psb_cdins(nz, ia, ja, desc_a, info)
+\end{verbatim}
This subroutine examines the edges of the graph associated with the
discretization mesh (and isomorphic to the sparsity pattern of a
@@ -190,7 +196,7 @@ Type: {\bf required} \\
Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item This routine may only be called if the descriptor is in the
build state;
@@ -204,9 +210,12 @@ nor the end vertex belong to the current process.
%
%% psb_cdasb %%
%
-\subroutine{psb\_cdasb}{Communication descriptor assembly routine}
+\clearpage\subsection*{psb\_cdasb --- Communication descriptor assembly routine}
+\addcontentsline{toc}{subsection}{psb\_cdasb}
-\syntax{call psb\_cdasb}{desc\_a, info}
+\begin{verbatim}
+call psb_cdasb(desc_a, info)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -232,7 +241,7 @@ Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
%\item[arg]
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item On exit from this routine the descriptor is in the assembled
state.
@@ -243,9 +252,12 @@ An integer value; 0 means no error has been detected.
%
%% psb_cdcpy %%
%
-\subroutine{psb\_cdcpy}{Copies a communication descriptor}
+\clearpage\subsection*{psb\_cdcpy --- Copies a communication descriptor}
+\addcontentsline{toc}{subsection}{psb\_cdcpy}
-\syntax{call psb\_cdcpy}{desc\_in, desc\_out, info}
+\begin{verbatim}
+call psb_cdcpy(desc_in, desc_out, info)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -276,9 +288,12 @@ An integer value; 0 means no error has been detected.
%
%% psb_cdfree %%
%
-\subroutine{psb\_cdfree}{Frees a communication descriptor}
+\clearpage\subsection*{psb\_cdfree --- Frees a communication descriptor}
+\addcontentsline{toc}{subsection}{psb\_cdfree}
-\syntax{call psb\_cdfree}{desc\_a, info}
+\begin{verbatim}
+call psb_cdfree(desc_a, info)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -304,9 +319,13 @@ An integer value; 0 means no error has been detected.
%
%% psb_cdcpy %%
%
-\subroutine{psb\_cdbldext}{Build an extended communication descriptor}
+\clearpage\subsection*{psb\_cdbldext --- Build an extended communication
+ descriptor}
+\addcontentsline{toc}{subsection}{psb\_cdbldext}
-\syntax{call psb\_cdbldext}{a,desc\_a,nl,desc\_out, info, extype}
+\begin{verbatim}
+call psb_cdbldext(a,desc_a,nl,desc_out, info, extype)
+\end{verbatim}
This subroutine builds an extended communication descriptor, based on
the input descriptor \verb|desc_a| and on the stencil specified
@@ -352,7 +371,7 @@ Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item Specifying \verb|psb_ovt_xhal_| for the \verb|extype| argument
the user will obtain a descriptor for a domain partition in which
@@ -370,7 +389,9 @@ An integer value; 0 means no error has been detected.
%% %
%% %% psb_cdren %%
%% %
-%% \subroutine{psb\_cdren}{Applies a renumeration to a communication descriptor}
+%% \subsection*{psb\_cdren --- Applies a renumeration to a
+%% communication descriptor}
+%% \addcontentsline{toc}{subsection}{psb\_cdren}
%% \syntax{call psb\_cdren}{trans, iperm, desc\_a, info}
@@ -405,7 +426,8 @@ An integer value; 0 means no error has been detected.
%
%% psb_descprt %%
%
-%% \subroutine{psb\_cdprt}{Prints a descriptor}
+%% \subsection*{psb\_cdprt --- Prints a descriptor}
+%%\addcontentsline{toc}{subsection}{psb\_cdprt}
%% \syntax{call psb\_cdprt}{iout, desc\_a, glob, short}
@@ -434,9 +456,12 @@ An integer value; 0 means no error has been detected.
%
%% psb_spalloc %%
%
-\subroutine{psb\_spall}{Allocates a sparse matrix}
+\clearpage\subsection*{psb\_spall --- Allocates a sparse matrix}
+\addcontentsline{toc}{subsection}{psb\_spall}
-\syntax{call psb\_spall}{a, desc\_a, info, nnz}
+\begin{verbatim}
+call psb_spall(a, desc_a, info, nnz)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -467,7 +492,7 @@ Type: {\bf required} \\
Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item On exit from this routine the sparse matrix is in the build
state.
@@ -483,9 +508,13 @@ An integer value; 0 means no error has been detected.
%
%% psb_spins %%
%
-\subroutine{psb\_spins}{Insert a cloud of elements into a sparse matrix}
+\clearpage\subsection*{psb\_spins --- Insert a cloud of elements into a sparse
+ matrix}
+\addcontentsline{toc}{subsection}{psb\_spins}
-\syntax{call psb\_spins}{nz, ia, ja, val, a, desc\_a, info}
+\begin{verbatim}
+call psb_spins(nz, ia, ja, val, a, desc_a, info)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -545,7 +574,7 @@ Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item On entry to this routine the descriptor may be in either the
build or assembled state.
@@ -569,9 +598,12 @@ An integer value; 0 means no error has been detected.
%
%% psb_spasb %%
%
-\subroutine{psb\_spasb}{Sparse matrix assembly routine}
+\clearpage\subsection*{psb\_spasb --- Sparse matrix assembly routine}
+\addcontentsline{toc}{subsection}{psb\_spasb}
-\syntax{call psb\_spasb}{a, desc\_a, info, afmt, upd, dupl}
+\begin{verbatim}
+call psb_spasb(a, desc_a, info, afmt, upd, dupl)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -613,7 +645,7 @@ Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item On entry to this routine the descriptor must be in the
assembled state, i.e. \verb|psb_cdasb| must already have been called.
@@ -634,7 +666,9 @@ An integer value; 0 means no error has been detected.
%% %
%% %% psb_spcnv %%
%% %
-%% \subroutine{psb\_spcnv}{Converts a sparse matrix storage format}
+%% \subsection*{psb\_spcnv --- Converts a sparse matrix storage
+%% format}
+%%\addcontentsline{toc}{subsection}{psb\_spcnv}
%% \syntax{call psb\_spcnv}{a, b, desc\_a, info}
@@ -667,9 +701,12 @@ An integer value; 0 means no error has been detected.
%
%% psb_spfree %%
%
-\subroutine{psb\_spfree}{Frees a sparse matrix}
+\clearpage\subsection*{psb\_spfree --- Frees a sparse matrix}
+\addcontentsline{toc}{subsection}{psb\_spfree}
-\syntax{call psb\_spfree}{a, desc\_a, info}
+\begin{verbatim}
+call psb_spfree(a, desc_a, info)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -701,9 +738,13 @@ An integer value; 0 means no error has been detected.
%
%% psb_sprn %%
%
-\subroutine{psb\_sprn}{Reinit sparse matrix structure for psblas routines.}
+\clearpage\subsection*{psb\_sprn --- Reinit sparse matrix structure for psblas
+ routines.}
+\addcontentsline{toc}{subsection}{psb\_sprn}
-\syntax{call psb\_sprn}{a, decsc\_a, info, clear}
+\begin{verbatim}
+call psb_sprn(a, decsc_a, info, clear)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -733,7 +774,7 @@ Type: {\bf required} \\
Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item On exit from this routine the sparse matrix is in the update
state.
@@ -741,7 +782,8 @@ An integer value; 0 means no error has been detected.
%
%% psb_spupdate %%
%
-%% \subroutine{psb\_spupdate}{Updates a sparse matrix.}
+%% \subsection*{psb\_spupdate --- Updates a sparse matrix.}
+%%\addcontentsline{toc}{subsection}{psb\_spupdate}
%% \syntax{call psb\_spupdate}{a, ia, ja, blck, desc\_a, info, ix, jx, updflag}
@@ -755,7 +797,9 @@ An integer value; 0 means no error has been detected.
%% %
%% %% psb_csrp %%
%% %
-%% \subroutine{psb\_csrp}{Applies a right permutation to a sparse matrix}
+%% \subsection*{psb\_csrp --- Applies a right permutation to a sparse
+%% matrix}
+%%\addcontentsline{toc}{subsection}{psb\_csrp}
%% \syntax{call psb\_csrp}{trans, iperm, a, info}
@@ -785,9 +829,12 @@ An integer value; 0 means no error has been detected.
%
%% psb_alloc %%
%
-\subroutine{psb\_geall}{Allocates a dense matrix}
+\clearpage\subsection*{psb\_geall --- Allocates a dense matrix}
+\addcontentsline{toc}{subsection}{psb\_geall}
-\syntax{call psb\_geall}{x, desc\_a, info, n, lb}
+\begin{verbatim}
+call psb_geall(x, desc_a, info, n, lb)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -830,9 +877,12 @@ An integer value; 0 means no error has been detected.
%
%% psb_ins %%
%
-\subroutine{psb\_geins}{Dense matrix insertion routine}
+\clearpage\subsection*{psb\_geins --- Dense matrix insertion routine}
+\addcontentsline{toc}{subsection}{psb\_geins}
-\syntax{call psb\_geins}{m, irw, val, x, desc\_a, info,dupl}
+\begin{verbatim}
+call psb_geins(m, irw, val, x, desc_a, info,dupl)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -883,7 +933,7 @@ Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item Dense vectors/matrices do not have an associated state;
\item Duplicate entries are either overwritten or added, there is no
@@ -894,9 +944,12 @@ An integer value; 0 means no error has been detected.
%
%% psb_asb %%
%
-\subroutine{psb\_geasb}{Assembly a dense matrix}
+\clearpage\subsection*{psb\_geasb --- Assembly a dense matrix}
+\addcontentsline{toc}{subsection}{psb\_geasb}
-\syntax{call psb\_geasb}{x, desc\_a, info}
+\begin{verbatim}
+call psb_geasb(x, desc_a, info)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -925,9 +978,12 @@ An integer value; 0 means no error has been detected.
%
%% psb_free %%
%
-\subroutine{psb\_gefree}{Frees a dense matrix}
+\clearpage\subsection*{psb\_gefree --- Frees a dense matrix}
+\addcontentsline{toc}{subsection}{psb\_gefree}
-\syntax{call psb\_gefree}{x, desc\_a, info}
+\begin{verbatim}
+call psb_gefree(x, desc_a, info)
+\end{verbatim}
\begin{description}
\item[Type:] Synchronous.
@@ -960,9 +1016,13 @@ An integer value; 0 means no error has been detected.
%
%% psb_gelp %%
%
-\subroutine{psb\_gelp}{Applies a left permutation to a dense matrix}
+\clearpage\subsection*{psb\_gelp --- Applies a left permutation to a dense
+ matrix}
+\addcontentsline{toc}{subsection}{psb\_gelp}
-\syntax{call psb\_gelp}{trans, iperm, x, info}
+\begin{verbatim}
+call psb_gelp(trans, iperm, x, info)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -997,10 +1057,14 @@ An integer value; 0 means no error has been detected.
%
%% psb_glob_to_loc %%
%
-\subroutine{psb\_glob\_to\_loc}{Global to local indices convertion}
+\clearpage\subsection*{psb\_glob\_to\_loc --- Global to local indices
+ convertion}
+\addcontentsline{toc}{subsection}{psb\_glob\_to\_loc}
-\syntax{call psb\_glob\_to\_loc}{x, y, desc\_a, info, iact,owned}
-\syntax*{call psb\_glob\_to\_loc}{x, desc\_a, info, iact,owned}
+\begin{verbatim}
+call psb_glob_to_loc(x, y, desc_a, info, iact,owned)
+call psb_glob_to_loc(x, desc_a, info, iact,owned)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -1052,17 +1116,23 @@ Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item If an input index is out of range, then the corresponding output
index is set to a negative number;
\item The default \verb|I|gnore means that the negative output is the
only action taken on an out-of-range input.
\end{enumerate}
-\subroutine{psb\_loc\_to\_glob}{Local to global indices conversion}
-\syntax{call psb\_loc\_to\_glob}{x, y, desc\_a, info, iact}
-\syntax*{call psb\_loc\_to\_glob}{x, desc\_a, info, iact}
+
+\clearpage\subsection*{psb\_loc\_to\_glob --- Local to global indices
+ conversion}
+\addcontentsline{toc}{subsection}{psb\_loc\_to\_glob}
+
+\begin{verbatim}
+call psb_loc_to_glob(x, y, desc_a, info, iact)
+call psb_loc_to_glob(x, desc_a, info, iact)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -1112,9 +1182,12 @@ An integer value; 0 means no error has been detected.
%
%% psb_loc_to_glob %%
%
-\subroutine{psb\_is\_owned}{}
+\clearpage\subsection*{psb\_is\_owned }
+\addcontentsline{toc}{subsection}{psb\_is\_owned}
-\syntax{call psb\_is\_owned}{x, desc\_a}
+\begin{verbatim}
+call psb_is_owned(x, desc_a)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -1141,7 +1214,7 @@ Intent: {\bf out}.\\
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item This routine returns a \verb|.true.| value for an index
that is strictly owned by the current process, excluding the halo
@@ -1149,9 +1222,12 @@ Intent: {\bf out}.\\
\end{enumerate}
-\subroutine{psb\_owned\_index}{}
+\clearpage\subsection*{psb\_owned\_index }
+\addcontentsline{toc}{subsection}{psb\_owned\_index}
-\syntax{call psb\_owned\_index}{y, x, desc\_a, info}
+\begin{verbatim}
+call psb_owned_index(y, x, desc_a, info)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -1190,7 +1266,7 @@ An integer value; 0 means no error has been detected.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item This routine returns a \verb|.true.| value for those indices
that are strictly owned by the current process, excluding the halo
@@ -1198,9 +1274,12 @@ An integer value; 0 means no error has been detected.
\end{enumerate}
-\subroutine{psb\_is\_local}{}
+\clearpage\subsection*{psb\_is\_local }
+\addcontentsline{toc}{subsection}{psb\_is\_local}
-\syntax{call psb\_is\_local}{x, desc\_a}
+\begin{verbatim}
+call psb_is_local(x, desc_a)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -1227,16 +1306,19 @@ Intent: {\bf out}.\\
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item This routine returns a \verb|.true.| value for an index
that is local to the current process, including the halo
indices
\end{enumerate}
-\subroutine{psb\_local\_index}{}
+\clearpage\subsection*{psb\_local\_index }
+\addcontentsline{toc}{subsection}{psb\_local\_index}
-\syntax{call psb\_local\_index}{y, x, desc\_a, info}
+\begin{verbatim}
+call psb_local_index(y, x, desc_a, info)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -1275,7 +1357,7 @@ An integer value; 0 means no error has been detected.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item This routine returns a \verb|.true.| value for those indices
that are local to the current process, including the halo
@@ -1287,9 +1369,12 @@ An integer value; 0 means no error has been detected.
%
%% psb_ins %%
%
-\subroutine{psb\_get\_boundary}{Extract list of boundary elements}
+\clearpage\subsection*{psb\_get\_boundary --- Extract list of boundary elements}
+\addcontentsline{toc}{subsection}{psb\_get\_boundary}
-\syntax{call psb\_get\_boundary}{bndel, desc, info}
+\begin{verbatim}
+call psb_get_boundary(bndel, desc, info)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -1317,7 +1402,7 @@ Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item If there are no boundary elements (i.e., if the local part of
the connectivity graph is self-contained) the output vector is set
@@ -1326,9 +1411,12 @@ An integer value; 0 means no error has been detected.
number of boundary elements.
\end{enumerate}
-\subroutine{psb\_get\_overlap}{Extract list of overlap elements}
+\clearpage\subsection*{psb\_get\_overlap --- Extract list of overlap elements}
+\addcontentsline{toc}{subsection}{psb\_get\_overlap}
-\syntax{call psb\_get\_overlap}{ovrel, desc, info}
+\begin{verbatim}
+call psb_get_overlap(ovrel, desc, info)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -1356,7 +1444,7 @@ Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item If there are no overlap elements the output vector is set
to the ``not allocated'' state.
@@ -1366,10 +1454,13 @@ An integer value; 0 means no error has been detected.
-\subroutine{psb\_sp\_getrow}{Extract row(s) from a sparse matrix}
+\clearpage\subsection*{psb\_sp\_getrow --- Extract row(s) from a sparse matrix}
+\addcontentsline{toc}{subsection}{psb\_sp\_getrow}
-\syntax{call psb\_sp\_getrow}{row, a, nz, ia, ja, val, info, append,
- nzin, lrw}
+\begin{verbatim}
+call psb_sp_getrow(row, a, nz, ia, ja, val, info, &
+ & append, nzin, lrw)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -1440,7 +1531,7 @@ Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
\end{description}
-\section*{Notes}
+{\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item The output $nz$ is always the size of the output generated by
the current call; thus, if \verb|append=.true.|, the total output
@@ -1456,14 +1547,17 @@ An integer value; 0 means no error has been detected.
-\subroutine{psb\_sizeof}{Memory occupation}
+\clearpage\subsection*{psb\_sizeof --- Memory occupation}
+\addcontentsline{toc}{subsection}{psb\_sizeof}
This function computes the memory occupation of a PSBLAS object.
-\syntax{psb\_sizeof}{a}
-\syntax*{psb\_sizeof}{desc\_a}
-\syntax*{psb\_sizeof}{prec}
+\begin{verbatim}
+isz = psb_sizeof(a)
+isz = psb_sizeof(desc_a)
+isz = psb_sizeof(prec)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -1492,14 +1586,17 @@ Returned as: an integer number.
\end{description}
-\subroutine{Sorting utilities}{}
+\clearpage\subsection*{Sorting utilities}
+\addcontentsline{toc}{subsection}{Sorting utilities}
-\subroutine*{psb\_msort}{Sorting by the Merge-sort algorithm}
-\subroutine*{psb\_qsort}{Sorting by the Quicksort algorithm}
-\subroutine*{psb\_hsort}{Sorting by the Heapsort algorithm}
-\syntax{call psb\_msort}{x,ix,dir,flag}
-\syntax*{call psb\_qsort}{x,ix,dir,flag}
-\syntax*{call psb\_hsort}{x,ix,dir,flag}
+{\par\noindent\large\bfseries psb\_msort --- Sorting by the Merge-sort algorithm}
+{\par\noindent\large\bfseries psb\_qsort --- Sorting by the Quicksort algorithm}
+{\par\noindent\large\bfseries psb\_hsort --- Sorting by the Heapsort algorithm}
+\begin{verbatim}
+call psb_msort(x,ix,dir,flag)
+call psb_qsort(x,ix,dir,flag)
+call psb_hsort(x,ix,dir,flag)
+\end{verbatim}
These serial routines sort a sequence $X$ into ascending or
descending order. The argument meaning is identical for the three
@@ -1536,7 +1633,8 @@ Type: {\bf Optional} \\
An integer array of rank 1, whose entries are moved to the same
position as the corresponding entries in $x$.
\end{description}
-\section*{Usage notes}
+
+{\goodbreak\par\noindent\large\bfseries Notes}
\begin{enumerate}
\item The sorting can be performed in the up/down direction, on the
natural or absolute values; for complex data the sorting can only
diff --git a/docs/pdf/userguide.tex b/docs/pdf/userguide.tex
index 73258c7a..29138be8 100644
--- a/docs/pdf/userguide.tex
+++ b/docs/pdf/userguide.tex
@@ -10,6 +10,7 @@
plainpages=false,
pdfpagelabels,
colorlinks,
+ citecolor=red,
linkcolor=blue]{hyperref}
\usepackage{ifthen}
\usepackage{graphicx}
@@ -58,7 +59,7 @@
\ifdim \wd\@tempboxa >\hsize
\setbox\@tempboxa\hbox{\em $($#2$)$}
\ifdim\wd\@tempboxa >\hsize
- \begin{flushright}#1\ \em$($#2$)$\end{flushright}%
+ \flushright#1\ \em$($#2$)$\endflushright%
\else
\hbox to\hsize{#1\hfil}%
\hbox to\hsize{\hfil\box\@tempboxa}%
@@ -75,7 +76,36 @@
\newcommand{\spdata}{\hyperlink{spdata}{{\tt psb\_spmat\_type}}}
\begin{document}
-\include{title}
+
+\pdfbookmark{PSBLAS-v2.3 User's Guide}{title}
+
+\newlength{\centeroffset}
+\setlength{\centeroffset}{-0.5\oddsidemargin}
+\addtolength{\centeroffset}{0.5\evensidemargin}
+%\addtolength{\textwidth}{-\centeroffset}
+\thispagestyle{empty}
+\vspace*{\stretch{1}}
+\noindent\hspace*{\centeroffset}\makebox[0pt][l]{\begin{minipage}{\textwidth}
+\flushright
+{\Huge\bfseries PSBLAS 2.3 User's guide
+}
+\noindent\rule[-1ex]{\textwidth}{5pt}\\[2.5ex]
+\hfill\emph{\Large A reference guide for the Parallel Sparse BLAS library}
+\end{minipage}}
+
+\vspace{\stretch{1}}
+\noindent\hspace*{\centeroffset}\makebox[0pt][l]{\begin{minipage}{\textwidth}
+\flushright
+{\bfseries
+by Salvatore Filippone\\
+and Alfredo Buttari}\\
+University of Rome ``Tor Vergata''.\\[3ex]
+\today
+\end{minipage}}
+
+%\addtolength{\textwidth}{\centeroffset}
+\vspace{\stretch{2}}
+
\cleardoublepage
\begingroup
\renewcommand*{\thepage}{toc}
diff --git a/docs/pdf/userhtml.tex b/docs/pdf/userhtml.tex
new file mode 100644
index 00000000..9763525a
--- /dev/null
+++ b/docs/pdf/userhtml.tex
@@ -0,0 +1,270 @@
+\documentclass[10pt,a4paper,twoside]{article}
+\usepackage{pstricks}
+\usepackage{fancybox}
+\usepackage{amsfonts}
+% \usepackage{minitoc}
+% \setcounter{minitocdepth}{2}
+\usepackage[bookmarks=true,
+ bookmarksnumbered=true,
+ bookmarksopen=false,
+ plainpages=false,
+ pdfpagelabels,
+ colorlinks,
+ linkcolor=blue]{hyperref}
+\usepackage{ifthen}
+\usepackage{graphicx}
+\newtheorem{theorem}{Theorem}
+\newtheorem{corollary}{Corollary}
+
+%\newboolean{mtc}
+%\setboolean{mtc}{true}
+
+\pdfoutput=0
+% \relax
+% \pdfcompresslevel=0 %-- 0 = none, 9 = best
+% \pdfinfo{ %-- Info dictionary of PDF output /Author (Alfredo Buttari)
+% /Title (Parallel Sparse BLAS V. 2.2)
+% /Subject (Parallel Sparse Basic Linear Algebra Subroutines)
+% /Keywords (Computer Science Linear Algebra Fluid Dynamics Parallel Linux MPI PSBLAS Iterative Solvers Preconditioners)
+% /Creator (pdfLaTeX)
+% /Producer ($Id: userguide.tex 1978 2007-10-19 14:51:12Z sfilippo $)
+% }
+% \pdfcatalog{ %-- Catalog dictionary of PDF output.
+% /URI (http://ce.uniroma2.it/psblas)
+% }
+
+\newcounter{subroutine}[subsection]
+\newcounter{example}[subroutine]
+\makeatletter
+\def\subroutine{\@ifstar{\@subroutine}{\clearpage\@subroutine}}%
+\def\@subroutine#1#2{%
+\stepcounter{subroutine}%
+ \section*{\flushleft #1---#2 \endflushleft}%
+ \addcontentsline{toc}{subsection}{#1}%
+ \markright{#1}}%
+\newcommand{\subsubroutine}[2]{%
+\stepcounter{subroutine}%
+ \subsection*{\flushleft #1---#2 \endflushleft}%
+ \addcontentsline{toc}{subsubsection}{#1}%
+ \markright{#1}}%
+\newcommand{\examplename}{Example}
+\newcommand{\syntaxname}{Syntax}
+\def\syntax{\@ifstar{\@ssyntax}{\@syntax}}%
+\def\@syntax{\nobreak\section*{\syntaxname}%
+ \@ssyntax}%
+\def\@ssyntax#1#2{%
+ \nobreak
+ \setbox\@tempboxa\hbox{#1\ {\em $($#2$)$}}%
+ \ifdim \wd\@tempboxa >\hsize
+ \setbox\@tempboxa\hbox{\em $($#2$)$}
+ \ifdim\wd\@tempboxa >\hsize
+ \flushright#1\ \em$($#2$)$\endflushright%
+ \else
+ \hbox to\hsize{#1\hfil}%
+ \hbox to\hsize{\hfil\box\@tempboxa}%
+ \fi
+ \else
+ \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi\par\vskip\baselineskip}
+\makeatother
+\newcommand{\example}{\stepcounter{example}%
+\section*{\examplename~\theexample}}
+
+\newcommand{\precdata}{\hyperlink{precdata}{{\tt psb\_prec\_type}}}
+\newcommand{\descdata}{\hyperlink{descdata}{{\tt psb\_desc\_type}}}
+\newcommand{\spdata}{\hyperlink{spdata}{{\tt psb\_spmat\_type}}}
+
+\begin{document}
+{\LARGE\bfseries PSBLAS\\[.8ex] User's and Reference
+ Guide}\\[\baselineskip]
+\emph{\large A reference guide for the Parallel Sparse BLAS library}\\[3ex]
+{\bfseries Salvatore Filippone\\
+ Alfredo Buttari } \\
+ University of Rome ``Tor Vergata'', Italy\\[2ex]
+%\\[10ex]
+%\today
+Software version: 2.3\\
+%\today
+July 24, 2008
+\cleardoublepage
+\begingroup
+ \renewcommand*{\thepage}{toc}
+ \pagenumbering{roman} % Roman numbering
+ \setcounter{page}{1} % Abstract start on page ii
+ \tableofcontents
+\endgroup
+
+\cleardoublepage
+
+\pagenumbering{arabic} % Arabic numbering
+\setcounter{page}{1} % Chapters start on page 1
+
+\include{intro}
+\include{datastruct}
+\include{psbrout}
+\include{commrout}
+\include{toolsrout}
+\include{penv}
+\include{error}
+\include{util}
+\include{precs}
+\include{methods}
+
+\cleardoublepage
+
+\begin{thebibliography}{99}
+
+\bibitem{PARA04FOREST}
+G.~Bella, S.~Filippone, A.~De Maio and M.~Testa,
+{\em A Simulation Model for Forest Fires},
+in J.~Dongarra, K.~Madsen, J.~Wasniewski, editors,
+Proceedings of PARA~04 Workshop on State of the Art
+in Scientific Computing, pp.~546--553, Lecture Notes in Computer Science,
+Springer, 2005.
+\bibitem{2007d} A. Buttari, D. di Serafino, P. D'Ambra, S. Filippone,\newblock
+2LEV-D2P4: a package of high-performance preconditioners,\newblock
+Applicable Algebra in Engineering, Communications and Computing,
+Volume 18, Number 3, May, 2007, pp. 223-239
+%Published online: 13 February 2007, {\tt http://dx.doi.org/10.1007/s00200-007-0035-z}
+%
+\bibitem{2007c} P. D'Ambra, S. Filippone, D. Di Serafino\newblock
+On the Development of PSBLAS-based Parallel Two-level Schwarz Preconditioners
+\newblock
+Applied Numerical Mathematics, Elsevier Science,
+Volume 57, Issues 11-12, November-December 2007, Pages 1181-1196.
+%published online 3 February 2007, {\tt
+% http://dx.doi.org/10.1016/j.apnum.2007.01.006}
+
+\bibitem{BLAS2}
+ Dongarra, J. J., DuCroz, J., Hammarling, S. and Hanson, R.,
+An Extended Set of {F}ortran {B}asic {L}inear {A}lgebra {S}ubprograms,
+{ACM Trans. Math. Softw.} vol.~{14}, 1--17, 1988.
+\bibitem{BLAS3}
+ Dongarra, J., DuCroz, J., Hammarling, S. and Duff, I.,
+A Set of level 3 Basic Linear Algebra Subprograms,
+{ACM Trans. Math. Softw.} vol.~{16}, 1--17, 1990.
+%% \bibitem{DOUGLAS}
+%% R.E.~Bank and C.C.~Douglas,
+%% {\em SMMP: Sparse Matrix Multiplication Package},
+%% Advances in Computational Mathematics, 1993, 1, 127-137.
+%% (See also {\tt http://www.mgnet.org/~douglas/ccd-codes.html})
+%
+%
+%% \bibitem{PARA04}
+%% A.~Buttari, P.~D'Ambra, D.~di Serafino and S.~Filippone,
+%% {\em Extending PSBLAS to Build Parallel Schwarz Preconditioners},
+%% in , J.~Dongarra, K.~Madsen, J.~Wasniewski, editors,
+%% Proceedings of PARA~04 Workshop on State of the Art
+%% in Scientific Computing, pp.~593--602, Lecture Notes in Computer Science,
+%% Springer, 2005.
+%
+%% \bibitem{CAI_SAAD}
+%% X.~C.~Cai and Y.~Saad,
+%% {\em Overlapping Domain Decomposition Algorithms for General Sparse Matrices},
+%% Numerical Linear Algebra with Applications, 3(3), pp.~221--237, 1996.
+%% %
+%% \bibitem{CAI_SARKIS}
+%% X.C.~Cai and M.~Sarkis,
+%% {\em A Restricted Additive Schwarz Preconditioner for General Sparse Linear Systems},
+%% SIAM Journal on Scientific Computing, 21(2), pp.~792--797, 1999.
+%
+%% \bibitem{CAI_WIDLUND}
+%% X.C.~Cai and O.~B.~Widlund,
+%% {\em Domain Decomposition Algorithms for Indefinite Elliptic Problems},
+%% SIAM Journal on Scientific and Statistical Computing, 13(1), pp.~243--258, 1992.
+%
+%% \bibitem{DD1}
+%% T.~Chan and T.~Mathew,
+%% {\em Domain Decomposition Algorithms},
+%% in A.~Iserles, editor, Acta Numerica 1994, pp.~61--143, 1994.
+%% Cambridge University Press.
+%% %
+%% \bibitem{APNUM06}
+%% P.~D'Ambra, D.~di Serafino and S.~Filippone,
+%% On the Development of PSBLAS-based Parallel Two-level Schwarz Preconditioners,
+%% Applied Numerical Mathematics, to appear, 2007.
+%
+%% \bibitem{UMFPACK}
+%% T.A.~Davis,
+%% {\em Algorithm 832: UMFPACK - an Unsymmetric-pattern Multifrontal
+%% Method with a Column Pre-ordering Strategy},
+%% ACM Transactions on Mathematical Software, 30, pp.~196--199, 2004.
+%% (See also {\tt http://www.cise.ufl.edu/~davis/})
+%% %
+%% \bibitem{SUPERLU}
+%% J.W.~Demmel, S.C.~Eisenstat, J.R.~Gilbert, X.S.~Li and J.W.H.~Liu,
+%% A supernodal approach to sparse partial pivoting,
+%% SIAM Journal on Matrix Analysis and Applications, 20(3), pp.~720--755, 1999.
+%
+\bibitem{BLACS}
+J.~J.~Dongarra and R.~C.~Whaley,
+{\em A User's Guide to the BLACS v.~1.1},
+Lapack Working Note 94, Tech.\ Rep.\ UT-CS-95-281, University of
+Tennessee, March 1995 (updated May 1997).
+%
+\bibitem{sblas97}
+I.~Duff, M.~Marrone, G.~Radicati and C.~Vittoli,
+{\em Level 3 Basic Linear Algebra Subprograms for Sparse Matrices:
+a User Level Interface},
+ACM Transactions on Mathematical Software, 23(3), pp.~379--401, 1997.
+%
+\bibitem{sblas02}
+I.~Duff, M.~Heroux and R.~Pozo,
+{\em An Overview of the Sparse Basic Linear
+Algebra Subprograms: the New Standard from the BLAS Technical Forum},
+ACM Transactions on Mathematical Software, 28(2), pp.~239--267, 2002.
+\bibitem{PSBLAS}
+S.~Filippone and M.~Colajanni,
+{\em PSBLAS: A Library for Parallel Linear Algebra
+Computation on Sparse Matrices},
+\newblock
+ACM Transactions on Mathematical Software, 26(4), pp.~527--550, 2000.
+%
+\bibitem{KIVA3PSBLAS}
+S.~Filippone, P.~D'Ambra, M.~Colajanni,
+{\em Using a Parallel Library of Sparse Linear Algebra in a Fluid Dynamics
+Applications Code on Linux Clusters},
+in G.~Joubert, A.~Murli, F.~Peters, M.~Vanneschi, editors,
+Parallel Computing - Advances \& Current Issues,
+pp.~441--448, Imperial College Press, 2002.
+%
+\bibitem{METIS}
+Karypis, G. and Kumar, V.,
+{\em {METIS}: Unstructured Graph Partitioning and Sparse Matrix
+ Ordering System}.
+Minneapolis, MN 55455: University of Minnesota, Department of
+ Computer Science, 1995.
+Internet Address: {\verb|http://www.cs.umn.edu/~karypis|}.
+\bibitem{BLAS1}
+Lawson, C., Hanson, R., Kincaid, D. and Krogh, F.,
+ Basic {L}inear {A}lgebra {S}ubprograms for {F}ortran usage,
+{ACM Trans. Math. Softw.} vol.~{5}, 38--329, 1979.
+
+\bibitem{machiels}
+{Machiels, L. and Deville, M.}
+{\em Fortran 90: An entry to object-oriented programming for the solution
+ of partial differential equations.}
+{ACM Trans. Math. Softw.} vol.~{23}, 32--49.
+\bibitem{metcalf}
+{Metcalf, M., Reid, J. and Cohen, M.}
+{\em Fortran 95/2003 explained.}
+{Oxford University Press}, 2004.
+%
+%% \bibitem{DD2}
+%% B.~Smith, P.~Bjorstad and W.~Gropp,
+%% {\em Domain Decomposition: Parallel Multilevel Methods for Elliptic
+%% Partial Differential Equations},
+%% Cambridge University Press, 1996.
+%
+\bibitem{MPI1}
+M.~Snir, S.~Otto, S.~Huss-Lederman, D.~Walker and J.~Dongarra,
+{\em MPI: The Complete Reference. Volume 1 - The MPI Core}, second edition,
+MIT Press, 1998.
+%
+\end{thebibliography}
+
+\end{document}
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: 'userguide'
+%%% End:
diff --git a/docs/pdf/util.tex b/docs/pdf/util.tex
index fb48a3ca..54db4fce 100644
--- a/docs/pdf/util.tex
+++ b/docs/pdf/util.tex
@@ -9,10 +9,14 @@ module \verb|psb_util_mod|.
%\subroutine{PSB\_HBIO\_MOD}{Input/Output in Harwell-Boeing format}
-\subroutine{hb\_read}{Read a sparse matrix from a file in the
+\clearpage\subsection*{hb\_read --- Read a sparse matrix from a file in the
Harwell--Boeing format}
-\syntax{call hb\_read}{a, iret, iunit, filename, b, mtitle}
-
+\addcontentsline{toc}{subsubsection}{hb\_read}
+
+\begin{verbatim}
+call hb_read(a, iret, iunit, filename, b, mtitle)
+\end{verbatim}
+
\begin{description}
\item[Type:] Asynchronous.
\item[\bf On Entry ]
@@ -48,8 +52,13 @@ An integer value; 0 means no error has been detected.
-\subroutine{hb\_write}{Write a sparse matrix to a file in the Harwell--Boeing format}
-\syntax{call hb\_write}{a, iret, iunit, filename, key, rhs, mtitle}
+\clearpage\subsection*{hb\_write --- Write a sparse matrix to a file
+ in the Harwell--Boeing format}
+\addcontentsline{toc}{subsubsection}{hb\_write}
+
+\begin{verbatim}
+call hb_write(a, iret, iunit, filename, key, rhs, mtitle)
+\end{verbatim}
@@ -96,8 +105,13 @@ An integer value; 0 means no error has been detected.
%\subroutine{PSB\_MMIO\_MOD}{Input/Output in MatrixMarket format}
-\subroutine{mm\_mat\_read}{Read a sparse matrix from a file in the MatrixMarket format}
-\syntax{call mm\_mat\_read}{a, iret, iunit, filename}
+\clearpage\subsection*{mm\_mat\_read --- Read a sparse matrix from a
+ file in the MatrixMarket format}
+\addcontentsline{toc}{subsubsection}{mm\_mat\_read}
+
+\begin{verbatim}
+call mm_mat_read(a, iret, iunit, filename)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -122,8 +136,12 @@ Type: {\bf required} \\
An integer value; 0 means no error has been detected.
\end{description}
-\subroutine{mm\_vet\_read}{Read a dense vector from a file in the MatrixMarket format}
-\syntax{call mm\_vet\_read}{b, iret, iunit, filename}
+\clearpage\subsection*{mm\_vet\_read --- Read a dense vector from a
+ file in the MatrixMarket format}
+\addcontentsline{toc}{subsubsection}{mm\_vet\_read }
+\begin{verbatim}
+call mm_vet_read(b, iret, iunit, filename)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
@@ -152,8 +170,12 @@ An integer value; 0 means no error has been detected.
-\subroutine{mm\_mat\_write}{Write a sparse matrix to a file in the MatrixMarket format}
-\syntax{call mm\_mat\_write}{a, mtitle, iret, iunit, filename}
+\clearpage\subsection*{mm\_mat\_write --- Write a sparse matrix to a
+ file in the MatrixMarket format}
+\addcontentsline{toc}{subsubsection}{mm\_mat\_write}
+\begin{verbatim}
+call mm_mat_write(a, mtitle, iret, iunit, filename)
+\end{verbatim}
\begin{description}
\item[Type:] Asynchronous.
\item[\bf On Entry ]