DARMA-tasking / LB-analysis-framework

Analysis framework for exploring, testing, and comparing load balancing strategies
Other
3 stars 1 forks source link

Different runtime errors occurring depending on whether vtk package is installed or not #513

Closed ppebay closed 1 month ago

ppebay commented 1 month ago

Steps to repeat

Identical as those of #509

Observed errors

If vtk package is not installed via pip

(lbaf39) [pppebay@aneto]~/Documents/Git/LB-analysis-framework/src/lbaf/Applications$ pip uninstall vtk
Found existing installation: vtk 9.1.0
Uninstalling vtk-9.1.0:
  Would remove:
    /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtk-9.1.0.dist-info/*
    /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtk.py
    /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/*
Proceed (Y/n)?  
  Successfully uninstalled vtk-9.1.0
(lbaf39) [pppebay@aneto]~/Documents/Git/LB-analysis-framework/src/lbaf/Applications$ python LBAF_app.py -c ../../../config/test-vt-tv.yaml
Traceback (most recent call last):
  File "/Users/pppebay/Documents/Git/LB-analysis-framework/src/lbaf/Applications/LBAF_app.py", line 19, in <module>
    import lbaf.IO.lbsStatistics as lbstats
  File "/Users/pppebay/Documents/Git/LB-analysis-framework/src/lbaf/__init__.py", line 21, in <module>
    from lbaf.Applications.MoveCountsViewer import MoveCountsViewer
  File "/Users/pppebay/Documents/Git/LB-analysis-framework/src/lbaf/Applications/MoveCountsViewer.py", line 5, in <module>
    import vtk
ModuleNotFoundError: No module named 'vtk'

If vtk package installed via pip

Prior to de-installing it a runtime error occurred, but following uninstallation and re-installation, the following warning is issued:

[LBAF_app] Executing with Python 3.9.19
objc[51824]: Class vtkCocoaTimer is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingUI-9.3.9.3.dylib (0x102fa8200) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingUI-9.3.dylib (0x1203c43e0). One of the two will be used. Which one is undefined.
objc[51824]: Class vtkCocoaFullScreenWindow is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingOpenGL2-9.3.9.3.dylib (0x103fe4ba0) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.3.dylib (0x153e16068). One of the two will be used. Which one is undefined.
objc[51824]: Class vtkCocoaServer is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingOpenGL2-9.3.9.3.dylib (0x103fe4bc8) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.3.dylib (0x153e16090). One of the two will be used. Which one is undefined.
objc[51824]: Class vtkCocoaGLView is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingOpenGL2-9.3.9.3.dylib (0x103fe4c18) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.3.dylib (0x153e160e0). One of the two will be used. Which one is undefined.
objc[51825]: Class vtkCocoaTimer is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingUI-9.3.9.3.dylib (0x10390c200) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingUI-9.3.dylib (0x111fdc3e0). One of the two will be used. Which one is undefined.
objc[51825]: Class vtkCocoaFullScreenWindow is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingOpenGL2-9.3.9.3.dylib (0x104948ba0) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.3.dylib (0x166092068). One of the two will be used. Which one is undefined.
objc[51825]: Class vtkCocoaServer is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingOpenGL2-9.3.9.3.dylib (0x104948bc8) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.3.dylib (0x166092090). One of the two will be used. Which one is undefined.
objc[51825]: Class vtkCocoaGLView is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingOpenGL2-9.3.9.3.dylib (0x104948c18) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.3.dylib (0x1660920e0). One of the two will be used. Which one is undefined.

but code runs to completion.

It remains concerning to have this warning, especially considering the fact that before uninstall/reinstall it resulted in a segfault as follows:

zsh: segmentation fault  python LBAF_app.py -c ../../../config/test-vt-tv.yaml
ppebay commented 1 month ago

Question @pierrepebay, when code is running, a PNG image is generated as expected, which is good, however I am curious about the new shape of the inter-object edges:

output_file0

Is this normal (assuming this is to indicate directionality, how does this scale)? We did not have this in LBAF-Viz; this may be an improvement but I am unsure.

pierrepebay commented 1 month ago

@ppebay

Is this for the /data/synthetic_lb_data ? If so, this is my output image: image

ppebay commented 1 month ago

Yes @pierrepebay I was getting the triangle above with the test-vt-tv.yaml config files. It seems that those triangular edges are thus some incorrect VTK artifact, aren't they?

pierrepebay commented 1 month ago

@ppebay it does seem that there are some artifacts, but notice as well that some edges are missing entirely in your output as well.

ppebay commented 1 month ago

Yes so really seems to be a bug. I am re-closing this issue and creating a new (bug) one.