sulu_wrapper Module

A SuperLU wrapper


Uses

  • module~~sulu_wrapper~~UsesGraph module~sulu_wrapper sulu_wrapper iso_c_binding iso_c_binding module~sulu_wrapper->iso_c_binding

Used by

  • module~~sulu_wrapper~~UsedByGraph module~sulu_wrapper sulu_wrapper module~solver solver module~solver->module~sulu_wrapper program~test_solvers test_solvers program~test_solvers->module~solver

Contents


Variables

TypeVisibility AttributesNameInitial
integer(kind=4), private, parameter:: I4 =4
integer(kind=4), private, parameter:: R4 =4
integer(kind=4), private, parameter:: R8 =8

Enumerations

enum, bind(c)

Enumerators

enumerator:: NOTRANS = 0
enumerator:: TRANS = 1
enumerator:: CONJ = 2

enum, bind(c)

Enumerators

enumerator:: DOFACT = 0
enumerator:: SAMEPATTERN = 1
enumerator:: SAMEPATTERN_SAMEROWPERM = 2
enumerator:: FACTORED = 3

enum, bind(c)

Enumerators

enumerator:: SLU_NC = 0

column-wise, no supernode

enumerator:: SLU_NCP = 1

column-wise, column-permuted, no supernode

enumerator:: SLU_NR = 2

row-wize, no supernode

enumerator:: SLU_SC = 3

column-wise, supernode

enumerator:: SLU_SCP = 4

supernode, column-wise, permuted

enumerator:: SLU_SR = 5

row-wise, supernode

enumerator:: SLU_DN = 6

Fortran style column-wise storage for dense matrix

enumerator:: SLU_NR_loc = 7

distributed compressed row format

enum, bind(c)

Enumerators

enumerator:: SLU_S = 0

single

enumerator:: SLU_D = 1

double

enumerator:: SLU_C = 2

single complex

enumerator:: SLU_Z = 3

double complex

enum, bind(c)

Enumerators

enumerator:: SLU_GE = 0

general

enumerator:: SLU_TRLU = 1

lower triangular, unit diagonal

enumerator:: SLU_TRUU = 2

upper triangular, unit diagonal

enumerator:: SLU_TRL = 3

lower triangular

enumerator:: SLU_TRU = 4

upper triangular

enumerator:: SLU_SYL = 5

symmetric, store lower half

enumerator:: SLU_SYU = 6

symmetric, store upper half

enumerator:: SLU_HEL = 7

Hermitian, store lower half

enumerator:: SLU_HEU = 8

Hermitian, store upper half


Interfaces

interface

  • public subroutine Destroy_SuperNode_Matrix(A) bind(c, name="0")

    Arguments

    Type IntentOptional AttributesName
    type(SUPERMATRIX), intent(in) :: A

interface

  • private subroutine Destroy_SuperMatrix_Store(A) bind(c, name="0")

    Arguments

    Type IntentOptional AttributesName
    type(SUPERMATRIX), intent(in) :: A

interface

  • public subroutine Destroy_CompCol_Matrix(A) bind(c, name="0")

    Arguments

    Type IntentOptional AttributesName
    type(SUPERMATRIX), intent(in) :: A

interface

  • private subroutine Destroy_Dense_Matrix(A) bind(c, name="0")

    Arguments

    Type IntentOptional AttributesName
    type(SUPERMATRIX), intent(in) :: A

interface

  • private subroutine StatInit(stat) bind(c, name="0")

    Arguments

    Type IntentOptional AttributesName
    type(SUPERLUSTAT_T), intent(out) :: stat

interface

  • private subroutine StatFree(stat) bind(c, name="0")

    Arguments

    Type IntentOptional AttributesName
    type(SUPERLUSTAT_T), intent(in) :: stat

interface

  • private subroutine dCreate_CompCol_Matrix(A, m, n, nnz, nzval, rowind, colptr, stype, dtype, mtype) bind(c, name="0")

    Arguments

    Type IntentOptional AttributesName
    type(SUPERMATRIX), intent(out) :: A
    integer(kind=C_INT), intent(in), value:: m
    integer(kind=C_INT), intent(in), value:: n
    integer(kind=C_INT), intent(in), value:: nnz
    real(kind=C_DOUBLE), intent(in) :: nzval(*)
    integer(kind=C_INT), intent(in) :: rowind(*)
    integer(kind=C_INT), intent(in) :: colptr(*)
    integer(kind=C_INT), intent(in), value:: stype
    integer(kind=C_INT), intent(in), value:: dtype
    integer(kind=C_INT), intent(in), value:: mtype

interface

  • private subroutine dCreate_Dense_Matrix(BX, m, n, x, ldx, stype, dtype, mtype) bind(c, name="0")

    Arguments

    Type IntentOptional AttributesName
    type(SUPERMATRIX), intent(out) :: BX
    integer(kind=C_INT), intent(in), value:: m
    integer(kind=C_INT), intent(in), value:: n
    real(kind=C_DOUBLE), intent(in) :: x(*)
    integer(kind=C_INT), intent(in), value:: ldx
    integer(kind=C_INT), intent(in), value:: stype
    integer(kind=C_INT), intent(in), value:: dtype
    integer(kind=C_INT), intent(in), value:: mtype

interface

  • private subroutine set_default_options(options) bind(c, name="0")

    Arguments

    Type IntentOptional AttributesName
    type(SUPERLU_OPTIONS_T), intent(inout) :: options

interface

  • private subroutine dgssvx(options, A, perm_c, perm_r, etree, equed, R, C, L, U, work, lwork, B, X, recip_pivot_growth, rcond, ferr, berr, Glu, mem_usage, stat, info) bind(c, name="0")

    Arguments

    Type IntentOptional AttributesName
    type(SUPERLU_OPTIONS_T), intent(in) :: options
    type(SUPERMATRIX), intent(inout) :: A
    integer(kind=C_INT), intent(inout) :: perm_c(*)
    integer(kind=C_INT), intent(inout) :: perm_r(*)
    integer(kind=C_INT), intent(inout) :: etree(*)
    character(kind=C_CHAR), intent(inout) :: equed(*)
    real(kind=C_DOUBLE), intent(inout) :: R(*)
    real(kind=C_DOUBLE), intent(inout) :: C(*)
    type(SUPERMATRIX), intent(inout) :: L
    type(SUPERMATRIX), intent(inout) :: U
    type(C_PTR), intent(out) :: work
    integer(kind=C_INT), intent(in), value:: lwork
    type(SUPERMATRIX), intent(inout) :: B
    type(SUPERMATRIX), intent(out) :: X
    real(kind=C_DOUBLE), intent(out) :: recip_pivot_growth(*)
    real(kind=C_DOUBLE), intent(out) :: rcond(*)
    real(kind=C_DOUBLE), intent(out) :: ferr(*)
    real(kind=C_DOUBLE), intent(out) :: berr(*)
    type(GLOBALLU_T), intent(inout) :: Glu
    type(MEM_USAGE_T), intent(out) :: mem_usage
    type(SUPERLUSTAT_T), intent(out) :: stat
    integer(kind=C_INT), intent(out) :: info

interface

  • private subroutine StatPrint(stat) bind(c, name="0")

    Arguments

    Type IntentOptional AttributesName
    type(SUPERLUSTAT_T), intent(in) :: stat

Derived Types

type, private, bind(c) :: LU_STACK_T

Components

TypeVisibility AttributesNameInitial
integer(kind=C_INT), public :: size
integer(kind=C_INT), public :: used
integer(kind=C_INT), public :: top1
integer(kind=C_INT), public :: top2
type(C_PTR), public :: array

type, private, bind(c) :: EXPHEADER

Components

TypeVisibility AttributesNameInitial
integer(kind=C_INT), public :: size
type(C_PTR), public :: mem

type, private, bind(c) :: GLOBALLU_T

Components

