[petsc-users] calling lapack for LU decomposition
Michael Povolotskyi
mpovolot at purdue.edu
Mon Nov 4 14:27:34 CST 2013
Dear Petsc developers,
in my work I need to measure the multi threading performance of LAPACK
function dgetrf
Since all matrices are of PETSc type I'd like to call Petsc functions
for the LU decomposition.
My code reads like this
Mat A; //serial dense matrix
PetscErrorCode ierr;
KSP ksp;
Mat F;
PC pc;
ierr = KSPCreate(comm, &ksp);
ierr = KSPSetOperators(ksp, A, A, SAME_PRECONDITIONER);
ierr = KSPSetType(ksp, KSPPREONLY);
ierr = KSPGetPC(ksp, &pc);
ierr = PCSetType(pc, PCLU);
ierr = PCFactorSetMatSolverPackage(pc, "petsc");
ierr = KSPSetUp(ksp);
ierr = PCFactorGetMatrix(pc, &F);
Is this a correct way to call dgetrf ?
Thank you,
Michael.
--
Michael Povolotskyi, PhD
Research Assistant Professor
Network for Computational Nanotechnology
207 S Martin Jischke Drive
Purdue University, DLR, room 441-10
West Lafayette, Indiana 47907
phone: +1-765-494-9396
fax: +1-765-496-6026
More information about the petsc-users
mailing list