[petsc-users] Transpose of rectangular dense parallel matrix
Hong
hzhang at mcs.anl.gov
Tue Feb 3 23:11:42 CST 2015
Ghosh:
For parallel dense matrix-matrix operations, suggest using Elemental
package http://libelemental.org
Hong
>
>
> I am trying to calculate the transpose of a dense rectangular matrix
> (pSddft->YOrb, size=Npts x Nstates) and then MatMatMult
> I am creating the dense matrix first of size (Nstates x Npts) and then
> doing an inplace transpose.
> Both the dense rectangular matrices have the same parallel communicator
> PetscObjectComm((PetscObject)pSddft->da).
>
> The following steps are the steps
>
>
> PetscInt rowloc,colloc;
> MatGetLocalSize(pSddft->YOrb,&rowloc,&colloc);
>
>
> MatCreate(PetscObjectComm((PetscObject)pSddft->da),&pSddft->YOrbTranspose);
>
>
> MatSetSizes(pSddft->YOrbTranspose,colloc,rowloc,PETSC_DETERMINE,PETSC_DETERMINE);
> MatSetType(pSddft->YOrbTranspose,MATDENSE);
> MatSetFromOptions(pSddft->YOrbTranspose);
> MatSetUp(pSddft->YOrbTranspose);
>
>
> MatTranspose(pSddft->YOrb,MAT_INITIAL_MATRIX,&pSddft->YOrbTranspose);
>
> MatMatMultNumeric(pSddft->YOrbTranspose,HpsiMat,HsubDense);
>
> The matrix HpsiMat has the same parallel communicator as pSddft->YOrb
> The code works fine on 1 core but I am getting segmentation fault in the
> MatMatMultNumeric step for more than 1 cores.
> So I think the problem is due to the way I am setting up the communicator
> of transpose matrix.
>
> Could you please tell me if there is a general way of creating a transpose
> of a rectangular dense parallel matrix and use it for matrix matrix
> multiplication?
>
>
>
>
>
>
>
>
>
>
> --
> Swarnava Ghosh
> PhD Candidate,
> Structural Engineering, Mechanics and Materials
> School of Civil and Environmental Engineering
> Georgia Institute of Technology
> Atlanta, GA 30332
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150203/c5169d3c/attachment.html>
More information about the petsc-users
mailing list