Giter VIP home page Giter VIP logo

Comments (6)

kwabenantim avatar kwabenantim commented on June 22, 2024

Failing Tests

  • cell_based/tutorials/TestVertexBasedCellSimulationsPythonTutorial.py
  • core/TestPetscToolsPython.py

from pychaste.

kwabenantim avatar kwabenantim commented on June 22, 2024

TestVertexBasedCellSimulationsPythonTutorial
Runs into a segmentation fault.

Error

[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind
[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run 
[0]PETSC ERROR: to get more information on the crash.
[0]PETSC ERROR: Run with -malloc_debug to check if memory corruption is causing the crash.
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 59.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------

Trace

OffLatticeSimulation::Solve(...);
OffLatticeSimulation::ApplyBoundaries(...);
PlaneBoundaryCondition::ImposeBoundaryCondition(...);
if (dynamic_cast<AbstractOffLatticeCellPopulation<ELEMENT_DIM, SPACE_DIM>*>(this->mpCellPopulation) == nullptr){...}

Fix
Resolved itself after switching from C++14 to C++17 and pulling latest updates from Chaste develop branch (fast-forwarded from e1fa6a6 to 3ed690e).

from pychaste.

kwabenantim avatar kwabenantim commented on June 22, 2024

TestPetscToolsPython
Needs wrapping for PETSc Vec and Mat.

Error

======================================================================
ERROR: test_some_vecs (__main__.TestPetscTools)
----------------------------------------------------------------------
TypeError: Unregistered type : _p_Vec

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/vboxuser/PyChaste/test/python/./core/TestPetscToolsPython.py", line 44, in test_some_vecs
    vec = chaste.core.PetscTools.CreateVec(local)
TypeError: Unable to convert function return value to a Python type! The signature was
	(data: List[float]) -> _p_Vec

Maybe Useful
https://gitlab.com/petsc/petsc/-/blob/main/src/binding/petsc4py/src/petsc4py/PETSc.pxd
https://gitlab.com/petsc/petsc/-/blob/main/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx
https://gitlab.com/petsc/petsc/-/blob/main/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx
https://github.com/FEniCS/dolfinx/blob/main/python/dolfinx/wrappers/caster_petsc.h

from pychaste.

kwabenantim avatar kwabenantim commented on June 22, 2024

Bad X server connection
Rendering in some tests tries to open a window, which causes an error in a headless environment.

Error

test_construct (cell_based.TestCaBasedCellPopulationPython.TestPottsMesh) ... ERROR: In ./Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 300
vtkXOpenGLRenderWindow (0x5555b3b08a80): bad X server connection. DISPLAY=[fv-az438-312:17440] *** Process received signal ***
[fv-az438-312:17440] Signal: Aborted (6)
[fv-az438-312:17440] Signal code:  (-6)
[fv-az438-312:17440] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f29080c4520]
[fv-az438-312:17440] [ 1] /lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x12c)[0x7f2908118a7c]
[fv-az438-312:17440] [ 2] /lib/x86_64-linux-gnu/libc.so.6(raise+0x16)[0x7f29080c4476]
[fv-az438-312:17440] [ 3] /lib/x86_64-linux-gnu/libc.so.6(abort+0xd3)[0x7f29080aa7f3]
[fv-az438-312:17440] [ 4] /lib/x86_64-linux-gnu/libvtkRenderingOpenGL2-7.1.so.7.1p(+0x900a5)[0x7f28fae310a5]
[fv-az438-312:17440] [ 5] /lib/x86_64-linux-gnu/libvtkRenderingOpenGL2-7.1.so.7.1p(_ZN22vtkXOpenGLRenderWindow15GetDesiredDepthEv+0x12)[0x7f28fafbaa12]
[fv-az438-312:17440] [ 6] /lib/x86_64-linux-gnu/libvtkRenderingOpenGL2-7.1.so.7.1p(_ZN26vtkXRenderWindowInteractor10InitializeEv+0x22d)[0x7f28fafb211d]
[fv-az438-312:17440] [ 7] /lib/x86_64-linux-gnu/libvtkRenderingCore-7.1.so.7.1p(_ZN15vtkRenderWindow6RenderEv+0x430)[0x7f28faaf4d90]
[fv-az438-312:17440] [ 8] /lib/x86_64-linux-gnu/libvtkRenderingOpenGL2-7.1.so.7.1p(_ZN22vtkXOpenGLRenderWindow6RenderEv+0x31)[0x7f28fafc0e51]
[fv-az438-312:17440] [ 9] /home/runner/work/PyChaste/PyChaste/Chaste/build/projects/PyChaste/libchaste_project_PyChaste.so(_ZN8VtkSceneILj3EE13ResetRendererEj+0x12b)[0x7f28fc37a21b]
[fv-az438-312:17440] [10] /home/runner/work/PyChaste/PyChaste/Chaste/build/projects/PyChaste/libchaste_project_PyChaste.so(_ZN8VtkSceneILj3EE5StartEv+0xf4)[0x7f28fc379c74]
[fv-az438-312:17440] [11] /home/runner/.local/lib/python3.10/site-packages/chaste/visualization/_chaste_project_PyChaste_visualization.so(+0x3f8a4)[0x7f28f6b908a4]
[fv-az438-312:17440] [12] /home/runner/.local/lib/python3.10/site-packages/chaste/visualization/_chaste_project_PyChaste_visualization.so(+0x20eac)[0x7f28f6b71eac]
[fv-az438-312:17440] [13] python3(+0x15cc9e)[0x5555afe8ec9e]
[fv-az438-312:17440] [14] python3(_PyObject_MakeTpCall+0x25b)[0x5555afe8572b]
[fv-az438-312:17440] [15] python3(+0x16b1eb)[0x5555afe9d1eb]
[fv-az438-312:17440] [16] python3(_PyEval_EvalFrameDefault+0x640a)[0x5555afe7d75a]
[fv-az438-312:17440] [17] python3(+0x16af11)[0x5555afe9cf11]
[fv-az438-312:17440] [18] python3(_PyEval_EvalFrameDefault+0x6cd)[0x5555afe77a1d]
[fv-az438-312:17440] [19] python3(_PyFunction_Vectorcall+0x7c)[0x5555afe8f4ec]
[fv-az438-312:17440] [20] python3(_PyEval_EvalFrameDefault+0x8c4)[0x5555afe77c14]
[fv-az438-312:17440] [21] python3(+0x16b05e)[0x5555afe9d05e]
[fv-az438-312:17440] [22] python3(_PyEval_EvalFrameDefault+0x2a37)[0x5555afe79d87]
[fv-az438-312:17440] [23] python3(_PyObject_FastCallDictTstate+0xc4)[0x5555afe848b4]
[fv-az438-312:17440] [24] python3(_PyObject_Call_Prepend+0x5c)[0x5555afe99f9c]
[fv-az438-312:17440] [25] python3(+0x285050)[0x5555affb7050]
[fv-az438-312:17440] [26] python3(_PyObject_MakeTpCall+0x25b)[0x5555afe8572b]
[fv-az438-312:17440] [27] python3(_PyEval_EvalFrameDefault+0x67dc)[0x5555afe7db2c]
[fv-az438-312:17440] [28] python3(+0x16b05e)[0x5555afe9d05e]
[fv-az438-312:17440] [29] python3(_PyEval_EvalFrameDefault+0x2a37)[0x5555afe79d87]
[fv-az438-312:17440] *** End of error message ***
/home/runner/work/_temp/88502592-3561-46f5-a073-165fa7e5765a.sh: line 6: 17440 Aborted                 (core dumped) python3 -m unittest -v cell_based/Test*.py cell_based/tutorials/Test*.py core/Test*.py mesh/Test*.py ode/Test*.py

Maybe Useful
https://discourse.vtk.org/t/offscreen-rendering-opening-window/1660

Fix
Use xvfb-run to run tests

from pychaste.

kwabenantim avatar kwabenantim commented on June 22, 2024

TestPetscToolsPython Needs wrapping for PETSc Vec and Mat.

It's not clear why this test is needed since we rely on petsc4py. Perhaps better to re-implement PetscTools.{hpp|cpp} in Python using petsc4py?

from pychaste.

kwabenantim avatar kwabenantim commented on June 22, 2024

It's not clear why this test is needed since we rely on petsc4py. Perhaps better to re-implement PetscTools.{hpp|cpp} in Python using petsc4py?

Vet and Mat are wrapped opaquely, so no conversions needed.

from pychaste.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.