Commit 482bffea authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Do not factorize the schur complement

parent c3495d57
......@@ -155,7 +155,6 @@ pastixInitParam( pastix_int_t *iparm,
iparm[IPARM_MURGE_REFINEMENT] = API_YES;
iparm[IPARM_TRANSPOSE_SOLVE] = API_NO;
/**
* Communication modes
*/
......@@ -188,7 +187,6 @@ pastixInitParam( pastix_int_t *iparm,
}
#endif /* defined(PASTIX_WITH_MPI) */
iparm[IPARM_NB_THREAD_COMM] = 1; /* Nb thread quand iparm[IPARM_THREAD_COMM_MODE] == API_THCOMM_DEFINED */
iparm[IPARM_FILL_MATRIX] = API_NO; /* fill matrix */
iparm[IPARM_INERTIA] = -1;
......
......@@ -628,7 +628,7 @@ void solve_ztrsmsp( int side, int uplo, int trans, int diag,
lda = (cblk->cblktype & CBLK_LAYOUT_2D) ? blok_rownbr( cblk->fblokptr ) : cblk->stride;
/*
* Left / Upper / NoTrans
* Left / Upper / NoTrans (Backward)
*/
if (side == PastixLeft) {
if (uplo == PastixUpper) {
......@@ -707,7 +707,7 @@ void solve_ztrsmsp( int side, int uplo, int trans, int diag,
}
}
/*
* Left / Upper / [Conj]Trans
* Left / Upper / [Conj]Trans (Forward)
*/
else {
assert(0 /* Not implemented */);
......@@ -717,7 +717,7 @@ void solve_ztrsmsp( int side, int uplo, int trans, int diag,
A = (pastix_complex64_t*)(cblk->lcoeftab);
/*
* Left / Lower / NoTrans
* Left / Lower / NoTrans (Forward)
*/
if (trans == PastixNoTrans) {
......@@ -741,6 +741,10 @@ void solve_ztrsmsp( int side, int uplo, int trans, int diag,
tempm = blok->lrownum - blok->frownum + 1;
lrA = blok->LRblock;
/* Do not solve the schur */
if (fcbk->cblktype & CBLK_IN_SCHUR ) {
break;
}
assert( blok->frownum >= fcbk->fcolnum );
assert( tempm <= (fcbk->lcolnum - fcbk->fcolnum + 1));
......@@ -794,6 +798,11 @@ void solve_ztrsmsp( int side, int uplo, int trans, int diag,
fcbk = datacode->cblktab + blok->fcblknm;
tempm = blok->lrownum - blok->frownum + 1;
/* Do not solve the schur */
if (fcbk->cblktype & CBLK_IN_SCHUR ) {
break;
}
assert( blok->frownum >= fcbk->fcolnum );
assert( tempm <= (fcbk->lcolnum - fcbk->fcolnum + 1));
......@@ -814,7 +823,7 @@ void solve_ztrsmsp( int side, int uplo, int trans, int diag,
}
}
/*
* Left / Lower / [Conj]Trans
* Left / Lower / [Conj]Trans (Backward)
*/
else {
......@@ -897,5 +906,3 @@ void solve_ztrsmsp( int side, int uplo, int trans, int diag,
assert(0 /* Not implemented */);
}
}
......@@ -48,6 +48,9 @@ sequential_zdiag( pastix_data_t *pastix_data, sopalin_data_t *sopalin_data,
pastix_complex64_t *tmp, *lb;
pastix_int_t size = cblk->lcolnum - cblk->fcolnum + 1;
if ( cblk->cblktype & CBLK_IN_SCHUR )
break;
lb = b + cblk->lcolidx;
if( nrhs == 1 ) {
......@@ -102,6 +105,9 @@ thread_pzdiag( isched_thread_t *ctx, void *args )
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
if ( cblk->cblktype & CBLK_IN_SCHUR )
continue;
pastix_complex64_t *coeftab = cblk->lcoeftab;
pastix_complex64_t *tmp, *lb;
pastix_int_t size = cblk->lcolnum - cblk->fcolnum + 1;
......
......@@ -50,6 +50,10 @@ sequential_zgetrf( pastix_data_t *pastix_data,
cblk = datacode->cblktab;
for (i=0; i<datacode->cblknbr; i++, cblk++){
if ( cblk->cblktype & CBLK_IN_SCHUR )
break;
/* Compute */
core_zgetrfsp1d( datacode, cblk, threshold, work );
}
......@@ -83,6 +87,9 @@ thread_pzgetrf( isched_thread_t *ctx, void *args )
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
if ( cblk->cblktype & CBLK_IN_SCHUR )
continue;
/* Wait */
do {} while( cblk->ctrbcnt );
......
......@@ -45,6 +45,10 @@ sequential_zhetrf( pastix_data_t *pastix_data,
cblk = datacode->cblktab;
for (i=0; i<datacode->cblknbr; i++, cblk++){
if ( cblk->cblktype & CBLK_IN_SCHUR )
break;
/* Compute */
core_zhetrfsp1d( datacode, cblk, threshold,
work1, work2 );
......@@ -82,6 +86,9 @@ thread_pzhetrf( isched_thread_t *ctx, void *args )
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
if ( cblk->cblktype & CBLK_IN_SCHUR )
continue;
/* Wait */
do {} while( cblk->ctrbcnt );
......
......@@ -47,6 +47,10 @@ sequential_zpotrf( pastix_data_t *pastix_data,
cblk = datacode->cblktab;
for (i=0; i<datacode->cblknbr; i++, cblk++){
if ( cblk->cblktype & CBLK_IN_SCHUR )
break;
/* Compute */
core_zpotrfsp1d( datacode, cblk, threshold, work );
}
......@@ -80,6 +84,9 @@ thread_pzpotrf( isched_thread_t *ctx, void *args )
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
if ( cblk->cblktype & CBLK_IN_SCHUR )
continue;
/* Wait */
do {} while( cblk->ctrbcnt );
......
......@@ -45,6 +45,10 @@ sequential_zsytrf( pastix_data_t *pastix_data,
cblk = datacode->cblktab;
for (i=0; i<datacode->cblknbr; i++, cblk++){
if ( cblk->cblktype & CBLK_IN_SCHUR )
break;
/* Compute */
core_zsytrfsp1d( datacode, cblk, threshold,
work1, work2 );
......@@ -82,6 +86,9 @@ thread_pzsytrf( isched_thread_t *ctx, void *args )
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
if ( cblk->cblktype & CBLK_IN_SCHUR )
continue;
/* Wait */
do {} while( cblk->ctrbcnt );
......
......@@ -52,6 +52,10 @@ sequential_ztrsm( pastix_data_t *pastix_data, int side, int uplo, int trans, int
{
cblk = datacode->cblktab + datacode->cblknbr - 1;
for (i=0; i<datacode->cblknbr; i++, cblk--){
if ( cblk->cblktype & CBLK_IN_SCHUR )
continue;
solve_ztrsmsp( side, uplo, trans, diag,
datacode, cblk, nrhs, b, ldb );
}
......@@ -66,6 +70,10 @@ sequential_ztrsm( pastix_data_t *pastix_data, int side, int uplo, int trans, int
{
cblk = datacode->cblktab;
for (i=0; i<datacode->cblknbr; i++, cblk++){
if ( cblk->cblktype & CBLK_IN_SCHUR )
break;
solve_ztrsmsp( side, uplo, trans, diag,
datacode, cblk, nrhs, b, ldb );
}
......@@ -95,6 +103,7 @@ thread_pztrsm( isched_thread_t *ctx, void *args )
int nrhs = arg->nrhs;
int ldb = arg->ldb;
SolverCblk *cblk;
SolverBlok *blok;
Task *t;
pastix_int_t i,ii;
pastix_int_t tasknbr, *tasktab;
......@@ -114,7 +123,16 @@ thread_pztrsm( isched_thread_t *ctx, void *args )
i = tasktab[ii];
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
cblk->ctrbcnt = (cblk[1].fblokptr-cblk[0].fblokptr)-1;
/* Start with the last block of the column */
blok = (cblk[1].fblokptr) - 1;
while( (blok > cblk[0].fblokptr) &&
(datacode->cblktab + blok->fcblknm)->cblktype & CBLK_IN_SCHUR )
{
/* Move up as long as facing Schur */
blok--;
}
cblk->ctrbcnt = (blok - cblk[0].fblokptr);
}
isched_barrier_wait( &(ctx->global_ctx->barrier) );
......@@ -123,6 +141,9 @@ thread_pztrsm( isched_thread_t *ctx, void *args )
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
if ( cblk->cblktype & CBLK_IN_SCHUR )
continue;
/* Wait */
do {} while( cblk->ctrbcnt );
......@@ -153,6 +174,9 @@ thread_pztrsm( isched_thread_t *ctx, void *args )
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
if ( cblk->cblktype & CBLK_IN_SCHUR )
continue;
/* Wait */
do {} while( cblk->ctrbcnt );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment