[petsc-users] Processor's coarse DMDA must lie over fine DMDA ( i_start 1375 i_c 687 i_start_ghost_c 689)

Smith, Barry F. bsmith at mcs.anl.gov
Sat May 11 20:24:22 CDT 2019


   Check the source code for exact details.


> On May 11, 2019, at 5:58 PM, Fande Kong via petsc-users <petsc-users at mcs.anl.gov> wrote:
> 
> Hi All,
> 
> I was running src/mat/examples/tests/ex96.c  with "-Mx 1000 -My 1000 -Mz 1000"  with 8192 MPI ranks, and got the message.  If I changed the mesh size a little bit (such as -Mx 400 -My 400 -Mz 400), then the code ran fine. 
> 
> The relationship between the coarse mesh and the fine mesh is defined through the following code
> 
> 
>   user.ratio     = 2;
>   user.coarse.mx = 20; user.coarse.my = 20; user.coarse.mz = 20;
> 
>   ierr = PetscOptionsGetInt(NULL,NULL,"-Mx",&user.coarse.mx,NULL);CHKERRQ(ierr);
>   ierr = PetscOptionsGetInt(NULL,NULL,"-My",&user.coarse.my,NULL);CHKERRQ(ierr);
>   ierr = PetscOptionsGetInt(NULL,NULL,"-Mz",&user.coarse.mz,NULL);CHKERRQ(ierr);
>   ierr = PetscOptionsGetInt(NULL,NULL,"-ratio",&user.ratio,NULL);CHKERRQ(ierr);
> 
>   if (user.coarse.mz) Test_3D = PETSC_TRUE;
> 
>   user.fine.mx = user.ratio*(user.coarse.mx-1)+1;
>   user.fine.my = user.ratio*(user.coarse.my-1)+1;
>   user.fine.mz = user.ratio*(user.coarse.mz-1)+1;
> 
> 
> I was wondering what is the rule to determine what sizes I could pass in? 
> 
> Thanks,
> 
> Fande,



More information about the petsc-users mailing list