[petsc-users] Vec is locked read only

Rongliang Chen rl.chen at siat.ac.cn
Sat Apr 2 03:51:40 CDT 2016


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 
--------------------------------------------------------------
[0]PETSC ERROR: Object is in wrong state
[0]PETSC ERROR:  Vec is locked read only, argument # 1
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html 
for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.6.3, Dec, 03, 2015
[0]PETSC ERROR: ./Nwtun on a 64bit-debug named rlchen by rlchen Sat Apr  
2 15:40:32 2016
[0]PETSC ERROR: Configure options --download-blacs --download-scalapack 
--download-metis --download-parmetis --download-exodusii 
--download-netcdf --download-hdf5 
--with-mpi-dir=/home/rlchen/soft/Program/mpich2-shared 
--with-debugging=1 --download-fblaslapack --download-chaco
[0]PETSC ERROR: #1 VecGetArray() line 1646 in 
/home/rlchen/soft/petsc-3.6.3/src/vec/vec/interface/rvector.c
[0]PETSC ERROR: #2 DMLocalToGlobalBegin() line 1913 in 
/home/rlchen/soft/petsc-3.6.3/src/dm/interface/dm.c
[0]PETSC ERROR: #3 FormMassTimeStepFunction() line 191 in 
/home/rlchen/soft/3D_fluid/FiniteVolumeMethod/PETScCodes/codefor3.6/SetupFunctions.c
[0]PETSC ERROR: #4 FormFunction() line 46 in 
/home/rlchen/soft/3D_fluid/FiniteVolumeMethod/PETScCodes/codefor3.6/SetupFunctions.c
[0]PETSC ERROR: #5 SNESComputeFunction() line 2067 in 
/home/rlchen/soft/petsc-3.6.3/src/snes/interface/snes.c
[0]PETSC ERROR: #6 SNESSolve_NEWTONLS() line 184 in 
/home/rlchen/soft/petsc-3.6.3/src/snes/impls/ls/ls.c
[0]PETSC ERROR: #7 SNESSolve() line 3906 in 
/home/rlchen/soft/petsc-3.6.3/src/snes/interface/snes.c
[0]PETSC ERROR: #8 SolveTimeDependent() line 843 in 
/home/rlchen/soft/3D_fluid/FiniteVolumeMethod/PETScCodes/codefor3.6/Nwtun.c
[0]PETSC ERROR: #9 main() line 452 in 
/home/rlchen/soft/3D_fluid/FiniteVolumeMethod/PETScCodes/codefor3.6/Nwtun.c




More information about the petsc-users mailing list