PaStiX Handbook  6.3.2
Solver matrix

Functions

void solverInit (SolverMatrix *solvmtx)
 Initialize the solver structure. More...
 
void solverExit (SolverMatrix *solvmtx)
 Free the content of the solver matrix structure. More...
 
void solverPrintStats (const SolverMatrix *solvptr)
 Print statistical information about the solver matrix structure. More...
 
void solverRequestInit (solve_step_t solve_step, SolverMatrix *solvmtx)
 Instanciate the arrays for the requests according to the scheduler. More...
 
void solverRequestExit (SolverMatrix *solvmtx)
 Free the arrays related to the requests. More...
 
void solverRecvInit (pastix_coefside_t side, SolverMatrix *solvmtx, pastix_coeftype_t flttype)
 Allocate the reception buffer, and initiate the first persistant reception. More...
 
void solverRecvExit (SolverMatrix *solvmtx)
 Free the array linked to pending reception. More...
 
static pastix_int_t solverRhsRecvMax (SolverMatrix *solvmtx)
 Computes the max size of recv cblk. More...
 
void solverRhsRecvInit (solve_step_t solve_step, SolverMatrix *solvmtx, pastix_coeftype_t flttype, pastix_rhs_t rhsb)
 Allocates the reception buffer, and initiate the first persistant reception. More...
 
void solverRhsRecvExit (SolverMatrix *solvmtx)
 Frees the array linked to pending reception. More...
 
SolverBackup_t * solverBackupInit (const SolverMatrix *solvmtx)
 Initialize the backup structure. More...
 
int solverBackupRestore (SolverMatrix *solvmtx, const SolverBackup_t *b)
 Restore initial values. More...
 
void solverBackupExit (SolverBackup_t *b)
 Free the solver backup data structure. More...
 
int solverCheck (const SolverMatrix *solvmtx)
 Checks the consistency of the given solver matrix structure. More...
 
SolverMatrixsolverCopy (const SolverMatrix *solvin, pastix_coeftype_t flttype)
 Generate a copy of a solver matrix structure. More...
 
void solverRealloc (SolverMatrix *solvmtx)
 Realloc in a contiguous way a given solver structure. More...
 
int solverDraw (const SolverMatrix *const solvptr, FILE *const stream, int verbose, const char *directory)
 Writes a PostScript picture of the low-rank solver matrix. More...
 
int solverLoad (SolverMatrix *solvptr, FILE *stream)
 Load a solver matrix structure from a file. More...
 
int solverSave (const SolverMatrix *solvptr, FILE *stream)
 Save a solver matrix structure into a file. More...
 
static void solvMatGen_init_blok (SolverBlok *solvblok, pastix_int_t lcblknm, pastix_int_t fcblknm, pastix_int_t frownum, pastix_int_t lrownum, pastix_int_t stride, pastix_int_t nbcols, pastix_int_t layout2D)
 Initialize a solver block. More...
 
static void solvMatGen_init_cblk (SolverCblk *solvcblk, SolverBlok *fblokptr, const Cand *candcblk, const symbol_cblk_t *symbcblk, pastix_int_t fcolnum, pastix_int_t lcolnum, pastix_int_t brownum, pastix_int_t stride, pastix_int_t cblknum, int ownerid)
 Initialize a solver cblk. More...
 
static pastix_int_t solvMatGen_supernode_index (const symbol_cblk_t *symbcblk, SolverCblk *solvcblk, pastix_int_t sndeidx, const pastix_order_t *ordeptr)
 Register the original supernode index of the cblk. More...
 
static void solvMatGen_cblkIs2D (SolverMatrix *solvmtx, pastix_int_t *nbcblk2d, pastix_int_t *nbblok2d, pastix_int_t nbbloks, pastix_int_t tasks2D, pastix_int_t cblknum)
 Update the 1D/2D infos of the solver matrix through a cblk. More...
 
void solvMatGen_fill_localnums (const symbol_matrix_t *symbmtx, const SimuCtrl *simuctrl, SolverMatrix *solvmtx, pastix_int_t *cblklocalnum, pastix_int_t *bloklocalnum, pastix_int_t *tasklocalnum, solver_cblk_recv_t **ftgttab)
 Fill the local numbering arrays to compress the symbol information into solver. More...
 
SolverBloksolvMatGen_register_local_cblk (const symbol_matrix_t *symbmtx, const Cand *candcblk, const pastix_int_t *cblklocalnum, SolverCblk *solvcblk, SolverBlok *solvblok, pastix_int_t lcblknm, pastix_int_t brownum, pastix_int_t gcblknm, pastix_int_t ownerid)
 Register a local cblk from a symbol_cblk_t structure !(Fanin|Recv) More...
 
SolverBloksolvMatGen_register_remote_cblk (const symbol_matrix_t *symbmtx, const solver_cblk_recv_t *recvcblk, const Cand *candcblk, const pastix_int_t *cblklocalnum, SolverCblk *solvcblk, SolverBlok *solvblok, pastix_int_t lcblknm, pastix_int_t brownum, pastix_int_t gcblknm)
 Register a remote cblk from a solver_recv_cblk_t structure (Fanin|Recv) More...
 
pastix_int_t solvMatGen_reorder_browtab (const symbol_matrix_t *symbmtx, const symbol_cblk_t *symbcblk, SolverMatrix *solvmtx, SolverCblk *solvcblk, pastix_int_t *browtmp, const pastix_int_t *cblklocalnum, const pastix_int_t *bloklocalnum, pastix_int_t brownum)
 Reorder the browtab from the symbol structure in a distributed way. First stock the 1D blocks and then the 2D blocks. More...
 
void solvMatGen_fill_tasktab (SolverMatrix *solvmtx, isched_t *isched, const SimuCtrl *simuctrl, const pastix_int_t *tasklocalnum, const pastix_int_t *cblklocalnum, const pastix_int_t *bloklocalnum, pastix_int_t clustnum, int is_dbg)
 Fill the global tasktab array, as well as the thread ttsktab arrays. More...
 
void solvMatGen_stats_last (SolverMatrix *solvmtx)
 Mark blocks if they belong to the last supernode, or if they are facing it for statistical purpose only. More...
 
void solvMatGen_max_buffers (SolverMatrix *solvmtx)
 Compute the maximum area of the temporary buffers used during computation. More...
 
void solver_recv_update_fanin (solver_cblk_recv_t **faninptr, const symbol_matrix_t *symbmtx, const symbol_cblk_t *cblk, const symbol_blok_t *blok, const symbol_cblk_t *fcblk, int ownerid)
 Register a new contribution to a fanin cblk. More...
 
void solver_recv_update_recv (solver_cblk_recv_t **recvptr, const symbol_matrix_t *symbmtx, const symbol_cblk_t *cblk, const symbol_blok_t *blok, const symbol_cblk_t *fcblk, int ownerid)
 Register a new contribution to a recv cblk. More...
 
int solver_recv_get_bloknbr (const solver_cblk_recv_t *ftgtptr, const symbol_cblk_t *symbcblk, const symbol_blok_t *symbblok)
 Compute the number of valid blocks in fanin/recv cblk. More...
 
void solvMatGen_fill_ttsktab (isched_thread_t *ctx, void *args)
 Fill the ttsktab for it's own thread. More...
 
void solvMatGen_fill_ttsktab_dbg (isched_thread_t *ctx, void *args)
 Fill in ttsktab for it's own thread. Only for debugging factorization. More...
 
static void solver_recv_update_cols (solver_cblk_recv_t *cblk, pastix_int_t fcolnum, pastix_int_t lcolnum)
 Update columns indices of a reception/fanin cblk. More...
 
static void solver_recv_update_rows (solver_blok_recv_t *blok, pastix_int_t frownum, pastix_int_t lrownum)
 Update rows indices of a reception/fanin blok. More...
 
static solver_cblk_recv_tsolver_recv_cblk_init (const symbol_matrix_t *symbmtx, const symbol_cblk_t *cblk)
 Create a new reception/fanin cblk and initialize to the default values. More...
 
static void solver_recv_add_contrib (solver_cblk_recv_t *rcblk, const symbol_matrix_t *symbmtx, const symbol_cblk_t *cblk, const symbol_blok_t *blok, const symbol_cblk_t *fcblk)
 TODO. More...
 

Detailed Description

Function Documentation

◆ solverInit()

void solverInit ( SolverMatrix solvmtx)

Initialize the solver structure.

Parameters
[in,out]solvmtxThe solver structure to initialize.

Definition at line 118 of file solver.c.

References solver_matrix_s::cblkmax1d, and solver_matrix_s::cblkmaxblk.

Referenced by solverLoad(), solverMatrixGen(), and solverMatrixGenSeq().

◆ solverExit()

void solverExit ( SolverMatrix solvmtx)

Free the content of the solver matrix structure.

All the arrays from the structure are freed and the structure is memset to 0 at exit, but the solver itself is not freed. It will require a new call to solverInit if the memory space area needs to be reused for a new solver matrix.

Parameters
[in,out]solvmtxThe pointer to the structure to free.

Definition at line 143 of file solver.c.

References solver_matrix_s::bloktab, solver_matrix_s::browtab, solver_matrix_s::cblktab, coeftabExit(), solver_matrix_s::gcbl2loc, pastix_int_t, and starpu_dense_matrix_destroy().

Referenced by pastix_subtask_blend(), pastixFinalize(), solverLoad(), and solverRealloc().

◆ solverPrintStats()

◆ solverRequestInit()

void solverRequestInit ( solve_step_t  solve_step,
SolverMatrix solvmtx 
)

Instanciate the arrays for the requests according to the scheduler.

Parameters
[in]solve_stepDefine which step of the solve is concerned.
  • PastixSolveForward
  • PastixSolveBackward
  • PastixFacto
[in,out]solvmtxThe pointer to the solver matrix structure.

Definition at line 433 of file solver.c.

References pastix_int_t.

Referenced by sopalin_cgetrf(), sopalin_chetrf(), sopalin_cpotrf(), sopalin_cpxtrf(), sopalin_csytrf(), sopalin_dgetrf(), sopalin_dpotrf(), sopalin_dsytrf(), sopalin_sgetrf(), sopalin_spotrf(), sopalin_ssytrf(), sopalin_zgetrf(), sopalin_zhetrf(), sopalin_zpotrf(), sopalin_zpxtrf(), and sopalin_zsytrf().

◆ solverRequestExit()

void solverRequestExit ( SolverMatrix solvmtx)

Free the arrays related to the requests.

Parameters
[in,out]solvmtxThe pointer to the solver matrix structure.

Definition at line 481 of file solver.c.

References solver_matrix_s::reqidx, solver_matrix_s::reqlock, solver_matrix_s::reqnum, solver_matrix_s::reqtab, solverComMatrixExit(), and solverComMatrixGather().

◆ solverRecvInit()

void solverRecvInit ( pastix_coefside_t  side,
SolverMatrix solvmtx,
pastix_coeftype_t  flttype 
)