TypeVisibility AttributesNameInitial
integer(kind=C_INT), public :: xsup
integer(kind=C_INT), public :: supno
integer(kind=C_INT), public :: lsub
integer(kind=C_INT), public :: xlsub
type(C_PTR), public :: lusup
integer(kind=C_INT), public :: xlusup
type(C_PTR), public :: ucol
integer(kind=C_INT), public :: usub
integer(kind=C_INT), public :: xusub
integer(kind=C_INT), public :: nzlmax
integer(kind=C_INT), public :: nzumax
integer(kind=C_INT), public :: nzlumax
integer(kind=C_INT), public :: MemModel =0
integer(kind=C_INT), public :: num_expansions
type(EXPHEADER), public :: expanders
type(LU_STACK_T), public :: stack

type, private, bind(c) :: SUPERLUSTAT_T

Components

TypeVisibility AttributesNameInitial
type(C_PTR), public :: panel_histo

histogram of panel size distribution

type(C_PTR), public :: utime

running time at various phases

type(C_PTR), public :: ops

operation count at various phases

integer(kind=C_INT), public :: TinyPivots

number of tiny pivots

integer(kind=C_INT), public :: RefineSteps

number of iterative refinement steps

integer(kind=C_INT), public :: expansions

number of memory expansions

type, private, bind(c) :: MEM_USAGE_T

Components

TypeVisibility AttributesNameInitial
real(kind=C_FLOAT), public :: for_lu
real(kind=C_FLOAT), public :: total_needed

type, private, bind(c) :: NCFORMAT

Read more…

Components

TypeVisibility AttributesNameInitial
integer(kind=C_INT), public :: nnz

number of nonzeros in the matrix

type(C_PTR), public :: nzval

pointer to array of nonzero values, packed by column

type(C_PTR), public :: rowind

pointer to array of row indices of the nonzeros

type(C_PTR), public :: colptr

pointer to array of beginning of columns in nzval[] and rowind[]

type, private, bind(c) :: SUPERMATRIX

Components

TypeVisibility AttributesNameInitial
integer(kind=C_INT), public :: Stype

Storage type: interprets the storage structure pointed to by Store

integer(kind=C_INT), public :: Dtype

Data type

integer(kind=C_INT), public :: Mtype

Matrix type: describes the mathematical property of the matrix

integer(kind=C_INT), public :: nrow

number of rows

integer(kind=C_INT), public :: ncol

number of columns

type(C_PTR), public :: Store

pointer to the actual storage of the matrix, here, pointer to NCFORMAT

type, private, bind(c) :: SUPERLU_OPTIONS_T

Read more…

Components

TypeVisibility AttributesNameInitial
integer(kind=C_INT), public :: Fact
integer(kind=C_INT), public :: Equil
integer(kind=C_INT), public :: ColPerm
integer(kind=C_INT), public :: Trans
integer(kind=C_INT), public :: IterRefine
real(kind=C_DOUBLE), public :: DiagPivotThresh
integer(kind=C_INT), public :: SymmetricMode
integer(kind=C_INT), public :: PivotGrowth
integer(kind=C_INT), public :: ConditionNumber
integer(kind=C_INT), public :: RowPerm
integer(kind=C_INT), public :: ILU_DropRule
real(kind=C_DOUBLE), public :: ILU_DropTol
real(kind=C_DOUBLE), public :: ILU_FillFactor
integer(kind=C_INT), public :: ILU_Norm
real(kind=C_DOUBLE), public :: ILU_FillTol
integer(kind=C_INT), public :: ILU_MILU
real(kind=C_DOUBLE), public :: ILU_MILU_Dim
integer(kind=C_INT), public :: ParSymbFact
integer(kind=C_INT), public :: ReplaceTinyPivot
integer(kind=C_INT), public :: SolveInitialized
integer(kind=C_INT), public :: RefineInitialized
integer(kind=C_INT), public :: PrintStat
integer(kind=C_INT), public :: nnzL

used to store nnzs for now

integer(kind=C_INT), public :: nnzU

used to store nnzs for now

integer(kind=C_INT), public :: num_lookaheads

num of levels in look-ahead

integer(kind=C_INT), public :: lookahead_etree

