csc_intern_compute.h

Functions computing operations on the CSC.

Summary
csc_intern_compute.hFunctions computing operations on the CSC.
CscNorm1Computes the norm 1 of the internal CSCd
CscbMAxComputes .
CscAxPbCompute the operation
CscBerrCompute the operation .
CscNormErrComputes the norm 2 of r and the norm 2 of b and return the quotient of these two vectors.
CscAxComputes A times p and store the result in x.
CscGradAlphaComputes the scalar product of r with z, then the scalar product of x with p and finaly store the quotient in alpha.
CscGradBetaComputes the scalar product between r and z and store the result in beta.
CscGmresBetaComputes the scalar product between r and z and store the result in beta.

CscNorm1

double CscNorm1(const CscMatrix *cscmtx,
MPI_Comm comm)

Computes the norm 1 of the internal CSCd

Norm 1 is equal to the maximum value of the sum of the Absolute values of the elements of each columns.

Parameters

cscmtxInternal CSCd to compute the norm of.
commMPI communicator.

Returns

The norm 1 of the internal CSCd.

CscbMAx

void CscbMAx(Sopalin_Data_t *sopalin_data,
int me,
volatile FLOAT *r,
const volatile FLOAT *b,
const CscMatrix *cscmtx,
const UpDownVector *updovct,
const SymbolMatrix *symbmtx,
MPI_Comm comm)

Computes .

Parameters

sopalin_dataInternal structure containing global datas used by PaStiX.
methread ID.
rwill contains
bVector .
cscmtxInternal CSCd matrix containing .
updovctUpDownVector structure containing .
symbmtxSymbol matrix.
commMPI communicator.

CscAxPb

void CscAxPb(Sopalin_Data_t *sopalin_data,
int me,
FLOAT *r,
const FLOAT *b,
const CscMatrix *cscmtx,
const UpDownVector *updovct,
const SymbolMatrix *symbmtx,
MPI_Comm comm)

Compute the operation

Parameters

sopalin_dataSopalin_Data_t structure, common to all threads.
methread number
rsolution (vector commont to all threads)
bAdded vector (vector commont to all threads)
cscmtxCompress Sparse Column matrix A
updovctx, multiplied vector
symbmtxsymbol matrix to know tho local structure of the matrix
commMPI communicator

CscBerr

void CscBerr(Sopalin_Data_t *sopalin_data,
int me,
const FLOAT *r,
const FLOAT *s,
const INT colnbr,
const INT smxnbr,
double *berr,
MPI_Comm comm)

Compute the operation .

Parameters :

sopalin_dataSopalin_Data_t structure, common to all threads.
methread number
rvector(s) (common to all threads)
svector(s) (common to all threads)
colnbrsize of the vectors
smvnbrnumber of vectors in r and s
berrberr (local variable)
commMPI communicator

CscNormErr

double CscNormErr(Sopalin_Data_t *sopalin_data,
int me,
const volatile FLOAT *r,
const volatile FLOAT *b,
const INT colnbr,
const INT smxnbr,
MPI_Comm comm)

Computes the norm 2 of r and the norm 2 of b and return the quotient of these two vectors.

This Function is multithreaded, each thread will compute a part of the norm, it will be gathered between threads, then between MPI processors.

Parameters

sopalin_dataglobal PaStix informations.
meThread ID.
rfirst vector from which the norm 2 is computed.
bsecond vector from which the norm 2 is computed.
colnbrSize of the vectors.
smxnbrNumber of vectors (multi-right-hand-side method)
commPaStiX MPI communicator.

CscAx

void CscAx(Sopalin_Data_t *sopalin_data,
int me,
const CscMatrix *cscmtx,
const volatile FLOAT *p,
volatile FLOAT *x,
const SymbolMatrix *symbmtx,
const UpDownVector *updovct,
MPI_Comm comm)

Computes A times p and store the result in x.

When compiled with SMP_RAFF, this operation is multi-threaded.

Parameters

sopalin_dataGloabl PaStiX data.
methread ID.
cscmtxInternal CSCd matrix, A.
pVector which will be multiplied by the CSCd.
xvector which will contain the computation result.
symbmtxSymbol matrix.
updovctStructure used for updown step, it contains informations about the vectors.
commMPI Communicator.

CscGradAlpha

void CscGradAlpha(Sopalin_Data_t *sopalin_data,
int me,
const volatile FLOAT *r,
const volatile FLOAT *z,
const volatile FLOAT *x,
const volatile FLOAT *p,
INT colnbr,
INT smxnbr,
double *alpha,
MPI_Comm comm)