Allocate the reception buffer, and initiate the first persistant reception.

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,out]solvmtxThe pointer to the solver matrix structure.
[in]flttypeDefine which type are the coefficients.
  • PastixFloat
  • PastixDouble
  • PastixComplex32
  • PastixComplex64

Definition at line 522 of file solver.c.

References pastix_int_t.

◆ solverRecvExit()

void solverRecvExit ( SolverMatrix solvmtx)

Free the array linked to pending reception.

Parameters
[in,out]solvmtxThe pointer to the solver matrix structure.

Definition at line 563 of file solver.c.

References solver_matrix_s::rcoeftab, and solver_matrix_s::reqtab.

Referenced by solverRhsRecvExit().

◆ solverRhsRecvMax()

static pastix_int_t solverRhsRecvMax ( SolverMatrix solvmtx)
inlinestatic

Computes the max size of recv cblk.

Parameters
[in,out]solvmtxThe pointer to the solver matrix structure.
Returns
maximun recv size

Definition at line 588 of file solver.c.

References cblk_colnbr(), solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, and pastix_int_t.

◆ solverRhsRecvInit()

void solverRhsRecvInit ( solve_step_t  solve_step,
SolverMatrix solvmtx,
pastix_coeftype_t  flttype,
pastix_rhs_t  rhsb 
)

Allocates the reception buffer, and initiate the first persistant reception.

Parameters
[in]solve_stepDefine which step of the solve is concerned.
  • PastixSolveForward
  • PastixSolveBackward
[in,out]solvmtxThe pointer to the solver matrix structure.
[in]flttypeDefine which type are the coefficients.
  • PastixFloat
  • PastixDouble
  • PastixComplex32
  • PastixComplex64
[in,out]rhsbThe pointer to the rhs data structure that holds the vectors of the right hand side.

Definition at line 633 of file solver.c.

References pastix_int_t.

◆ solverRhsRecvExit()

void solverRhsRecvExit ( SolverMatrix solvmtx)

Frees the array linked to pending reception.

Parameters
[in,out]solvmtxThe pointer to the solver matrix structure.

Definition at line 676 of file solver.c.

References solverRecvExit().

◆ solverBackupInit()

SolverBackup_t* solverBackupInit ( const SolverMatrix solvmtx)

Initialize the backup structure.

This function saves the initial values of the counters before modifications. See structure description for more information about what is saved and why.

Parameters
[in]solvmtxThe solver matrix structure holding information for factorization and solve steps.
Return values
Pointerto the allocated backup structure with the copy of information that might be destroyed.

Definition at line 59 of file solver_backup.c.

References solver_matrix_s::bloknbr, solver_matrix_s::bloktab, solver_cblk_s::brownum, solver_matrix_s::cblknbr, solver_matrix_s::cblktab, task_s::ctrbcnt, solver_cblk_s::ctrbcnt, solver_matrix_s::fanincnt, solver_blok_s::fcblknm, solver_matrix_s::nodenbr, solver_cblk_s::partitioned, pastix_int_t, and solver_matrix_s::recvcnt.

Referenced by pastix_subtask_sopalin().

◆ solverBackupRestore()

int solverBackupRestore ( SolverMatrix solvmtx,
const SolverBackup_t *  b 
)

Restore initial values.

Restore counter values to be able to call a second factorization or solve step. The amount of information restored depends on the value of solvmtx->restore. If it is equal to:

  • 0: Nothing is restored
  • 1: A solve step has been performed and partial information is restored.
  • 2: A factorization step has been performed and full information is restored. The value of solvmtx->restore is noramally initialized to 0 during the structure creation, and then set to the correct value by the routine modifying the solvmtx structure.
Parameters
[in,out]solvmtxThe solver matrix structure holding information for factorization and solve steps. On exit, the counters have been restored to their original value stored in the backup structure.
[in]bThe backup structure pointer returned by the call to solverBackupInit().
Return values
PASTIX_SUCCESSif the data has been restored successfuly.
PASTIX_ERR_BADPARAMETERif one of the parameter is incorrect.

Definition at line 141 of file solver_backup.c.

References solver_matrix_s::bloknbr, solver_matrix_s::bloktab, task_s::ctrbcnt, solver_matrix_s::fanincnt, solver_blok_s::fcblknm, solver_matrix_s::nodenbr, PASTIX_ERR_BADPARAMETER, pastix_int_t, PASTIX_SUCCESS, solver_matrix_s::recvcnt, and solver_matrix_s::restore.

Referenced by pastix_subtask_sopalin().

◆ solverBackupExit()

void solverBackupExit ( SolverBackup_t *  b)

Free the solver backup data structure.

Clean the data structure holding the information backup and free the given pointer because it has necessarily been allocated in solverBackupInit().

Parameters
[in,out]bThe backup structure to destroy. On exit, b cannot be used anymore.

Definition at line 199 of file solver_backup.c.

Referenced by pastix_subtask_sopalin().

◆ solverCheck()

◆ solverCopy()

SolverMatrix* solverCopy ( const SolverMatrix solvin,
pastix_coeftype_t  flttype 
)

Generate a copy of a solver matrix structure.

Every data is copied, event the coefficient if they are allocated and initialized.

Warning
This function is not able to copy a solver matrix with low rank blocks yet.
Parameters
[in]solvinThe solver matrix structure to duplicate.
[in]flttypeThe floating point arithmetic used in the input solver matrix to know the size of the memory space to duplicate for the coefficients.
Returns
The pointer to the solver matrix internally allocated and that is a copy of the input solver. This pointer is NULL if the copy failed.

