PaStiX Handbook  6.4.0
Solver matrix coefficient structure

Typedefs

typedef void(* coeftab_fct_memory_t) (const SolverMatrix *, const pastix_int_t *, pastix_fixdbl_t *)
 Type of the memory gain functions.
 

Functions

void coeftabInit (pastix_data_t *pastix_data, pastix_coefside_t side)
 Initialize the solver matrix structure. More...
 
void coeftabExit (SolverMatrix *solvmtx)
 Free the solver matrix structure. More...
 
pastix_int_t coeftabCompress (pastix_data_t *pastix_data)
 Compress the factorized matrix structure if not already done. More...
 
void coeftabComputeCblkILULevels (const SolverMatrix *solvmtx, SolverCblk *cblk)
 Compute the ILU levels of a cblk. More...
 

Variables

coeftab_fct_memory_t coeftabMemory [4]
 List of functions to compute the memory gain in low-rank per precision.
 

PastixComplex64 compression/uncompression routines

pastix_int_t coeftab_zcompress (SolverMatrix *solvmtx)
 Compress all the cblks marked as valid for low-rank format. More...
 
void coeftab_zuncompress (SolverMatrix *solvmtx)
 Uncompress all column block in low-rank format into full-rank format. More...
 
void coeftab_zmemory (const SolverMatrix *solvmtx, const pastix_int_t *iparm, pastix_fixdbl_t *dparm)
 Compute the memory usage for the entire matrix. More...
 

PastixComplex64 Extraction routines

void coeftab_zgetschur (const SolverMatrix *solvmtx, pastix_complex64_t *S, pastix_int_t lds)
 Extract the Schur complement. More...
 
void coeftab_zgetdiag (const SolverMatrix *solvmtx, pastix_complex64_t *D, pastix_int_t incD)
 Extract the diagonal. More...
 

PastixComplex64 debug routines

void coeftab_zdump (pastix_data_t *pastix_data, const SolverMatrix *solvmtx, const char *filename)
 Dump the solver matrix coefficients into a file in human readable format. More...
 
void cpucblk_zdumpfile (pastix_coefside_t side, SolverCblk *cblk, pastix_int_t itercblk, const char *directory)
 Dump a single column block into a FILE in a human readale format. More...
 
int coeftab_zdiff (pastix_coefside_t side, const SolverMatrix *solvA, SolverMatrix *solvB)
 Compare two solver matrices in full-rank format with the same data distribution. More...
 

PastixComplex32 compression/uncompression routines

pastix_int_t coeftab_ccompress (SolverMatrix *solvmtx)
 Compress all the cblks marked as valid for low-rank format. More...
 
void coeftab_cuncompress (SolverMatrix *solvmtx)
 Uncompress all column block in low-rank format into full-rank format. More...
 
void coeftab_cmemory (const SolverMatrix *solvmtx, const pastix_int_t *iparm, pastix_fixdbl_t *dparm)
 Compute the memory usage for the entire matrix. More...
 

PastixComplex32 Extraction routines

void coeftab_cgetschur (const SolverMatrix *solvmtx, pastix_complex32_t *S, pastix_int_t lds)
 Extract the Schur complement. More...
 
void coeftab_cgetdiag (const SolverMatrix *solvmtx, pastix_complex32_t *D, pastix_int_t incD)
 Extract the diagonal. More...
 

PastixComplex32 debug routines

void coeftab_cdump (pastix_data_t *pastix_data, const SolverMatrix *solvmtx, const char *filename)
 Dump the solver matrix coefficients into a file in human readable format. More...
 
void cpucblk_cdumpfile (pastix_coefside_t side, SolverCblk *cblk, pastix_int_t itercblk, const char *directory)
 Dump a single column block into a FILE in a human readale format. More...
 
int coeftab_cdiff (pastix_coefside_t side, const SolverMatrix *solvA, SolverMatrix *solvB)
 Compare two solver matrices in full-rank format with the same data distribution. More...
 

PastixDouble compression/uncompression routines

pastix_int_t coeftab_dcompress (SolverMatrix *solvmtx)
 Compress all the cblks marked as valid for low-rank format. More...
 
void coeftab_duncompress (SolverMatrix *solvmtx)
 Uncompress all column block in low-rank format into full-rank format. More...
 
void coeftab_dmemory (const SolverMatrix *solvmtx, const pastix_int_t *iparm, pastix_fixdbl_t *dparm)
 Compute the memory usage for the entire matrix. More...
 

PastixDouble Extraction routines

void coeftab_dgetschur (const SolverMatrix *solvmtx, double *S, pastix_int_t lds)
 Extract the Schur complement. More...
 
