PaStiX Handbook
6.2.1
|
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 (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, int flttype) |
Allocate the reception buffer, and initiate the first persistant reception. More... | |
void | solverRecvExit (SolverMatrix *solvmtx) |
Free 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, int 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 (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) |
void solverInit | ( | SolverMatrix * | solvmtx | ) |
Initialize the solver structure.
[in,out] | solvmtx | The solver structure to initialize. |
Definition at line 118 of file solver.c.
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 coeftabExit(), and starpu_dense_matrix_destroy().
Referenced by 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_cblk_s::brown2d, solver_cblk_s::brownum, solver_cblk_s::fblokptr, solver_cblk_s::fcolnum, solver_blok_s::lcblknm, solver_cblk_s::lcolnum, and solver_cblk_s::stride.
void solverRequestInit | ( | SolverMatrix * | solvmtx | ) |
Instanciate the arrays for the requests according to the scheduler.
[in,out] | solvmtx | The pointer to the solver matrix structure. |
Definition at line 423 of file solver.c.
References solverComMatrixInit().
void solverRequestExit | ( | SolverMatrix * | solvmtx | ) |
Free the arrays related to the requests.
[in,out] | solvmtx | The pointer to the solver matrix structure. |
Definition at line 459 of file solver.c.
References solverComMatrixExit(), and solverComMatrixGather().
void solverRecvInit | ( | pastix_coefside_t | side, |
SolverMatrix * | solvmtx, | ||
int | 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 500 of file solver.c.
References PastixLUCoef.
void solverRecvExit | ( | SolverMatrix * | solvmtx | ) |
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_cblk_s::brownum, task_s::ctrbcnt, solver_cblk_s::ctrbcnt, and solver_blok_s::fcblknm.
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 140 of file solver_backup.c.
References task_s::ctrbcnt, solver_blok_s::fcblknm, solver_blok_s::gpuid, solver_cblk_s::gpuid, GPUID_UNDEFINED, PASTIX_ERR_BADPARAMETER, and PASTIX_SUCCESS.
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 207 of file solver_backup.c.
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 cblk_colnbr(), solver_cblk_s::cblktype, solver_cblk_s::fblokptr, solver_blok_s::fcblknm, solver_cblk_s::fcolnum, solver_cblk_s::lcoeftab, solver_cblk_s::lcolnum, solver_cblk_s::lock, solver_cblk_s::ownerid, solver_cblk_s::stride, solver_cblk_s::threadid, and solver_cblk_s::ucoeftab.
SolverMatrix* solverCopy | ( | const SolverMatrix * | solvin, |
int | 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().
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 54 of file solver_draw.c.
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 task_s::bloknum, task_s::cblknum, solver_blok_s::coefind, task_s::ctrbcnt, PASTIX_ERR_FILE, 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 task_s::bloknum, task_s::cblknum, solver_blok_s::coefind, 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, PASTIX_ERR_FILE, 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::gpuid, GPUID_UNDEFINED, solver_blok_s::handler, solver_blok_s::inlast, solver_blok_s::lcblknm, solver_blok_s::LRblock, and solver_blok_s::lrownum.
|
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 137 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::gpuid, GPUID_UNDEFINED, solver_cblk_s::lcolidx, solver_cblk_s::lcolnum, solver_cblk_s::lock, solver_cblk_s::selevtx, and solver_cblk_s::stride.
|
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] | 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 201 of file solver_matrix_gen_utils.h.
References solver_cblk_s::cblktype, solver_cblk_s::fcolnum, solver_cblk_s::lcolnum, solver_cblk_s::sndeidx, pastix_order_s::sndenbr, and pastix_order_s::sndetab.
|
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 253 of file solver_matrix_gen_utils.h.
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 65 of file solver_matrix_gen_utils.c.
References symbol_cblk_s::bloknum, simu_task_s::bloknum, symbol_matrix_s::bloktab, solver_cblk_recv_s::bloktab, simuctrl_s::bloktab, symbol_cblk_s::brownum, symbol_matrix_s::browtab, symbol_matrix_s::cblknbr, symbol_matrix_s::cblktab, simuctrl_s::cblktab, 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, 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 857 of file solver_matrix_gen_utils.c.
References symbol_cblk_s::bloknum, symbol_matrix_s::bloktab, symbol_matrix_s::cblktab, and cand_s::cblktype.
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 953 of file solver_matrix_gen_utils.c.
References symbol_cblk_s::bloknum, symbol_matrix_s::bloktab, solver_cblk_recv_s::bloktab, symbol_matrix_s::cblktab, and cand_s::cblktype.
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. |
Definition at line 311 of file solver_matrix_gen_utils.c.
References symbol_matrix_s::bloktab, solver_cblk_s::brown2d, symbol_cblk_s::brownum, solver_cblk_s::brownum, symbol_matrix_s::browtab, solver_cblk_s::cblktype, and symbol_blok_s::lcblknm.
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 616 of file solver_matrix_gen_utils.c.
References task_s::taskid, simuctrl_s::tasknbr, and simuctrl_s::tasktab.
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 795 of file solver_matrix_gen_utils.c.
References solver_cblk_s::cblktype, solver_blok_s::fcblknm, and solver_blok_s::lcblknm.
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 713 of file solver_matrix_gen_utils.c.
References blok_rownbr(), cblk_colnbr(), solver_cblk_s::cblktype, solver_cblk_s::fblokptr, and solver_cblk_s::stride.
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 177 of file solver_recv.c.
References 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 224 of file solver_recv.c.
References 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 278 of file solver_recv.c.
References symbol_cblk_s::bloknum, solver_cblk_recv_s::bloktab, solver_blok_recv_s::frownum, and solver_blok_recv_s::lrownum.
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 475 of file solver_matrix_gen_utils.c.
References simuctrl_s::clustab, extendint_Read(), extendint_Size(), simu_cluster_s::fprocnum, simuctrl_s::proctab, and simu_proc_s::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 542 of file solver_matrix_gen_utils.c.
|
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] | fcolnum | The last column index of the contribution block. |
Definition at line 40 of file solver_recv.c.
References solver_cblk_recv_s::fcolnum, and solver_cblk_recv_s::lcolnum.
|
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] | frownum | The last row index of the contribution block. |
Definition at line 66 of file solver_recv.c.
References solver_blok_recv_s::frownum, and solver_blok_recv_s::lrownum.
|
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 92 of file solver_recv.c.
References symbol_cblk_s::bloknum, symbol_matrix_s::bloktab, solver_cblk_recv_s::bloktab, symbol_cblk_s::fcolnum, solver_cblk_recv_s::fcolnum, symbol_blok_s::frownum, solver_blok_recv_s::frownum, symbol_cblk_s::lcolnum, solver_cblk_recv_s::lcolnum, symbol_blok_s::lrownum, and solver_blok_recv_s::lrownum.
Referenced by solver_recv_update_fanin(), and solver_recv_update_recv().