Definition at line 171 of file solver_copy.c.

References solver_copy().

◆ solverRealloc()

void solverRealloc ( SolverMatrix solvmtx)

Realloc in a contiguous way a given solver structure.

All internal data of the solver structure are reallocated in a contiguous manner to avoid the possible fragmentation from the initialization at runtime.

Warning
This function is not able to copy a solver matrix with low rank blocks yet.
Parameters
[in,out]solvmtxOn entry, the solver matrix to reallocate. On exit, the solver matrix with all internal data reallocated.

copy general info

Free the former solver matrix

Definition at line 205 of file solver_copy.c.

References solver_copy(), and solverExit().

Referenced by pastix_subtask_blend().

◆ solverDraw()

int solverDraw ( const SolverMatrix *const  solvptr,
FILE *const  stream,
int  verbose,
const char *  directory 
)

Writes a PostScript picture of the low-rank solver matrix.

Parameters
[in]solvptrThe solver structure of PaStiX
[in,out]streamFile to write the PostScript
[in]verboseLevel of verbosity. If verbose > 4, the number of updates is printed on each low-rank block.
[in]directoryTempory directory for output files
Return values
0if success
!=0, otherwise

Definition at line 56 of file solver_draw.c.

References solver_matrix_s::baseval, blok_rownbr(), solver_matrix_s::bloknbr, cblk_colnbr(), solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, solver_matrix_s::factotype, solver_cblk_s::fblokptr, solver_cblk_s::fcolnum, solver_blok_s::frownum, solver_cblk_s::lcolnum, solver_blok_s::LRblock, solver_blok_s::lrownum, solver_matrix_s::nodenbr, PASTIX_ERR_FILE, pastix_fopenw(), pastix_int_t, PastixFactLU, and pastix_lrblock_s::rk.

Referenced by pastix_subtask_sopalin().

◆ solverLoad()

int solverLoad ( SolverMatrix solvptr,
FILE *  stream 
)

Load a solver matrix structure from a file.

Parameters
[in,out]solvptrThe allocated pointer to a solver structure initialized. No need to initialized it with solverInit().
[in]streamThe stream where to read the informations.
Return values
PASTIX_SUCCESSon successful exit,
PASTIX_ERR_FILEif a problem occurs during the read.

Load the symbol matrix

Read Task data

Read task by thread data

Definition at line 45 of file solver_io.c.

References solver_matrix_s::baseval, solver_matrix_s::bloknbr, task_s::bloknum, solver_matrix_s::bloktab, solver_matrix_s::cblknbr, task_s::cblknum, solver_matrix_s::cblktab, solver_blok_s::coefind, solver_matrix_s::coefnbr, task_s::ctrbcnt, solver_cblk_s::fblokptr, solver_blok_s::fcblknm, solver_cblk_s::fcolnum, solver_blok_s::frownum, solver_cblk_s::lcolnum, solver_blok_s::lrownum, solver_matrix_s::nodenbr, PASTIX_ERR_FILE, pastix_int_t, PASTIX_SUCCESS, task_s::prionum, solverExit(), solverInit(), solver_cblk_s::stride, and task_s::taskid.

◆ solverSave()

int solverSave ( const SolverMatrix solvptr,
FILE *  stream 
)

Save a solver matrix structure into a file.

Parameters
[in,out]solvptrThe solver matrix structure to dump to disk.
[in]streamThe stream where to write the ordering.
Return values
PASTIX_SUCCESSon successful exit,
PASTIX_ERR_BADPARAMETERif the ordeptr structure is incorrect,
PASTIX_ERR_FILEif a problem occurs during the write.

Definition at line 261 of file solver_io.c.

References solver_matrix_s::baseval, solver_matrix_s::bloknbr, task_s::bloknum, solver_matrix_s::bloktab, solver_matrix_s::cblknbr, task_s::cblknum, solver_matrix_s::cblktab, solver_blok_s::coefind, solver_matrix_s::coefnbr, task_s::ctrbcnt, solver_cblk_s::fblokptr, solver_blok_s::fcblknm, solver_cblk_s::fcolnum, solver_blok_s::frownum, solver_cblk_s::lcolnum, solver_blok_s::lrownum, solver_matrix_s::nodenbr, PASTIX_ERR_FILE, pastix_int_t, PASTIX_SUCCESS, task_s::prionum, solver_cblk_s::stride, and task_s::taskid.

◆ solvMatGen_init_blok()

static void solvMatGen_init_blok ( SolverBlok solvblok,
pastix_int_t  lcblknm,
pastix_int_t  fcblknm,
pastix_int_t  frownum,
pastix_int_t  lrownum,
pastix_int_t  stride,
pastix_int_t  nbcols,
pastix_int_t  layout2D 
)
inlinestatic

Initialize a solver block.

Parameters
[in,out]solvblokThe pointer to the solver block to initialize.
[in]lcblknmLocal column block index.
[in]fcblknmFacing column block index.
[in]frownumFirst row of the block.
[in]lrownumLast row of the block.
[in]strideStride of the column block.
[in]nbcolsNumber of columns of the cblk to which belong the current block.
[in]layout2DParameter which indicates if the cblk layout is 1D lapack or 2D tile layout.

Definition at line 67 of file solver_matrix_gen_utils.h.

References solver_blok_s::browind, solver_blok_s::coefind, solver_blok_s::fcblknm, solver_blok_s::frownum, solver_blok_s::handler, solver_blok_s::inlast, solver_blok_s::lcblknm, solver_blok_s::LRblock, and solver_blok_s::lrownum.

