Re: [PyCUDA] Changing nvcc command in configure.py at install time?

2011-07-29 Thread Andreas Kloeckner
On Fri, 29 Jul 2011 14:49:17 +0100, Ben Aylott beayl...@gmail.com wrote:
 Hi,
 
 Im using pycuda on arch linux with CUDA 4 and have had problems with the
 gcc 4.4 requirement (with arch using gcc-4.6 as default and providing
 gcc-4.4 as a separate package).
 
 I am aware of many possible solutions (which all work for me) but it
 would be quite nice to change the gcc that nvcc uses via 'nvcc
 -ccbin=/usr/bin/gcc-4.4' etc. You can obviously pass this to the compile
 function in the wrapper but it would be nice to be able to add some
 options at install time (via configure.py etc.) so a PKGBUILD can
 configure pycuda to 'work out the box'.
 
 Im not sure if this is already possible or if it would be feasible?

This is not yet possible, but it's easy to patch in. Here's how to do
it: Add a string config option for that to configure.py, defaulting to
just 'nvcc'. Before setup.py call the distutils setup() function, write
pycuda/config.py with the configured value. Add pycuda/config.py to
.gitignore. In pycuda/compiler.py, read the default compiler from that
setting. Test that everything works. Submit patch. :)

HTH,
Andreas


pgpJkbWSyzoCx.pgp
Description: PGP signature
___
PyCUDA mailing list
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda


Re: [PyCUDA] Changing nvcc command in configure.py at install time?

2011-07-29 Thread Andreas Kloeckner
On Fri, 29 Jul 2011 16:12:41 +0100, Ben Aylott beayl...@gmail.com wrote:
 On 29/07/11 16:10, Andreas Kloeckner wrote:
  This is not yet possible, but it's easy to patch in. Here's how to do
  it: Add a string config option for that to configure.py,

Just occurred to me: The list of config options is also in setup.py.

 defaulting to
  just 'nvcc'. Before setup.py call the distutils setup() function, write
  pycuda/config.py with the configured value. Add pycuda/config.py to
  .gitignore. In pycuda/compiler.py, read the default compiler from that
  setting. Test that everything works. Submit patch. :)
 
 Ok I will give this a go . Thanks for your help.

Cool, looking forward to your patch.

Andreas


pgpIPrnyX6yeQ.pgp
Description: PGP signature
___
PyCUDA mailing list
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda