PaStiX Handbook
6.3.2
|
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... | |
SolverMatrix * | solverCopy (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... | |
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) More... | |
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) 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_t * | solver_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... | |
void solverInit | ( | SolverMatrix * | solvmtx | ) |
Initialize the solver structure.
[in,out] | solvmtx | The 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().
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.
[in,out] | solvmtx | The 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().
void solverPrintStats | ( | const SolverMatrix * | solvptr | ) |
Print statistical information about the solver matrix structure.
[in] | solvptr | The pointer to the solver matrix structure. |
Definition at line 196 of file solver.c.
References solver_matrix_s::bloknbr, solver_matrix_s::bloktab, solver_cblk_s::brown2d, solver_cblk_s::brownum, solver_matrix_s::browtab, solver_matrix_s::cblkmax1d, solver_matrix_s::cblkmin2d, solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, solver_cblk_s::fblokptr, solver_cblk_s::fcolnum, solver_blok_s::lcblknm, solver_cblk_s::lcolnum, solver_matrix_s::nb2dblok, solver_matrix_s::nb2dcblk, solver_matrix_s::nodenbr, pastix_int_t, solver_size(), and solver_cblk_s::stride.
Referenced by pastix_subtask_blend().
void solverRequestInit | ( | solve_step_t | solve_step, |
SolverMatrix * | solvmtx | ||
) |
Instanciate the arrays for the requests according to the scheduler.
[in] | solve_step | Define which step of the solve is concerned.
|
[in,out] | solvmtx | The 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().
void solverRequestExit | ( | SolverMatrix * | solvmtx | ) |
Free the arrays related to the requests.
[in,out] | solvmtx | The 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().
void solverRecvInit | ( | pastix_coefside_t | side, |
SolverMatrix * | solvmtx, | ||
pastix_coeftype_t | flttype | ||
) |
Allocate the reception buffer, and initiate the first persistant reception.
[in] | side | Define which side of the cblk must be tested.
|
[in,out] | solvmtx | The pointer to the solver matrix structure. |
[in] | flttype | Define which type are the coefficients.
|
Definition at line 522 of file solver.c.
References pastix_int_t.
void solverRecvExit | ( | SolverMatrix * | solvmtx | ) |
Free the array linked to pending reception.
[in,out] | solvmtx | The 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().
|
inlinestatic |
Computes the max size of recv cblk.
[in,out] | solvmtx | The pointer to the solver matrix structure. |
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.
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.
[in] | solve_step | Define which step of the solve is concerned.
|
[in,out] | solvmtx | The pointer to the solver matrix structure. |
[in] | flttype | Define which type are the coefficients.
|
[in,out] | rhsb | The 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.
void solverRhsRecvExit | ( | SolverMatrix * | solvmtx | ) |
Frees the array linked to pending reception.
[in,out] | solvmtx | The pointer to the solver matrix structure. |
Definition at line 676 of file solver.c.
References solverRecvExit().
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.
[in] | solvmtx | The solver matrix structure holding information for factorization and solve steps. |
Pointer | to 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().
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:
[in,out] | solvmtx | The 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] | b | The backup structure pointer returned by the call to solverBackupInit(). |
PASTIX_SUCCESS | if the data has been restored successfuly. |
PASTIX_ERR_BADPARAMETER | if 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().
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().
[in,out] | b | The 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().
int solverCheck | ( | const SolverMatrix * | solvmtx | ) |
Checks the consistency of the given solver matrix structure.
[in] | solvmtx | The solver matrix structure to check. |
0 | if the structure is correct |
1 | if incorrect |
Definition at line 54 of file solver_check.c.
References solver_cblk_s::bcscnum, solver_matrix_s::bloktab, solver_blok_s::browind, solver_cblk_s::brownum, solver_matrix_s::browtab, cblk_colnbr(), solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, solver_matrix_s::faninnbr, solver_cblk_s::fblokptr, solver_blok_s::fcblknm, solver_cblk_s::fcolnum, solver_blok_s::frownum, solver_matrix_s::gcbl2loc, solver_matrix_s::gcblknbr, solver_cblk_s::gcblknum, is_block_inside_fblock(), solver_blok_s::lcblknm, solver_cblk_s::lcoeftab, solver_cblk_s::lcolidx, solver_cblk_s::lcolnum, solver_cblk_s::lock, solver_blok_s::lrownum, solver_cblk_s::ownerid, pastix_int_t, solver_matrix_s::recvnbr, solver_cblk_s::sndeidx, solver_cblk_s::stride, solver_cblk_s::threadid, and solver_cblk_s::ucoeftab.
Referenced by pastix_subtask_blend().
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.
[in] | solvin | The solver matrix structure to duplicate. |
[in] | flttype | The floating point arithmetic used in the input solver matrix to know the size of the memory space to duplicate for the coefficients. |
Definition at line 171 of file solver_copy.c.
References solver_copy().
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.
[in,out] | solvmtx | On 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().
int solverDraw | ( | const SolverMatrix *const | solvptr, |
FILE *const | stream, | ||
int | verbose, | ||
const char * | directory | ||
) |
Writes a PostScript picture of the low-rank solver matrix.
[in] | solvptr | The solver structure of PaStiX |
[in,out] | stream | File to write the PostScript |
[in] | verbose | Level of verbosity. If verbose > 4, the number of updates is printed on each low-rank block. |
[in] | directory | Tempory directory for output files |
0 | if 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().
int solverLoad | ( | SolverMatrix * | solvptr, |
FILE * | stream | ||
) |
Load a solver matrix structure from a file.
[in,out] | solvptr | The allocated pointer to a solver structure initialized. No need to initialized it with solverInit(). |
[in] | stream | The stream where to read the informations. |
PASTIX_SUCCESS | on successful exit, |
PASTIX_ERR_FILE | if 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.
int solverSave | ( | const SolverMatrix * | solvptr, |
FILE * | stream | ||
) |
Save a solver matrix structure into a file.
[in,out] | solvptr | The solver matrix structure to dump to disk. |
[in] | stream | The stream where to write the ordering. |
PASTIX_SUCCESS | on successful exit, |
PASTIX_ERR_BADPARAMETER | if the ordeptr structure is incorrect, |
PASTIX_ERR_FILE | if 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.
|
inlinestatic |
Initialize a solver block.
[in,out] | solvblok | The pointer to the solver block to initialize. |
[in] | lcblknm | Local column block index. |
[in] | fcblknm | Facing column block index. |
[in] | frownum | First row of the block. |
[in] | lrownum | Last row of the block. |
[in] | stride | Stride of the column block. |
[in] | nbcols | Number of columns of the cblk to which belong the current block. |
[in] | layout2D | Parameter 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().
|
inlinestatic |
Initialize a solver cblk.
[in,out] | solvcblk | The pointer to the solver cblk to initialize. |
[in] | fblokptr | The pointer to the first block. |
[in] | candcblk | The associated cand structure to the cblk to know the type of the cblk. |
[in] | symbcblk | The associated symbol cblk structure to get symbol information. |
[in] | fcolnum | Index of the first column included in the cblk. |
[in] | lcolnum | Index of the last column included in the cblk. |
[in] | brownum | Index of the first contribution to this cblk in the browtab. |
[in] | stride | Stride of the cblk. |
[in] | cblknum | The global index of the cblk. -1 if virtual. |
[in] | ownerid | The 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().
|
inlinestatic |
Register the original supernode index of the cblk.
This computes the index in the original elimination tree before spliting the large supernodes.
[in,out] | symbcblk | TODO |
[in,out] | solvcblk | The pointer to the cblk. |
[in] | sndeidx | The index of the last visited supernode to reduce the complexity of the function. |
[in] | ordeptr | The ordering structure. |
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().
|
inlinestatic |
Update the 1D/2D infos of the solver matrix through a cblk.
[in,out] | solvmtx | Pointer to the solver matrix. |
[in,out] | nbcblk2d | Amount of 2D cblk. On exit, the number of cblk is updated if the given cblk is considered as 2D. |
[in,out] | nbblok2d | Amount of 2D blocks. On exit, the number of blok is updated if the given cblk is considered as 2D. |
[in] | nbbloks | Amount blocks in the current cblk. |
[in] | tasks2D | Boolean which indicate if the task is 2D. |
[in] | cblknum | Current 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().
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.
[in] | symbmtx | The pointer to the symbol matrix structure. |
[in] | simuctrl | The pointer to the simuctrl structure. |
[in,out] | solvmtx | Pointer to the solver matrix. |
[in,out] | cblklocalnum | Local cblk infos. |
[in,out] | bloklocalnum | Local blok infos. |
[in,out] | tasklocalnum | Local tasks infos. |
[in,out] | ftgttab | Array 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().
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)
[in] | symbmtx | The pointer to the symbol matrix. |
[in] | candcblk | The cand structure associated to the current cblk to get the type of the cblk. |
[in] | cblklocalnum | Array of the local indices of the cblk. |
[in,out] | solvcblk | Pointer to the current cblk to register. |
[in,out] | solvblok | Pointer to the first block of the current cblk. |
[in] | lcblknm | The local index of the cblk. |
[in] | brownum | The current index in the browtab. |
[in] | gcblknm | The global index of the current cblk. |
[in] | ownerid | The index of the local MPI rank. |
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().
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)
[in] | symbmtx | The pointer to the symbol matrix. |
[in] | recvcblk | The associated solver_recv_cblk_t structure used to initialize the remote cblk. |
[in] | candcblk | The cand structure associated to the current cblk to get the type of the cblk. |
[in] | cblklocalnum | Array of the local indices of the cblk. |
[in,out] | solvcblk | Pointer to the current cblk to register. |
[in,out] | solvblok | Pointer to the first block of the current cblk. |
[in] | lcblknm | The local index of the cblk. |
[in] | brownum | The current index in the browtab. |
[in] | gcblknm | The global index of the current cblk. |
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().
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.
[in] | symbmtx | The pointer to the symbol matrix structure. |
[in] | symbcblk | The pointer to the current symbol cblk. |
[in,out] | solvmtx | Pointer to the solver matrix. |
[in,out] | solvcblk | The pointer to the current solver cblk. |
[in,out] | browtmp | Workspace array used to reorder the local brow information. Must be of size at least (symbcblk[1].brownum - symbcblk[0].brownum) |
[in] | cblklocalnum | Local cblk indices. |
[in] | bloklocalnum | Local blok indices. |
[in] | brownum | Current brownum. |
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().
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.
[in,out] | solvmtx | Pointer to the solver matrix. |
[in] | isched | The internal context to run multi-threaded functions. |
[in] | simuctrl | The pointer to the simulation control structure. |
[in] | tasklocalnum | Array of the local indices of the tasks. |
[in] | cblklocalnum | Array of the local indices of the cblk. |
[in] | bloklocalnum | Array of the local indices of the blocks. |
[in] | clustnum | Rank of the MPI instance. |
[in] | is_dbg | Enable/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().
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
[in,out] | solvmtx | Pointer 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().
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:
Rk: This loop is not merged within the main block loop, since strides have to be peviously computed.
[in,out] | solvmtx | Pointer 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().
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.
[in,out] | faninptr | The 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] | symbmtx | The symbol matrix pointer (used to access the bloktab array) |
[in] | cblk | The symbol cblk that holds the block responsible for the contribution. |
[in] | blok | The symbol blok responsible for the contribution. |
[in] | fcblk | The facing symbol cblk that corresponds to the faninptr, and that is updated by the contribution. |
[in] | ownerid | The 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().
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.
[in,out] | recvptr | The 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] | symbmtx | The symbol matrix pointer (used to access the bloktab array) |
[in] | cblk | The symbol cblk that holds the block responsible for the contribution. |
[in] | blok | The symbol blok responsible for the contribution. |
[in] | fcblk | The facing symbol cblk that corresponds to the recvptr, and that is updated by the contribution. |
[in] | ownerid | The 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().
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.
[in] | ftgtptr | The pointer to the fan-in contribution to study. |
[in] | symbcblk | The original symbol cblk associated to the fan-in |
[in] | symbblok | The first symbol blok of the symbcblk. |
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().
void solvMatGen_fill_ttsktab | ( | isched_thread_t * | ctx, |
void * | args | ||
) |
Fill the ttsktab for it's own thread.
[in] | ctx | The context of the current thread |
[in,out] | args | The 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().
void solvMatGen_fill_ttsktab_dbg | ( | isched_thread_t * | ctx, |
void * | args | ||
) |
Fill in ttsktab for it's own thread. Only for debugging factorization.
[in] | ctx | the context of the current thread |
[in,out] | args | The 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().
|
inlinestatic |
Update columns indices of a reception/fanin cblk.
[in,out] | cblk | The fanin or recv cblk to update. Must have been initialized first. |
[in] | fcolnum | The first column index of the contribution block. |
[in] | lcolnum | The 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().
|
inlinestatic |
Update rows indices of a reception/fanin blok.
[in,out] | blok | The fanin or recv blok to update. Must have been initialized first. |
[in] | frownum | The first row index of the contribution block. |
[in] | lrownum | The 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().
|
inlinestatic |
Create a new reception/fanin cblk and initialize to the default values.
[in] | symbmtx | The symbol matrix pointer (used to access the bloktab array) |
[in] | cblk | The symbol cblk used as a template to create the fanin/recv cblk. |
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().
|
inlinestatic |
TODO.
[in] | rcblk | TODO |
[in] | symbmtx | TODO |
[in] | cblk | TODO |
[in] | blok | TODO |
[in] | fcblk | TODO |
Definition at line 143 of file solver_recv.c.
References symbol_cblk_s::bloknum, solver_cblk_recv_s::bloktab, symbol_matrix_s::bloktab, symbol_blok_s::frownum, is_symbblock_inside_fblock(), symbol_blok_s::lrownum, pastix_int_t, solver_recv_update_cols(), and solver_recv_update_rows().
Referenced by solver_recv_update_fanin(), and solver_recv_update_recv().