xiaozhenBoy / cudamat

Automatically exported from code.google.com/p/cudamat
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Error in windows #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Installed cudamat on Windows (and all its dependencies)
2. ran test_cudamat.py
3.

What is the expected output? What do you see instead?

Traceback (most recent call last):
  File "test_cudamat.py", line 4, in <module>
    import cudamat as cm
  File "C:\Documents and Settings\i7\My Documents\Downloads\cudamat\cudamat.py",
 line 12, in <module>
    _cudamat.get_last_cuda_error.restype = ct.c_char_p
  File "C:\Python26\lib\ctypes\__init__.py", line 366, in __getattr__
    func = self.__getitem__(name)
  File "C:\Python26\lib\ctypes\__init__.py", line 371, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'get_last_cuda_error' not found

What version of the product are you using? On what operating system?
version .3
CUDA 3.2
Windows XP
Python  2.6

Please provide any additional information below.

Original issue reported on code.google.com by krishnam...@gmail.com on 21 Jun 2011 at 7:03

GoogleCodeExporter commented 9 years ago
Hi, I encountered exactly the same problem. Does anyone have any idea what's 
the problem? 

The command I used to compile the dll files is:
nvcc -o libcudamat.dll --shared cudamat.cu cudamat_kernels.cu -LC:\CUDA\lib 
-lcublas

Has anyone used this package on windows? How did you compile it? 

Thanks!

Original comment by troy.lee2008@gmail.com on 25 Jun 2011 at 4:20

GoogleCodeExporter commented 9 years ago
Problem solved. Just add __declspec(dllexport) to all the functions in 
cudamat.cu I got 3 tests failed but reducing the error threshold to 10**-2 
removed those errors. So I don't know if that is fine. 

Original comment by krishnam...@gmail.com on 27 Jun 2011 at 6:30

GoogleCodeExporter commented 9 years ago
Hi,

After the last suggestion I had tried to change the cudamat.py 
line 7 to
_cudamat = ct.cdll.LoadLibrary('libcudamat.dll')
I think this is the vital problem for running on the windows.

Original comment by muli60@gmail.com on 5 Jan 2014 at 1:56