PyCUDA / Copperhead 似乎无法识别 64 位机器

发布于 2024-10-31 22:24:37 字数 1495 浏览 3 评论 0原文

目前我在铜斑蛇方面遇到了两个问题,我怀疑它们是相关的。

运行示例文件 (samples/axpy.py) 会生成许多小警告,但这个警告很突出。

g++ -pthread -fno-strict-aliasing -g -O2 -g -fwrapv -O2 -Wall -fPIC -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -DNDEBUG -I/usr/include/python2.6 -I/usr/local/lib/python2.6/dist-packages/copperhead-0.1a1-py2.6.egg/copperhead/include -I/usr/local/cuda/include /tmp/codepy-compiler-cache-v5-uid1000/202478034fea29b82d046b259bd6f43e/module.o /tmp/codepy-compiler-cache-v5-uid1000/fdcb04ede426b146cfce8894e99eeb57/gpu.o -L/usr/lib -L/usr/local/cuda/lib -L/usr/local/cuda/lib64 -lcuda -lcudart -lboost_python-gcc43-mt -lpthread -ldl -lutil -o /tmp/codepy-compiler-cache-v5-uid1000/202478034fea29b82d046b259bd6f43e/codepy.temp.202478034fea29b82d046b259bd6f43e.module.so
/usr/bin/ld: skipping incompatible /usr/local/cuda/lib/libcudart.so when searching for -lcudart
/usr/bin/ld: cannot find -lboost_python-gcc43-mt
collect2: ld returned 1 exit status

需要注意的事情很少;

g++ 已正确选择要使用的正确 CUDA lib 目录 (lib64),但在其中没有看到 libcudart.so,但事实确实如此。

/usr/local/cuda/lib64/libcudart.so.4.0.12: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped

接下来,没有找到boost_python;我从一些地方听说这是由于 ubuntu 在某个地方打破了包约定,人们说他们已经通过更改 pycuda 配置选项来修复它,但没有说将其更改为什么...( 示例

任何人对 cudart 或启动问题有任何想法?

Two problems I'm having with copperhead at the minute, which I suspect are related.

Running a sample file (samples/axpy.py) generated lots of little warnings, but this one stood out.

g++ -pthread -fno-strict-aliasing -g -O2 -g -fwrapv -O2 -Wall -fPIC -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -DNDEBUG -I/usr/include/python2.6 -I/usr/local/lib/python2.6/dist-packages/copperhead-0.1a1-py2.6.egg/copperhead/include -I/usr/local/cuda/include /tmp/codepy-compiler-cache-v5-uid1000/202478034fea29b82d046b259bd6f43e/module.o /tmp/codepy-compiler-cache-v5-uid1000/fdcb04ede426b146cfce8894e99eeb57/gpu.o -L/usr/lib -L/usr/local/cuda/lib -L/usr/local/cuda/lib64 -lcuda -lcudart -lboost_python-gcc43-mt -lpthread -ldl -lutil -o /tmp/codepy-compiler-cache-v5-uid1000/202478034fea29b82d046b259bd6f43e/codepy.temp.202478034fea29b82d046b259bd6f43e.module.so
/usr/bin/ld: skipping incompatible /usr/local/cuda/lib/libcudart.so when searching for -lcudart
/usr/bin/ld: cannot find -lboost_python-gcc43-mt
collect2: ld returned 1 exit status

Few things to notice;

g++ is has correctly picked up the correct CUDA lib dir to use (lib64), but doesn't see libcudart.so in there, which it is.

/usr/local/cuda/lib64/libcudart.so.4.0.12: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped

Next, boost_python isn't found; I've heard from a few places that this is due to ubuntu breaking a package convention somewhere, and people has said they've fixed it by changing the pycuda configure options, but haven't said what to change it to... (Example)

Anyone got any ideas for either the cudart or boot issues?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦过后 2024-11-07 22:24:37
  1. 正在寻找libcudart。你什么
    我们看到的只是一个信息
    警告:-L 选项是
    按顺序搜索,链接器是
    首先找到32位版本,
    因为你给了
    -L/usr/local/cuda/lib-L/usr/loca/cuda/lib64 之前。
  2. 对于libboost_python问题,
    只需与 -lboost_python 链接即可。这
    我使用的Ubuntu系统(64位
    10.04LTS with boost-python 1.40)有一系列级联符号
    到该规范的链接
    生成链接器的库名称
    找到正确的库,没有任何
    进一步干预。
  1. It is finding libcudart. What you
    are seeing is only an informational
    warning: -L options are
    searched in order and the linker is
    finding the 32 bit version first,
    because you gave
    -L/usr/local/cuda/lib before -L/usr/loca/cuda/lib64.
  2. For the libboost_python problem,
    just link with -lboost_python. The
    Ubuntu systems I use (64 bit
    10.04LTS with boost-python 1.40) have a series of cascading symbolic
    links to that canonical
    library name that make the linker
    find the correct library without any
    further intervention.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文