### Output of SCALAPACK pdgetrf as input for LAPACK dgesv

Posted:

**Wed Apr 11, 2018 10:15 am**Dear all,

I try to use the output of the SCALAPACK routine pdgetrf (LU factorization) as input for the LAPACK routine dgesv.

In the first phase the factorization is done with several MPI processes (pdgetrf).

In the second phase, the distributed matrix is gathered to process 0 (pdgeadd).

In the third phase, the linear system is solved on the process 0 (dgesv).

My question is about the second phase: How to gather the pivoting information ?

Here is a pseudocode:

Thank you,

Dmirtry

I try to use the output of the SCALAPACK routine pdgetrf (LU factorization) as input for the LAPACK routine dgesv.

In the first phase the factorization is done with several MPI processes (pdgetrf).

In the second phase, the distributed matrix is gathered to process 0 (pdgeadd).

In the third phase, the linear system is solved on the process 0 (dgesv).

My question is about the second phase: How to gather the pivoting information ?

Here is a pseudocode:

- Code: Select all
`//LU Decomposition`

pdgetrf_(&rowsGlobal,&colsGlobal,ADistr,&i_one,&i_one,descADistr,IPIV,&Ret);

//Gather Matrix to proc 0

pdgeadd_("N",&rowsGlobal, &colsGlobal, &one, ADistr,&i_one, &i_one, itsDescADistr, &zero, AResult, &i_one, &i_one, itsDescAResult);

//Gather IPIV to IPIV0

???????

MPI_Barrier(MPI_COMM_WORLD);

//Solve the linear system on proc 0

if(my_rank==0)

dgesv_(&rowsGlobal, &i_one, AResult, &rowsGlobal, &IPIV0, b, &rowsGlobal, &Ret);

Thank you,

Dmirtry