24 #include "sopalin/sopalin_data.h"
28 #if defined(PASTIX_WITH_PARSEC)
32 #if defined(PASTIX_WITH_STARPU)
52 sopalin_data_t *sopalin_data )
60 lwork = datacode->gemmmax;
64 lwork = pastix_imax( lwork, 2 * datacode->blokmax );
69 for (i=0; i<datacode->
cblknbr; i++, cblk++){
70 if ( cblk->
cblktype & CBLK_IN_SCHUR ) {
107 sopalin_data_t *sopalin_data = (sopalin_data_t*)args;
114 int rank = ctx->rank;
116 lwork = datacode->gemmmax;
120 lwork = pastix_imax( lwork, 2 * datacode->blokmax );
124 tasknbr = datacode->ttsknbr[rank];
125 tasktab = datacode->ttsktab[rank];
127 for (ii=0; ii<tasknbr; ii++) {
129 t = datacode->tasktab + i;
132 if ( cblk->
cblktype & CBLK_IN_SCHUR ) {
148 memFree_null( work );
167 sopalin_data_t *sopalin_data )
177 sopalin_data_t *sopalin_data;
178 volatile int32_t taskcnt;
199 struct args_cgetrf_t *arg = (
struct args_cgetrf_t*)args;
200 sopalin_data_t *sopalin_data = arg->sopalin_data;
209 int32_t local_taskcnt = 0;
210 int rank = ctx->rank;
212 lwork = datacode->gemmmax;
216 lwork = pastix_imax( lwork, 2 * datacode->blokmax );
221 tasknbr = datacode->ttsknbr[rank];
222 tasktab = datacode->ttsktab[rank];
223 computeQueue = datacode->computeQueue[rank];
227 for (ii=0; ii<tasknbr; ii++) {
229 t = datacode->tasktab + i;
238 isched_barrier_wait( &(ctx->global_ctx->barrier) );
240 while( arg->taskcnt > 0 )
244 #if defined(PASTIX_WITH_MPI)
246 if( cblknum == -1 ) {
253 if( cblknum == -1 ) {
254 if ( local_taskcnt ) {
255 pastix_atomic_sub_32b( &(arg->taskcnt), local_taskcnt );
259 ctx->global_ctx->world_size );
263 if ( cblknum == -1 ) {
267 if ( cblknum >= 0 ) {
268 cblk = datacode->
cblktab + cblknum;
269 if ( cblk->
cblktype & CBLK_IN_SCHUR ) {
275 if ( cblk->
cblktype & CBLK_TASKS_2D ) {
284 bloknum = - cblknum - 1;
285 blok = datacode->
bloktab + bloknum;
290 memFree_null( work );
293 isched_barrier_wait( &(ctx->global_ctx->barrier) );
295 memFree_null( computeQueue );
314 sopalin_data_t *sopalin_data )
317 int32_t taskcnt = datacode->tasknbr_1dp;
318 struct args_cgetrf_t args_cgetrf = { sopalin_data, taskcnt };
321 MALLOC_INTERN( datacode->computeQueue,
326 memFree_null( datacode->computeQueue );
329 #ifndef DOXYGEN_SHOULD_SKIP_THIS
330 static void (*cgetrf_table[5])(
pastix_data_t *, sopalin_data_t *) = {
333 #if defined(PASTIX_WITH_PARSEC)
338 #if defined(PASTIX_WITH_STARPU)
363 sopalin_data_t *sopalin_data )
366 void (*cgetrf)(
pastix_data_t *, sopalin_data_t *) = cgetrf_table[ sched ];
368 if (cgetrf == NULL) {
381 cgetrf( pastix_data, sopalin_data );
392 #if defined(PASTIX_DEBUG_FACTO)
393 coeftab_cdump( pastix_data, sopalin_data->solvmtx,
"getrf" );
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_cgetrfsp1dplus_update(SolverMatrix *solvmtx, SolverBlok *blok, pastix_complex32_t *work, pastix_int_t lwork)
Apply the updates of the LU factorisation of a given panel.
int cpucblk_cgetrfsp1dplus(SolverMatrix *solvmtx, SolverCblk *cblk)
Perform the LU factorization of a given panel and submit tasks for the subsequent updates.
void cpucblk_crequest_cleanup(pastix_coefside_t side, pastix_int_t sched, SolverMatrix *solvmtx)
Waitall routine for current cblk request.
int cpucblk_cgetrfsp1d(SolverMatrix *solvmtx, SolverCblk *cblk, pastix_complex32_t *work, pastix_int_t lwork)
Perform the LU factorization of a given panel and apply all its updates.
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_cgetrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
Perform a sparse LU factorization using PaRSEC runtime.
Main PaStiX data structure.
void starpu_cgetrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
Perform a sparse LU factorization using StarPU runtime.
void thread_cgetrf_static(isched_thread_t *ctx, void *args)
TODO.
void thread_cgetrf_dynamic(isched_thread_t *ctx, void *args)
TODO.
void static_cgetrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void sequential_cgetrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void sopalin_cgetrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void dynamic_cgetrf(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.