GLS#

purpose#

The gls package solves sparse unsymmetric systems of linear equations using a variant of Gaussian elimination. Given a sparse symmetric matrix \(A = \{ a_{ij} \}_{m \times n}\), and an \(n\)-vector \(b\), this function solves the system \(A x = b\). If instead \(b\) is an \(m\)-vector, the function may solve instead \(A^T x = b\). gls is based upon a modern fortran interface to the HSL Archive fortran 77 package MA28, which itself relies on MA33. To obtain HSL Archive packages, see

Currently only the options and info dictionaries are exposed; these are provided and used by other GALAHAD packages with Python interfaces. Extended functionality is available with the uls function.

See Section 4 of $GALAHAD/doc/gls.pdf for a brief description of the method employed and other details.

functions#

gls.initialize()#

Set default option values and initialize private data

Returns:

optionsdict
dictionary containing default control options:
lpint

Unit for error messages.

wpint

Unit for warning messages.

mpint

Unit for monitor output.

ldiagint

Controls level of diagnostic output.

btfint

Minimum block size for block-triangular form (BTF). Set to \(n\) to avoid using BTF.

maxitint

Maximum number of iterations.

factor_blockingint

Level 3 blocking in factorize.

solve_blasint

Switch for using Level 1 or 2 BLAS in solve.

laint

Initial size for real array for the factors.

la_intint

Initial size for integer array for the factors.

maxlaint

Maximum size for real array for the factors.

pivotingint

Controls pivoting: Number of columns searched. Zero for Markowitz.

fill_inint

Initially fill_in * ne space allocated for factors.

multiplierfloat

Factor by which arrays sizes are to be increased if they are too small.

reducefloat

if previously allocated internal workspace arrays are greater than reduce times the currently required sizes, they are reset to current requirment.

ufloat

Pivot threshold.

switch_fullfloat

Density for switch to full code.

dropfloat

Drop tolerance.

tolerancefloat

anything < this is considered zero.

cgcefloat

Ratio for required reduction using IR.

diagonal_pivotingbool

Set to 0 for diagonal pivoting.

struct_abortbool

abort if \(A\) is structurally singular.

[optional] gls.information()

Provide optional output information

Returns:

ainfodict
dictionary containing output information from the analysis phase:
flagint

Flags success or failure case.

moreint

More information on failure.

len_analyseint

Size for analysis.

len_factorizeint

Size for factorize.

ncmpaint

Number of compresses.

rankint

Estimated rank.

dropint

Number of entries dropped.

struc_rankint

Structural rank of matrix.

oorint

Number of indices out-of-range.

dupint

Number of duplicates.

statint

STAT value after allocate failure.

lblockint

Size largest non-triangular block.

sblockint

Sum of orders of non-triangular blocks.

tblockint

Total entries in all non-tringular blocks.

opsfloat

Number of operations in elimination.

finfodict
dictionary containing output information from the factorization phase:
flagint

Flags success or failure case.

moreint

More information on failure.

size_factorint

Number of words to hold factors.

len_factorizeint

Size for subsequent factorization.

dropint

Number of entries dropped.

rankint

Estimated rank.

statint

Status value after allocate failure.

opsfloat

Number of operations in elimination.

sinfodict
dictionary containing output information from the solve phase:
flagint

Flags success or failure case.

moreint

More information on failure.

statint

Status value after allocate failure.

gls.finalize()#

Deallocate all internal private storage.