sulu_wrapper Module


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

Variables

Type Visibility Attributes Name Initial
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_CompCol_Matrix(A) bind(c, name="Destroy_CompCol_Matrix")

    Arguments

    Type IntentOptional Attributes Name
    type(SUPERMATRIX), intent(in) :: A

interface

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

    Arguments

    Type IntentOptional Attributes Name
    type(SUPERMATRIX), intent(in) :: A

interface

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

    Arguments

    Type IntentOptional Attributes Name
    type(SUPERMATRIX), intent(in) :: A

interface

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

    Arguments

    Type IntentOptional Attributes Name
    type(SUPERMATRIX), intent(in) :: A

interface

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

    Arguments

    Type IntentOptional Attributes Name
    type(SUPERLUSTAT_T), intent(in) :: stat

interface

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

    Arguments

    Type IntentOptional Attributes Name
    type(SUPERLUSTAT_T), intent(out) :: stat

interface

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

    Arguments

    Type IntentOptional Attributes Name
    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="dCreate_CompCol_Matrix")

    Arguments

    Type IntentOptional Attributes Name
    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='dCreate_Dense_Matrix')

    Arguments

    Type IntentOptional Attributes Name
    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 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='dgssvx')

    Arguments

    Type IntentOptional Attributes Name
    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, len=1), 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 set_default_options(options) bind(c, name='set_default_options')

    Arguments

    Type IntentOptional Attributes Name
    type(SUPERLU_OPTIONS_T), intent(inout) :: options

Derived Types

type, private, bind(c) ::  EXPHEADER

Components

Type Visibility Attributes Name Initial
type(C_PTR), public :: mem
integer(kind=C_INT), public :: size

type, private, bind(c) ::  GLOBALLU_T

Components

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

type, private, bind(c) ::  LU_STACK_T

Components

Type Visibility Attributes Name Initial
type(C_PTR), public :: array
integer(kind=C_INT), public :: size
integer(kind=C_INT), public :: top1
integer(kind=C_INT), public :: top2
integer(kind=C_INT), public :: used

type, private, bind(c) ::  MEM_USAGE_T

Components

Type Visibility Attributes Name Initial
real(kind=C_FLOAT), public :: for_lu
real(kind=C_FLOAT), public :: total_needed

type, private, bind(c) ::  NCFORMAT

Read more…

Components

Type Visibility Attributes Name Initial
type(C_PTR), public :: colptr

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

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, public ::  SULU_ENV

Global type for SuperLU which covers all the stuff needed

Components

Type Visibility Attributes Name Initial
real(kind=C_DOUBLE), public, allocatable, dimension(:) :: CC

column scale factors for A

type(GLOBALLU_T), public :: Glu

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

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

*row scale factors for A *

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

CC system matrix: points to a_elt

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

right hand side: points to b

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

componentwise relative backward error of each solution

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

form of equilibration

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

Elimination tree

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

estimated forward error bound for each solution vector

logical(kind=I4), public :: first

if false the system has been factorized at least once

integer(kind=C_INT), public :: info

info returned by dgssvx

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

integer(kind=C_INT), public :: lwork

size of workspace, not used here

type(MEM_USAGE_T), public :: mem_usage

memory usage statistics

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

type(SUPERLU_OPTIONS_T), public :: options

LU controls

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

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

estimate of the reciprocal condition number of the matrix A

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

reciprocal pivot growth factor

type(SUPERMATRIX), public :: sma

Matrix A in AX=B*

type(SUPERMATRIX), public :: smb

On entry, the right hand side matrix

type(SUPERMATRIX), public :: sml

factor L from the factorization

type(SUPERMATRIX), public :: smu

factor U from the factorization

type(SUPERMATRIX), public :: smx

olution matrix to the original system

type(SUPERLUSTAT_T), public :: stat

statistics on runtime and floating-point operation count

type(C_PTR), public :: work

User supplied workspace

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

solution

type, private, bind(c) ::  SUPERLUSTAT_T

Components

Type Visibility Attributes Name Initial
integer(kind=C_INT), public :: RefineSteps

number of iterative refinement steps

integer(kind=C_INT), public :: TinyPivots

number of tiny pivots

integer(kind=C_INT), public :: expansions

number of memory expansions

type(C_PTR), public :: ops

operation count at various phases

type(C_PTR), public :: panel_histo

histogram of panel size distribution

type(C_PTR), public :: utime

running time at various phases

type, private, bind(c) ::  SUPERLU_OPTIONS_T

Read more…

Components

Type Visibility Attributes Name Initial
integer(kind=C_INT), public :: ColPerm
integer(kind=C_INT), public :: ConditionNumber
real(kind=C_DOUBLE), public :: DiagPivotThresh
integer(kind=C_INT), public :: Equil
integer(kind=C_INT), public :: Fact
integer(kind=C_INT), public :: ILU_DropRule
real(kind=C_DOUBLE), public :: ILU_DropTol
real(kind=C_DOUBLE), public :: ILU_FillFactor
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 :: ILU_Norm
integer(kind=C_INT), public :: IterRefine
integer(kind=C_INT), public :: ParSymbFact
integer(kind=C_INT), public :: PivotGrowth
integer(kind=C_INT), public :: PrintStat
integer(kind=C_INT), public :: RefineInitialized
integer(kind=C_INT), public :: ReplaceTinyPivot
integer(kind=C_INT), public :: RowPerm
integer(kind=C_INT), public :: SolveInitialized
integer(kind=C_INT), public :: SymPattern

symmetric factorization

integer(kind=C_INT), public :: SymmetricMode
integer(kind=C_INT), public :: Trans
integer(kind=C_INT), public :: lookahead_etree

use etree computed from the serial symbolic factorization

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

type, private, bind(c) ::  SUPERMATRIX

Components

Type Visibility Attributes Name Initial
integer(kind=C_INT), public :: Dtype

Data type

integer(kind=C_INT), public :: Mtype

Matrix type: describes the mathematical property of the matrix

type(C_PTR), public :: Store

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

integer(kind=C_INT), public :: Stype

Storage type: interprets the storage structure pointed to by Store

integer(kind=C_INT), public :: ncol

number of columns

integer(kind=C_INT), public :: nrow

number of rows


Subroutines

public subroutine close_superlu(sulu)

Subroutine to close the SuperLU process, with memory release

Arguments

Type IntentOptional Attributes Name
type(SULU_ENV), intent(inout) :: sulu

public subroutine fact_superlu(sulu, verbose)

Subroutine to factorize the system

Read more…

Arguments

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

public subroutine free_superlu()

Subroutine that actually does nothing yet. Maybe, there will be extra memory that could be released here?

Arguments

None

public subroutine init_superlu(sulu)

Read more…

Arguments

Type IntentOptional Attributes Name
type(SULU_ENV), intent(inout) :: sulu

public subroutine prep_superlu(sulu)

Subroutine to prepare the SULU_ENV components

Arguments

Type IntentOptional Attributes Name
type(SULU_ENV), intent(inout) :: sulu

public subroutine solv_superlu(sol_x, sulu, verbose)

Subroutine to solve the system

Read more…

Arguments

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