utils.f90

Utilities for Fortran exemple Print usage (see usage) Get option from commant line (see get_option) Reads the matrix (see read_matrix)

Summary
utils.f90Utilities for Fortran exemple Print usage (see usage) Get option from commant line (see get_option) Reads the matrix (see read_matrix)
usagePrints usage
get_optionGets options from command line
read_matrixreads the matrix, only RSA supported yet.
read_rsaReads a matrix in RSA format
read_rsa_headerReads a matrix header in RSA format

usage

Subroutine usage()

Prints usage

get_option

Subroutine get_option(driver_num,
filename,
nbthread,
verbose,
matsize)

Gets options from command line

Parameters

driver_numinteger giving driver to use to read the matrix
filenamePath to the file to read
nbthreadNumber of threads in PaStiX
verboseVerbose mode 1, 2 or 3
matsizesize of the matrix wanted

read_matrix

Subroutine read_matrix(driver_type,
filename,
n,
ia,
ja,
val,
rhs,
type,
rhstype,
pastix_comm,
ierr)

reads the matrix, only RSA supported yet.

(see <read_rsa>)

Parameters

driver_typeinteger corresponding to driver to use to read the matrix
filenamePath to the file to read
nsize of the matrix
iaIndex of first element of each column in ja and vals
jaColumn of each element of the matrix.
valValue of each element of the matrix.
rhsright-hand-side member
typetype of the matrix
rhstypetype of the right-hand-side member
pastix_commMPI communicator
ierrreturn value

read_rsa

Subroutine read_rsa(filename,
n,
nnzero,
ia,
ja,
val,
type,
rhstype,
ierr)

Reads a matrix in RSA format

Parameters

filenamePath to the file to read from.
nSize of the matrix
nnzeroNumber of non zeros
iaIndex of first element of each column in ja and vals
jaColumn of each element of the matrix.
valValue of each element of the matrix.
rhsright-hand-side member
typetype of the matrix
rhstypetype of the right-hand-side member
ierrreturn value

read_rsa_header

Subroutine read_rsa_header(filename,
nrow,
ncol,
nnzero,
type,
rhstype,
ierr)

Reads a matrix header in RSA format

Parameters

filenamePath to the file to read from.
nrowNumber of rows
ncolNumber of columns
nnzeroNumber of non zeros
typetype of the matrix
rhstypetype of the right-hand-side member
ierrreturn value
Subroutine usage()
Prints usage
Subroutine get_option(driver_num,
filename,
nbthread,
verbose,
matsize)
Gets options from command line
Subroutine read_matrix(driver_type,
filename,
n,
ia,
ja,
val,
rhs,
type,
rhstype,
pastix_comm,
ierr)
reads the matrix, only RSA supported yet.
Subroutine read_rsa(filename,
n,
nnzero,
ia,
ja,
val,
type,
rhstype,
ierr)
Reads a matrix in RSA format
Subroutine read_rsa_header(filename,
nrow,
ncol,
nnzero,
type,
rhstype,
ierr)
Reads a matrix header in RSA format
Close