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 ) {
107 sopalin_data_t *sopalin_data = (sopalin_data_t*)args;
111 pastix_complex64_t *work;
114 int rank = ctx->rank;
116 lwork = datacode->gemmmax;
120 lwork = pastix_imax( lwork, 2 * datacode->blokmax );
122 MALLOC_INTERN( work, lwork, pastix_complex64_t );
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_zgetrf_t *arg = (
struct args_zgetrf_t*)args;
200 sopalin_data_t *sopalin_data = arg->sopalin_data;
206 pastix_complex64_t *work;
209 int32_t local_taskcnt = 0;
210 int rank = ctx->rank;
212 lwork = datacode->gemmmax;
216 lwork = pastix_imax( lwork, 2 * datacode->blokmax );
218 MALLOC_INTERN( work, lwork, pastix_complex64_t );
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_zgetrf_t args_zgetrf = { sopalin_data, taskcnt };
321 MALLOC_INTERN( datacode->computeQueue,
326 memFree_null( datacode->computeQueue );
329 #ifndef DOXYGEN_SHOULD_SKIP_THIS
330 static void (*zgetrf_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 (*zgetrf)(
pastix_data_t *, sopalin_data_t *) = zgetrf_table[ sched ];
368 if (zgetrf == NULL) {
381 zgetrf( pastix_data, sopalin_data );
392 #if defined(PASTIX_DEBUG_FACTO)
393 coeftab_zdump( pastix_data, sopalin_data->solvmtx,
"getrf" );
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.
int cpucblk_zgetrfsp1dplus(SolverMatrix *solvmtx, SolverCblk *cblk)
Perform the LU factorization of a given panel and submit tasks for the subsequent updates.
void cpucblk_zgetrfsp1dplus_update(SolverMatrix *solvmtx, SolverBlok *blok, pastix_complex64_t *work, pastix_int_t lwork)
Apply the updates of the LU factorisation of a given panel.
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_zgetrfsp1d(SolverMatrix *solvmtx, SolverCblk *cblk, pastix_complex64_t *work, pastix_int_t lwork)
Perform the LU 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_zgetrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
Perform a sparse LU factorization using PaRSEC runtime.
Main PaStiX data structure.
void starpu_zgetrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
Perform a sparse LU factorization using StarPU runtime.
void thread_zgetrf_dynamic(isched_thread_t *ctx, void *args)
TODO.
void static_zgetrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void sequential_zgetrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void dynamic_zgetrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void sopalin_zgetrf(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data)
TODO.
void thread_zgetrf_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.