void coeftab_dgetdiag (const SolverMatrix *solvmtx, double *D, pastix_int_t incD)
 Extract the diagonal. More...
 

PastixDouble debug routines

void coeftab_ddump (pastix_data_t *pastix_data, const SolverMatrix *solvmtx, const char *filename)
 Dump the solver matrix coefficients into a file in human readable format. More...
 
void cpucblk_ddumpfile (pastix_coefside_t side, SolverCblk *cblk, pastix_int_t itercblk, const char *directory)
 Dump a single column block into a FILE in a human readale format. More...
 
int coeftab_ddiff (pastix_coefside_t side, const SolverMatrix *solvA, SolverMatrix *solvB)
 Compare two solver matrices in full-rank format with the same data distribution. More...
 

PastixFloat compression/uncompression routines

pastix_int_t coeftab_scompress (SolverMatrix *solvmtx)
 Compress all the cblks marked as valid for low-rank format. More...
 
void coeftab_suncompress (SolverMatrix *solvmtx)
 Uncompress all column block in low-rank format into full-rank format. More...
 
void coeftab_smemory (const SolverMatrix *solvmtx, const pastix_int_t *iparm, pastix_fixdbl_t *dparm)
 Compute the memory usage for the entire matrix. More...
 

PastixFloat Extraction routines

void coeftab_sgetschur (const SolverMatrix *solvmtx, float *S, pastix_int_t lds)
 Extract the Schur complement. More...
 
void coeftab_sgetdiag (const SolverMatrix *solvmtx, float *D, pastix_int_t incD)
 Extract the diagonal. More...
 

PastixFloat debug routines

void coeftab_sdump (pastix_data_t *pastix_data, const SolverMatrix *solvmtx, const char *filename)
 Dump the solver matrix coefficients into a file in human readable format. More...
 
void cpucblk_sdumpfile (pastix_coefside_t side, SolverCblk *cblk, pastix_int_t itercblk, const char *directory)
 Dump a single column block into a FILE in a human readale format. More...
 
int coeftab_sdiff (pastix_coefside_t side, const SolverMatrix *solvA, SolverMatrix *solvB)
 Compare two solver matrices in full-rank format with the same data distribution. More...
 

Detailed Description

This group collects all the functions that operate on the full matrix and which are not factorization/solve routines.

Function Documentation

◆ coeftabInit()

void coeftabInit ( pastix_data_t pastix_data,
pastix_coefside_t  side 
)

Initialize the solver matrix structure.

This routine is a parallel routine to initialize the solver matrix structure through the internal static scheduler

Parameters
[in,out]pastix_dataThe pastix_data structure that hold the solver matrix to initialize.
[in]sideDescribe the side(s) of the matrix that must be initialized.
  • PastixLCoef if lower part only
  • PastixUCoef if upper part only
  • PastixLUCoef if both sides.

Definition at line 205 of file coeftab.c.

References pastix_data_s::bcsc, solver_matrix_s::bloknbr, solver_matrix_s::bloktab, solver_cblk_s::brownum, solver_matrix_s::cblknbr, solver_matrix_s::cblktab, coeftabAlloc(), solver_cblk_s::ctrbcnt, pastix_data_s::dir_local, solver_matrix_s::globalalloc, solver_blok_s::iluklvl, pastix_data_s::iparm, IPARM_COMPRESS_WHEN, IPARM_GLOBAL_ALLOCATION, IPARM_MIXED, pastix_data_s::isched, pastix_gendirectories(), pastix_int_t, PastixCompressNever, pcoeftabInit(), and pastix_data_s::solvmatr.

Referenced by pastix_subtask_bcsc2ctab().

◆ coeftabExit()

void coeftabExit ( SolverMatrix solvmtx)

Free the solver matrix structure.

This routine free all data structure refereing to the solver matrix L, even the runtime descriptors if present.

Parameters
[in,out]solvmtxThe solver matrix structure of the problem.

Definition at line 268 of file coeftab.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, cpucblk_zfree(), solver_matrix_s::globalalloc, solver_cblk_s::lcoeftab, parsec_sparse_matrix_destroy(), pastix_int_t, PastixLUCoef, starpu_sparse_matrix_destroy(), and solver_cblk_s::ucoeftab.

Referenced by pastix_subtask_bcsc2ctab(), and solverExit().

◆ coeftabCompress()

pastix_int_t coeftabCompress ( pastix_data_t pastix_data)

Compress the factorized matrix structure if not already done.

This routine compress all column blocks that are marked for compression, and return the amount of memory saved by the compression.

Parameters
[in,out]pastix_dataThe pastix_data structure that holds the problem
Returns
The memory gain resulting from the compression to low-rank format in number of elements.

Definition at line 417 of file coeftab.c.

References pastix_data_s::bcsc, pastix_data_s::dparm, DPARM_COMPRESS_TOLERANCE, solver_matrix_s::flttype, pastix_data_s::iparm, IPARM_COMPRESS_METHOD, IPARM_COMPRESS_MIN_HEIGHT, IPARM_COMPRESS_MIN_WIDTH, pastix_data_s::isched, solver_matrix_s::lowrank, pcoeftabComp(), and pastix_data_s::solvmatr.

◆ coeftabComputeCblkILULevels()

void coeftabComputeCblkILULevels ( const SolverMatrix solvmtx,
SolverCblk cblk 
)

Compute the ILU levels of a cblk.

Parameters
[in]solvmtxThe solver matrix data structure.
[in]cblkThe column block to compute the ILU levels of.

Definition at line 454 of file coeftab.c.

References solver_matrix_s::cblktab, solver_cblk_s::ctrbcnt, solver_cblk_s::fblokptr, solver_blok_s::fcblknm, solver_blok_s::iluklvl, and is_block_inside_fblock().

Referenced by cpucblk_cinit(), cpucblk_dinit(), cpucblk_dsinit(), cpucblk_sinit(), cpucblk_zcinit(), and cpucblk_zinit().

◆ coeftab_zcompress()

pastix_int_t coeftab_zcompress ( SolverMatrix solvmtx)

Compress all the cblks marked as valid for low-rank format.

All the cblk in the top levels of the elimination tree marked as candidates for compression are compressed if there is a gain to compress them. The compression to low-rank format is parameterized by the input information stored in the lowrank structure. On exit, all the cblks marked for compression are stored through the low-rank structure, even if they are kept in their full-rank form.

Remarks
This routine is sequential
Parameters
[in,out]solvmtxThe solver matrix of the problem to compress.
Returns
The memory gain resulting from the compression to low-rank format in Bytes.

Definition at line 243 of file coeftab_z.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, pastix_lr_s::compress_preselect, cpucblk_zcompress(), solver_matrix_s::factotype, pastix_lr_s::ilu_lvl, solver_matrix_s::lowrank, pastix_int_t, PastixFactLU, PastixLCoef, and PastixLUCoef.

◆ coeftab_zuncompress()

void coeftab_zuncompress ( SolverMatrix solvmtx)

Uncompress all column block in low-rank format into full-rank format.

Parameters
[in,out]solvmtxThe solver matrix of the problem.

Definition at line 272 of file coeftab_z.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, cpucblk_zuncompress(), solver_matrix_s::factotype, pastix_int_t, PastixFactLU, PastixLCoef, and PastixLUCoef.

◆ coeftab_zmemory()

void coeftab_zmemory ( const SolverMatrix solvmtx,
const pastix_int_t iparm,
pastix_fixdbl_t dparm 
)

Compute the memory usage for the entire matrix.

This functions computes the memory usage and gain if the matrix is compressed

Parameters
[in]solvmtxThe solver matrix of the problem.
[in]iparmThe integer parameter array. Uses IPARM_COMPRESS_WHEN, IPARM_VERBOSE
[in,out]dparmThe double parameter array which is going to be updated. Update DPARM_MEM_FR and DPARM_MEM_LR.

Definition at line 573 of file coeftab_z.c.

References coeftab_zmemory_fr(), coeftab_zmemory_lr(), IPARM_COMPRESS_WHEN, and PastixCompressNever.

◆ coeftab_zgetschur()

void coeftab_zgetschur ( const SolverMatrix solvmtx,
pastix_complex64_t *  S,
pastix_int_t  lds 
)

Extract the Schur complement.

This routine is sequential and returns the full Schur complement uncommpressed in Lapack format.

Parameters
[in]solvmtxThe solver matrix structure describing the problem.
[in,out]SThe pointer to the allocated matrix array that will store the Schur complement.
[in]ldsThe leading dimension of the S array.

Definition at line 607 of file coeftab_z.c.

References solver_matrix_s::cblkschur, solver_matrix_s::cblktab, solver_cblk_s::cblktype, cpucblk_zgetschur(), solver_matrix_s::factotype, solver_cblk_s::fcolnum, solver_matrix_s::nodenbr, pastix_int_t, PastixFactLU, and solver_cblk_s::stride.

Referenced by pastixGetSchur().

◆ coeftab_zgetdiag()

void coeftab_zgetdiag ( const SolverMatrix solvmtx,
pastix_complex64_t *  D,
pastix_int_t  incD 
)

Extract the diagonal.

This routine is sequential and returns the full diagonal in the vector D, such that: D[incD*i]= A(i, i)

Parameters
[in]solvmtxThe solver matrix structure describing the problem.
[in,out]DThe pointer to the allocated vector array that will store the diagonal. D must be of size solvmtx->nodenbr * incD.
[in]incDThe increment bewteen two elements of D. incD > 0.