Referenced by solverMatrixGen(), solverMatrixGenSeq(), solvMatGen_register_local_cblk(), and solvMatGen_register_remote_cblk().

◆ solvMatGen_init_cblk()

static void solvMatGen_init_cblk ( SolverCblk solvcblk,
SolverBlok fblokptr,
const Cand candcblk,
const symbol_cblk_t symbcblk,
pastix_int_t  fcolnum,
pastix_int_t  lcolnum,
pastix_int_t  brownum,
pastix_int_t  stride,
pastix_int_t  cblknum,
int  ownerid 
)
inlinestatic

Initialize a solver cblk.

Parameters
[in,out]solvcblkThe pointer to the solver cblk to initialize.
[in]fblokptrThe pointer to the first block.
[in]candcblkThe associated cand structure to the cblk to know the type of the cblk.
[in]symbcblkThe associated symbol cblk structure to get symbol information.
[in]fcolnumIndex of the first column included in the cblk.
[in]lcolnumIndex of the last column included in the cblk.
[in]brownumIndex of the first contribution to this cblk in the browtab.
[in]strideStride of the cblk.
[in]cblknumThe global index of the cblk. -1 if virtual.
[in]owneridThe owner if of the cluster that owns the main instance of the cblk.

Definition at line 136 of file solver_matrix_gen_utils.h.

References solver_cblk_s::bcscnum, solver_cblk_s::brownum, cand_s::cblktype, solver_cblk_s::cblktype, solver_cblk_s::ctrbcnt, solver_cblk_s::fblokptr, solver_cblk_s::fcolnum, solver_cblk_s::gcblknum, solver_cblk_s::handler, solver_cblk_s::lcoeftab, solver_cblk_s::lcolidx, solver_cblk_s::lcolnum, solver_cblk_s::lock, solver_cblk_s::ownerid, solver_cblk_s::selevtx, solver_cblk_s::stride, solver_cblk_s::threadid, and solver_cblk_s::ucoeftab.

Referenced by solverMatrixGen(), solverMatrixGenSeq(), solvMatGen_register_local_cblk(), and solvMatGen_register_remote_cblk().

◆ solvMatGen_supernode_index()

static pastix_int_t solvMatGen_supernode_index ( const symbol_cblk_t symbcblk,
SolverCblk solvcblk,
pastix_int_t  sndeidx,
const pastix_order_t ordeptr 
)
inlinestatic

Register the original supernode index of the cblk.

This computes the index in the original elimination tree before spliting the large supernodes.

Parameters
[in,out]symbcblkTODO
[in,out]solvcblkThe pointer to the cblk.
[in]sndeidxThe index of the last visited supernode to reduce the complexity of the function.
[in]ordeptrThe ordering structure.
Returns
The supernode index of the given cblk. The value can be used in the future calls of the function to reduce its complexity cost.

Definition at line 204 of file solver_matrix_gen_utils.h.

References solver_cblk_s::cblktype, symbol_cblk_s::fcolnum, symbol_cblk_s::lcolnum, solver_cblk_s::sndeidx, pastix_order_s::sndenbr, and pastix_order_s::sndetab.

Referenced by solverMatrixGen(), and solverMatrixGenSeq().

◆ solvMatGen_cblkIs2D()

static void solvMatGen_cblkIs2D ( SolverMatrix solvmtx,
pastix_int_t nbcblk2d,
pastix_int_t nbblok2d,
pastix_int_t  nbbloks,
pastix_int_t  tasks2D,
pastix_int_t  cblknum 
)
inlinestatic

Update the 1D/2D infos of the solver matrix through a cblk.

Parameters
[in,out]solvmtxPointer to the solver matrix.
[in,out]nbcblk2dAmount of 2D cblk. On exit, the number of cblk is updated if the given cblk is considered as 2D.
[in,out]nbblok2dAmount of 2D blocks. On exit, the number of blok is updated if the given cblk is considered as 2D.
[in]nbbloksAmount blocks in the current cblk.
[in]tasks2DBoolean which indicate if the task is 2D.
[in]cblknumCurrent cblk index.

Definition at line 257 of file solver_matrix_gen_utils.h.

References solver_matrix_s::cblkmax1d, solver_matrix_s::cblkmaxblk, and solver_matrix_s::cblkmin2d.

Referenced by solverMatrixGen(), and solverMatrixGenSeq().

◆ solvMatGen_fill_localnums()

void solvMatGen_fill_localnums ( const symbol_matrix_t symbmtx,
const SimuCtrl simuctrl,
SolverMatrix solvmtx,
pastix_int_t cblklocalnum,
pastix_int_t bloklocalnum,
pastix_int_t tasklocalnum,
solver_cblk_recv_t **  ftgttab 
)

Fill the local numbering arrays to compress the symbol information into solver.

Parameters
[in]symbmtxThe pointer to the symbol matrix structure.
[in]simuctrlThe pointer to the simuctrl structure.
[in,out]solvmtxPointer to the solver matrix.
[in,out]cblklocalnumLocal cblk infos.
[in,out]bloklocalnumLocal blok infos.
[in,out]tasklocalnumLocal tasks infos.
[in,out]ftgttabArray of fan-in to store the lists of recv/fanin cblk per local cblk.

Definition at line 67 of file solver_matrix_gen_utils.c.

