PaStiX Handbook
6.4.0
|
Data Structures | |
struct | simu_cluster_s |
Process structure for the simulation. More... | |
struct | simu_proc_s |
Thread structure for the simulation. More... | |
struct | simu_ftgt_s |
Fan-in structure for the simulation. More... | |
struct | simu_cblk_s |
Column block structure for the simulation. More... | |
struct | simu_blok_s |
Block structure for the simulation. More... | |
struct | simu_task_s |
Task structure for the simulation. More... | |
struct | simuctrl_s |
Control structure for the simulation. More... | |
struct | simu_timer_s |
Timer for the simulation. More... | |
Typedefs | |
typedef struct simu_cluster_s | SimuCluster |
Process structure for the simulation. | |
typedef struct simu_proc_s | SimuProc |
Thread structure for the simulation. | |
typedef struct simu_ftgt_s | SimuFtgt |
Fan-in structure for the simulation. | |
typedef struct simu_cblk_s | SimuCblk |
Column block structure for the simulation. | |
typedef struct simu_blok_s | SimuBlok |
Block structure for the simulation. | |
typedef struct simu_task_s | SimuTask |
Task structure for the simulation. | |
typedef struct simuctrl_s | SimuCtrl |
Control structure for the simulation. | |
typedef struct simu_timer_s | SimuTimer |
Timer for the simulation. | |
Enumerations | |
enum | simu_ftgt_e { FTGT_CTRBNBR = 0 , FTGT_CTRBCNT , FTGT_PROCDST , FTGT_TASKDST , FTGT_BLOKDST , FTGT_PRIONUM , FTGT_FCOLNUM , FTGT_LCOLNUM , FTGT_FROWNUM , FTGT_LROWNUM , FTGT_MAXINFO } |
Fan-in target information fields. More... | |
Functions | |
pastix_int_t | simuInit (SimuCtrl *simuctrl, const symbol_matrix_t *symbptr, const Cand *candtab, pastix_int_t clustnbr, pastix_int_t procnbr) |
Initialize the simulation structures. More... | |
pastix_int_t | simuRealloc (SimuCtrl *simuctrl, pastix_int_t procnbr, pastix_int_t local_nbthrds) |
Reallocate the simulation structures to compact them. More... | |
void | simuExit (SimuCtrl *simuctrl, pastix_int_t clustnbr, pastix_int_t procnbr, pastix_int_t local_nbthrds) |
Free the simulation structure. More... | |
void | simuTaskBuild (SimuCtrl *simuctrl, const symbol_matrix_t *symbptr) |
Initialize the tasktab array of the simulation structure. More... | |
static int | timerComp (const SimuTimer *t1, const SimuTimer *t2) |
Compare two timings. More... | |
static void | timerAdd (SimuTimer *timer, double t) |
Increment the timer. More... | |
static double | timerVal (const SimuTimer *timer) |
Get the timer value. More... | |
static void | timerSet (SimuTimer *timer, double t) |
Set the timer value. More... | |
static void | timerSetMax (SimuTimer *timer, double t) |
Set the timer value if the value is greater than the actual one. More... | |
static void | simu_computeFtgtCosts (const BlendCtrl *ctrl, const SimuFtgt *ftgt, pastix_int_t clustsrc, pastix_int_t sync_comm_nbr, double *send, double *add) |
Compute the cost of a communication and its update. More... | |
static void | simu_computeBlockCtrbNbr (const symbol_matrix_t *symbptr, SimuCtrl *simuctrl, pastix_int_t ricar) |
Compute the number of contributions to each block. More... | |
static void | simu_printBlockCtrbNbr (const BlendCtrl *ctrl, const symbol_matrix_t *symbptr, const SimuCtrl *simuctrl) |
Print the number of contributions per cblk and block for debug. More... | |
static void | simu_putInAllReadyQueues (const BlendCtrl *ctrl, SimuCtrl *simuctrl, pastix_int_t tasknum) |
Insert a task in the ready task queues of all its candidates. More... | |
static pastix_int_t | simu_getNextTaskNextProc (const BlendCtrl *ctrl, SimuCtrl *simuctrl, pastix_int_t *procnumptr) |
Look for the best next couple (tasknum, corenum) that is ready to be executed. More... | |
static void | simu_computeTaskReceiveTime (const BlendCtrl *ctrl, const symbol_matrix_t *symbptr, SimuCtrl *simuctrl, pastix_int_t tasknum) |
Compute the instant t where the task will be received by a node. More... | |
static void | simu_updateFtgt (const symbol_matrix_t *symbptr, SimuCtrl *simuctrl, pastix_int_t ftgtnum, pastix_int_t bloknum, pastix_int_t fbloknum) |
Update the Fan In target structure. More... | |
static void | simu_computeTask (const BlendCtrl *ctrl, const symbol_matrix_t *symbptr, SimuCtrl *simuctrl, pastix_int_t tasknum) |
Simulate the task execution. More... | |
static void | simu_pushToReadyHeap (const BlendCtrl *ctrl, SimuCtrl *simuctrl, pastix_int_t procnum) |
Push all tasks from future to ready. More... | |
struct simu_cluster_s |
Data Fields | ||
---|---|---|
pastix_int_t | fprocnum |
Global index of the first processor belonging to the cluster (Check is it is not redundant) |
pastix_int_t | lprocnum |
Global index of the last processor belonging to the cluster (Check is it is not redundant) |
ExtendVectorINT * | ftgtsend |
Arrays of ftgt sent by this proc (one vector per processor) |
pastix_int_t | prionum |
Counter to order tasks on one cluster |
struct simu_proc_s |
Data Fields | ||
---|---|---|
SimuTimer | timer |
Simulated clock of the processor |
pastix_queue_t * | readytask |
Heap of tasks ready to be executed |
pastix_queue_t * | futuretask |
Heap of tasks ready to be executed in a near future (after timer) |
ExtendVectorINT * | tasktab |
Vector to store tasks affected to the candidate |
char * | procalias |
Paje trace alias to the processor if PASTIX_BLEND_GENTRACE is eenabled |
struct simu_ftgt_s |
Data Fields | ||
---|---|---|
pastix_int_t | infotab[FTGT_MAXINFO] |
Fan-in information array |
pastix_int_t | clustnum |
Cluster sending the contribution |
SimuTimer | timerecv |
Simulated clock of the reception time |
double | costsend |
Cost to send the contribution |
double | costadd |
Cost to add the contribution to its final cblk |
struct simu_cblk_s |
Data Fields | ||
---|---|---|
pastix_int_t | ctrbcnt |
Counter of remaining contributions for the cblk |
int8_t | owned |
Boolean to indicate if owned by the local processor |
struct simu_blok_s |
Data Fields | ||
---|---|---|
pastix_int_t | tasknum |
Task index opeating on this block (stored per block for 2D computations) |
pastix_int_t | ftgtnum |
Index of the first fanin destinated to this block in the ftgttab. This index is also used to find the first cblk timer (one per cand proc) in the timetab array |
pastix_int_t | ctrbcnt |
Counter of remaining contributions |
int | fccandnum |
First candidate that is attributed to the cblk of the block |
int | ownerclust |
Processor on which the block is distributed |
struct simu_task_s |
Data Fields | ||
---|---|---|
pastix_int_t | prionum |
priority of the task |
pastix_int_t | cblknum |
Number of the cblknum the task deals with |
pastix_int_t | bloknum |
number of the block that the task deals with |
pastix_int_t | bloknum2 | |
pastix_int_t | facebloknum |
Number of the facing block for E2 |
SimuTimer | time |
Time the task is ready if it doesn't need message |
pastix_int_t | mesglen |
Time to send the block target |
double | cost |
Cost of the task |
pastix_int_t | ctrbcnt |
nbr ftgt + le btgt (+ E1 pret si E2) |
pastix_int_t | ftgtcnt |
nbr of contrib from fan-in target |
pastix_int_t | tasknext |
chainage des E1 ou E2, si fin = -1 => liberer les btagptr |
struct simuctrl_s |
Data Fields | ||
---|---|---|
pastix_int_t | cblknbr |
Number of cblk |
pastix_int_t | ftgtprio |
Priority to assign to current ftgts |
pastix_int_t | tasknbr |
Number of tasks |
pastix_int_t | ftgtcnt |
Number of received communication |
SimuTask * | tasktab |
SimuTask vector |
SimuProc * | proctab |
Virtual processor tab |
SimuCluster * | clustab |
Virtual cluster tab |
pastix_int_t * | ownetab |
Vector containing the distribution of the diagonal blok |
SimuCblk * | cblktab |
SimuCblk vector |
SimuBlok * | bloktab |
SimuBlok vector |
SimuFtgt * | ftgttab |
Vector containing the fan in target |
pastix_int_t | ftgtnbr |
The number of fan-in contribution |
SimuTimer * | ftgttimetab |
Vector containing a timer for each cluster on each ftgt |
struct simu_timer_s |
Timer for the simulation.
Definition at line 25 of file simu_timer.h.
Data Fields | ||
---|---|---|
double | s |
Second in the timer |
enum simu_ftgt_e |
Fan-in target information fields.
pastix_int_t simuInit | ( | SimuCtrl * | simuctrl, |
const symbol_matrix_t * | symbptr, | ||
const Cand * | candtab, | ||
pastix_int_t | clustnbr, | ||
pastix_int_t | procnbr | ||
) |
Initialize the simulation structures.
[in,out] | simuctrl | The allocated pointer to main control structure for the simulation. |
[in] | symbptr | The pointer to the symbol matrix structure studied. |
[in] | candtab | The pointer to the candidate information associated to the symbol structure and that will guide the simulation. |
[in] | clustnbr | The number of PaStiX processes involved in the simulation. |
[in] | procnbr | The total number of workers involved in the simulation. |
PASTIX_SUCCESS | if success. |
PASTIX_ERR_OUTOFMEMORY | if one of the malloc failed. |
Definition at line 66 of file simu.c.
References symbol_matrix_s::bloknbr, symbol_cblk_s::bloknum, simuctrl_s::bloktab, simuctrl_s::cblknbr, symbol_matrix_s::cblknbr, simuctrl_s::cblktab, symbol_matrix_s::cblktab, simuctrl_s::clustab, simu_ftgt_s::clustnum, simu_ftgt_s::costadd, simu_ftgt_s::costsend, simu_cblk_s::ctrbcnt, simu_blok_s::ctrbcnt, extendint_Init(), cand_s::fccandnum, simu_blok_s::fccandnum, simu_cluster_s::fprocnum, simuctrl_s::ftgtcnt, simuctrl_s::ftgtnbr, simu_blok_s::ftgtnum, simuctrl_s::ftgtprio, simu_cluster_s::ftgtsend, simuctrl_s::ftgttab, simuctrl_s::ftgttimetab, simu_proc_s::futuretask, simu_ftgt_s::infotab, cand_s::lccandnum, simu_cluster_s::lprocnum, simu_cblk_s::owned, simu_blok_s::ownerclust, simuctrl_s::ownetab, pastix_int_t, pqueueInit(), simu_cluster_s::prionum, simuctrl_s::proctab, simu_proc_s::readytask, simu_blok_s::tasknum, simu_proc_s::tasktab, simuctrl_s::tasktab, simu_ftgt_s::timerecv, and timerSet().
Referenced by pastix_subtask_blend().
pastix_int_t simuRealloc | ( | SimuCtrl * | simuctrl, |
pastix_int_t | procnbr, | ||
pastix_int_t | local_nbthrds | ||
) |
Reallocate the simulation structures to compact them.
All data that were globally allocated and replicated on every node is freed, and only the local information are allocated. This is used only when a second proportionnal mapping with local information is performed for the dynamic scheduling.
[in,out] | simuctrl | The simulation structure to reallocate. |
[in] | procnbr | The total number of workers. |
[in] | local_nbthrds | The number of local workers per process. |
PASTIX_SUCCESS | if success. |
PASTIX_ERR_OUTOFMEMORY | if one of the malloc failed. |
Definition at line 205 of file simu.c.
References extendint_Exit(), simu_proc_s::futuretask, pastix_int_t, PASTIX_SUCCESS, pqueueExit(), simuctrl_s::proctab, simu_proc_s::readytask, and simu_proc_s::tasktab.
void simuExit | ( | SimuCtrl * | simuctrl, |
pastix_int_t | clustnbr, | ||
pastix_int_t | procnbr, | ||
pastix_int_t | local_nbthrds | ||
) |
Free the simulation structure.
[in,out] | simuctrl | The simulation structure to free. |
[in] | clustnbr | The total number of PaStiX processes. |
[in] | procnbr | The total number of workers. |
[in] | local_nbthrds | The number of local workers per process. |
Definition at line 254 of file simu.c.
References simuctrl_s::bloktab, simuctrl_s::cblktab, simuctrl_s::clustab, extendint_Exit(), simu_cluster_s::ftgtsend, simuctrl_s::ftgttab, simuctrl_s::ftgttimetab, simu_proc_s::futuretask, simuctrl_s::ownetab, pastix_int_t, pqueueExit(), simuctrl_s::proctab, simu_proc_s::readytask, simu_proc_s::tasktab, and simuctrl_s::tasktab.
Referenced by pastix_subtask_blend().
void simuTaskBuild | ( | SimuCtrl * | simuctrl, |
const symbol_matrix_t * | symbptr | ||
) |
Initialize the tasktab array of the simulation structure.
[in,out] | simuctrl | The main simulation structure. On exit, the tasktab array is built and initialized with default values. |
[in] | symbptr | The pointer to the symbol matrix structure studied. |
Definition at line 49 of file simu_task.c.
References simu_task_s::bloknum, symbol_cblk_s::bloknum, simuctrl_s::bloktab, symbol_matrix_s::cblknbr, simu_task_s::cblknum, symbol_matrix_s::cblktab, simu_task_s::cost, simu_task_s::ctrbcnt, simu_task_s::facebloknum, simu_task_s::ftgtcnt, simu_task_s::mesglen, pastix_int_t, simu_task_s::prionum, simuctrl_s::tasknbr, simu_task_s::tasknext, simu_blok_s::tasknum, simuctrl_s::tasktab, simu_task_s::time, and timerSet().
Referenced by pastix_subtask_blend().
Compare two timings.
[in] | t1 | The first timer. |
[in] | t2 | The second timer. |
Definition at line 39 of file simu_timer.h.
References simu_timer_s::s.
Referenced by simu_pushToReadyHeap().
|
inlinestatic |
Increment the timer.
[in,out] | timer | The timer to update. |
[in] | t | The time to add to the timer. |
Definition at line 59 of file simu_timer.h.
References simu_timer_s::s.
Referenced by simu_computeTask().
|
inlinestatic |
Get the timer value.
[in] | timer | The timer to read. |
Definition at line 71 of file simu_timer.h.
References simu_timer_s::s.
Referenced by simu_computeTask(), simu_computeTaskReceiveTime(), simu_putInAllReadyQueues(), and simuRun().
|
inlinestatic |
Set the timer value.
[in,out] | timer | The timer to set |
[in] | t | The value to set |
Definition at line 84 of file simu_timer.h.
References simu_timer_s::s.
Referenced by simu_computeTaskReceiveTime(), simuInit(), and simuTaskBuild().
|
inlinestatic |
Set the timer value if the value is greater than the actual one.
[in,out] | timer | The timer to update |
[in] | t | The time to compare with and set if larger than the timer. |
Definition at line 97 of file simu_timer.h.
References simu_timer_s::s.
Referenced by simu_computeTask(), simu_computeTaskReceiveTime(), and simuRun().
|
inlinestatic |
Compute the cost of a communication and its update.
[in] | ctrl | The blend control structure that describes the architecture and the cost of the communication between nodes. |
[in] | ftgt | The fan-in for which the cost is computed. |
[in] | clustsrc | The index of the source pastix process. |
[in] | sync_comm_nbr | The number of simultaneous communication. |
[out] | send | The time cost of the send operation. |
[out] | add | The time cost of the addition operation. |
Definition at line 153 of file simu_run.c.
References blendctrl_s::core2clust, FTGT_FCOLNUM, FTGT_FROWNUM, FTGT_LCOLNUM, FTGT_LROWNUM, FTGT_PROCDST, getCommunicationCosts(), simu_ftgt_s::infotab, and pastix_int_t.
Referenced by simu_computeTaskReceiveTime().
|
inlinestatic |
Compute the number of contributions to each block.
[in] | symbptr | The symbol matrix structure describing the problem. |
[in,out] | simuctrl | The main simulation structure. On exit, the ctrbcnt field of the blocks is updated with the number of contributions that they each should receive. |
[in] | ricar | True if ILU(k) factorization is applied to change the algorithm to compute the number of contributions. |
Definition at line 207 of file simu_run.c.
References symbol_cblk_s::bloknum, simuctrl_s::bloktab, symbol_matrix_s::cblknbr, simu_task_s::cblknum, simuctrl_s::cblktab, symbol_matrix_s::cblktab, simu_cblk_s::ctrbcnt, simu_blok_s::ctrbcnt, simu_task_s::ctrbcnt, pastix_int_t, pastixSymbolGetFacingBloknum(), simuctrl_s::tasknbr, and simuctrl_s::tasktab.
Referenced by simuRun().
|
inlinestatic |
Print the number of contributions per cblk and block for debug.
[in] | ctrl | The blendctrl structure with the simulation parameters. |
[in] | symbptr | The symbol matrix structure describing the problem. |
[in] | simuctrl | The main simulation structure. |
Definition at line 284 of file simu_run.c.
References symbol_cblk_s::bloknum, simuctrl_s::bloktab, symbol_matrix_s::cblknbr, simuctrl_s::cblktab, symbol_matrix_s::cblktab, simu_cblk_s::ctrbcnt, simu_blok_s::ctrbcnt, blendctrl_s::dirname, pastix_fopenw(), and pastix_int_t.
Referenced by simuRun().
|
inlinestatic |
Insert a task in the ready task queues of all its candidates.
This function according to the ready date of a task put this task on the ready queue of a processor. When the ready date of a task is inferior to the proc timer then the task is ordered according to its priorities in the elimination tree.
[in] | ctrl | The blend control structure to provide the candtab and the core2clust arrays. |
[in,out] | simuctrl | The main simulation structure. On exit, the ready tasks queues of the candidates for tasknum are updated. |
[in] | tasknum | The index of the task to insert as a ready task. |
Definition at line 349 of file simu_run.c.
References simu_task_s::bloknum, blendctrl_s::candtab, simu_task_s::cblknum, blendctrl_s::clustnum, blendctrl_s::core2clust, cand_s::costlevel, cand_s::fcandnum, cand_s::fccandnum, simuctrl_s::ftgttimetab, simu_proc_s::futuretask, cand_s::lccandnum, pastix_int_t, pqueuePush2(), simu_proc_s::procalias, simuctrl_s::proctab, simu_proc_s::readytask, simuctrl_s::tasktab, simu_task_s::time, simu_proc_s::timer, timerVal(), and cand_s::treelevel.
Referenced by simu_computeTask(), and simuRun().
|
inlinestatic |
Look for the best next couple (tasknum, corenum) that is ready to be executed.
This function is the main and more costly one. It looks for each worker, which task is the first one available for execution, and from all those couples, which one is the first one to finish.
[in] | ctrl | The blend control structure to provide the candtab and the core2clust arrays. |
[in,out] | simuctrl | The main simulation structure. On exit, the structure is updated with the extraction of the next best task to run. |
[out] | procnumptr | The index of the candidate to run the task. |
Definition at line 436 of file simu_run.c.
References pastix_int_t.
Referenced by simuRun().
|
inlinestatic |
Compute the instant t where the task will be received by a node.
Compute the time the cblk would have RECEIVED and ADDED all its contributions if it was mapped on a given cand CLUSTER.
[in] | ctrl | The blend control structure to provide the candtab and the core2clust arrays. |
[in] | symbptr | The symbol matrix structure describing the problem. |
[in,out] | simuctrl | The main simulation structure. On exit, the ready tasks queues of the candidates for tasknum are updated. |
[in] | tasknum | The index of the task to insert as a ready task. |
Definition at line 583 of file simu_run.c.
References simu_task_s::bloknum, symbol_cblk_s::bloknum, simuctrl_s::bloktab, blendctrl_s::candtab, simu_task_s::cblknum, symbol_matrix_s::cblktab, simu_ftgt_s::costadd, simu_ftgt_s::costsend, cand_s::fccandnum, FTGT_CTRBNBR, simu_blok_s::ftgtnum, simuctrl_s::ftgttab, simuctrl_s::ftgttimetab, simu_ftgt_s::infotab, cand_s::lccandnum, pastix_int_t, simu_computeFtgtCosts(), simuctrl_s::tasktab, simu_ftgt_s::timerecv, timerSet(), timerSetMax(), and timerVal().
Referenced by simu_computeTask().
|
inlinestatic |
Update the Fan In target structure.
Increment the contribution counter of the fan-in and integrate to the ftgt area the new contribution.
[in] | symbptr | The pointer to the symbolic matrix structure. |
[in,out] | simuctrl | The pointer to the simulation structure. On exit, data regarding the computational unit pr are updated. |
[in] | ftgtnum | Index of the fanin target to update. |
[in] | bloknum | Index of the first off-diagonal block generating a contribution to the ftgtnum Fan In. |
[in] | fbloknum | Index of the off-diagonal block that is multiplied by blocknum to produce the update. |
Definition at line 711 of file simu_run.c.
References symbol_matrix_s::bloktab, symbol_blok_s::frownum, FTGT_CTRBNBR, FTGT_FCOLNUM, FTGT_FROWNUM, FTGT_LCOLNUM, FTGT_LROWNUM, simuctrl_s::ftgttab, simu_ftgt_s::infotab, symbol_blok_s::lrownum, and pastix_int_t.
Referenced by simu_computeTask().
|
inlinestatic |
Simulate the task execution.
Update the timers of the selected worker, as well as those of the current cblk, and the targeted cblks by the update.
[in] | ctrl | The pointer to the global blend control structure. |
[in] | symbptr | The pointer to the symbolic matrix structure. |
[in,out] | simuctrl | The pointer to the simulation structure. On exit, data regarding the computational unit pr are updated. |
[in] | tasknum | The task index of the one, we want to simulate the execution. |
Definition at line 775 of file simu_run.c.
References cost_matrix_s::blokcost, symbol_cblk_s::bloknum, simuctrl_s::bloktab, symbol_matrix_s::bloktab, blendctrl_s::candtab, simu_task_s::cblknum, simuctrl_s::cblktab, symbol_matrix_s::cblktab, blendctrl_s::core2clust, blendctrl_s::costmtx, simu_cblk_s::ctrbcnt, simu_blok_s::ctrbcnt, cand_s::fcandnum, symbol_blok_s::fcblknm, cand_s::fccandnum, simuctrl_s::ftgttimetab, cand_s::lccandnum, simuctrl_s::ownetab, pastix_int_t, pastixSymbolGetFacingBloknum(), simuctrl_s::proctab, blendctrl_s::ricar, simu_computeTaskReceiveTime(), simu_putInAllReadyQueues(), simu_updateFtgt(), simu_blok_s::tasknum, simuctrl_s::tasktab, simu_task_s::time, simu_proc_s::timer, timerAdd(), timerSetMax(), and timerVal().
Referenced by simuRun().
|
inlinestatic |
Push all tasks from future to ready.
This routine pushes all future tasks from the future task heap to the ready one, if the time at which the task will be ready is already passed by the computation unit.
[in] | ctrl | The pointer to the global blend control structure. |
[in,out] | simuctrl | The pointer to the simulation structure. On exit, data regarding the computational unit pr are updated. |
[in] | procnum | The computational unit index for which the data need to be transfer from the future task heap to ready task heap if the computational unit timer is more advanced than the ready time of the tasks. |
Definition at line 908 of file simu_run.c.
References simu_task_s::bloknum, blendctrl_s::candtab, simu_task_s::cblknum, blendctrl_s::core2clust, cand_s::costlevel, cand_s::fccandnum, simuctrl_s::ftgttimetab, simu_proc_s::futuretask, cand_s::lccandnum, pastix_int_t, pqueuePop(), pqueuePush2(), pqueueRead(), pqueueSize(), simuctrl_s::proctab, simu_proc_s::readytask, simuctrl_s::tasktab, simu_task_s::time, simu_proc_s::timer, timerComp(), and cand_s::treelevel.
Referenced by simuRun().