Discussion:
Pycuda installation with cuda-9.0
(too old to reply)
Baskaran Sankaran
2017-08-09 12:38:20 UTC
Permalink
Hi everyone,

I am having hard time installing PyCUDA with cuda-9.0 on rhel7.

I tried both pip install as well as from source and in both cases. Here is
the command I used when building from source. I suspect it has something to
do with wrap_cudadrv.cpp (see the error messages below), though I am not
sure what. Any help will be much appreciated.

$ cd pycuda-2017.1

$ ./configure.py --cuda-root=/usr/local/cuda-9.0
--cudadrv-lib-dir=/usr/lib64/nvidia --boost-inc-dir=/usr/include
--boost-lib-dir=/usr/lib64 --boost-python-libname=boost_python
--boost-thread-libname=boost_thread

$ python setup.py build

Here is my setup:

RHEL-7
gcc (GCC) 4.8.5 20150623
cuda-9.0

I get the following cryptic message in the end:

error: command 'gcc' failed with exit status 1

And, here is some more snippet before the setup.py fails.

src/wrapper/wrap_cudadrv.cpp:669:83: warning: deprecated conversion from
string constant to ‘char*’ [-Wwrite-strings]
Cuda##NAME = py::handle<>(PyErr_NewException("pycuda._driver." #NAME,
BASE, NULL)); \

^
src/wrapper/wrap_cudadrv.cpp:674:5: note: in expansion of macro
‘DECLARE_EXC’
DECLARE_EXC(MemoryError, CudaError.get());
^
src/wrapper/wrap_cudadrv.cpp:669:83: warning: deprecated conversion from
string constant to ‘char*’ [-Wwrite-strings]
Cuda##NAME = py::handle<>(PyErr_NewException("pycuda._driver." #NAME,
BASE, NULL)); \

^
src/wrapper/wrap_cudadrv.cpp:675:5: note: in expansion of macro
‘DECLARE_EXC’
DECLARE_EXC(LogicError, CudaError.get());
^
src/wrapper/wrap_cudadrv.cpp:669:83: warning: deprecated conversion from
string constant to ‘char*’ [-Wwrite-strings]
Cuda##NAME = py::handle<>(PyErr_NewException("pycuda._driver." #NAME,
BASE, NULL)); \

^
src/wrapper/wrap_cudadrv.cpp:676:5: note: in expansion of macro
‘DECLARE_EXC’
DECLARE_EXC(LaunchError, CudaError.get());
^
src/wrapper/wrap_cudadrv.cpp:669:83: warning: deprecated conversion from
string constant to ‘char*’ [-Wwrite-strings]
Cuda##NAME = py::handle<>(PyErr_NewException("pycuda._driver." #NAME,
BASE, NULL)); \

^
src/wrapper/wrap_cudadrv.cpp:677:5: note: in expansion of macro
‘DECLARE_EXC’
DECLARE_EXC(RuntimeError, CudaError.get());

src/wrapper/wrap_cudadrv.cpp:978:26: error: ‘CU_TARGET_COMPUTE_10’ was not
declared in this scope
.value("COMPUTE_10", CU_TARGET_COMPUTE_10)
^
src/wrapper/wrap_cudadrv.cpp:979:26: error: ‘CU_TARGET_COMPUTE_11’ was not
declared in this scope
.value("COMPUTE_11", CU_TARGET_COMPUTE_11)
^
src/wrapper/wrap_cudadrv.cpp:980:26: error: ‘CU_TARGET_COMPUTE_12’ was not
declared in this scope
.value("COMPUTE_12", CU_TARGET_COMPUTE_12)
^
src/wrapper/wrap_cudadrv.cpp:981:26: error: ‘CU_TARGET_COMPUTE_13’ was not
declared in this scope
.value("COMPUTE_13", CU_TARGET_COMPUTE_13)
^
In file included from
bpl-subset/bpl_subset/boost/system/system_error.hpp:14:0,
from bpl-subset/bpl_subset/boost/thread/exceptions.hpp:22,
from
bpl-subset/bpl_subset/boost/thread/pthread/thread_data.hpp:10,
from bpl-subset/bpl_subset/boost/thread/thread.hpp:17,
from src/cpp/cuda.hpp:37,
from src/wrapper/wrap_cudadrv.cpp:1:
bpl-subset/bpl_subset/boost/system/error_code.hpp: At global scope:
bpl-subset/bpl_subset/boost/system/error_code.hpp:214:36: warning:
‘pycudaboost::system::posix_category’ defined but not used
[-Wunused-variable]
static const error_category & posix_category = generic_category();
^
bpl-subset/bpl_subset/boost/system/error_code.hpp:215:36: warning:
‘pycudaboost::system::errno_ecat’ defined but not used [-Wunused-variable]
static const error_category & errno_ecat = generic_category();
^
bpl-subset/bpl_subset/boost/system/error_code.hpp:216:36: warning:
‘pycudaboost::system::native_ecat’ defined but not used [-Wunused-variable]
static const error_category & native_ecat = system_category();
^
error: command 'gcc' failed with exit status 1

Thanks
- Baskaran
Andreas Kloeckner
2017-08-09 15:59:20 UTC
Permalink
Baskaran,
Post by Baskaran Sankaran
I am having hard time installing PyCUDA with cuda-9.0 on rhel7.
Thanks for the report. CUDA 9 support was added to git a while back but
was not yet part of a release. I've just released 2017.1.1 that should
address (at least some of) the issues you ran into.

Best,
Andreas
Baskaran Sankaran
2017-08-11 15:23:00 UTC
Permalink
Thanks Andreas. That did solve the issue.

- Baskaran
Post by Andreas Kloeckner
Baskaran,
Post by Baskaran Sankaran
I am having hard time installing PyCUDA with cuda-9.0 on rhel7.
Thanks for the report. CUDA 9 support was added to git a while back but
was not yet part of a release. I've just released 2017.1.1 that should
address (at least some of) the issues you ran into.
Best,
Andreas
Loading...