Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add (py)CUDA test/info script #23

Open
pgleeson opened this issue Nov 19, 2014 · 4 comments
Open

Add (py)CUDA test/info script #23

pgleeson opened this issue Nov 19, 2014 · 4 comments
Assignees

Comments

@pgleeson
Copy link

A simple python script to check the local installation of (py)CUDA would be very helpful, giving info on current configuration, hardware specs etc.

@pgleeson
Copy link
Author

Getting an error when running python generic_demo.py

Process LPU-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/home/padraig/NK/src/neurokernel/neurokernel/core.py", line 772, in run
    self.pre_run()
  File "/home/padraig/NK/src/neurokernel/neurokernel/LPU/LPU.py", line 262, in pre_run
    self._initialize_gpu_ds()
  File "/home/padraig/NK/src/neurokernel/neurokernel/LPU/LPU.py", line 606, in _initialize_gpu_ds
    len(self.input_neuron_list), np.float64)
  File "/home/padraig/NK/local/lib/python2.7/site-packages/pycuda/gpuarray.py", line 932, in zeros
    result.fill(zero)
  File "/home/padraig/NK/local/lib/python2.7/site-packages/pycuda/gpuarray.py", line 525, in fill
    func = elementwise.get_fill_kernel(self.dtype)
  File "<string>", line 2, in get_fill_kernel
  File "/home/padraig/NK/local/lib/python2.7/site-packages/pycuda/tools.py", line 423, in context_dependent_memoize
    result = func(*args)
  File "/home/padraig/NK/local/lib/python2.7/site-packages/pycuda/elementwise.py", line 486, in get_fill_kernel
    "fill")
  File "/home/padraig/NK/local/lib/python2.7/site-packages/pycuda/elementwise.py", line 157, in get_elwise_kernel
    arguments, operation, name, keep, options, **kwargs)
  File "/home/padraig/NK/local/lib/python2.7/site-packages/pycuda/elementwise.py", line 143, in get_elwise_kernel_and_types
    keep, options, **kwargs)
  File "/home/padraig/NK/local/lib/python2.7/site-packages/pycuda/elementwise.py", line 71, in get_elwise_module
    options=options, keep=keep)
  File "/home/padraig/NK/local/lib/python2.7/site-packages/pycuda/compiler.py", line 251, in __init__
    arch, code, cache_dir, include_dirs)
  File "/home/padraig/NK/local/lib/python2.7/site-packages/pycuda/compiler.py", line 241, in compile
    return compile_plain(source, options, keep, nvcc, cache_dir)
  File "/home/padraig/NK/local/lib/python2.7/site-packages/pycuda/compiler.py", line 73, in compile_plain
    checksum.update(preprocess_source(source, options, nvcc).encode("utf-8"))
  File "/home/padraig/NK/local/lib/python2.7/site-packages/pycuda/compiler.py", line 52, in preprocess_source
    cmdline, stderr=stderr)
CompileError: nvcc preprocessing of /tmp/tmpUYPlDl.cu failed
[command: nvcc --preprocess -arch sm_12 -I/home/padraig/NK/lib/python2.7/site-packages/pycuda/cuda /tmp/tmpUYPlDl.cu --compiler-options -P]
[stderr:
In file included from /usr/local/cuda/bin/../include/cuda_runtime.h:59:0,
                 from <command-line>:0:
/usr/local/cuda/bin/../include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.5 and up are not supported!
 #error -- unsupported GNU version! gcc 4.5 and up are not supported!
  ^
]

@pgleeson
Copy link
Author

I managed to get some of the nk examples running successfully by updating my version of the CUDA libraries & pycuda (so ignore the error above), but a helper script for checking the local installation & compatibility would be very useful.

lebedov added a commit that referenced this issue Nov 21, 2014
…installation info to INSTALL/README, add info for obtaining GPU info (#23).
@lebedov
Copy link
Member

lebedov commented Nov 21, 2014

I added more information on how to examine the available GPUs to the documentation and how to get PyCUDA to install properly. I also added a script (check_cuda_version.py) to the master repo for checking the installed CUDA version; we can combine it with the other installation steps into a single script to streamline the installation procedure.

@pgleeson
Copy link
Author

Great, thanks. Worked for me.

Would be a good idea too as you say to integrate it into the set-up scripts to tell users whether the minimal requirements have been satisfied.

@lebedov lebedov self-assigned this Dec 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants