Re: [PyCUDA] test program hello_gpu.py and simplespeedtest.py

2017-10-28 Thread Andreas Kloeckner
ephi5757  writes:

> Hi Andreas
> I found that the pycuda .whl was a combination install for pycuda 2017.1.1 + 
> Cuda 8.0.6.1 for win64 and python 3.6.
>
> I suspect that while the install was successful my test programs are failing 
> because I have Cuda 9.0.
>
> I am home now for the Sabbath but on Sunday I will see if I can install a 
> compatible who + cuda version.
>
> I am sorry that I did not see this earlier. 

Happy to hear you were able to figure this out.

Andreas

___
PyCUDA mailing list
PyCUDA@tiker.net
https://lists.tiker.net/listinfo/pycuda


Re: [PyCUDA] test program hello_gpu.py and simplespeedtest.py

2017-10-27 Thread ephi5757
Hi Andreas
I found that the pycuda .whl was a combination install for pycuda 2017.1.1 + 
Cuda 8.0.6.1 for win64 and python 3.6.

I suspect that while the install was successful my test programs are failing 
because I have Cuda 9.0.

I am home now for the Sabbath but on Sunday I will see if I can install a 
compatible who + cuda version.

I am sorry that I did not see this earlier. 

Best, Arnold 


Sent via the Samsung Galaxy S® 4 mini ™, an AT 4G LTE smartphone

 Original message From: Andreas Kloeckner 
<li...@informa.tiker.net> Date:10/26/2017  7:22 PM  (GMT-05:00) 
To: Arnold Tunick <ephi5...@yahoo.com>, pycuda@tiker.net 
Cc:  Subject: Re: [PyCUDA] test program hello_gpu.py and 
simplespeedtest.py 
Arnold Tunick <ephi5...@yahoo.com> writes:

> Hi Andreas,I tried to reinstall pycuda from within my Miniconda3 command 
> window, i.e., using the command... pip install pycuda.Everything goes 
> well in the build until it tries to execute the following:
> C:\ProgramData\Miniconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall 
> -DMS_WIN64 -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_DLL=1 
> -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION=1 -DBOOST_PYTHON_SOURCE=1 
> -Dboost=pycudaboost -DBOOST_THREAD_DONT_USE_CHRONO=1 -DPYGPU_PACKAGE=pycuda 
> -DPYGPU_PYCUDA=1 -DHAVE_CURAND=1 -Isrc/cpp -Ibpl-subset/bpl_subset 
> "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" 
> -IC:\ProgramData\Miniconda3\lib\site-packages\numpy\core\include 
> -IC:\ProgramData\Miniconda3\lib\site-packages\numpy\core\include 
> -IC:\ProgramData\Miniconda3\include -IC:\ProgramData\Miniconda3\include -c 
> src/cpp/cuda.cpp -o build\temp.win-amd64-3.6\Release\src\cpp\cuda.o /EHsc
> Then I get this error message:gcc: error: /EHsc: No such file or directory
> error: command 
> 'C:\\ProgramData\\Miniconda3\\Library\\mingw-w64\\bin\\gcc.exe' failed with 
> exit status 1.So I thought that the gcc.exe folder needed to be added to the 
> path, so I added it. Nevertheless, I got the same gcc: error: /EHsc: No such 
> file or directory.
>   
> PATH=C:\ProgramData\Miniconda3;C:\ProgramData\Miniconda3\Library\mingw-w64\bin;C:\ProgramData\Miniconda3\Library\usr\bin;C:\ProgramData\Miniconda3\Library\;C:\ProgramData\Miniconda3\Scripts;C:\ProgramData\Miniconda3\Library\bin;C:\Program
>  Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin;C:\Program Files\NVIDIA GPU 
> Computing 
> Toolkit\CUDA\v9.0\libnvvp;C:\SciSoft\Python36\Scripts\;C:\SciSoft\Python36\; 
> etc...
> At the same time, the pip install provides the following message:
> *
> *** I have detected that you have not run configure.py.
> *
> *** Additionally, no global config files were found.
> *** I will go ahead with the default configuration.
> *** In all likelihood, this will not work out.
> ***
> *** See README_SETUP.txt for more information.
> ***
> *** If the build does fail, just re-run configure.py with the
> *** correct arguments, and then retry. Good 
> luck!*However,
>  there are no files named configure.py or README_SETUP.txt on my 
> computer..Please advise.Thank you.Arnold

