[petsc-users] [2]PETSC ERROR: MatPermute not available for Mat type mpiaij!

Barry Smith bsmith at mcs.anl.gov
Mon Sep 16 20:04:11 CDT 2013


  I thought we discussed this before and stated that reordering the matrix, without reordering the mesh first for Krylov methods is not the correct approach.

   Barry

On Sep 16, 2013, at 7:17 PM, 丁老师 <ztdepyahoo at 163.com> wrote:

> Daer Barry:
>     Matrix A is the coeffcients not the mesh. I use the MatPermute following the ksp examples in dev version ex18. 
> After the line 77, we declared a parallel matrix , at line 78, we declare a seq matrix.
> so what is this seq matrix for ?
>  77:   MatMPIAIJSetPreallocation
> (A,5,NULL,5,NULL);
> 
>  78:   MatSeqAIJSetPreallocation(A,5,NULL);
> 
> 
> 
> 
> 
> 
> 
> At 2013-09-17 00:19:39,"Barry Smith" <bsmith at mcs.anl.gov> wrote:
> >
> >   I assume that his matrix A is suppose to represent the connections in the mesh.
> >
> >   1) You only want to reorder the mesh locally (assuming you have already partitioned the mesh in parallel for good load balancing and low number of cut eges) so each process will call MatCreate() with PETSC_COMM_SELF and each set a matrix associated only with the local part of the mesh.
> >
> >   2) You don't want to use MatPermute() rather you would use MatGetOrdering() which tells you how to reorder the unknowns on the mesh on each process.  For the ordering I think you want to use MATORDERINGRCM. Now you just renumber the mesh nodes on each process and update the the ghost node information to reflect the new ordering.
> >
> >   Barry
> >
> >
> >On Sep 16, 2013, at 7:14 AM, 丁老师 <ztdepyahoo at 163.com> wrote:
> >
> >> i set up my matrix A with 
> >>   MatCreate(PETSC_COMM_WORLD,&A);
> >>   MatSetSizes(A,PMesh->LocalSize,PMesh->LocalSize,PETSC_DECIDE,PETSC_DECIDE);
> >>   MatSetFromOptions(A);
> >>   MatMPIAIJSetPreallocation(A,5,PETSC_NULL,5,PETSC_NULL);
> >> 
> >> 
> >> then which type should i use to support the matpermute.
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> < span title="neteasefooter">
> >
> 
> 
> 



More information about the petsc-users mailing list