Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Rongliang Chen
aturday, April 2, 2016 at 3:51 AM To: PETSc users list mailto:petsc-users@mcs.anl.gov>>, "rongliang.c...@gmail.com <mailto:rongliang.c...@gmail.com>"

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Matthew Knepley
gt; No - you should change it in your function FormMassTimeStepFunction(). >>>>>> The input vector x passed into SNESComputeFunction() is read only. >>>>>> >>>>>> >>>>>> >>>>>>> I tried it and I got a

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Rongliang Chen
o:petsc-users@mcs.anl.gov>>, "rongliang.c...@gmail.com <mailto:rongliang.c...@gmail.com>" mailto:rongliang.c...@gmail.com>> Subject: [petsc-users] Vec is locked

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Matthew Knepley
incompatible pointer type >>>>>> [enabled by default] >>>>>> In file included from >>>>>> /home/rlchen/soft/petsc-3.6.3/include/petscmat.h:6:0, >>>>>> from /home/rlchen/soft/petsc-3.6.3/include/petscdm.h:6, >>>>>> from /ho

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Rongliang Chen
;mailto:rongliang.c...@gmail.com>" mailto:rongliang.c...@gmail.com>> Subject: [petsc-users] Vec is locked read only Dear All, My code got the following error

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Matthew Knepley
>>>> from /home/rlchen/soft/petsc-3.6.3/include/petsc/private/dmimpl.h:6, >>>>> from /home/rlchen/soft/petsc-3.6.3/src/dm/interface/dm.c:1: >>>>> /home/rlchen/soft/petsc-3.6.3/include/petscvec.h:420:29: note: >>>>> expected ‘const PetscScalar **’

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Rongliang Chen
tsc-users@mcs.anl.gov>>, "rongliang.c...@gmail.com <mailto:rongliang.c...@gmail.com>" mailto:rongliang.c...@gmail.com>> Subject: [petsc-users] Vec is locked read only Dear All,

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Matthew Knepley
calar **’ >>>> >>>> Best regards, >>>> Rongliang >>>> >>>> - >>>> Rongliang Chen, PhD >>>> Associate Professor >>>> >>>> Laboratory for Engineering and Scientific Computing

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Rongliang Chen
, 2016 at 3:51 AM To: PETSc users list mailto:petsc-users@mcs.anl.gov>>, "rongliang.c...@gmail.com <mailto:rongliang.c...@gmail.com>" mailto:rongliang.c...@gmail.com>> Subject: [petsc-users] V

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Matthew Knepley
Shenzhen University Town, Shenzhen, >>> Guangdong (518055), P. R. China >>> E-mail: rl.c...@siat.ac.cn >>> Phone: +86-755-86392312 >>> >>> >>> On 04/02/2016 05:03 PM, Abhyankar, Shrirang G. wrote: >>> >>>> Use VecGetArray

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Rongliang Chen
rs list mailto:petsc-users@mcs.anl.gov>>, "rongliang.c...@gmail.com <mailto:rongliang.c...@gmail.com>" mailto:rongliang.c...@gmail.com>> Subject: [petsc-users] Vec is locked read only Dear All, My code got the fol

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Matthew Knepley
Shrirang G. wrote: >> >>> Use VecGetArrayRead instead of VecGetArray >>> >>> >>> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecGetArray >>> Read.html >>> >>> >>> Shri >>> >>> -Origi

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Rongliang Chen
hen mailto:rl.c...@siat.ac.cn>> Date: Saturday, April 2, 2016 at 3:51 AM To: PETSc users list mailto:petsc-users@mcs.anl.gov>>, "rongliang.c...@gmail.com <mailto:rongliang.c...@gmail.com>" mailto:rongliang.c...@gmail.com>> Subject: [petsc

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Dave May
alpages/Vec/VecGetArray >> Read.html >> >> >> Shri >> >> -Original Message----- >> From: Rongliang Chen >> Date: Saturday, April 2, 2016 at 3:51 AM >> To: PETSc users list , "rongliang.c...@gmail.com >> " >> >> S

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Rongliang Chen
, April 2, 2016 at 3:51 AM To: PETSc users list , "rongliang.c...@gmail.com" Subject: [petsc-users] Vec is locked read only Dear All, My code got the following error messages, but the code works well for the petsc optimized version (--with-debugging=0). Anyone can tell me how to fix th

Re: [petsc-users] Vec is locked read only

2016-04-02 Thread Abhyankar, Shrirang G.
ct: [petsc-users] Vec is locked read only >Dear All, > >My code got the following error messages, but the code works well for >the petsc optimized version (--with-debugging=0). Anyone can tell me how >to fix this problem? > >Best regards, >Rongliang > > >[0]PETSC

[petsc-users] Vec is locked read only

2016-04-02 Thread Rongliang Chen
Dear All, My code got the following error messages, but the code works well for the petsc optimized version (--with-debugging=0). Anyone can tell me how to fix this problem? Best regards, Rongliang [0]PETSC ERROR: - Error Message