API

In the below, all reals are double precision unless otherwise indicated.

General

subroutine sylver_init(ncpu, ngpu)

Initialization routine which should be called before any other routine within SyLVER. The number of CPUs and GPUs involved in the computations should be passed to this routine.

Parameters:
  • ncpu [integer,in] :: number of CPUs to be used in the execution of SyLVER routines.
  • ngpu [integer,in] :: number of GPUs to be used in the execution of SyLVER routines. Note that if CUDA is not enabled during the compilation, this value will be ignored.
subroutine sylver_finalize()

SyLVER termination routine which should be called once all the desired operations have been performed.

SpLDLT

subroutine spldlt_analyse(akeep, n, ptr, row, options, inform[, order, val, ncpu, ngpu, check])

Perform the analyse (symbolic) phase of the factorization for a matrix supplied in Compressed Sparse Column (CSC) format. The resulting symbolic factors stored in spldlt_akeep should be passed unaltered in the subsequent calls to ssids_factor().

Parameters:
  • akeep [spldlt_akeep,out] :: returns symbolic factorization, to be passed unchanged to subsequent routines.
  • n [integer,in] :: number of columns in \(A\).
  • ptr (n+1) [long,in] :: column pointers for \(A\) (see CSC format).
  • row (ptr(n+1)-1) [integer,in] ::

    row indices for \(A\) (see CSC format).

  • options [sylver_options,in] :: specifies algorithm options to be used (see sylver_options).
  • inform [sylver_inform,out] :: returns information about the execution of the routine (see sylver_inform).
Options:
  • order (n) [integer,inout] :: on entry a user-supplied ordering (options%ordering=0). On return, the actual ordering used (if present).
  • val (ptr(n+1)-1) [real,in] ::

    non-zero values for \(A\) (see CSC format). Only used if a matching-based ordering is requested.

  • ncpu [integer,in] :: Number of CPU available for the execution. If absent, the value of ncpu passed to the sylver_init() routine is used instead.
  • ncpu :: Number of GPU available for the execution. This value is ignored if CUDA is not enabled during the compilation and if absent, the value of ncpu passed to the sylver_init() routine is used instead.
  • check [logical,in] :: if true, matrix data is checked. Out-of-range entries are dropped and duplicate entries are summed.

Note

If a user-supplied ordering is used, it may be altered by this routine, with the altered version returned in order(:). This version will be equivalent to the original ordering, except that some supernodes may have been amalgamated, a topological ordering may have been applied to the assembly tree and the order of columns within a supernode may have been adjusted to improve cache locality.

subroutine spldlt_factorize(akeep, fkeep, posdef, val, options, inform[, scale, ptr, row])
Parameters:
  • akeep [spldlt_akeep,out] :: symbolic factorization returned by preceding call to spldlt_analyse().
  • akeep :: returns numeric factorization, to be passed unchanged to subsequent routines.
  • posdef [logical,in] :: true if matrix is positive-definite.
  • val (*) [real,in] :: non-zero values for \(A\) in same format as for the call to spldlt_analyse().
  • options [sylver_options,in] :: specifies algorithm options to be used (see sylver_options).
  • inform [sylver_inform,out] :: returns information about the execution of the routine (see sylver_inform).
Options:
  • scale (n) [real,inout] :: diagonal scaling. scale(i) contains entry \(S_{ii}\) of \(S\). Must be supplied by user if options%scaling=0 (user-supplied scaling). On exit, return scaling used.
  • ptr (n+1) [integer(long),in] :: column pointers for \(A\), only required if scaling is required (options%scaling > 0) expect in the case where matching-based ordering is done (options%scaling = 3)
  • row (ptr(n+1)-1) [integer,in] :: row indices for \(A\), only required if scaling is required (options%scaling > 0) expect in the case where matching-based ordering is done (options%scaling = 3)
subroutine spldlt_solve(akeep, fkeep, nrhs, x, ldx, options, inform[, job])

Solve (for multiple right-hand sides) one of the following equations:

job Equation solved
0 (or absent) \(AX=B\)
1 \(PLX=SB\)
2 \(DX=B\)
3 \((PL)^TS^{-1}X=B\)
4 \(D(PL)^TS^{-1}X=B\)

Recall \(A\) has been factorized as either:

  • \(SAS = (PL)(PL)^T~\) (positive-definite case); or
  • \(SAS = (PL)D(PL)^T\) (indefinite case).
Parameters:
  • akeep [spldlt_akeep,in] :: symbolic factorization returned by preceding call to spldlt_analyse()
  • fkeep [spldlt_fkeep,in] :: numeric factorization returned by preceding call to spldlt_factor().
  • nrhs [integer,in] :: number of right-hand sides.
  • x (ldx,nrhs) [real,inout] :: right-hand sides \(B\) on entry, solutions \(X\) on exit.
  • ldx [integer,in] :: leading dimension of x.
  • options [sylver_options,in] :: specifies algorithm options to be used (see sylver_options).
  • inform [sylver_inform,out] :: returns information about the execution of the routine (see sylver_inform).
Options:

job [integer,in] :: specifies equation to solve, as per above table.