23#include "sopalin/sopalin_data.h"
27#if defined(PASTIX_WITH_PARSEC)
31#if defined(PASTIX_WITH_STARPU)
51 sopalin_data_t *sopalin_data )
59 lwork = datacode->gemmmax;
63 lwork = pastix_imax( lwork, 2 * datacode->blokmax );
68 for (i=0; i<datacode->
cblknbr; i++, cblk++){
69 if ( cblk->
cblktype & CBLK_IN_SCHUR ) {
106 sopalin_data_t *sopalin_data = (sopalin_data_t*)args;
113 int rank = ctx->rank;
115 lwork = datacode->gemmmax;
119 lwork = pastix_imax( lwork, 2 * datacode->blokmax );
123 tasknbr = datacode->ttsknbr[rank];
124 tasktab = datacode->ttsktab[rank];
126 for (ii=0; ii<tasknbr; ii++) {
128 t = datacode->tasktab + i;
131 if ( cblk->
cblktype & CBLK_IN_SCHUR ) {
147 memFree_null( work );
166 sopalin_data_t *sopalin_data )
176 sopalin_data_t *sopalin_data;
177 volatile int32_t taskcnt;
198 struct args_cpxtrf_t *arg = (
struct args_cpxtrf_t*)args;
199 sopalin_data_t *sopalin_data = arg->sopalin_data;
208 int32_t local_taskcnt = 0;
209 int rank = ctx->rank;
211 lwork = datacode->gemmmax;
215 lwork = pastix_imax( lwork, 2 * datacode->blokmax );
220 tasknbr = datacode->ttsknbr[rank];
221 tasktab = datacode->ttsktab[rank];
222 computeQueue = datacode->computeQueue[rank];
226 for (ii=0; ii<tasknbr; ii++) {
228 t = datacode->tasktab + i;
237 isched_barrier_wait( &(ctx->global_ctx->barrier) );
239 while( arg->taskcnt > 0 )
243#if defined(PASTIX_WITH_MPI)
245 if( cblknum == -1 ) {
246 cpucblk_cmpi_progress(
PastixLCoef, datacode, rank );
252 if( cblknum == -1 ) {
253 if ( local_taskcnt ) {
254 pastix_atomic_sub_32b( &(arg->taskcnt), local_taskcnt );
258 ctx->global_ctx->world_size );
262 if ( cblknum == -1 ) {
266 if ( cblknum >= 0 ) {
267 cblk = datacode->
cblktab + cblknum;
268 if ( cblk->
cblktype & CBLK_IN_SCHUR ) {
274 if ( cblk->
cblktype & CBLK_TASKS_2D ) {
283 bloknum = - cblknum - 1;
284 blok = datacode->
bloktab + bloknum;
289 memFree_null( work );
292 isched_barrier_wait( &(ctx->global_ctx->barrier) );
294 memFree_null( computeQueue );
313 sopalin_data_t *sopalin_data )
316 int32_t taskcnt = datacode->tasknbr_1dp;
317 struct args_cpxtrf_t args_cpxtrf = { sopalin_data, taskcnt };
320 MALLOC_INTERN( datacode->computeQueue,
325 memFree_null( datacode->computeQueue );
328#ifndef DOXYGEN_SHOULD_SKIP_THIS
329static void (*cpxtrf_table[5])(
pastix_data_t *, sopalin_data_t *) = {
332#if defined(PASTIX_WITH_PARSEC)
337#if defined(PASTIX_WITH_STARPU)
362 sopalin_data_t *sopalin_data )
365 void (*cpxtrf)(
pastix_data_t *, sopalin_data_t *) = cpxtrf_table[ sched ];
367 if (cpxtrf == NULL) {
380 cpxtrf( pastix_data, sopalin_data );
391#if defined(PASTIX_DEBUG_FACTO)
392 coeftab_cdump( pastix_data, sopalin_data->solvmtx,
"pxtrf" );
void cpucblk_cpxtrfsp1dplus_update(SolverMatrix *solvmtx, SolverBlok *blok, pastix_complex32_t *work, pastix_int_t lwork)
Apply the updates of the LL^t factorisation of a given panel.
int cpucblk_cpxtrfsp1dplus(SolverMatrix *solvmtx, SolverCblk *cblk)
Perform the LL^t factorization of a given panel.
int cpucblk_cpxtrfsp1d(SolverMatrix *solvmtx, SolverCblk *cblk, pastix_complex32_t *work, pastix_int_t lwork)
Perform the LL^t factorization of a given panel and apply all its updates.
BEGIN_C_DECLS typedef int pastix_int_t
float _Complex pastix_complex32_t
static void pqueuePush1(pastix_queue_t *q, pastix_int_t elt, double key1)
Push an element with a single key.
void pqueueExit(pastix_queue_t *)
Free the structure associated to the queue.
static pastix_int_t pqueuePop(pastix_queue_t *q)
Pop the head of the queue whithout returning the keys.
int pqueueInit(pastix_queue_t *, pastix_int_t)
Initialize the queue structure with an initial space to store the elements.
void solverRecvExit(SolverMatrix *solvmtx)
Free the array linked to pending reception.
void solverRequestExit(SolverMatrix *solvmtx)
Free the arrays related to the requests.
void solverRecvInit(pastix_coefside_t side, SolverMatrix *solvmtx, pastix_coeftype_t flttype)
Allocate the reception buffer, and initiate the first persistant reception.
void solverRequestInit(solve_step_t solve_step, SolverMatrix *solvmtx)
Instanciate the arrays for the requests according to the scheduler.
void coeftab_cdump(pastix_data_t *pastix_data, const SolverMatrix *solvmtx, const char *filename)
Dump the solver matrix coefficients into a file in human readable format.
void cpucblk_crequest_cleanup(pastix_coefside_t side, pastix_int_t sched, SolverMatrix *solvmtx)
Waitall routine for current cblk request.
int cpucblk_cincoming_deps(int rank, pastix_coefside_t side, SolverMatrix *solvmtx, SolverCblk *cblk)
Wait for incoming dependencies, and return when cblk->ctrbcnt has reached 0.
pastix_compress_when_t compress_when
void parsec_cpxtrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
Perform a sparse LL^t factorization using PaRSEC runtime.
Main PaStiX data structure.
void starpu_cpxtrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
Perform a sparse LL^t factorization using StarPU runtime.
void sequential_cpxtrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void thread_cpxtrf_static(isched_thread_t *ctx, void *args)
TODO.
void dynamic_cpxtrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void thread_cpxtrf_dynamic(isched_thread_t *ctx, void *args)
TODO.
void static_cpxtrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void sopalin_cpxtrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
static pastix_int_t stealQueue(SolverMatrix *solvmtx, int rank, int nbthreads)
Task stealing method.
SolverBlok *restrict bloktab
pastix_int_t volatile ctrbcnt
SolverCblk *restrict cblktab
Solver column block structure.
Solver column block structure.
The task structure for the numerical factorization.