Definition at line 659 of file coeftab_z.c.

References cblk_colnbr(), solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, solver_cblk_s::fblokptr, solver_cblk_s::lcoeftab, solver_blok_s::LRblock, pastix_int_t, pastix_lrblock_s::rk, solver_cblk_s::stride, and pastix_lrblock_s::u.

Referenced by pastixGetDiag().

◆ coeftab_zdump()

void coeftab_zdump ( pastix_data_t pastix_data,
const SolverMatrix solvmtx,
const char *  prefix 
)

Dump the solver matrix coefficients into a file in human readable format.

All non-zeroes coefficients are dumped in the format: i j val with one value per row.

Parameters
[in,out]pastix_dataThe pastix_data instance to access the unique directory id in which output the files.
[in]solvmtxThe solver matrix to print.
[in]prefixThe filename where to store the output matrix.

Definition at line 55 of file coeftab_z.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, cpucblk_zdump(), pastix_data_s::dir_global, solver_cblk_s::gcblknum, solver_cblk_s::ownerid, pastix_fopenw(), pastix_gendirectories(), pastix_int_t, PastixLCoef, PastixUCoef, and solver_cblk_s::ucoeftab.

◆ cpucblk_zdumpfile()

void cpucblk_zdumpfile ( pastix_coefside_t  side,
SolverCblk cblk,
pastix_int_t  itercblk,
const char *  directory 
)

Dump a single column block into a FILE in a human readale format.

All non-zeroes coefficients are dumped in the format: i j val with one value per row.

The filename is as follows : {L, U}cblk{Index of the cblk}_init.txt

Parameters
[in]sideDefine which side of the matrix must be initialized.
  • PastixLCoef if lower part only
  • PastixUCoef if upper part only
  • PastixLUCoef if both sides.
[in]cblkThe column block to dump into the file.
[in]itercblkThe index of the cblk to dump
[in,out]directoryThe pointer to the temporary directory where to store the output files.

Definition at line 125 of file coeftab_z.c.

References cpucblk_zdump(), pastix_fopenw(), PastixLCoef, and PastixUCoef.

Referenced by cpucblk_zinit().

◆ coeftab_zdiff()

int coeftab_zdiff ( pastix_coefside_t  side,
const SolverMatrix solvA,
SolverMatrix solvB 
)

Compare two solver matrices in full-rank format with the same data distribution.

The second solver matrix is overwritten by the difference of the two matrices. The frobenius norm of the difference of each column block is computed and the functions returns 0 if the result for all the column blocks of: || B_k - A_k || / ( || A_k || * eps )

is below 10. Otherwise, an error message is printed and 1 is returned.

Parameters
[in]sideDefine which side of the cblk must be tested.
  • PastixLCoef if lower part only
  • PastixUCoef if upper part only
  • PastixLUCoef if both sides.
[in]solvAThe solver matrix A.
[in,out]solvBThe solver matrix B. On exit, B coefficient arrays are overwritten by the result of (B-A).
Returns
0 if the test is passed, >= 0 otherwise.

Definition at line 196 of file coeftab_z.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, cpucblk_zdiff(), and pastix_int_t.

◆ coeftab_ccompress()

pastix_int_t coeftab_ccompress ( SolverMatrix solvmtx)

Compress all the cblks marked as valid for low-rank format.

All the cblk in the top levels of the elimination tree marked as candidates for compression are compressed if there is a gain to compress them. The compression to low-rank format is parameterized by the input information stored in the lowrank structure. On exit, all the cblks marked for compression are stored through the low-rank structure, even if they are kept in their full-rank form.

Remarks
This routine is sequential
Parameters
[in,out]solvmtxThe solver matrix of the problem to compress.
Returns
The memory gain resulting from the compression to low-rank format in Bytes.

Definition at line 243 of file coeftab_c.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, pastix_lr_s::compress_preselect, cpucblk_ccompress(), solver_matrix_s::factotype, pastix_lr_s::ilu_lvl, solver_matrix_s::lowrank, pastix_int_t, PastixFactLU, PastixLCoef, and PastixLUCoef.

◆ coeftab_cuncompress()

void coeftab_cuncompress ( SolverMatrix solvmtx)

Uncompress all column block in low-rank format into full-rank format.

Parameters
[in,out]solvmtxThe solver matrix of the problem.

Definition at line 272 of file coeftab_c.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, cpucblk_cuncompress(), solver_matrix_s::factotype, pastix_int_t, PastixFactLU, PastixLCoef, and PastixLUCoef.

◆ coeftab_cmemory()

void coeftab_cmemory ( const SolverMatrix solvmtx,
const pastix_int_t iparm,
pastix_fixdbl_t dparm 
)

Compute the memory usage for the entire matrix.

This functions computes the memory usage and gain if the matrix is compressed

Parameters
[in]solvmtxThe solver matrix of the problem.
[in]iparmThe integer parameter array. Uses IPARM_COMPRESS_WHEN, IPARM_VERBOSE
[in,out]dparmThe float parameter array which is going to be updated. Update DPARM_MEM_FR and DPARM_MEM_LR.

Definition at line 573 of file coeftab_c.c.

References coeftab_cmemory_fr(), coeftab_cmemory_lr(), IPARM_COMPRESS_WHEN, and PastixCompressNever.

◆ coeftab_cgetschur()

void coeftab_cgetschur ( const SolverMatrix solvmtx,
pastix_complex32_t S,
pastix_int_t  lds 
)

Extract the Schur complement.

This routine is sequential and returns the full Schur complement uncommpressed in Lapack format.

Parameters
[in]solvmtxThe solver matrix structure describing the problem.
[in,out]SThe pointer to the allocated matrix array that will store the Schur complement.
[in]ldsThe leading dimension of the S array.

Definition at line 607 of file coeftab_c.c.

References solver_matrix_s::cblkschur, solver_matrix_s::cblktab, solver_cblk_s::cblktype, cpucblk_cgetschur(), solver_matrix_s::factotype, solver_cblk_s::fcolnum, solver_matrix_s::nodenbr, pastix_int_t, PastixFactLU, and solver_cblk_s::stride.

Referenced by pastixGetSchur().

◆ coeftab_cgetdiag()

void coeftab_cgetdiag ( const SolverMatrix solvmtx,
pastix_complex32_t D,
pastix_int_t  incD 
)

Extract the diagonal.

This routine is sequential and returns the full diagonal in the vector D, such that: D[incD*i]= A(i, i)

Parameters
[in]solvmtxThe solver matrix structure describing the problem.
[in,out]DThe pointer to the allocated vector array that will store the diagonal. D must be of size solvmtx->nodenbr * incD.
[in]incDThe increment bewteen two elements of D. incD > 0.

Definition at line 659 of file coeftab_c.c.

References cblk_colnbr(), solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, solver_cblk_s::fblokptr, solver_cblk_s::lcoeftab, solver_blok_s::LRblock, pastix_int_t, pastix_lrblock_s::rk, solver_cblk_s::stride, and pastix_lrblock_s::u.

Referenced by pastixGetDiag().

◆ coeftab_cdump()

void coeftab_cdump ( pastix_data_t pastix_data,
const SolverMatrix solvmtx,
const char *  prefix 
)

Dump the solver matrix coefficients into a file in human readable format.

All non-zeroes coefficients are dumped in the format: i j val with one value per row.

Parameters
[in,out]pastix_dataThe pastix_data instance to access the unique directory id in which output the files.
[in]solvmtxThe solver matrix to print.
[in]prefixThe filename where to store the output matrix.

Definition at line 55 of file coeftab_c.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, cpucblk_cdump(), pastix_data_s::dir_global, solver_cblk_s::gcblknum, solver_cblk_s::ownerid, pastix_fopenw(), pastix_gendirectories(), pastix_int_t, PastixLCoef, PastixUCoef, and solver_cblk_s::ucoeftab.

◆ cpucblk_cdumpfile()

void cpucblk_cdumpfile ( pastix_coefside_t  side,
SolverCblk cblk,
pastix_int_t  itercblk,
const char *  directory 
)

Dump a single column block into a FILE in a human readale format.

All non-zeroes coefficients are dumped in the format: i j val with one value per row.

The filename is as follows : {L, U}cblk{Index of the cblk}_init.txt

Parameters
[in]sideDefine which side of the matrix must be initialized.
  • PastixLCoef if lower part only
  • PastixUCoef if upper part only
  • PastixLUCoef if both sides.
[in]cblkThe column block to dump into the file.
[in]itercblkThe index of the cblk to dump
[in,out]directoryThe pointer to the temporary directory where to store the output files.

Definition at line 125 of file coeftab_c.c.

References cpucblk_cdump(), pastix_fopenw(), PastixLCoef, and PastixUCoef.

Referenced by cpucblk_cinit(), and cpucblk_zcinit().

◆ coeftab_cdiff()

int coeftab_cdiff ( pastix_coefside_t  side,
const SolverMatrix solvA,
SolverMatrix solvB 
)

Compare two solver matrices in full-rank format with the same data distribution.

The second solver matrix is overwritten by the difference of the two matrices. The frobenius norm of the difference of each column block is computed and the functions returns 0 if the result for all the column blocks of: || B_k - A_k || / ( || A_k || * eps )

is below 10. Otherwise, an error message is printed and 1 is returned.

Parameters
[in]sideDefine which side of the cblk must be tested.
  • PastixLCoef if lower part only
  • PastixUCoef if upper part only
  • PastixLUCoef if both sides.
[in]solvAThe solver matrix A.
[in,out]solvBThe solver matrix B. On exit, B coefficient arrays are overwritten by the result of (B-A).
Returns
0 if the test is passed, >= 0 otherwise.

Definition at line 196 of file coeftab_c.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, cpucblk_cdiff(), and pastix_int_t.

◆ coeftab_dcompress()

pastix_int_t coeftab_dcompress ( SolverMatrix solvmtx)

Compress all the cblks marked as valid for low-rank format.

All the cblk in the top levels of the elimination tree marked as candidates for compression are compressed if there is a gain to compress them. The compression to low-rank format is parameterized by the input information stored in the lowrank structure. On exit, all the cblks marked for compression are stored through the low-rank structure, even if they are kept in their full-rank form.

Remarks
This routine is sequential
Parameters
[in,out]solvmtxThe solver matrix of the problem to compress.
Returns
The memory gain resulting from the compression to low-rank format in Bytes.

Definition at line 243 of file coeftab_d.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, pastix_lr_s::compress_preselect, cpucblk_dcompress(), solver_matrix_s::factotype, pastix_lr_s::ilu_lvl, solver_matrix_s::lowrank, pastix_int_t, PastixFactLU, PastixLCoef, and PastixLUCoef.

◆ coeftab_duncompress()

void coeftab_duncompress ( SolverMatrix solvmtx)

Uncompress all column block in low-rank format into full-rank format.

Parameters
[in,out]solvmtxThe solver matrix of the problem.

Definition at line 272 of file coeftab_d.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, cpucblk_duncompress(), solver_matrix_s::factotype, pastix_int_t, PastixFactLU, PastixLCoef, and PastixLUCoef.

◆ coeftab_dmemory()

void coeftab_dmemory ( const SolverMatrix solvmtx,
const pastix_int_t iparm,
pastix_fixdbl_t dparm 
)

Compute the memory usage for the entire matrix.

This functions computes the memory usage and gain if the matrix is compressed

Parameters
[in]solvmtxThe solver matrix of the problem.
[in]iparmThe integer parameter array. Uses IPARM_COMPRESS_WHEN, IPARM_VERBOSE
[in,out]dparmThe double parameter array which is going to be updated. Update DPARM_MEM_FR and DPARM_MEM_LR.

Definition at line 573 of file coeftab_d.c.

References coeftab_dmemory_fr(), coeftab_dmemory_lr(), IPARM_COMPRESS_WHEN, and PastixCompressNever.

◆ coeftab_dgetschur()

void coeftab_dgetschur ( const SolverMatrix solvmtx,
double *  S,
pastix_int_t  lds 
)

Extract the Schur complement.

This routine is sequential and returns the full Schur complement uncommpressed in Lapack format.

Parameters
[in]solvmtxThe solver matrix structure describing the problem.
[in,out]SThe pointer to the allocated matrix array that will store the Schur complement.
[in]ldsThe leading dimension of the S array.

Definition at line 607 of file coeftab_d.c.

References solver_matrix_s::cblkschur, solver_matrix_s::cblktab, solver_cblk_s::cblktype, cpucblk_dgetschur(), solver_matrix_s::factotype, solver_cblk_s::fcolnum, solver_matrix_s::nodenbr, pastix_int_t, PastixFactLU, and solver_cblk_s::stride.

Referenced by pastixGetSchur().

◆ coeftab_dgetdiag()

void coeftab_dgetdiag ( const SolverMatrix solvmtx,
double *  D,
pastix_int_t  incD 
)

Extract the diagonal.

This routine is sequential and returns the full diagonal in the vector D, such that: D[incD*i]= A(i, i)

Parameters
[in]solvmtxThe solver matrix structure describing the problem.
[in,out]DThe pointer to the allocated vector array that will store the diagonal. D must be of size solvmtx->nodenbr * incD.
[in]incDThe increment bewteen two elements of D. incD > 0.

Definition at line 659 of file coeftab_d.c.

References cblk_colnbr(), solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, solver_cblk_s::fblokptr, solver_cblk_s::lcoeftab, solver_blok_s::LRblock, pastix_int_t, pastix_lrblock_s::rk, solver_cblk_s::stride, and pastix_lrblock_s::u.

Referenced by pastixGetDiag().

◆ coeftab_ddump()

void coeftab_ddump ( pastix_data_t pastix_data,
const SolverMatrix solvmtx,
const char *  prefix 
)

