NVIDIA / warp

A Python framework for high performance GPU simulation and graphics

Home Page:https://nvidia.github.io/warp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: dlsym(0x7ff90b8be310, array_fill_host): symbol not found

yangfengzzz opened this issue · comments

I upgrade Warp on my MacOS, version: 0.10.1, python 3.9, when I run example, it show this error.

Traceback (most recent call last):
  File "/Users/yangfeng/Desktop/warp/examples/example_dem.py", line 24, in <module>
    wp.init()
  File "/Users/yangfeng/Desktop/warp/warp/context.py", line 3869, in init
    runtime = Runtime()
  File "/Users/yangfeng/Desktop/warp/warp/context.py", line 1796, in __init__
    self.core.array_fill_host.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p, ctypes.c_int]
  File "/usr/local/Cellar/python@3.9/3.9.17/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/Cellar/python@3.9/3.9.17/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(0x7ff90b8be310, array_fill_host): symbol not found

Thanks for reporting this! I was not able to reproduce it on my MacBook Pro M1 with Python 3.10.

It's bizarre that it would fail to find the array_fill_host symbol while a few lines higher there's a very similar array_copy_host function.

Could you try with Python 3.10? Also, if you're using Visual Studio Code, could you add some breakpoints in /Users/yangfeng/Desktop/warp/warp/context.py at line 1796 and above it and debug with "justMyCode": false, added to the launch.json?

array_fill_host() was added fairly recently, while array_copy_host() has been there for some time so I suspect this is some kind of mismatch between the 0.10.1 Python scripts and the binaries.

Indeed I can't repro. this locally either so I think it may be that for some reason an older warp.dylib is being picked up on @yangfengzzz's system (possibly via. system path) instead of the 0.10.1 binaries.

sorry I forget to call build_lib.py again. it fixed