PaStiX Handbook  6.2.1
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 (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...
 
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)
 

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.

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 coeftabExit(), and starpu_dense_matrix_destroy().

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

◆ solverPrintStats()

void solverPrintStats ( const SolverMatrix *  solvptr)

Print statistical information about the solver matrix structure.

Parameters
[in]solvptrThe 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.

◆ solverRequestInit()

void solverRequestInit ( SolverMatrix *  solvmtx)

Instanciate the arrays for the requests according to the scheduler.

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

Definition at line 423 of file solver.c.

References solverComMatrixInit().

◆ 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 459 of file solver.c.

References solverComMatrixExit(), and solverComMatrixGather().

◆ solverRecvInit()

void solverRecvInit ( pastix_coefside_t  side,
SolverMatrix *  solvmtx,
int  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 500 of file solver.c.

References PastixLUCoef.

◆ 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 540 of file solver.c.

◆ 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_cblk_s::brownum, task_s::ctrbcnt, solver_cblk_s::ctrbcnt, and solver_blok_s::fcblknm.

◆ 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 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.

◆ 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 207 of file solver_backup.c.

◆ solverCheck()

int solverCheck ( const SolverMatrix *  solvmtx)

Checks the consistency of the given solver matrix structure.

Parameters
[in]solvmtxThe solver matrix structure to check.
Return values
0if the structure is correct
1if 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.

◆ solverCopy()

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.

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().

◆ 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 54 of file solver_draw.c.

◆ 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 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.

◆ 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 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.

◆ 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::gpuid, GPUID_UNDEFINED, solver_blok_s::handler, solver_blok_s::inlast, solver_blok_s::lcblknm, solver_blok_s::LRblock, and solver_blok_s::lrownum.

◆ 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 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.

◆ solvMatGen_supernode_index()

static pastix_int_t solvMatGen_supernode_index ( 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]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 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.

◆ 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 253 of file solver_matrix_gen_utils.h.

◆ 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 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().

◆ 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 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.

◆ 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 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.

◆ 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.

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.

◆ 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 616 of file solver_matrix_gen_utils.c.

References task_s::taskid, simuctrl_s::tasknbr, and simuctrl_s::tasktab.

◆ 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 795 of file solver_matrix_gen_utils.c.

References solver_cblk_s::cblktype, solver_blok_s::fcblknm, and solver_blok_s::lcblknm.

◆ 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 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.

◆ 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 177 of file solver_recv.c.

References 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 224 of file solver_recv.c.

References 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 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().

◆ 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 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.

◆ 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 542 of file solver_matrix_gen_utils.c.

◆ 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]fcolnumThe 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.

◆ 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]frownumThe 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.

◆ 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 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().