Dump the solver matrix coefficients into a file in human readable format.

All non-zeroes coefficients are dumped in the format: i j val with one value per row.

Parameters
[in,out]pastix_dataThe pastix_data instance to access the unique directory id in which output the files.
[in]solvmtxThe solver matrix to print.
[in]prefixThe filename where to store the output matrix.

Definition at line 55 of file coeftab_d.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, cpucblk_ddump(), pastix_data_s::dir_global, solver_cblk_s::gcblknum, solver_cblk_s::ownerid, pastix_fopenw(), pastix_gendirectories(), pastix_int_t, PastixLCoef, PastixUCoef, and solver_cblk_s::ucoeftab.

◆ cpucblk_ddumpfile()

void cpucblk_ddumpfile ( pastix_coefside_t  side,
SolverCblk cblk,
pastix_int_t  itercblk,
const char *  directory 
)

Dump a single column block into a FILE in a human readale format.

All non-zeroes coefficients are dumped in the format: i j val with one value per row.

The filename is as follows : {L, U}cblk{Index of the cblk}_init.txt

Parameters
[in]sideDefine which side of the matrix must be initialized.
  • PastixLCoef if lower part only
  • PastixUCoef if upper part only
  • PastixLUCoef if both sides.
[in]cblkThe column block to dump into the file.
[in]itercblkThe index of the cblk to dump
[in,out]directoryThe pointer to the temporary directory where to store the output files.

Definition at line 125 of file coeftab_d.c.

References cpucblk_ddump(), pastix_fopenw(), PastixLCoef, and PastixUCoef.

Referenced by cpucblk_dinit().

◆ coeftab_ddiff()

int coeftab_ddiff ( pastix_coefside_t  side,
const SolverMatrix solvA,
SolverMatrix solvB 
)

Compare two solver matrices in full-rank format with the same data distribution.

The second solver matrix is overwritten by the difference of the two matrices. The frobenius norm of the difference of each column block is computed and the functions returns 0 if the result for all the column blocks of: || B_k - A_k || / ( || A_k || * eps )

is below 10. Otherwise, an error message is printed and 1 is returned.

Parameters
[in]sideDefine which side of the cblk must be tested.
  • PastixLCoef if lower part only
  • PastixUCoef if upper part only
  • PastixLUCoef if both sides.
[in]solvAThe solver matrix A.
[in,out]solvBThe solver matrix B. On exit, B coefficient arrays are overwritten by the result of (B-A).
Returns
0 if the test is passed, >= 0 otherwise.

Definition at line 196 of file coeftab_d.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, cpucblk_ddiff(), and pastix_int_t.

◆ coeftab_scompress()

pastix_int_t coeftab_scompress ( SolverMatrix solvmtx)

Compress all the cblks marked as valid for low-rank format.

All the cblk in the top levels of the elimination tree marked as candidates for compression are compressed if there is a gain to compress them. The compression to low-rank format is parameterized by the input information stored in the lowrank structure. On exit, all the cblks marked for compression are stored through the low-rank structure, even if they are kept in their full-rank form.

Remarks
This routine is sequential
Parameters
[in,out]solvmtxThe solver matrix of the problem to compress.
Returns
The memory gain resulting from the compression to low-rank format in Bytes.

Definition at line 243 of file coeftab_s.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, pastix_lr_s::compress_preselect, cpucblk_scompress(), solver_matrix_s::factotype, pastix_lr_s::ilu_lvl, solver_matrix_s::lowrank, pastix_int_t, PastixFactLU, PastixLCoef, and PastixLUCoef.

◆ coeftab_suncompress()

void coeftab_suncompress ( SolverMatrix solvmtx)

Uncompress all column block in low-rank format into full-rank format.

Parameters
[in,out]solvmtxThe solver matrix of the problem.

Definition at line 272 of file coeftab_s.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, cpucblk_suncompress(), solver_matrix_s::factotype, pastix_int_t, PastixFactLU, PastixLCoef, and PastixLUCoef.

◆ coeftab_smemory()

void coeftab_smemory ( const SolverMatrix solvmtx,
const pastix_int_t iparm,
pastix_fixdbl_t dparm 
)

Compute the memory usage for the entire matrix.

This functions computes the memory usage and gain if the matrix is compressed

Parameters
[in]solvmtxThe solver matrix of the problem.
[in]iparmThe integer parameter array. Uses IPARM_COMPRESS_WHEN, IPARM_VERBOSE
[in,out]dparmThe float parameter array which is going to be updated. Update DPARM_MEM_FR and DPARM_MEM_LR.

Definition at line 573 of file coeftab_s.c.

References coeftab_smemory_fr(), coeftab_smemory_lr(), IPARM_COMPRESS_WHEN, and PastixCompressNever.