References solver_matrix_s::bloknbr, simu_task_s::bloknum, symbol_cblk_s::bloknum, simuctrl_s::bloktab, solver_cblk_recv_s::bloktab, symbol_matrix_s::bloktab, solver_matrix_s::brownbr, symbol_cblk_s::brownum, symbol_matrix_s::browtab, solver_matrix_s::cblknbr, symbol_matrix_s::cblknbr, simuctrl_s::cblktab, symbol_matrix_s::cblktab, solver_matrix_s::faninnbr, symbol_blok_s::fcblknm, solver_blok_recv_s::frownum, symbol_blok_s::lcblknm, solver_blok_recv_s::lrownum, simu_cblk_s::owned, simu_blok_s::ownerclust, pastix_int_t, solver_matrix_s::recvnbr, solver_recv_get_bloknbr(), solver_recv_update_fanin(), solver_recv_update_recv(), simuctrl_s::tasknbr, and simuctrl_s::tasktab.

Referenced by solverMatrixGen().

◆ solvMatGen_register_local_cblk()

SolverBlok * solvMatGen_register_local_cblk ( const symbol_matrix_t symbmtx,
const Cand candcblk,
const pastix_int_t cblklocalnum,
SolverCblk solvcblk,
SolverBlok solvblok,
pastix_int_t  lcblknm,
pastix_int_t  brownum,
pastix_int_t  gcblknm,
pastix_int_t  ownerid 
)

Register a local cblk from a symbol_cblk_t structure !(Fanin|Recv)

Parameters
[in]symbmtxThe pointer to the symbol matrix.
[in]candcblkThe cand structure associated to the current cblk to get the type of the cblk.
[in]cblklocalnumArray of the local indices of the cblk.
[in,out]solvcblkPointer to the current cblk to register.
[in,out]solvblokPointer to the first block of the current cblk.
[in]lcblknmThe local index of the cblk.
[in]brownumThe current index in the browtab.
[in]gcblknmThe global index of the current cblk.
[in]owneridThe index of the local MPI rank.
Returns
The pointer to the next solver block to register.

Definition at line 935 of file solver_matrix_gen_utils.c.

References symbol_cblk_s::bloknum, symbol_matrix_s::bloktab, symbol_matrix_s::cblktab, cand_s::cblktype, symbol_blok_s::fcblknm, solver_blok_s::gbloknm, symbol_blok_s::lcblknm, solver_cblk_s::lcolidx, pastix_int_t, solvMatGen_init_blok(), solvMatGen_init_cblk(), symbol_blok_get_rownum(), and symbol_cblk_get_colnum().

Referenced by solverMatrixGen(), and solverMatrixGenSeq().

◆ solvMatGen_register_remote_cblk()

SolverBlok * solvMatGen_register_remote_cblk ( const symbol_matrix_t symbmtx,
const solver_cblk_recv_t recvcblk,
const Cand candcblk,
const pastix_int_t cblklocalnum,
SolverCblk solvcblk,
SolverBlok solvblok,
pastix_int_t  lcblknm,
pastix_int_t  brownum,
pastix_int_t  gcblknm 
)

Register a remote cblk from a solver_recv_cblk_t structure (Fanin|Recv)

Parameters
[in]symbmtxThe pointer to the symbol matrix.
[in]recvcblkThe associated solver_recv_cblk_t structure used to initialize the remote cblk.
[in]candcblkThe cand structure associated to the current cblk to get the type of the cblk.
[in]cblklocalnumArray of the local indices of the cblk.
[in,out]solvcblkPointer to the current cblk to register.
[in,out]solvblokPointer to the first block of the current cblk.
[in]lcblknmThe local index of the cblk.
[in]brownumThe current index in the browtab.
[in]gcblknmThe global index of the current cblk.
Returns
The pointer to the next solver block to register.

Definition at line 1031 of file solver_matrix_gen_utils.c.

References symbol_cblk_s::bloknum, solver_cblk_recv_s::bloktab, symbol_matrix_s::bloktab, symbol_matrix_s::cblktab, cand_s::cblktype, solver_cblk_s::cblktype, symbol_matrix_s::dof, symbol_matrix_s::dofs, symbol_blok_s::fcblknm, solver_cblk_recv_s::fcolnum, solver_blok_recv_s::frownum, solver_blok_s::gbloknm, symbol_blok_s::lcblknm, solver_cblk_s::lcolidx, solver_cblk_recv_s::lcolnum, solver_blok_recv_s::lrownum, pastix_int_t, solvMatGen_init_blok(), and solvMatGen_init_cblk().

Referenced by solverMatrixGen().

◆ solvMatGen_reorder_browtab()

pastix_int_t solvMatGen_reorder_browtab ( const symbol_matrix_t symbmtx,
const symbol_cblk_t symbcblk,
SolverMatrix solvmtx,
SolverCblk solvcblk,
pastix_int_t browtmp,
const pastix_int_t cblklocalnum,
const pastix_int_t bloklocalnum,
pastix_int_t  brownum 
)

Reorder the browtab from the symbol structure in a distributed way. First stock the 1D blocks and then the 2D blocks.

Parameters
[in]symbmtxThe pointer to the symbol matrix structure.
[in]symbcblkThe pointer to the current symbol cblk.
[in,out]solvmtxPointer to the solver matrix.
[in,out]solvcblkThe pointer to the current solver cblk.
[in,out]browtmpWorkspace array used to reorder the local brow information. Must be of size at least (symbcblk[1].brownum - symbcblk[0].brownum)
[in]cblklocalnumLocal cblk indices.
[in]bloklocalnumLocal blok indices.
[in]brownumCurrent brownum.
Return values
TODO

Definition at line 317 of file solver_matrix_gen_utils.c.

References solver_matrix_s::bloktab, symbol_matrix_s::bloktab, solver_blok_s::browind, solver_cblk_s::brown2d, solver_cblk_s::brownum, symbol_cblk_s::brownum, solver_matrix_s::browtab, symbol_matrix_s::browtab, solver_matrix_s::cblktab, solver_cblk_s::cblktype, solver_blok_s::frownum, symbol_blok_s::frownum, solver_blok_s::lcblknm, symbol_blok_s::lcblknm, solver_blok_s::lrownum, symbol_blok_s::lrownum, solver_cblk_s::ownerid, pastix_int_t, and symbol_blok_get_rownum().

Referenced by solverMatrixGen(), and solverMatrixGenSeq().

◆ solvMatGen_fill_tasktab()

void solvMatGen_fill_tasktab ( SolverMatrix solvmtx,
isched_t *  isched,
const SimuCtrl simuctrl,
const pastix_int_t tasklocalnum,
const pastix_int_t cblklocalnum,
const pastix_int_t bloklocalnum,
pastix_int_t  clustnum,
int  is_dbg 
)

Fill the global tasktab array, as well as the thread ttsktab arrays.

Parameters
[in,out]solvmtxPointer to the solver matrix.
[in]ischedThe internal context to run multi-threaded functions.
[in]simuctrlThe pointer to the simulation control structure.
[in]tasklocalnumArray of the local indices of the tasks.
[in]cblklocalnumArray of the local indices of the cblk.
[in]bloklocalnumArray of the local indices of the blocks.
[in]clustnumRank of the MPI instance.
[in]is_dbgEnable/disable the ttsktab debug generation.

Definition at line 630 of file solver_matrix_gen_utils.c.

References solver_matrix_s::bloknbr, simu_task_s::bloknum, task_s::bloknum, simuctrl_s::bloktab, solver_matrix_s::cblknbr, simu_task_s::cblknum, task_s::cblknum, solver_matrix_s::cblktab, solver_cblk_s::cblktype, simu_task_s::ctrbcnt, task_s::ctrbcnt, solver_cblk_s::fblokptr, simu_blok_s::ownerclust, pastix_int_t, simu_task_s::prionum, task_s::prionum, solver_cblk_s::priority, solvMatGen_fill_ttsktab(), solvMatGen_fill_ttsktab_dbg(), task_s::taskid, simuctrl_s::tasknbr, and simuctrl_s::tasktab.

Referenced by solverMatrixGen(), and solverMatrixGenSeq().

◆ solvMatGen_stats_last()

void solvMatGen_stats_last ( SolverMatrix solvmtx)

Mark blocks if they belong to the last supernode, or if they are facing it for statistical purpose only.

TODO : Should be improved by using the brow array in order to cover only the blocks in front of the last cblk

Parameters
[in,out]solvmtxPointer to the solver matrix.

Definition at line 873 of file solver_matrix_gen_utils.c.

References solver_matrix_s::bloknbr, solver_matrix_s::bloktab, solver_matrix_s::cblktab, solver_cblk_s::cblktype, solver_blok_s::fcblknm, solver_blok_s::inlast, solver_blok_s::lcblknm, and pastix_int_t.

Referenced by solverMatrixGen(), and solverMatrixGenSeq().

◆ solvMatGen_max_buffers()

void solvMatGen_max_buffers ( SolverMatrix solvmtx)

Compute the maximum area of the temporary buffers used during computation.

During this loop, we compute the maximum area that will be used as temporary buffers, and statistics:

  • diagmax: Only for hetrf/sytrf factorization, this the maximum size of a panel of MAXSIZEOFBLOCKS width in a diagonal block
  • gemmmax: For all, this is the maximum area used to compute the compacted gemm on a CPU.

Rk: This loop is not merged within the main block loop, since strides have to be peviously computed.

Parameters
[in,out]solvmtxPointer to the solver matrix.

Definition at line 788 of file solver_matrix_gen_utils.c.

References blok_rownbr(), solver_matrix_s::bloktab, cblk_colnbr(), solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, solver_cblk_s::fblokptr, solver_blok_s::fcblknm, pastix_int_t, and solver_cblk_s::stride.

Referenced by solverMatrixGen(), and solverMatrixGenSeq().

◆ solver_recv_update_fanin()

void solver_recv_update_fanin ( solver_cblk_recv_t **  faninptr,
const symbol_matrix_t symbmtx,
const symbol_cblk_t cblk,
const symbol_blok_t blok,
const symbol_cblk_t fcblk,
int  ownerid 
)

Register a new contribution to a fanin cblk.

Parameters
[in,out]faninptrThe location of the pointer of the fanin cblk. On entry, points to NULL if the fanin does not exist, to the existing fanin otherwise. On exit, points to the updated fanin cblk.
[in]symbmtxThe symbol matrix pointer (used to access the bloktab array)
[in]cblkThe symbol cblk that holds the block responsible for the contribution.
[in]blokThe symbol blok responsible for the contribution.
[in]fcblkThe facing symbol cblk that corresponds to the faninptr, and that is updated by the contribution.
[in]owneridThe index of the cluster that owns the fcblk.

Definition at line 203 of file solver_recv.c.

References solver_recv_add_contrib(), and solver_recv_cblk_init().

Referenced by solvMatGen_fill_localnums().

◆ solver_recv_update_recv()

void solver_recv_update_recv ( solver_cblk_recv_t **  recvptr,
const symbol_matrix_t symbmtx,
const symbol_cblk_t cblk,
const symbol_blok_t blok,
const symbol_cblk_t fcblk,
int  ownerid 
)

