24 #include "sopalin/sopalin_data.h"
28 #if defined(PASTIX_WITH_PARSEC)
32 #if defined(PASTIX_WITH_STARPU)
52 sopalin_data_t *sopalin_data )
56 pastix_complex64_t *work1, *work2;
60 lwork1 = datacode->offdmax;
61 lwork2 = pastix_imax( datacode->gemmmax, datacode->blokmax );
65 lwork2 = pastix_imax( lwork2, 2 * datacode->blokmax );
67 MALLOC_INTERN( work1, lwork1, pastix_complex64_t );
68 MALLOC_INTERN( work2, lwork2, pastix_complex64_t );
71 for (i=0; i<datacode->
cblknbr; i++, cblk++){
72 if ( cblk->
cblktype & CBLK_IN_SCHUR ) {
93 work1 - (N*N), work2, lwork2 );
96 memFree_null( work1 );
97 memFree_null( work2 );
118 sopalin_data_t *sopalin_data = (sopalin_data_t*)args;
122 pastix_complex64_t *work1, *work2;
125 int rank = ctx->rank;
127 lwork1 = datacode->offdmax;
128 lwork2 = pastix_imax( datacode->gemmmax, datacode->blokmax );
132 lwork2 = pastix_imax( lwork2, 2 * datacode->blokmax );
134 MALLOC_INTERN( work1, lwork1, pastix_complex64_t );
135 MALLOC_INTERN( work2, lwork2, pastix_complex64_t );
137 tasknbr = datacode->ttsknbr[rank];
138 tasktab = datacode->ttsktab[rank];
140 for (ii=0; ii<tasknbr; ii++) {
142 t = datacode->tasktab + i;
145 if ( cblk->
cblktype & CBLK_IN_SCHUR ) {
166 work1 - (N*N), work2, lwork2 );
169 memFree_null( work1 );
170 memFree_null( work2 );
189 sopalin_data_t *sopalin_data )
199 sopalin_data_t *sopalin_data;
200 volatile int32_t taskcnt;
221 struct args_zsytrf_t *arg = (
struct args_zsytrf_t *)args;
222 sopalin_data_t *sopalin_data = arg->sopalin_data;
228 pastix_complex64_t *work1, *work2;
231 int32_t local_taskcnt = 0;
232 int rank = ctx->rank;
234 lwork1 = datacode->offdmax;
235 lwork2 = pastix_imax( datacode->gemmmax, datacode->blokmax );
239 lwork2 = pastix_imax( lwork2, 2 * datacode->blokmax );
241 MALLOC_INTERN( work1, lwork1, pastix_complex64_t );
242 MALLOC_INTERN( work2, lwork2, pastix_complex64_t );
245 tasknbr = datacode->ttsknbr[rank];
246 tasktab = datacode->ttsktab[rank];
247 computeQueue = datacode->computeQueue[rank];
251 for (ii=0; ii<tasknbr; ii++) {
253 t = datacode->tasktab + i;
262 isched_barrier_wait( &(ctx->global_ctx->barrier) );
264 while( arg->taskcnt > 0 )
268 #if defined(PASTIX_WITH_MPI)
270 if( cblknum == -1 ) {
271 cpucblk_zmpi_progress(
PastixLCoef, datacode, rank );
277 if( cblknum == -1 ) {
278 if ( local_taskcnt ) {
279 pastix_atomic_sub_32b( &(arg->taskcnt), local_taskcnt );
283 ctx->global_ctx->world_size );
287 if ( cblknum == -1 ) {
291 if ( cblknum >= 0 ) {
292 cblk = datacode->
cblktab + cblknum;
293 if ( cblk->
cblktype & CBLK_IN_SCHUR ) {
301 if ( cblk->
cblktype & CBLK_TASKS_2D ) {
312 work1 - (N*N), work2, lwork2 );
316 bloknum = - cblknum - 1;
317 blok = datacode->
bloktab + bloknum;
322 memFree_null( work1 );
323 memFree_null( work2 );
326 isched_barrier_wait( &(ctx->global_ctx->barrier) );
328 memFree_null( computeQueue );
347 sopalin_data_t *sopalin_data )
350 int32_t taskcnt = datacode->tasknbr_1dp;
351 struct args_zsytrf_t args_zsytrf = { sopalin_data, taskcnt };
354 MALLOC_INTERN( datacode->computeQueue,
359 memFree_null( datacode->computeQueue );
362 #ifndef DOXYGEN_SHOULD_SKIP_THIS
363 static void (*zsytrf_table[5])(
pastix_data_t *, sopalin_data_t *) = {
371 #if defined(PASTIX_WITH_STARPU)
396 sopalin_data_t *sopalin_data )
399 void (*zsytrf)(
pastix_data_t *, sopalin_data_t *) = zsytrf_table[ sched ];
401 if ( zsytrf == NULL ) {
414 zsytrf( pastix_data, sopalin_data );
425 #if defined(PASTIX_DEBUG_FACTO)
426 coeftab_zdump( pastix_data, sopalin_data->solvmtx,
"sytrf" );
BEGIN_C_DECLS typedef int pastix_int_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_zdump(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_zsytrfsp1dplus_update(SolverMatrix *solvmtx, SolverBlok *blok, pastix_complex64_t *work)
Apply the updates of the LDL^t factorisation of a given panel.
int cpucblk_zsytrfsp1dplus(SolverMatrix *solvmtx, SolverCblk *cblk)
Perform the LDL^t factorization of a given panel and submit tasks for the subsequent updates.
int cpucblk_zincoming_deps(int rank, pastix_coefside_t side, SolverMatrix *solvmtx, SolverCblk *cblk)
Wait for incoming dependencies, and return when cblk->ctrbcnt has reached 0.
void cpucblk_zrequest_cleanup(pastix_coefside_t side, pastix_int_t sched, SolverMatrix *solvmtx)
Waitall routine for current cblk request.
int cpucblk_zsytrfsp1d(SolverMatrix *solvmtx, SolverCblk *cblk, pastix_complex64_t *DLt, pastix_complex64_t *work, pastix_int_t lwork)
Perform the LDL^t factorization of a given panel and apply all its updates.
pastix_compress_when_t compress_when
Main PaStiX data structure.
void starpu_zsytrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
Perform a sparse LDL^t factorization using StarPU runtime.
void sopalin_zsytrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void thread_zsytrf_dynamic(isched_thread_t *ctx, void *args)
TODO.
void dynamic_zsytrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void static_zsytrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void sequential_zsytrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void thread_zsytrf_static(isched_thread_t *ctx, void *args)
TODO.
static pastix_int_t cblk_colnbr(const SolverCblk *cblk)
Compute the number of columns in a column block.
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.