Dear Malcolum,

Malcolm Tobias <mtob...@wustl.edu> writes:
> Sorry to bug you, but I run a cluster at Washington Univ. in St. Louis and we 
> recently added some GPU nodes.  We have several python users, and one has 
> requested that I install PyCUDA on our system.  For the first attempt, I 
> tried building against CUDA 5.0:
>
> [root@login002 pycuda-2012.1]# /export/epd-7.0.2/bin/python configure.py 
> --cuda-root=/export/cuda-5.0
>
> The build failed when it attempted to link against libcuda:
>
> [root@login002 pycuda-2012.1]# make install
> ...
> lib -lcuda -lcurand -lpython2.7 -o 
> build/lib.linux-x86_64-2.7/pycuda/_driver.so
> /usr/bin/ld: cannot find -lcuda
> collect2: ld returned 1 exit status
> error: command 'g++' failed with exit status 1
> make: *** [install] Error 1
>
> I had seen this problem before with another CUDA application.  AFAICT, when 
> going from CUDA 4.x to 5.0 they've dropped libcuda?  I can't find this 
> documented anywhere, but in 4.x they had separate installers for "toolkit" 
> and "driver" whereas with 5.0 they packages this all in a single installer.  
> I know the driver must be installed, since I can run simple commands like 
> 'nvidia-smi' and more complicated GPU applications without issues, but 
> there's no libcuda:
>
> [root@gpu001 ~]# ls /usr/local/cuda-5.0/lib64/
> libcublas_device.a   libcufft.so.5.0       libcusparse.so.5.0
> libcublas.so         libcufft.so.5.0.35    libcusparse.so.5.0.35
> libcublas.so.5.0     libcuinj64.so         libnpp.so
> libcublas.so.5.0.35  libcuinj64.so.5.0     libnpp.so.5.0
> libcudadevrt.a       libcuinj64.so.5.0.35  libnpp.so.5.0.35
> libcudart.so         libcurand.so          libnvToolsExt.so
> libcudart.so.5.0     libcurand.so.5.0      libnvToolsExt.so.5.0
> libcudart.so.5.0.35  libcurand.so.5.0.35   libnvToolsExt.so.5.0.35
> libcufft.so          libcusparse.so
>
>
> I tried hacking the PyCUDA build script to ignore the -libcuda, which allowed 
> the build to succeed, but (not surprisingly) complained about a missing 
> symbol when I tried running the tests:
>
> [root@login002 test]# /export/epd-7.0.2/bin/python test_driver.py 
> ...
> ImportError: 
> /export/epd-7.0.2/lib/python2.7/site-packages/pycuda-2012.1-py2.7-linux-x86_64.egg/pycuda/_driver.so:
>  undefined symbol: cuMemAllocPitch_v2
>
> I tried building against the 4.2 version of CUDA (I was assuming that since 
> the PyCUDA release was ~1 year old it might not support 5.0), but while that 
> builds, it wont run since the driver doesn't match the library version number.
>
> Any suggestions you could give about building PyCUDA would be greatly 
> appreciated.  If this is better directed to a mailing list, please let me 
> know.

(I've cc'd the list.)

I'm guessing the reason why you're not seeing libcuda.so is because that
actually gets installed along with the GPU driver, not the CUDA
Toolkit. In other words, you either have to build PyCUDA on a machine
that has a GPU, or you somehow have to force the driver to install in
the absence of a GPU.

Hope that helps,
Andreas

_______________________________________________
PyCUDA mailing list
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda

Reply via email to