Register a new contribution to a recv cblk.

Parameters
[in,out]recvptrThe location of the pointer of the recv cblks list. On entry, points to NULL if no recv cblk has been registered yet, to the head of the list otherwise. On exit, points to the updated list of recv cblks.
[in]symbmtxThe symbol matrix pointer (used to access the bloktab array)
[in]cblkThe symbol cblk that holds the block responsible for the contribution.
[in]blokThe symbol blok responsible for the contribution.
[in]fcblkThe facing symbol cblk that corresponds to the recvptr, and that is updated by the contribution.
[in]owneridThe index of the cluster that owns the original contribution (cblk).

Definition at line 250 of file solver_recv.c.

References solver_recv_add_contrib(), and solver_recv_cblk_init().

Referenced by solvMatGen_fill_localnums().

◆ solver_recv_get_bloknbr()

int solver_recv_get_bloknbr ( const solver_cblk_recv_t ftgtptr,
const symbol_cblk_t symbcblk,
const symbol_blok_t symbblok 
)

Compute the number of valid blocks in fanin/recv cblk.

Parameters
[in]ftgtptrThe pointer to the fan-in contribution to study.
[in]symbcblkThe original symbol cblk associated to the fan-in
[in]symbblokThe first symbol blok of the symbcblk.
Returns
The number of non empty blocks in the fan-in.

Definition at line 306 of file solver_recv.c.

References symbol_cblk_s::bloknum, solver_cblk_recv_s::bloktab, solver_blok_recv_s::frownum, symbol_blok_s::frownum, solver_blok_recv_s::lrownum, symbol_blok_s::lrownum, and pastix_int_t.

Referenced by solvMatGen_fill_localnums().

◆ solvMatGen_fill_ttsktab()

void solvMatGen_fill_ttsktab ( isched_thread_t *  ctx,
void *  args 
)

Fill the ttsktab for it's own thread.

Parameters
[in]ctxThe context of the current thread
[in,out]argsThe pointer to the args_ttsktab structure that parameterize the function call.

Definition at line 489 of file solver_matrix_gen_utils.c.

References simuctrl_s::clustab, simu_cluster_s::fprocnum, pastix_int_t, and simuctrl_s::proctab.

Referenced by solvMatGen_fill_tasktab().

◆ solvMatGen_fill_ttsktab_dbg()

void solvMatGen_fill_ttsktab_dbg ( isched_thread_t *  ctx,
void *  args 
)

Fill in ttsktab for it's own thread. Only for debugging factorization.

Parameters
[in]ctxthe context of the current thread
[in,out]argsThe pointer to the args_ttsktab structure that parameterize the function call.

Definition at line 556 of file solver_matrix_gen_utils.c.

References pastix_int_t.

Referenced by solvMatGen_fill_tasktab().

◆ solver_recv_update_cols()

static void solver_recv_update_cols ( solver_cblk_recv_t cblk,
pastix_int_t  fcolnum,
pastix_int_t  lcolnum 
)
inlinestatic

Update columns indices of a reception/fanin cblk.

Parameters
[in,out]cblkThe fanin or recv cblk to update. Must have been initialized first.
[in]fcolnumThe first column index of the contribution block.
[in]lcolnumThe last column index of the contribution block.

Definition at line 41 of file solver_recv.c.

References solver_cblk_recv_s::fcolnum, and solver_cblk_recv_s::lcolnum.

Referenced by solver_recv_add_contrib().

◆ solver_recv_update_rows()

static void solver_recv_update_rows ( solver_blok_recv_t blok,
pastix_int_t  frownum,
pastix_int_t  lrownum 
)
inlinestatic

Update rows indices of a reception/fanin blok.

Parameters
[in,out]blokThe fanin or recv blok to update. Must have been initialized first.
[in]frownumThe first row index of the contribution block.
[in]lrownumThe last row index of the contribution block.

Definition at line 67 of file solver_recv.c.

References solver_blok_recv_s::frownum, and solver_blok_recv_s::lrownum.

Referenced by solver_recv_add_contrib().

◆ solver_recv_cblk_init()

static solver_cblk_recv_t* solver_recv_cblk_init ( const symbol_matrix_t symbmtx,
const symbol_cblk_t cblk 
)
inlinestatic

Create a new reception/fanin cblk and initialize to the default values.

Parameters
[in]symbmtxThe symbol matrix pointer (used to access the bloktab array)
[in]cblkThe symbol cblk used as a template to create the fanin/recv cblk.
Returns
The pointer to the recv/fanin cblk initialized with respect to the input symbcblk.

Definition at line 95 of file solver_recv.c.

References symbol_cblk_s::bloknum, solver_cblk_recv_s::bloktab, symbol_matrix_s::bloktab, solver_cblk_recv_s::fcolnum, symbol_cblk_s::fcolnum, solver_blok_recv_s::frownum, symbol_blok_s::frownum, solver_cblk_recv_s::lcolnum, symbol_cblk_s::lcolnum, solver_blok_recv_s::lrownum, symbol_blok_s::lrownum, and pastix_int_t.

Referenced by solver_recv_update_fanin(), and solver_recv_update_recv().

◆ solver_recv_add_contrib()

static void solver_recv_add_contrib ( solver_cblk_recv_t rcblk,
const symbol_matrix_t symbmtx,
const symbol_cblk_t cblk,
const symbol_blok_t blok,
const symbol_cblk_t fcblk 
)
inlinestatic