Discussion:
[PyCUDA] error invoking 'nvcc --version': [Errno 20] Not a directory
Luigi Assom
2014-12-21 19:52:54 UTC
Permalink
Hello,

i had installed cuda driver and pycuda on mac, it looks working ok after
testing it with tests in NVDIA installation guide.

when I try to run a mod = SourceModule ()
I run into this error which looks to have problems with nvcc compiler.

I cannot figure out where the problem may be.
I check PATH for finding nvcc and looks ok...

echo $PATH

/Developer/NVIDIA/CUDA-6.5/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin/ruby
echo $DYLD_LIBRARY_PATH

/Developer/NVIDIA/CUDA-6.5/lib:

Traceback (most recent call last):

File "<stdin>", line 12, in <module>

File
"/Library/Python/2.7/site-packages/pycuda-2014.1-py2.7-macosx-10.9-x86_64.egg/pycuda/compiler.py",
line 251, in __init__

arch, code, cache_dir, include_dirs)

File
"/Library/Python/2.7/site-packages/pycuda-2014.1-py2.7-macosx-10.9-x86_64.egg/pycuda/compiler.py",
line 241, in compile

return compile_plain(source, options, keep, nvcc, cache_dir)

File
"/Library/Python/2.7/site-packages/pycuda-2014.1-py2.7-macosx-10.9-x86_64.egg/pycuda/compiler.py",
line 79, in compile_plain

checksum.update(get_nvcc_version(nvcc).encode("utf-8"))

File "<string>", line 2, in get_nvcc_version

File
"/Library/Python/2.7/site-packages/pytools-2014.3.5-py2.7.egg/pytools/__init__.py",
line 430, in _deco

result = func(*args)

File
"/Library/Python/2.7/site-packages/pycuda-2014.1-py2.7-macosx-10.9-x86_64.egg/pycuda/compiler.py",
line 13, in get_nvcc_version

result, stdout, stderr = call_capture_output(cmdline)

File
"/Library/Python/2.7/site-packages/pytools-2014.3.5-py2.7.egg/pytools/prefork.py",
line 197, in call_capture_output

return forker[0].call_capture_output(cmdline, cwd, error_on_nonzero)

File
"/Library/Python/2.7/site-packages/pytools-2014.3.5-py2.7.egg/pytools/prefork.py",
line 54, in call_capture_output

% ( " ".join(cmdline), e))

*pytools.prefork.ExecError: error invoking 'nvcc --version': [Errno 20] Not
a directory*



As example, I use:

mod = SourceModule("""
__global__ void process(char **dest, char **line)
{
int tID = threadIdx.x ;//+ blockIdx.x * blockDim.x;
dest[tID] = line[tID];
}
""")


from this example
http://stackoverflow.com/questions/18808279/pycuda-using-string-but-not-array-of-strings


Could you please help ?
--
Luigi Assom

Skype contact: oggigigi
Andreas Kloeckner
2014-12-21 20:45:00 UTC
Permalink
Post by Luigi Assom
Hello,
i had installed cuda driver and pycuda on mac, it looks working ok after
testing it with tests in NVDIA installation guide.
when I try to run a mod = SourceModule ()
I run into this error which looks to have problems with nvcc compiler.
I cannot figure out where the problem may be.
I check PATH for finding nvcc and looks ok...
What version of PyCUDA are you using?

Andreas
Luigi Assom
2014-12-21 21:30:59 UTC
Permalink
pycuda.VERSION

(2014, 1)
Post by Andreas Kloeckner
Post by Luigi Assom
Hello,
i had installed cuda driver and pycuda on mac, it looks working ok after
testing it with tests in NVDIA installation guide.
when I try to run a mod = SourceModule ()
I run into this error which looks to have problems with nvcc compiler.
I cannot figure out where the problem may be.
I check PATH for finding nvcc and looks ok...
What version of PyCUDA are you using?
Andreas
--
Luigi Assom

Skype contact: oggigigi
Andreas Kloeckner
2014-12-21 22:03:54 UTC
Permalink
Post by Luigi Assom
pycuda.VERSION
(2014, 1)
That's not specific enough unfortunately--where did you get your version
of PyCUDA?

Andreas
Luigi Assom
2014-12-21 23:50:15 UTC
Permalink
from here:
http://wiki.tiker.net/PyCuda/Installation/Mac


when I installed it, i set up the PATH as on the instruction on that page.

I noticed that $PATH is not holding the new path.. ?!
I send them through email few hours ago, now I check again there was no
path to cuda in $PATH...

I set up PATH again,
I setup siteconfig.py for Maverickes 10.9





sudo make install

warning: no files found matching '*.cpp' under directory
'bpl-subset/bpl_subset/boost'

warning: no files found matching '*.html' under directory
'bpl-subset/bpl_subset/boost'

warning: no files found matching '*.inl' under directory
'bpl-subset/bpl_subset/boost'

warning: no files found matching '*.txt' under directory
'bpl-subset/bpl_subset/boost'

warning: no files found matching '*.h' under directory
'bpl-subset/bpl_subset/libs'

warning: no files found matching '*.ipp' under directory
'bpl-subset/bpl_subset/libs'

warning: no files found matching '*.pl' under directory
'bpl-subset/bpl_subset/libs'


/TEST/python test_driver.py

*==================== 21 passed, 2 skipped in 29.30 seconds
=====================*


As a couple of days ago..
I opened now another terminal
echo $PATH
does not have again the path to cuda library..

and there indeed nvcc is not found hu!?

I tried set it up with
sudo export PATH=... :$path

but

sudo: export: command not found


any idea?


it looks like it cannot the path to the library in $PATH... =?
Post by Andreas Kloeckner
Post by Luigi Assom
pycuda.VERSION
(2014, 1)
That's not specific enough unfortunately--where did you get your version
of PyCUDA?
Andreas
--
Luigi Assom

Skype contact: oggigigi
Loading...