[petsc-users] NASM FormFunctionLocal

Matthew Knepley knepley at gmail.com
Sat May 30 09:55:42 CDT 2015


On Sat, May 30, 2015 at 5:05 AM, Rongliang Chen <rongliang.chan at gmail.com>
wrote:

> Hi there,
>
> I am trying to use NASM to solve a nonlinear problem. In my
> FormFunctionLocal, I need to call DMDAVecGetArray(da, myvec, z). For the
> "-da_overlap 0" case, the code works fine.
>
> For the "-da_overlap 1" case, when I use the vector "myvec" created by
> DMCreateLocalVector, it works fine. But if I use the vector "myvec" created
> by DMCreateGlobalVector, I got the error messages:
> -----------------------
> [6]Arguments are incompatible
> [6]PETSC ERROR: Vector local size 597870 is not compatible with DMDA local
> sizes 619528 664392
> ----------------------
>
> And when I switch to "-da_overlap 2", both of the global and local version
> of "mrvec" got error messages:
> ----------------------------------
> [10]PETSC ERROR: Arguments are incompatible
> [10]PETSC ERROR: Vector local size 589680 is not compatible with DMDA
> local sizes 633144 678680
>
> [3]PETSC ERROR: Arguments are incompatible
> [3]PETSC ERROR: Vector local size 619528 is not compatible with DMDA local
> sizes 650256 696540
> -----------------------------------
>
> Can any one tell me how to use DMDAVecGetArray in FormFunctionLocal for
> NASM? Thanks.
>

1) You have to show the full error messages

2) You should simplify the problem for debugging. Run on 1 or 2 processes

3) The vector that comes into FormFunctionLocal() is a local vector

  Thanks,

    Matt


> Best regards,
> Rongliang
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150530/b4245bed/attachment.html>


More information about the petsc-users mailing list