Computes the scalar product of r with z, then the scalar product of x with p and finaly store the quotient in alpha.

Multi-threaded in SMP_RAFF mode.

Parameters

sopalin_dataGloabal PaStiX data structure.
meThread ID.
rA vector of size colnbr times smxnbr.
zA vector of size colnbr times smxnbr.
xA vector of size colnbr times smxnbr.
pA vector of size colnbr times smxnbr.
colnbrNumber of unkowns.
smxnbrNumber of right-hand-side members.
alphaFloat which will store the computation result.
commMPI communicator.

CscGradBeta

void CscGradBeta(Sopalin_Data_t *sopalin_data,
int me,
const volatile FLOAT *r,
const volatile FLOAT *z,
INT colnbr,
INT smxnbr,
double *beta,
MPI_Comm comm)

Computes the scalar product between r and z and store the result in beta.

At the end, beta is only on thread 0.

Parameters

sopalin_dataPaStiX data structure.
meThread ID.
rfirst vector of size colnbr times smxnbr.
zsecond vector of size colnbr times smxnbr.a
colnbrNumber of unknowns.
smxnbrNumber of right-hand-side members.
betaFloat which will store the solution.
commMPI communicator.

CscGmresBeta

void CscGmresBeta(Sopalin_Data_t *sopalin_data,
int me,
const volatile FLOAT *r,
const volatile FLOAT *z,
INT colnbr,
INT smxnbr,
double *beta,
MPI_Comm comm)

Computes the scalar product between r and z and store the result in beta.

Parameters

sopalin_dataPaStiX data structure.
meThread ID.
rfirst vector of size colnbr times smxnbr.
zsecond vector of size colnbr times smxnbr.a
colnbrNumber of unknowns.
smxnbrNumber of right-hand-side members.
betaFloat which will store the solution.
commMPI communicator.
double CscNorm1(const CscMatrix *cscmtx,
MPI_Comm comm)
Computes the norm 1 of the internal CSCd
void CscbMAx(Sopalin_Data_t *sopalin_data,
int me,
volatile FLOAT *r,
const volatile FLOAT *b,
const CscMatrix *cscmtx,
const UpDownVector *updovct,
const SymbolMatrix *symbmtx,
MPI_Comm comm)
Computes .
void CscAxPb(Sopalin_Data_t *sopalin_data,
int me,
FLOAT *r,
const FLOAT *b,
const CscMatrix *cscmtx,
const UpDownVector *updovct,
const SymbolMatrix *symbmtx,
MPI_Comm comm)
Compute the operation
void CscBerr(Sopalin_Data_t *sopalin_data,
int me,
const FLOAT *r,
const FLOAT *s,
const INT colnbr,
const INT smxnbr,
double *berr,
MPI_Comm comm)
Compute the operation .
double CscNormErr(Sopalin_Data_t *sopalin_data,
int me,
const volatile FLOAT *r,
const volatile FLOAT *b,
const INT colnbr,
const INT smxnbr,
MPI_Comm comm)
Computes the norm 2 of r and the norm 2 of b and return the quotient of these two vectors.
void CscAx(Sopalin_Data_t *sopalin_data,
int me,
const CscMatrix *cscmtx,
const volatile FLOAT *p,
volatile FLOAT *x,
const SymbolMatrix *symbmtx,
const UpDownVector *updovct,
MPI_Comm comm)
Computes A times p and store the result in x.
void CscGradAlpha(Sopalin_Data_t *sopalin_data,
int me,
const volatile FLOAT *r,
const volatile FLOAT *z,
const volatile FLOAT *x,
const volatile FLOAT *p,
INT colnbr,
INT smxnbr,
double *alpha,
MPI_Comm comm)
Computes the scalar product of r with z, then the scalar product of x with p and finaly store the quotient in alpha.
void CscGradBeta(Sopalin_Data_t *sopalin_data,
int me,
const volatile FLOAT *r,
const volatile FLOAT *z,
INT colnbr,
INT smxnbr,
double *beta,
MPI_Comm comm)
Computes the scalar product between r and z and store the result in beta.
void CscGmresBeta(Sopalin_Data_t *sopalin_data,
int me,
const volatile FLOAT *r,
const volatile FLOAT *z,
INT colnbr,
INT smxnbr,
double *beta,
MPI_Comm comm)
Computes the scalar product between r and z and store the result in beta.
Close