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 *work;
60 lwork = datacode->gemmmax;
64 lwork = pastix_imax( lwork, 2 * datacode->blokmax );
66 MALLOC_INTERN( work, lwork, pastix_complex64_t );
69 for (i=0; i<datacode->
cblknbr; i++, cblk++){
70 if ( cblk->
cblktype & CBLK_IN_SCHUR ) {
106 sopalin_data_t *sopalin_data = (sopalin_data_t*)args;
110 pastix_complex64_t *work;
113 int rank = ctx->rank;
115 lwork = datacode->gemmmax;
119 lwork = pastix_imax( lwork, 2 * datacode->blokmax );
121 MALLOC_INTERN( work, lwork, pastix_complex64_t );
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;
197 struct args_zpotrf_t *arg = (
struct args_zpotrf_t*)args;
198 sopalin_data_t *sopalin_data = arg->sopalin_data;
204 pastix_complex64_t *work;
207 int32_t local_taskcnt = 0;
208 int rank = ctx->rank;
210 lwork = datacode->gemmmax;
214 lwork = pastix_imax( lwork, 2 * datacode->blokmax );
216 MALLOC_INTERN( work, lwork, pastix_complex64_t );
219 tasknbr = datacode->ttsknbr[rank];
220 tasktab = datacode->ttsktab[rank];
221 computeQueue = datacode->computeQueue[rank];
225 for (ii=0; ii<tasknbr; ii++) {
227 t = datacode->tasktab + i;
236 isched_barrier_wait( &(ctx->global_ctx->barrier) );
238 while( arg->taskcnt > 0 )
242 #if defined(PASTIX_WITH_MPI)
244 if( cblknum == -1 ) {
245 cpucblk_zmpi_progress(
PastixLCoef, datacode, rank );
251 if( cblknum == -1 ) {
252 if ( local_taskcnt ) {
253 pastix_atomic_sub_32b( &(arg->taskcnt), local_taskcnt );
257 ctx->global_ctx->world_size );
261 if ( cblknum == -1 ) {
265 if ( cblknum >= 0 ) {
266 cblk = datacode->
cblktab + cblknum;
267 if ( cblk->
cblktype & CBLK_IN_SCHUR ) {
273 if ( cblk->
cblktype & CBLK_TASKS_2D ) {
282 bloknum = - cblknum - 1;
283 blok = datacode->
bloktab + bloknum;
288 memFree_null( work );
291 isched_barrier_wait( &(ctx->global_ctx->barrier) );
293 memFree_null( computeQueue );
312 sopalin_data_t *sopalin_data )
315 int32_t taskcnt = datacode->tasknbr_1dp;
316 struct args_zpotrf_t args_zpotrf = { sopalin_data, taskcnt };
319 MALLOC_INTERN( datacode->computeQueue,
324 memFree_null( datacode->computeQueue );
327 #ifndef DOXYGEN_SHOULD_SKIP_THIS
328 static void (*zpotrf_table[5])(
pastix_data_t *, sopalin_data_t *) = {
331 #if defined(PASTIX_WITH_PARSEC)
336 #if defined(PASTIX_WITH_STARPU)
361 sopalin_data_t *sopalin_data )
364 void (*zpotrf)(
pastix_data_t *, sopalin_data_t *) = zpotrf_table[ sched ];
366 if ( zpotrf == NULL ) {
379 zpotrf( pastix_data, sopalin_data );
390 #if defined(PASTIX_DEBUG_FACTO)
391 coeftab_zdump( pastix_data, sopalin_data->solvmtx,
"potrf" );
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_zpotrfsp1dplus_update(SolverMatrix *solvmtx, SolverBlok *blok, pastix_complex64_t *work, pastix_int_t lwork)
Apply the updates of the cholesky factorisation of a given panel.
int cpucblk_zpotrfsp1dplus(SolverMatrix *solvmtx, SolverCblk *cblk)
Perform the Cholesky 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.
int cpucblk_zpotrfsp1d(SolverMatrix *solvmtx, SolverCblk *cblk, pastix_complex64_t *work, pastix_int_t lwork)
Perform the Cholesky factorization of a given panel and apply all its updates.
void cpucblk_zrequest_cleanup(pastix_coefside_t side, pastix_int_t sched, SolverMatrix *solvmtx)
Waitall routine for current cblk request.
pastix_compress_when_t compress_when
void parsec_zpotrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
Perform a sparse Cholesky factorization using PaRSEC runtime.
Main PaStiX data structure.
void starpu_zpotrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
Perform a sparse Cholesky factorization using StarPU runtime.
void sopalin_zpotrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void dynamic_zpotrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void static_zpotrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void thread_zpotrf_dynamic(isched_thread_t *ctx, void *args)
TODO.
void sequential_zpotrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void thread_zpotrf_static(isched_thread_t *ctx, void *args)
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.