read_matrix.h

Definition of a global function to read all type of matrices.

Summary
read_matrix.hDefinition of a global function to read all type of matrices.
Enumerations
driver_type_enum
Types
driver_type_t
read_matrixReads a matrix from a file in the format given by driver_type (see driver_type_enum).
s_read_matrix
d_read_matrix
c_read_matrix
z_read_matrix
dread_matrixReads a matrix from a file in the format given by driver_type (see driver_type_enum) and distribute the matrix on the MPI processors.
s_dread_matrix
d_dread_matrix
c_dread_matrix
z_dread_matrix
comparcoupleCompares 2 couples (i,j).
s_comparcouple
d_comparcouple
c_comparcouple
z_comparcouple
checkStrucSymCheck if unsymmetric matrix has a symmetric pattern, if not correct it.
s_checkStrucSym
d_checkStrucSym
c_checkStrucSym
z_checkStrucSym

Enumerations

driver_type_enum

enum driver_type_enum
RSArsa file format.
CHBchb file format.
CCCccc file format.
RCCrcc file format.
OLAFolaf file format.
PEERpeer file format.
HBHarwell-boeing file format.
THREEFILESIJV file format with one file for each element of the triple.
MMMatrix Market file format.
CSCDCSCd file format.
LAPLACIANGenerating laplacian.
FDUPBinary matrix driver from Fabrice dupros.

Types

driver_type_t

read_matrix

int read_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **row,
pastix_float_t **values,
pastix_float_t **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)

Reads a matrix from a file in the format given by driver_type (see driver_type_enum).

Parameters

filenameName of the file to read from.
ncolNumber of column in the matrix (output).
colptrIndexes in row and avals of first element of each column of the matrix.(output)
rowRow of each element of the matrix.
valuesValues of each element of the matrix.
typetype of the matrix.
rhstypetype of the right and side.
driver_typedriver to use to read the matrix.
pastix_commMPI communicator containing all processes wich call read_matrix.

s_read_matrix

int s_read_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **row,
float **values,
float **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)

d_read_matrix

int d_read_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **row,
double **values,
double **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)

c_read_matrix

int c_read_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **row,
float complex **values,
float complex **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)

z_read_matrix

int z_read_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **row,
double complex **values,
double complex **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)

dread_matrix

int dread_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **rows,
pastix_int_t **loc2glob,
pastix_float_t **values,
pastix_float_t **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)

Reads a matrix from a file in the format given by driver_type (see driver_type_enum) and distribute the matrix on the MPI processors.

Parameters

filenameName of the file to read from.
ncolNumber of column in the matrix (output).
colptrIndexes in rows and avals of first element of each column of the matrix.(output)
rowsRow of each element of the matrix.
valuesValues of each element of the matrix.
typetype of the matrix.
rhstypetype of the right and side.
driver_typedriver to use to read the matrix.
pastix_commMPI communicator containing all processes wich call read_matrix.

s_dread_matrix

int s_dread_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **rows,
pastix_int_t **loc2glob,
float **values,
float **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)

d_dread_matrix

int d_dread_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **rows,
pastix_int_t **loc2glob,
double **values,
double **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)

c_dread_matrix

int c_dread_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **rows,
pastix_int_t **loc2glob,
float complex **values,
float complex **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)

z_dread_matrix

int z_dread_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **rows,
pastix_int_t **loc2glob,
double complex **values,
double complex **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)

comparcouple

int comparcouple(const void *a,
const void *b)

Compares 2 couples (i,j).

Parameters

aone couple
bone other couple

Returns

-1if a_i < b_i
1if a_i > b_i
-1if a_i = b_i and a_j < b_j
1else

s_comparcouple

int s_comparcouple(const void *a,
const void *b)

d_comparcouple

int d_comparcouple(const void *a,
const void *b)

c_comparcouple

int c_comparcouple(const void *a,
const void *b)

z_comparcouple

int z_comparcouple(const void *a,
const void *b)

checkStrucSym

void checkStrucSym(pastix_int_t n,
pastix_int_t *nz,
pastix_int_t **colptr,
pastix_int_t **row,
pastix_float_t **avals)

Check if unsymmetric matrix has a symmetric pattern, if not correct it.

Parameters

nsize of the matrix
nznumber of elements
colptrIndex of first element of each column in row and avals
rowrow of each element
avalsvalue of each element

s_checkStrucSym

void s_checkStrucSym(pastix_int_t n,
pastix_int_t *nz,
pastix_int_t **colptr,
pastix_int_t **row,
float **avals)

d_checkStrucSym

void d_checkStrucSym(pastix_int_t n,
pastix_int_t *nz,
pastix_int_t **colptr,
pastix_int_t **row,
double **avals)

c_checkStrucSym

void c_checkStrucSym(pastix_int_t n,
pastix_int_t *nz,
pastix_int_t **colptr,
pastix_int_t **row,
float complex **avals)

z_checkStrucSym

void z_checkStrucSym(pastix_int_t n,
pastix_int_t *nz,
pastix_int_t **colptr,
pastix_int_t **row,
double complex **avals)
enum driver_type_enum
int read_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **row,
pastix_float_t **values,
pastix_float_t **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)
Reads a matrix from a file in the format given by driver_type (see driver_type_enum).
int s_read_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **row,
float **values,
float **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)
int d_read_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **row,
double **values,
double **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)
int c_read_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **row,
float complex **values,
float complex **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)
int z_read_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **row,
double complex **values,
double complex **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)
int dread_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **rows,
pastix_int_t **loc2glob,
pastix_float_t **values,
pastix_float_t **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)
Reads a matrix from a file in the format given by driver_type (see driver_type_enum) and distribute the matrix on the MPI processors.
int s_dread_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **rows,
pastix_int_t **loc2glob,
float **values,
float **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)
int d_dread_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **rows,
pastix_int_t **loc2glob,
double **values,
double **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)
int c_dread_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **rows,
pastix_int_t **loc2glob,
float complex **values,
float complex **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)
int z_dread_matrix(char *filename,
pastix_int_t *ncol,
pastix_int_t **colptr,
pastix_int_t **rows,
pastix_int_t **loc2glob,
double complex **values,
double complex **rhs,
char **type,
char **rhstype,
driver_type_t driver_type,
MPI_Comm pastix_comm)
int comparcouple(const void *a,
const void *b)
Compares 2 couples (i,j).
int s_comparcouple(const void *a,
const void *b)
int d_comparcouple(const void *a,
const void *b)
int c_comparcouple(const void *a,
const void *b)
int z_comparcouple(const void *a,
const void *b)
void checkStrucSym(pastix_int_t n,
pastix_int_t *nz,
pastix_int_t **colptr,
pastix_int_t **row,
pastix_float_t **avals)
Check if unsymmetric matrix has a symmetric pattern, if not correct it.
void s_checkStrucSym(pastix_int_t n,
pastix_int_t *nz,
pastix_int_t **colptr,
pastix_int_t **row,
float **avals)
void d_checkStrucSym(pastix_int_t n,
pastix_int_t *nz,
pastix_int_t **colptr,
pastix_int_t **row,
double **avals)
void c_checkStrucSym(pastix_int_t n,
pastix_int_t *nz,
pastix_int_t **colptr,
pastix_int_t **row,
float complex **avals)
void z_checkStrucSym(pastix_int_t n,
pastix_int_t *nz,
pastix_int_t **colptr,
pastix_int_t **row,
double complex **avals)
Close