Hi,

When changing the solver on the fem_system_ex1 from DiffSolver to
a PetscDiffSolver there is a problem with a lock on PETSc vec.

The error is copied bellow and attached is the diff from master code and
modified.

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.7.5, Jan, 01, 2017
[0]PETSC ERROR: ./test on a linux-gnu-dbg named office by fcanesin Fri Mar
31 02:03:41 2017
[0]PETSC ERROR: Configure options PETSC_ARCH=linux-gnu-dbg --with-cc=clang
--with-cxx=clang++ --with-fc=0 --prefix=/home/fcanesin/libs/petsc
--download-metis --download-parmetis --download-openmpi
--download-f2cblaslapack --with-debugging=1
[0]PETSC ERROR: #1 VecGetArray() line 1647 in
/home/fcanesin/libs/petsc-clang/src/vec/vec/interface/rvector.c
[0]PETSC ERROR: #2 VecSetValues_MPI() line 876 in
/home/fcanesin/libs/petsc-clang/src/vec/vec/impls/mpi/pdvec.c
[0]PETSC ERROR: #3 VecSetValues() line 892 in
/home/fcanesin/libs/petsc-clang/src/vec/vec/interface/rvector.c

Regards,
Fabio
45a46
> #include "libmesh/petsc_diff_solver.h"
161,164c162,168
<   DiffSolver & solver = *(system.time_solver->diff_solver().get());
<   solver.quiet = infile("solver_quiet", true);
<   solver.verbose = !solver.quiet;
<   solver.max_nonlinear_iterations =
---
>   //DiffSolver & solver = *(system.time_solver->diff_solver().get());
>   PetscDiffSolver *solver = new PetscDiffSolver(system);
>   system.time_solver->diff_solver() = UniquePtr<DiffSolver>(solver);
> 
>   solver->quiet = infile("solver_quiet", true);
>   solver->verbose = !solver->quiet;
>   solver->max_nonlinear_iterations =
166c170
<   solver.relative_step_tolerance =
---
>   solver->relative_step_tolerance =
168c172
<   solver.relative_residual_tolerance =
---
>   solver->relative_residual_tolerance =
170c174
<   solver.absolute_residual_tolerance =
---
>   solver->absolute_residual_tolerance =
174c178
<   solver.max_linear_iterations =
---
>   solver->max_linear_iterations =
176c180
<   solver.initial_linear_tolerance =
---
>   solver->initial_linear_tolerance =
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to