use etree computed from the serial symbolic factorization

integer(kind=C_INT), public :: SymPattern

symmetric factorization

type, public :: SULU_ENV

Global type for SuperLU which covers all the stuff needed

Components

TypeVisibility AttributesNameInitial
integer(kind=C_INT), public :: n

system size

integer(kind=C_INT), public :: nrhs

number of right hand sides

integer(kind=C_INT), public :: nz

number on non-zero entries

integer(kind=C_INT), public :: info

info returned by dgssvx

integer(kind=C_INT), public :: lwork

size of workspace, not used here

logical(kind=I4), public :: first

if false the system has been factorized at least once

real(kind=R8), public, dimension(:), pointer:: b

right hand side: points to b

real(kind=R8), public, allocatable, dimension(:):: x

solution

real(kind=R8), public, dimension(:), pointer:: a_elt

CC system matrix: points to a_elt

integer(kind=I4), public, dimension(:), pointer:: irow

matrix line of an a_elt element: points to irow

integer(kind=I4), public, dimension(:), pointer:: jptr

matrix column pointers: points to jptr

real(kind=C_DOUBLE), public, allocatable, dimension(:):: ferr

estimated forward error bound for each solution vector

real(kind=C_DOUBLE), public, allocatable, dimension(:):: berr

componentwise relative backward error of each solution

real(kind=C_DOUBLE), public, allocatable, dimension(:):: RR

*row scale factors for A *

real(kind=C_DOUBLE), public, allocatable, dimension(:):: CC

column scale factors for A

real(kind=C_DOUBLE), public, allocatable, dimension(:):: rpg

reciprocal pivot growth factor

real(kind=C_DOUBLE), public, allocatable, dimension(:):: rcond

estimate of the reciprocal condition number of the matrix A

integer(kind=C_INT), public, allocatable, dimension(:):: perm_c

If A->Stype = SLU_NC, Column permutation vector of size A->ncol

integer(kind=C_INT), public, allocatable, dimension(:):: perm_r

If A->Stype = SLU_NC, row permutation vector of size A->nrow

integer(kind=C_INT), public, allocatable, dimension(:):: etree

Elimination tree

character(kind=len=1,C_CHAR), public :: equed

form of equilibration

type(C_PTR), public :: work

User supplied workspace

type(SUPERLU_OPTIONS_T), public :: options

LU controls

type(SUPERMATRIX), public :: sma

Matrix A in AX=B*

type(SUPERMATRIX), public :: smb

On entry, the right hand side matrix

type(SUPERMATRIX), public :: smx

olution matrix to the original system

type(SUPERMATRIX), public :: sml

factor L from the factorization

type(SUPERMATRIX), public :: smu

factor U from the factorization

type(SUPERLUSTAT_T), public :: stat

statistics on runtime and floating-point operation count

type(GLOBALLU_T), public :: Glu

first, an output with the whole stuff LU; next, an input for other resolutions with same sparsity

type(MEM_USAGE_T), public :: mem_usage

memory usage statistics


Subroutines

public subroutine init_superlu(sulu)

Read more…

Arguments

Type IntentOptional AttributesName
type(SULU_ENV), intent(inout) :: sulu

public subroutine prep_superlu(sulu)

Read more…

Arguments

Type IntentOptional AttributesName
type(SULU_ENV), intent(inout) :: sulu

public subroutine fact_superlu(sulu, verbose)

Read more…

Arguments

Type IntentOptional AttributesName
type(SULU_ENV), intent(inout) :: sulu
logical(kind=I4), intent(in) :: verbose

public subroutine solv_superlu(sol_x, sulu, verbose)

Read more…

Arguments

Type IntentOptional AttributesName
real(kind=R8), intent(inout), dimension(:):: sol_x
type(SULU_ENV), intent(inout) :: sulu
logical(kind=I4), intent(in) :: verbose

public subroutine free_superlu()

Read more…

Arguments

None

public subroutine close_superlu(sulu)

Read more…

Arguments

Type IntentOptional AttributesName
type(SULU_ENV), intent(inout) :: sulu