Opened 10 years ago

Last modified 9 years ago

#10010 needs_info enhancement

PyCUDA package (optional)

Reported by: maldun Owned by: maldun
Priority: minor Milestone: sage-feature
Component: packages: optional Keywords: cuda gpu programming
Cc: leif Merged in:
Authors: Stefan Reiterer Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by maldun)

The PyCuda? Package from Andreas Kloeckner (a useful GPU Programming tool for NVIDIA Graphic cards). See http://mathema.tician.de/software/pycuda for more Info

The package can be downloaded from: http://code.google.com/p/spkg-upload/downloads/detail?name=pycuda-0.94.1.spkg (direct link: http://spkg-upload.googlecode.com/files/pycuda-0.94.1.spkg)

Installation Notes:

  • Install CUDA on your machine: http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html
  • set the SAGE_CUDA variable in your shell with: export SAGE_CUDA =/where/you/have/installed/cuda (i set in .bashrc)
  • install package. (Download it from the links above)
  • IMPORTANT: After installation the setuptools package has to be reinstalled!! Because the installer uses the distributed egg package. This messes somehow with setuptools and will be removed after the installation. But this destroys setup tools!
  • enjoy!

UPDATE: Now there is a new version of PyCuda? which requires setuptools-0.6c11 (see #10361), where the reinstallment of setuptools is not needed any more. The download link is: http://spkg-upload.googlecode.com/files/pycuda-0.94.2.spkg

Tipp: For some errors, like "nvcc not found" after installation, can a reboot be the solution. At least for me it solved 100% of the troubles I had with a fresh installed pycuda in sage. (Sometimes one has really to switch off the machine!)

WARNING: The whole thing is not well tested, use on own risk!

Change History (11)

comment:1 Changed 10 years ago by maldun

  • Status changed from new to needs_info

This is only tested in ubuntu 10.04 with nvidia devel drivers (260.40) on an NVIDIA GeForce? 9500 GT, with CUDA toolkit 3.2.

So more testing is neeeded!

comment:2 Changed 10 years ago by maldun

  • Description modified (diff)

comment:3 Changed 10 years ago by leif

  • Cc leif added

See also #10009 for an optional OpenCL (PyOpenCL) spkg.

comment:4 Changed 10 years ago by maldun

Remark: I changed

cd $SAGE_LOCAL/LIB/python/site-packages

to

cd $SAGE_LOCAL/lib/python/site-packages

to make it possible to install this package on FEMhub also. The same applies for #10009

comment:5 Changed 9 years ago by Koen

I suspect the problem with setuptools breaking after the use of distribute can be solved by upgrading the current default version of setuptools 0.6c9 in Sage to 0.6c11, see also https://groups.google.com/group/sage-support/browse_thread/thread/4153d6a8135c921d

comment:6 follow-up: Changed 9 years ago by Koen

  • Status changed from needs_info to needs_work

After #10361 lands, the setuptools corruption should be gone. Also, there's an update upstream (pycuda-0.94.2), which fixes some kind of corruption bug for Fermi devices. It would be good to have this update.

comment:7 in reply to: ↑ 6 Changed 9 years ago by maldun

Replying to Koen:

After #10361 lands, the setuptools corruption should be gone. Also, there's an update upstream (pycuda-0.94.2), which fixes some kind of corruption bug for Fermi devices. It would be good to have this update.

Thanx for the info! I will try to to give an updated version soon.

comment:8 Changed 9 years ago by maldun

  • Description modified (diff)
  • Status changed from needs_work to needs_info

I uploaded a package with the new PyCuda? version, which holds the change with respect to the update. There was only one small problem, which could be fixed rather easily: the PyCuda? folder contained a folder named src, which leaded to name problems during the installation. Creation of some symbolic links did the trick.

Here thelink of the new package: http://spkg-upload.googlecode.com/files/pycuda-0.94.2.spkg

comment:9 Changed 9 years ago by maldun

  • Description modified (diff)

comment:10 Changed 9 years ago by maldun

  • Description modified (diff)

comment:11 Changed 9 years ago by maldun

  • Description modified (diff)
Note: See TracTickets for help on using tickets.