◆ coeftab_sgetschur()

void coeftab_sgetschur ( const SolverMatrix solvmtx,
float *  S,
pastix_int_t  lds 
)

Extract the Schur complement.

This routine is sequential and returns the full Schur complement uncommpressed in Lapack format.

Parameters
[in]solvmtxThe solver matrix structure describing the problem.
[in,out]SThe pointer to the allocated matrix array that will store the Schur complement.
[in]ldsThe leading dimension of the S array.

Definition at line 607 of file coeftab_s.c.

References solver_matrix_s::cblkschur, solver_matrix_s::cblktab, solver_cblk_s::cblktype, cpucblk_sgetschur(), solver_matrix_s::factotype, solver_cblk_s::fcolnum, solver_matrix_s::nodenbr, pastix_int_t, PastixFactLU, and solver_cblk_s::stride.

Referenced by pastixGetSchur().

◆ coeftab_sgetdiag()

void coeftab_sgetdiag ( const SolverMatrix solvmtx,
float *  D,
pastix_int_t  incD 
)

Extract the diagonal.

This routine is sequential and returns the full diagonal in the vector D, such that: D[incD*i]= A(i, i)

Parameters
[in]solvmtxThe solver matrix structure describing the problem.
[in,out]DThe pointer to the allocated vector array that will store the diagonal. D must be of size solvmtx->nodenbr * incD.
[in]incDThe increment bewteen two elements of D. incD > 0.

Definition at line 659 of file coeftab_s.c.

References cblk_colnbr(), solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, solver_cblk_s::fblokptr, solver_cblk_s::lcoeftab, solver_blok_s::LRblock, pastix_int_t, pastix_lrblock_s::rk, solver_cblk_s::stride, and pastix_lrblock_s::u.

Referenced by pastixGetDiag().

◆ coeftab_sdump()

void coeftab_sdump ( pastix_data_t pastix_data,
const SolverMatrix solvmtx,
const char *  prefix 
)

Dump the solver matrix coefficients into a file in human readable format.

All non-zeroes coefficients are dumped in the format: i j val with one value per row.

Parameters
[in,out]pastix_dataThe pastix_data instance to access the unique directory id in which output the files.
[in]solvmtxThe solver matrix to print.
[in]prefixThe filename where to store the output matrix.

Definition at line 55 of file coeftab_s.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, cpucblk_sdump(), pastix_data_s::dir_global, solver_cblk_s::gcblknum, solver_cblk_s::ownerid, pastix_fopenw(), pastix_gendirectories(), pastix_int_t, PastixLCoef, PastixUCoef, and solver_cblk_s::ucoeftab.

◆ cpucblk_sdumpfile()

void cpucblk_sdumpfile ( pastix_coefside_t  side,
SolverCblk cblk,
pastix_int_t  itercblk,
const char *  directory 
)

Dump a single column block into a FILE in a human readale format.

All non-zeroes coefficients are dumped in the format: i j val with one value per row.

The filename is as follows : {L, U}cblk{Index of the cblk}_init.txt

Parameters
[in]sideDefine which side of the matrix must be initialized.
  • PastixLCoef if lower part only
  • PastixUCoef if upper part only
  • PastixLUCoef if both sides.
[in]cblkThe column block to dump into the file.
[in]itercblkThe index of the cblk to dump
[in,out]directoryThe pointer to the temporary directory where to store the output files.

Definition at line 125 of file coeftab_s.c.

References cpucblk_sdump(), pastix_fopenw(), PastixLCoef, and PastixUCoef.

Referenced by cpucblk_dsinit(), and cpucblk_sinit().

◆ coeftab_sdiff()

int coeftab_sdiff ( pastix_coefside_t  side,
const SolverMatrix solvA,
SolverMatrix solvB 
)

Compare two solver matrices in full-rank format with the same data distribution.

The second solver matrix is overwritten by the difference of the two matrices. The frobenius norm of the difference of each column block is computed and the functions returns 0 if the result for all the column blocks of: || B_k - A_k || / ( || A_k || * eps )

is below 10. Otherwise, an error message is printed and 1 is returned.

Parameters
[in]sideDefine which side of the cblk must be tested.
  • PastixLCoef if lower part only
  • PastixUCoef if upper part only
  • PastixLUCoef if both sides.
[in]solvAThe solver matrix A.
[in,out]solvBThe solver matrix B. On exit, B coefficient arrays are overwritten by the result of (B-A).
Returns
0 if the test is passed, >= 0 otherwise.

Definition at line 196 of file coeftab_s.c.

References solver_matrix_s::cblknbr, solver_matrix_s::cblktab, cpucblk_sdiff(), and pastix_int_t.