diff --git a/compute/pzgetrf.c b/compute/pzgetrf.c index cdc98668ccf450b9bbfeef9af564836fa85e3af4..0d17f0034ce15b08044f300c89bfd6d81480231a 100644 --- a/compute/pzgetrf.c +++ b/compute/pzgetrf.c @@ -147,10 +147,8 @@ chameleon_pzgetrf_panel_facto_percol( struct chameleon_pzgetrf_s *ws, ipiv ); } - if ( h < minmn ) { - /* Reduce globally (between MPI processes) */ - INSERT_TASK_ipiv_reducek( options, ipiv, k, h, A->myrank ); - } + /* Reduce globally (between MPI processes) */ + INSERT_TASK_zipiv_redux( A, options, ipiv, ws->proc_involved, k, h, tempkn ); } /* Flush temporary data used for the pivoting */ @@ -196,10 +194,7 @@ chameleon_pzgetrf_panel_facto_percol_batched( struct chameleon_pzgetrf_s *ws, } INSERT_TASK_zgetrf_panel_offdiag_batched_flush( options, A, k, clargs, ipiv ); - if ( h < minmn ) { - /* Reduce globally (between MPI processes) */ - INSERT_TASK_ipiv_reducek( options, ipiv, k, h, A->myrank ); - } + INSERT_TASK_zipiv_redux( A, options, ipiv, ws->proc_involved, k, h, tempkn ); } free( clargs ); @@ -255,19 +250,17 @@ chameleon_pzgetrf_panel_facto_blocked( struct chameleon_pzgetrf_s *ws, ipiv ); } - if ( (b < (nbblock-1)) && (h == hmax-1) ) { + assert( j <= minmn ); + /* Reduce globally (between MPI processes) */ + INSERT_TASK_zipiv_redux( A, options, ipiv, ws->proc_involved, k, j, tempkn ); + + if ( ( b < (nbblock-1) ) && ( h == hmax-1 ) ) { INSERT_TASK_zgetrf_blocked_trsm( options, - ws->ib, tempkn, b * ws->ib + hmax, ws->ib, + ws->ib, tempkn, j+1, ws->ib, Up(k, k), ipiv ); } - - assert( j<= minmn ); - if ( j < minmn ) { - /* Reduce globally (between MPI processes) */ - INSERT_TASK_ipiv_reducek( options, ipiv, k, j, A->myrank ); - } } } RUNTIME_data_flush( options->sequence, Up(k, k) ); @@ -319,6 +312,10 @@ chameleon_pzgetrf_panel_facto_blocked_batched( struct chameleon_pzgetrf_s *ws, INSERT_TASK_zgetrf_panel_blocked_batched_flush( options, A, k, Up(k, k), clargs, ipiv ); + assert( j <= minmn ); + /* Reduce globally (between MPI processes) */ + INSERT_TASK_zipiv_redux( A, options, ipiv, ws->proc_involved, k, j, tempkn ); + if ( (b < (nbblock-1)) && (h == hmax-1) ) { INSERT_TASK_zgetrf_blocked_trsm( options, @@ -326,12 +323,6 @@ chameleon_pzgetrf_panel_facto_blocked_batched( struct chameleon_pzgetrf_s *ws, Up(k, k), ipiv ); } - - assert( j <= minmn ); - if ( j < minmn ) { - /* Reduce globally (between MPI processes) */ - INSERT_TASK_ipiv_reducek( options, ipiv, k, j, A->myrank ); - } } }