This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

petsc and num_threads > 1

0 votes

I have a problem that solves using PETSc if parameters['num_threads'] = 1 but not when parameters['num_threads'] > 1. The error is below and has to do with PetscVector::get_local. Apparently the vector is in a bad state. Any idea how to change this?

Coloring mesh.
terminate called after throwing an instance of 'std::runtime_error'
  what():  

*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
***     fenics@fenicsproject.org
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error:   Unable to successfully call PETSc function 'VecGhostGetLocalForm'.
*** Reason:  PETSc error code is: 64.
*** Where:   This error was encountered inside /home/chaffra/Projects/FEniCS/src/dolfin/dolfin/la/PETScVector.cpp.
*** Process: 0
*** 
*** DOLFIN version: 1.6.0dev
*** Git changeset:  99eaea4eb6cd12074a45977d0552e3fbce6ab1b4
*** -------------------------------------------------------------------------

[affouda:01906] *** Process received signal ***
[affouda:01906] Signal: Aborted (6)
[affouda:01906] Signal code:  (-6)
[affouda:01906] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x7fec8eb7e340]
[affouda:01906] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39) [0x7fec8e7dfcc9]
[affouda:01906] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7fec8e7e30d8]
[affouda:01906] [ 3] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x155) [0x7fec88f1f535]
[affouda:01906] [ 4] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x5e6d6) [0x7fec88f1d6d6]
[affouda:01906] [ 5] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x5d799) [0x7fec88f1c799]
[affouda:01906] [ 6] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(__gxx_personality_v0+0x52a) [0x7fec88f1d34a]
[affouda:01906] [ 7] /lib/x86_64-linux-gnu/libgcc_s.so.1(+0xfff3) [0x7fec88cb8ff3]
[affouda:01906] [ 8] /lib/x86_64-linux-gnu/libgcc_s.so.1(_Unwind_Resume+0x57) [0x7fec88cb9517]
[affouda:01906] [ 9] /home/chaffra/Projects/FEniCS/lib/libdolfin.so.1.6(_ZNK6dolfin11PETScVector9get_localEPdmPKi+0x61d) [0x7fec6a921e3d]
[affouda:01906] [10] /home/chaffra/Projects/FEniCS/lib/libdolfin.so.1.6(_ZNK6dolfin8Function8restrictEPdRKNS_13FiniteElementERKNS_4CellEPKdRKN3ufc4cellE+0xda) [0x7fec6aafad1a]
[affouda:01906] [11] /home/chaffra/Projects/FEniCS/lib/libdolfin.so.1.6(_ZN6dolfin3UFC6updateERKNS_4CellERKSt6vectorIdSaIdEERKN3ufc4cellERKS4_IbSaIbEE+0xb6) [0x7fec6a82c0c6]
[affouda:01906] [12] /home/chaffra/Projects/FEniCS/lib/libdolfin.so.1.6(+0x1c47f6) [0x7fec6a85a7f6]
[affouda:01906] [13] /home/chaffra/Projects/FEniCS/lib/libdolfin.so.1.6(_ZN6dolfin15OpenMpAssembler14assemble_cellsERNS_13GenericTensorERKNS_4FormERNS_3UFCESt10shared_ptrIKNS_12MeshFunctionImEEEPSt6vectorIdSaIdEE+0x714) [0x7fec6a85d354]
[affouda:01906] [14] /home/chaffra/Projects/FEniCS/lib/libdolfin.so.1.6(_ZN6dolfin15OpenMpAssembler8assembleERNS_13GenericTensorERKNS_4FormE+0x4e6) [0x7fec6a860006]
[affouda:01906] [15] /home/chaffra/Projects/FEniCS/lib/libdolfin.so.1.6(_ZN6dolfin9Assembler8assembleERNS_13GenericTensorERKNS_4FormE+0x5a4) [0x7fec6a89c7c4]
[affouda:01906] [16] /home/chaffra/Projects/FEniCS/lib/python2.7/site-packages/semifem/cpp/_problem.so(_ZN7semifem16NonlinearProblem1FERN6dolfin13GenericVectorERKS2_+0x2f) [0x7fec51c7655f]
[affouda:01906] [17] /home/chaffra/Projects/FEniCS/lib/libdolfin.so.1.6(_ZN6dolfin12NewtonSolver5solveERNS_16NonlinearProblemERNS_13GenericVectorE+0x22d) [0x7fec6ab26d7d]
[affouda:01906] [18] /home/chaffra/Projects/FEniCS/lib/python2.7/site-packages/semifem/cpp/_solver.so(_ZN7semifem9DDMSolver5solveERN6dolfin16NonlinearProblemERNS1_13GenericVectorE+0x9) [0x7fec49fdebf9]
[affouda:01906] [19] /home/chaffra/Projects/FEniCS/lib/python2.7/site-packages/semifem/cpp/_solver.so(+0x21026) [0x7fec49fd9026]
[affouda:01906] [20] /usr/bin/python() [0x4dfe94]
[affouda:01906] [21] /usr/bin/python(PyEval_EvalFrameEx+0x965) [0x499be5]
[affouda:01906] [22] /usr/bin/python(PyEval_EvalFrameEx+0xc72) [0x499ef2]
[affouda:01906] [23] /usr/bin/python(PyEval_EvalCodeEx+0x2ac) [0x4a090c]
[affouda:01906] [24] /usr/bin/python(PyEval_EvalFrameEx+0x7d2) [0x499a52]
[affouda:01906] [25] /usr/bin/python() [0x4a1634]
[affouda:01906] [26] /usr/bin/python(PyRun_FileExFlags+0x92) [0x44e4a5]
[affouda:01906] [27] /usr/bin/python() [0x44e6a2]
[affouda:01906] [28] /usr/bin/python(PyEval_EvalFrameEx+0x3259) [0x49c4d9]
[affouda:01906] [29] /usr/bin/python(PyEval_EvalCodeEx+0x2ac) [0x4a090c]
[affouda:01906] *** End of error message ***
Aborted (core dumped)
asked Sep 28, 2015 by chaffra FEniCS User (1,830 points)
...