On 18/07/16 15:49, Lulu Liu wrote:
> Hi,
> 
> I add the following lines in the example
> /petsc/src/snes/examples/tutorials/ex19. When I run this example using
> different numbers of processors, n always equals to 1. However,
> according to the manual, n is the number of subproblems in the domain
> decomposition. I feel confused why n does not return the number of
> processors, could you explain it? Thanks!
> 
>  PetscInt n;
>  DM *subdms;
>  ierr
> =DMCreateDomainDecomposition(da,&n,NULL,NULL,NULL,&subdms);CHKERRQ(ierr);
>  PetscPrintf(PETSC_COMM_WORLD,"### n==%d\n", n);
>

You need to do -da_local_subdomains nsubdomain_per_process

or else call DMDASetNumLocalSubdomains

Cheers,

Lawrence

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to