23 #include "sopalin/sopalin_data.h"
26 #if defined(PASTIX_WITH_STARPU)
50 sopalin_data_t *sopalin_data,
60 cblknbr = (mode == PastixSolvModeSchur) ? datacode->
cblknbr : datacode->
cblkschur;
61 for ( i = 0; i < cblknbr; i++, cblk++ ) {
62 if ( cblk->
ownerid != datacode->clustnum ) {
76 sopalin_data_t *sopalin_data;
78 volatile int32_t taskcnt;
100 struct args_cdiag_t *arg = (
struct args_cdiag_t*)args;
102 sopalin_data_t *sopalin_data = arg->sopalin_data;
112 int rank = ctx->rank;
114 tasknbr = datacode->ttsknbr[rank];
115 tasktab = datacode->ttsktab[rank];
116 cblknbr = (mode == PastixSolvModeSchur) ? datacode->
cblknbr : datacode->
cblkschur;
118 for (ii=0; ii<tasknbr; ii++) {
120 t = datacode->tasktab + i;
126 if ( cblk->
ownerid != datacode->clustnum ) {
130 nrhs, b + cblk->
lcolidx, ldb, NULL );
154 sopalin_data_t *sopalin_data,
157 struct args_cdiag_t args_cdiag = {pastix_data, sopalin_data, rhsb, 0};
180 struct args_cdiag_t *arg = (
struct args_cdiag_t*)args;
182 sopalin_data_t *sopalin_data = arg->sopalin_data;
187 int32_t local_taskcnt = 0;
194 int rank = ctx->rank;
198 tasknbr = datacode->ttsknbr[rank];
199 tasktab = datacode->ttsktab[rank];
200 computeQueue = datacode->computeQueue[rank];
202 cblknbr = (mode == PastixSolvModeSchur) ? datacode->
cblknbr : datacode->
cblkschur;
204 for ( ii = 0; ii < tasknbr; ii++ ) {
206 t = datacode->tasktab + i;
216 isched_barrier_wait( &(ctx->global_ctx->barrier) );
219 while( arg->taskcnt > 0 ) {
222 if( cblknum == -1 ) {
223 if ( local_taskcnt ) {
224 pastix_atomic_sub_32b( &(arg->taskcnt), local_taskcnt );
228 ctx->global_ctx->world_size );
230 if( cblknum != -1 ) {
231 cblk = datacode->
cblktab + cblknum;
233 nrhs, b + cblk->
lcolidx, ldb, NULL );
238 isched_barrier_wait( &(ctx->global_ctx->barrier) );
240 memFree_null( computeQueue );
263 sopalin_data_t *sopalin_data,
268 sopalin_data->solvmtx->cblknbr : sopalin_data->solvmtx->cblkschur;
269 struct args_cdiag_t args_cdiag = { pastix_data, sopalin_data, rhsb, tasknbr };
271 MALLOC_INTERN( sopalin_data->solvmtx->computeQueue,
275 memFree_null( sopalin_data->solvmtx->computeQueue );
278 #ifndef DOXYGEN_SHOULD_SKIP_THIS
282 #if defined(PASTIX_WITH_PARSEC)
287 #if defined(PASTIX_WITH_STARPU)
316 sopalin_data_t *sopalin_data,
325 cdiag( pastix_data, sopalin_data, rhsb );
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 solve_cblk_cdiag(const SolverCblk *cblk, const void *dataA, int nrhs, pastix_complex32_t *b, int ldb, pastix_complex32_t *work)
Apply the diagonal solve related to one cblk to all the right hand side.
enum pastix_solv_mode_e pastix_solv_mode_t
Solve Schur modes.
Main PaStiX data structure.
Main PaStiX RHS structure.
void starpu_cdiag(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data, pastix_rhs_t rhsb)
Apply the diagonal solve (StarPU version)
void sequential_cdiag(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data, pastix_rhs_t rhsb)
Apply the diagonal solve (sequential version)
void static_cdiag(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data, pastix_rhs_t rhsb)
Apply the diagonal solve (static version)
void thread_cdiag_static(isched_thread_t *ctx, void *args)
Applies the diagonal solve.
void dynamic_cdiag(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data, pastix_rhs_t rhsb)
Apply the diagonal solve (dynamic version)
void thread_cdiag_dynamic(isched_thread_t *ctx, void *args)
Applies the diagonal solve.
void sopalin_cdiag(pastix_data_t *pastix_data, sopalin_data_t *sopalin_data, pastix_rhs_t rhsb)
Apply the diagonal solve.
static pastix_int_t stealQueue(SolverMatrix *solvmtx, int rank, int nbthreads)
Task stealing method.
static void * cblk_getdataL(const SolverCblk *cblk)
Get the pointer to the data associated to the lower part of the cblk.
SolverCblk *restrict cblktab
Solver column block structure.
Solver column block structure.
The task structure for the numerical factorization.