I am not sure PyCUDA likes being built with Mingw; I'd recommend the
MS compiler (or Christoph Gohlke's binaries) on Windows. At the very
least, you'd have to adjust the CXXFLAGS config variable to not include
flags that only the MS compiler will recognize. Alternatively, PyOpenCL
does much the same thing as PyCUDA and is included in conda forge.

HTH,
Andreas
___
PyCUDA mailing list
PyCUDA@tiker.net
https://lists.tiker.net/listinfo/pycuda


Re: [PyCUDA] test program hello_gpu.py and simplespeedtest.py

2017-10-27 Thread Arnold Tunick
 Hi Andreas,    Thank you for your email. While PyOpenCL may be useful, in the 
long run my CNN has Pycuda as a software dependency and so I would like to keep 
trying.   Previously, I downloaded a .whl file directly from 
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pycuda and used pip install. I tried 
that again today and it appeared to be successful.
 
(C:\ProgramData\Miniconda3) C:\Users\atunick\Documents>pip install 
pycuda-2017.1.1+cuda8061-cp36-cp36m-win_amd64.whl
Processing 
c:\users\atunick\documents\pycuda-2017.1.1+cuda8061-cp36-cp36m-win_amd64.whl
Installing collected packages: pycuda
Successfully installed pycuda-2017.1.1+cuda8061
However, when I try to run hello_gpu.py or simplespeedtest.py I get the error 
message that I reported earlier, i.e.,   File 
"C:\ProgramData\Miniconda3\lib\site-packages\pycuda\driver.py", line 5, in 

    from pycuda._driver import *  # noqa
ImportError: DLL load failed: The specified module could not be found.
.Don't I need to run a setup.py file or something similar for this .whl install 
to build pycuda?
Yet there is not a setup.py file in the newly created folder 
C:\ProgramData\Miniconda3\Lib\site-packages\pycuda.
Please adviseThank you.Arnold

  ___
PyCUDA mailing list
PyCUDA@tiker.net
https://lists.tiker.net/listinfo/pycuda


Re: [PyCUDA] test program hello_gpu.py and simplespeedtest.py

2017-10-26 Thread Andreas Kloeckner
Arnold Tunick  writes:

> Hi Andreas,    I tried to reinstall pycuda from within my Miniconda3 command 
> window, i.e., using the command... pip install pycuda.    Everything goes 
> well in the build until it tries to execute the following:
>     C:\ProgramData\Miniconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall 
> -DMS_WIN64 -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_DLL=1 
> -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION=1 -DBOOST_PYTHON_SOURCE=1 
> -Dboost=pycudaboost -DBOOST_THREAD_DONT_USE_CHRONO=1 -DPYGPU_PACKAGE=pycuda 
> -DPYGPU_PYCUDA=1 -DHAVE_CURAND=1 -Isrc/cpp -Ibpl-subset/bpl_subset 
> "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" 
> -IC:\ProgramData\Miniconda3\lib\site-packages\numpy\core\include 
> -IC:\ProgramData\Miniconda3\lib\site-packages\numpy\core\include 
> -IC:\ProgramData\Miniconda3\include -IC:\ProgramData\Miniconda3\include -c 
> src/cpp/cuda.cpp -o build\temp.win-amd64-3.6\Release\src\cpp\cuda.o /EHsc
> Then I get this error message:gcc: error: /EHsc: No such file or directory
> error: command 
> 'C:\\ProgramData\\Miniconda3\\Library\\mingw-w64\\bin\\gcc.exe' failed with 
> exit status 1.So I thought that the gcc.exe folder needed to be added to the 
> path, so I added it. Nevertheless, I got the same gcc: error: /EHsc: No such 
> file or directory.
>   
> PATH=C:\ProgramData\Miniconda3;C:\ProgramData\Miniconda3\Library\mingw-w64\bin;C:\ProgramData\Miniconda3\Library\usr\bin;C:\ProgramData\Miniconda3\Library\;C:\ProgramData\Miniconda3\Scripts;C:\ProgramData\Miniconda3\Library\bin;C:\Program
>  Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin;C:\Program Files\NVIDIA GPU 
> Computing 
> Toolkit\CUDA\v9.0\libnvvp;C:\SciSoft\Python36\Scripts\;C:\SciSoft\Python36\; 
> etc...
> At the same time, the pip install provides the following message:
>     *
>     *** I have detected that you have not run configure.py.
>     *
>     *** Additionally, no global config files were found.
>     *** I will go ahead with the default configuration.
>     *** In all likelihood, this will not work out.
>     ***
>     *** See README_SETUP.txt for more information.
>     ***
>     *** If the build does fail, just re-run configure.py with the
>     *** correct arguments, and then retry. Good 
> luck!*However,
>  there are no files named configure.py or README_SETUP.txt on my 
> computer..Please advise.Thank you.Arnold

I am not sure PyCUDA likes being built with Mingw; I'd recommend the
MS compiler (or Christoph Gohlke's binaries) on Windows. At the very
least, you'd have to adjust the CXXFLAGS config variable to not include
flags that only the MS compiler will recognize. Alternatively, PyOpenCL
does much the same thing as PyCUDA and is included in conda forge.

HTH,
Andreas

___
PyCUDA mailing list
PyCUDA@tiker.net
https://lists.tiker.net/listinfo/pycuda


Re: [PyCUDA] test program hello_gpu.py and simplespeedtest.py

2017-10-26 Thread Arnold Tunick
Hi Andreas,    I tried to reinstall pycuda from within my Miniconda3 command 
window, i.e., using the command... pip install pycuda.    Everything goes well 
in the build until it tries to execute the following:
    C:\ProgramData\Miniconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall 
-DMS_WIN64 -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_DLL=1 
-DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION=1 -DBOOST_PYTHON_SOURCE=1 
-Dboost=pycudaboost -DBOOST_THREAD_DONT_USE_CHRONO=1 -DPYGPU_PACKAGE=pycuda 
-DPYGPU_PYCUDA=1 -DHAVE_CURAND=1 -Isrc/cpp -Ibpl-subset/bpl_subset 
"-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" 
-IC:\ProgramData\Miniconda3\lib\site-packages\numpy\core\include 
-IC:\ProgramData\Miniconda3\lib\site-packages\numpy\core\include 
-IC:\ProgramData\Miniconda3\include -IC:\ProgramData\Miniconda3\include -c 
src/cpp/cuda.cpp -o build\temp.win-amd64-3.6\Release\src\cpp\cuda.o /EHsc
Then I get this error message:gcc: error: /EHsc: No such file or directory
error: command 'C:\\ProgramData\\Miniconda3\\Library\\mingw-w64\\bin\\gcc.exe' 
failed with exit status 1.So I thought that the gcc.exe folder needed to be 
added to the path, so I added it. Nevertheless, I got the same gcc: error: 
/EHsc: No such file or directory.
  
PATH=C:\ProgramData\Miniconda3;C:\ProgramData\Miniconda3\Library\mingw-w64\bin;C:\ProgramData\Miniconda3\Library\usr\bin;C:\ProgramData\Miniconda3\Library\;C:\ProgramData\Miniconda3\Scripts;C:\ProgramData\Miniconda3\Library\bin;C:\Program
 Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin;C:\Program Files\NVIDIA GPU 
Computing 
Toolkit\CUDA\v9.0\libnvvp;C:\SciSoft\Python36\Scripts\;C:\SciSoft\Python36\; 
etc...
At the same time, the pip install provides the following message:
    *
    *** I have detected that you have not run configure.py.
    *
    *** Additionally, no global config files were found.
    *** I will go ahead with the default configuration.
    *** In all likelihood, this will not work out.
    ***
    *** See README_SETUP.txt for more information.
    ***
    *** If the build does fail, just re-run configure.py with the
    *** correct arguments, and then retry. Good 
luck!*However, 
there are no files named configure.py or README_SETUP.txt on my 
computer..Please advise.Thank you.Arnold

___
PyCUDA mailing list
PyCUDA@tiker.net
https://lists.tiker.net/listinfo/pycuda


Re: [PyCUDA] test program hello_gpu.py

2017-10-25 Thread Arnold Tunick
 I downloaded dependency walker software from the Dependency Walker 
(depends.exe) Home Page. I opened the file _driver.cp36-win_amd64.pyd.Hundreds 
of dlls could not be found, e.g., API-MS-WIN-CORE-FILE_L1-1.DLL, etc..Please 
advise.Arnold


On ‎Wednesday‎, ‎October‎ ‎25‎, ‎2017‎ ‎05‎:‎25‎:‎36‎ ‎PM‎ ‎EDT, Andreas 
Kloeckner  wrote:  
 
 Use dependency walker on _driver.pyd/dll to find the DLL you're missing.

Andreas

Arnold Tunick  writes:
>  FYI, I used pip install 
>pycuda-2017.1.1+cuda8061-cp36-cp36m-win_amd64.whl..
>
>    On ‎Wednesday‎, ‎October‎ ‎25‎, ‎2017‎ ‎04‎:‎44‎:‎33‎ ‎PM‎ ‎EDT, Arnold 
>Tunick  wrote:  
>  
>  I am testing the following python script in a miniconda shell on a win 10 
>notebook with cuda 9.0 amd python 3.6: 
>  import pycuda.autoinit
> import pycuda.driver as drv
> import numpyfrom pycuda.compiler import SourceModule
> mod = SourceModule("""
> __global__ void multiply_them(float *dest, float *a, float *b)
> {
>   const int i = threadIdx.x;
>   dest[i] = a[i] * b[i];
> }
> """)multiply_them = mod.get_function("multiply_them")a = 
> numpy.random.randn(400).astype(numpy.float32)
> b = numpy.random.randn(400).astype(numpy.float32)dest = numpy.zeros_like(a)
> multiply_them(
>     drv.Out(dest), drv.In(a), drv.In(b),
>     block=(400,1,1), grid=(1,1))c= dest-a*b
> print (c)
> Unfortunately, I get the following error:
> (C:\ProgramData\Miniconda3) C:\SciSoft>python hello_gpu.py
> Traceback (most recent call last):
>   File "hello_gpu.py", line 1, in 
>     import pycuda.autoinit
>   File "C:\ProgramData\Miniconda3\lib\site-packages\pycuda\autoinit.py", line 
> 2, in 
>     import pycuda.driver as cuda
>   File "C:\ProgramData\Miniconda3\lib\site-packages\pycuda\driver.py", line 
> 5, in 
>     from pycuda._driver import *  # noqa
> ImportError: DLL load failed: The specified module could not be found.
>
> Please advise.Arnold
>
>  
> ___
> PyCUDA mailing list
> PyCUDA@tiker.net
> https://lists.tiker.net/listinfo/pycuda
  ___
PyCUDA mailing list
PyCUDA@tiker.net
https://lists.tiker.net/listinfo/pycuda


Re: [PyCUDA] test program hello_gpu.py

2017-10-25 Thread Arnold Tunick
 Thank you for your email and rapid response.Please recommend how to implement 
your suggestion within the miniconda3 command window environment.Thank 
you,Arnold

On ‎Wednesday‎, ‎October‎ ‎25‎, ‎2017‎ ‎05‎:‎25‎:‎36‎ ‎PM‎ ‎EDT, Andreas 
Kloeckner  wrote:  
 
 Use dependency walker on _driver.pyd/dll to find the DLL you're missing.

Andreas

Arnold Tunick  writes:
>  FYI, I used pip install 
>pycuda-2017.1.1+cuda8061-cp36-cp36m-win_amd64.whl..
>
>    On ‎Wednesday‎, ‎October‎ ‎25‎, ‎2017‎ ‎04‎:‎44‎:‎33‎ ‎PM‎ ‎EDT, Arnold 
>Tunick  wrote:  
>  
>  I am testing the following python script in a miniconda shell on a win 10 
>notebook with cuda 9.0 amd python 3.6: 
>  import pycuda.autoinit
> import pycuda.driver as drv
> import numpyfrom pycuda.compiler import SourceModule
> mod = SourceModule("""
> __global__ void multiply_them(float *dest, float *a, float *b)
> {
>   const int i = threadIdx.x;
>   dest[i] = a[i] * b[i];
> }
> """)multiply_them = mod.get_function("multiply_them")a = 
> numpy.random.randn(400).astype(numpy.float32)
> b = numpy.random.randn(400).astype(numpy.float32)dest = numpy.zeros_like(a)
> multiply_them(
>     drv.Out(dest), drv.In(a), drv.In(b),
>     block=(400,1,1), grid=(1,1))c= dest-a*b
> print (c)
> Unfortunately, I get the following error:
> (C:\ProgramData\Miniconda3) C:\SciSoft>python hello_gpu.py
> Traceback (most recent call last):
>   File "hello_gpu.py", line 1, in 
>     import pycuda.autoinit
>   File "C:\ProgramData\Miniconda3\lib\site-packages\pycuda\autoinit.py", line 
> 2, in 
>     import pycuda.driver as cuda
>   File "C:\ProgramData\Miniconda3\lib\site-packages\pycuda\driver.py", line 
> 5, in 
>     from pycuda._driver import *  # noqa
> ImportError: DLL load failed: The specified module could not be found.
>
> Please advise.Arnold
>
>  
> ___
> PyCUDA mailing list
> PyCUDA@tiker.net
> https://lists.tiker.net/listinfo/pycuda
  ___
PyCUDA mailing list
PyCUDA@tiker.net
https://lists.tiker.net/listinfo/pycuda


[PyCUDA] test program hello_gpu.py

2017-10-25 Thread Arnold Tunick
I am testing the following python script in a miniconda shell on a win 10 
notebook with cuda 9.0 amd python 3.6: 
 import pycuda.autoinit
import pycuda.driver as drv
import numpyfrom pycuda.compiler import SourceModule
mod = SourceModule("""
__global__ void multiply_them(float *dest, float *a, float *b)
{
  const int i = threadIdx.x;
  dest[i] = a[i] * b[i];
}
""")multiply_them = mod.get_function("multiply_them")a = 
numpy.random.randn(400).astype(numpy.float32)
b = numpy.random.randn(400).astype(numpy.float32)dest = numpy.zeros_like(a)
multiply_them(
    drv.Out(dest), drv.In(a), drv.In(b),
    block=(400,1,1), grid=(1,1))c= dest-a*b
print (c)
Unfortunately, I get the following error:
(C:\ProgramData\Miniconda3) C:\SciSoft>python hello_gpu.py
Traceback (most recent call last):
  File "hello_gpu.py", line 1, in 
    import pycuda.autoinit
  File "C:\ProgramData\Miniconda3\lib\site-packages\pycuda\autoinit.py", line 
2, in 
    import pycuda.driver as cuda
  File "C:\ProgramData\Miniconda3\lib\site-packages\pycuda\driver.py", line 5, 
in 
    from pycuda._driver import *  # noqa
ImportError: DLL load failed: The specified module could not be found.

Please advise.Arnold

___
PyCUDA mailing list
PyCUDA@tiker.net
https://lists.tiker.net/listinfo/pycuda


Re: [PyCUDA] test program hello_gpu.py

2017-10-25 Thread Andreas Kloeckner
Use dependency walker on _driver.pyd/dll to find the DLL you're missing.

Andreas

Arnold Tunick  writes:
>  FYI, I used pip install 
> pycuda-2017.1.1+cuda8061-cp36-cp36m-win_amd64.whl..
>
> On ‎Wednesday‎, ‎October‎ ‎25‎, ‎2017‎ ‎04‎:‎44‎:‎33‎ ‎PM‎ ‎EDT, Arnold 
> Tunick  wrote:  
>  
>  I am testing the following python script in a miniconda shell on a win 10 
> notebook with cuda 9.0 amd python 3.6: 
>  import pycuda.autoinit
> import pycuda.driver as drv
> import numpyfrom pycuda.compiler import SourceModule
> mod = SourceModule("""
> __global__ void multiply_them(float *dest, float *a, float *b)
> {
>   const int i = threadIdx.x;
>   dest[i] = a[i] * b[i];
> }
> """)multiply_them = mod.get_function("multiply_them")a = 
> numpy.random.randn(400).astype(numpy.float32)
> b = numpy.random.randn(400).astype(numpy.float32)dest = numpy.zeros_like(a)
> multiply_them(
>     drv.Out(dest), drv.In(a), drv.In(b),
>     block=(400,1,1), grid=(1,1))c= dest-a*b
> print (c)
> Unfortunately, I get the following error:
> (C:\ProgramData\Miniconda3) C:\SciSoft>python hello_gpu.py
> Traceback (most recent call last):
>   File "hello_gpu.py", line 1, in 
>     import pycuda.autoinit
>   File "C:\ProgramData\Miniconda3\lib\site-packages\pycuda\autoinit.py", line 
> 2, in 
>     import pycuda.driver as cuda
>   File "C:\ProgramData\Miniconda3\lib\site-packages\pycuda\driver.py", line 
> 5, in 
>     from pycuda._driver import *  # noqa
> ImportError: DLL load failed: The specified module could not be found.
>
> Please advise.Arnold
>
>   
> ___
> PyCUDA mailing list
> PyCUDA@tiker.net
> https://lists.tiker.net/listinfo/pycuda


___
PyCUDA mailing list
PyCUDA@tiker.net
https://lists.tiker.net/listinfo/pycuda


Re: [PyCUDA] test program hello_gpu.py

2017-10-25 Thread Arnold Tunick
 FYI, I used pip install 
pycuda-2017.1.1+cuda8061-cp36-cp36m-win_amd64.whl..

On ‎Wednesday‎, ‎October‎ ‎25‎, ‎2017‎ ‎04‎:‎44‎:‎33‎ ‎PM‎ ‎EDT, Arnold 
Tunick  wrote:  
 
 I am testing the following python script in a miniconda shell on a win 10 
notebook with cuda 9.0 amd python 3.6: 
 import pycuda.autoinit
import pycuda.driver as drv
import numpyfrom pycuda.compiler import SourceModule
mod = SourceModule("""
__global__ void multiply_them(float *dest, float *a, float *b)
{
  const int i = threadIdx.x;
  dest[i] = a[i] * b[i];
}
""")multiply_them = mod.get_function("multiply_them")a = 
numpy.random.randn(400).astype(numpy.float32)
b = numpy.random.randn(400).astype(numpy.float32)dest = numpy.zeros_like(a)
multiply_them(
    drv.Out(dest), drv.In(a), drv.In(b),
    block=(400,1,1), grid=(1,1))c= dest-a*b
print (c)
Unfortunately, I get the following error:
(C:\ProgramData\Miniconda3) C:\SciSoft>python hello_gpu.py
Traceback (most recent call last):
  File "hello_gpu.py", line 1, in 
    import pycuda.autoinit
  File "C:\ProgramData\Miniconda3\lib\site-packages\pycuda\autoinit.py", line 
2, in 
    import pycuda.driver as cuda
  File "C:\ProgramData\Miniconda3\lib\site-packages\pycuda\driver.py", line 5, 
in 
    from pycuda._driver import *  # noqa
ImportError: DLL load failed: The specified module could not be found.

Please advise.Arnold

  ___
PyCUDA mailing list
PyCUDA@tiker.net
https://lists.tiker.net/listinfo/pycuda