Following on from the Mac problem yesterday (which is now solved - thanks
Andreas!) I'm having related trouble on Windows XP with this error:
Traceback (most recent call last):
  File "demo.py", line 3, in <module>
    import pycuda.driver as cuda
  File
"C:\Python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg\pycuda\driver.py",
line 1, in <module>
    from _driver import *
ImportError: DLL load failed: The specified module could not be found.

C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda\examples>

This report has the same error:
http://www.mail-archive.com/[email protected]/msg00656.html
but unlike there I see an 'nvcuda.dll' in my <system32>.

Any thoughts on how I can get past this would be very happily received!

Versions:

Windows XP
Python 2.6.4
distribute.py in use rather than setuptools
pyCUDA: 0.94beta (3 days old)
CUDA 2.3 installed and NVIDIA's CUDA demos run
Numpy 1.4.0
Boost: 1.41 built from source with MS VC 2008 (Visual Studio 9)
Visual Studio 2008 (AKA Visual Studio 9) Team
GFX: NVIDIA 9800GT

Instructions taken from:
http://wiki.tiker.net/PyCuda/Installation/Windows

Boost dlls copied to <system32> and they're in the PATH too:
C:\Documents and Settings\parc\My Documents\Downloads\pycuda_git\pycuda>echo
%PATH%
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;c:\program
files\intel\dmix;c:\program files\common files\roxio
shared\dllshared\;c:\program files\common files\roxio
shared\dllshared\;c:\program files\common files\roxio shared\9.0\d
llshared\;c:\python25;C:\Program Files\MATLAB71\bin\win32;c:\Program
Files\Microsoft SQL Server\90\Tools\binn\;C:\Progra
m Files\Git\cmd;C:\Program
Files\TortoiseGit\bin;C:\CUDA\bin;C:\Python26;C:\Program
Files\boost\boost_1_41_0\stage\lib;C
:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program
Files\Microsoft Visual Studio\Common\MSDev98\Bin;C
:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program
Files\Microsoft Visual Studio\VC98\bin

NOTE above - VC98 is uninstalled, I only have Visual Studio 2008 which was
used for boost.

The boost dlls are:
05/01/2010  17:26            45,056 boost_date_time-vc90-mt-1_41.dll
05/01/2010  17:26            83,456 boost_date_time-vc90-mt-gd-1_41.dll
05/01/2010  18:10            67,584 boost_filesystem-vc90-mt-1_41.dll
05/01/2010  18:09            97,792 boost_filesystem-vc90-mt-gd-1_41.dll
05/01/2010  18:11           113,664 boost_graph-vc90-mt-1_41.dll
05/01/2010  18:10           296,960 boost_graph-vc90-mt-gd-1_41.dll
05/01/2010  18:11            26,624 boost_iostreams-vc90-mt-1_41.dll
05/01/2010  18:10            40,448 boost_iostreams-vc90-mt-gd-1_41.dll
05/01/2010  18:12            83,968 boost_math_c99-vc90-mt-1_41.dll
05/01/2010  18:06           154,624 boost_math_c99-vc90-mt-gd-1_41.dll
05/01/2010  18:12            85,504 boost_math_c99f-vc90-mt-1_41.dll
05/01/2010  18:07           157,696 boost_math_c99f-vc90-mt-gd-1_41.dll
05/01/2010  18:12            82,944 boost_math_c99l-vc90-mt-1_41.dll
05/01/2010  18:07           152,576 boost_math_c99l-vc90-mt-gd-1_41.dll
05/01/2010  18:11           118,784 boost_math_tr1-vc90-mt-1_41.dll
05/01/2010  18:06           235,008 boost_math_tr1-vc90-mt-gd-1_41.dll
05/01/2010  18:12           123,392 boost_math_tr1f-vc90-mt-1_41.dll
05/01/2010  18:06           250,368 boost_math_tr1f-vc90-mt-gd-1_41.dll
05/01/2010  18:12           118,272 boost_math_tr1l-vc90-mt-1_41.dll
05/01/2010  18:06           233,472 boost_math_tr1l-vc90-mt-gd-1_41.dll
05/01/2010  18:14            24,576 boost_prg_exec_monitor-vc90-mt-1_41.dll
05/01/2010  18:08            33,280
boost_prg_exec_monitor-vc90-mt-gd-1_41.dll
05/01/2010  18:12           262,656 boost_program_options-vc90-mt-1_41.dll
05/01/2010  18:07           470,016
boost_program_options-vc90-mt-gd-1_41.dll
05/01/2010  17:21           220,672 boost_python-vc90-mt-1_41.dll
05/01/2010  17:21           512,000 boost_python-vc90-mt-gd-1_41.dll
05/01/2010  18:11           672,768 boost_regex-vc90-mt-1_41.dll
05/01/2010  18:10         1,686,528 boost_regex-vc90-mt-gd-1_41.dll
05/01/2010  18:13           224,256 boost_serialization-vc90-mt-1_41.dll
05/01/2010  18:08           573,440 boost_serialization-vc90-mt-gd-1_41.dll
05/01/2010  18:13            50,176 boost_signals-vc90-mt-1_41.dll
05/01/2010  18:08           112,640 boost_signals-vc90-mt-gd-1_41.dll
05/01/2010  18:10            12,800 boost_system-vc90-mt-1_41.dll
05/01/2010  18:09            16,384 boost_system-vc90-mt-gd-1_41.dll
05/01/2010  17:23            41,984 boost_thread-vc90-mt-1_41.dll
05/01/2010  17:23            61,440 boost_thread-vc90-mt-gd-1_41.dll
05/01/2010  18:14           379,904
boost_unit_test_framework-vc90-mt-1_41.dll
05/01/2010  18:09         1,127,424
boost_unit_test_framework-vc90-mt-gd-1_41.dll

siteconf.py:
BOOST_INC_DIR = ['C:\\Program Files\\boost\\boost_1_41_0']
BOOST_LIB_DIR = ['C:\\Program Files\\boost\\boost_1_41_0\\stage\\lib']
BOOST_COMPILER = 'msvc'
BOOST_PYTHON_LIBNAME = ['boost_python-vc90-mt-1_41']
BOOST_THREAD_LIBNAME = ['boost_thread-vc90-mt-1_41']
CUDA_TRACE = False
CUDA_ROOT = 'c:\\cuda'
CUDA_ENABLE_GL = False
CUDADRV_LIB_DIR = []
CUDADRV_LIBNAME = ['cuda']
CXXFLAGS = ['/EHsc']
LDFLAGS = ['/FORCE']
via:
configure.py --boost-inc-dir="C:\Program Files\boost\boost_1_41_0"
--boost-lib-dir="C:\Program Files\boost\boost_1_41_0\stage\lib"
--boost-compiler=msvc --boost-python-libname=boost_python-vc90-mt-1_41
--boost-thread-libname=boost_thread-vc90-mt-1_41 --cuda-root="c:\cuda"
--cxxflags="/EHsc" --ldflags="/FORCE"


Build process:

# ./build and <site-packages>/pycuda's .egg removed before doing the
following

C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda>python setup.py build
C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda\setuptools-0.6c9-py2.6.egg-info
already exists
C:\Program Files\boost\boost_1_41_0 /boost/  python .hpp
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_python-vc90-mt-1_41 .so
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_python-vc90-mt-1_41 .dylib
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_python-vc90-mt-1_41 .lib
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_thread-vc90-mt-1_41 .so
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_thread-vc90-mt-1_41 .dylib
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_thread-vc90-mt-1_41 .lib
C:\CUDA /bin/  nvcc
C:\CUDA /bin/  nvcc .exe
C:\CUDA\include /  cuda .h
c:\cuda\lib / lib cuda .so
c:\cuda\lib / lib cuda .dylib
c:\cuda\lib / lib cuda .lib
c:\cuda\lib /  cuda .so
c:\cuda\lib /  cuda .dylib
c:\cuda\lib /  cuda .lib
running build
running build_py
running build_ext
building '_driver' extension
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -Isrc/cpp "-IC:\Program
Files\boost\boost_1_41_0" -IC:\CUDA\include
-IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include -I
:\Python26\PC /Tpsrc/wrapper/wrap_cudadrv.cpp
/Fobuild\temp.win32-2.6\Release\src/wrapper/wrap_cudadrv.obj /EHsc
wrap_cudadrv.cpp
src/cpp\cuda.hpp(653) : warning C4930: 'cuda::scoped_context_activation
ca(void)': prototyped function not called (was
 variable definition intended?)
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -Isrc/cpp "-IC:\Program
Files\boost\boost_1_41_0" -IC:\CUDA\include
-IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include -I
:\Python26\PC /Tpsrc/wrapper/mempool.cpp
/Fobuild\temp.win32-2.6\Release\src/wrapper/mempool.obj /EHsc
mempool.cpp
src/cpp\cuda.hpp(653) : warning C4930: 'cuda::scoped_context_activation
ca(void)': prototyped function not called (was
 variable definition intended?)
src/cpp\bitlog.hpp(35) : warning C4244: 'argument' : conversion from
'boost::uint32_t' to 'boost::uint16_t', possible l
ss of data
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo
/INCREMENTAL:NO "/LIBPATH:C:\Program Files\bo
st\boost_1_41_0\stage\lib" /LIBPATH:c:\cuda\lib /LIBPATH:C:\Python26\libs
/LIBPATH:C:\Python26\PCbuild boost_python-vc9
-mt-1_41.lib boost_thread-vc90-mt-1_41.lib cuda.lib /EXPORT:init_driver
build\temp.win32-2.6\Release\src/cpp/cuda.obj b
ild\temp.win32-2.6\Release\src/cpp/bitlog.obj
build\temp.win32-2.6\Release\src/wrapper/wrap_cudadrv.obj build\temp.win3
-2.6\Release\src/wrapper/mempool.obj
/OUT:build\lib.win32-2.6\pycuda\_driver.pyd
/IMPLIB:build\temp.win32-2.6\Release\s
c/cpp\_driver.lib
/MANIFESTFILE:build\temp.win32-2.6\Release\src/cpp\_driver.pyd.manifest
/FORCE
libboost_thread-vc90-mt-1_41.lib(thread.obj) : warning LNK4006: "void *
__cdecl boost::detail::get_tss_data(void const
)" (?get_tss_d...@detail@boost@@yapax...@z) already defined in
boost_thread-vc90-mt-1_41.lib(boost_thread-vc90-mt-1_41.
ll); second definition ignored
libboost_thread-vc90-mt-1_41.lib(thread.obj) : warning LNK4006: "class
boost::thread::id __cdecl boost::this_thread::ge
_id(void)" (?get...@this_thread@boost@@ya?a...@thread@2...@xz) already defined
in boost_thread-vc90-mt-1_41.lib(boost_thre
d-vc90-mt-1_41.dll); second definition ignored
libboost_thread-vc90-mt-1_41.lib(thread.obj) : warning LNK4006: "void
__cdecl boost::detail::set_tss_data(void const *,
lass boost::shared_ptr<struct boost::detail::tss_cleanup_function>,void
*,bool)" (?set_tss_d...@detail@boost@@YAXPBXV?$
hared_...@utss_cleanup_function@det...@boost@@@2...@pax_n@Z) already defined in
boost_thread-vc90-mt-1_41.lib(boost_thread
vc90-mt-1_41.dll); second definition ignored
   Creating library build\temp.win32-2.6\Release\src/cpp\_driver.lib and
object build\temp.win32-2.6\Release\src/cpp\_d
iver.exp
build\lib.win32-2.6\pycuda\_driver.pyd : warning LNK4088: image being
generated due to /FORCE option; image may not run
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe -nologo -manifest
build\temp.win32-2.6\Release\src/cpp\_driver
pyd.manifest -outputresource:build\lib.win32-2.6\pycuda\_driver.pyd;2



C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda>python setup.py install
C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda\setuptools-0.6c9-py2.6.egg-info
already exists
C:\Program Files\boost\boost_1_41_0 /boost/  python .hpp
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_python-vc90-mt-1_41 .so
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_python-vc90-mt-1_41 .dylib
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_python-vc90-mt-1_41 .lib
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_thread-vc90-mt-1_41 .so
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_thread-vc90-mt-1_41 .dylib
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_thread-vc90-mt-1_41 .lib
C:\CUDA /bin/  nvcc
C:\CUDA /bin/  nvcc .exe
C:\CUDA\include /  cuda .h
c:\cuda\lib / lib cuda .so
c:\cuda\lib / lib cuda .dylib
c:\cuda\lib / lib cuda .lib
c:\cuda\lib /  cuda .so
c:\cuda\lib /  cuda .dylib
c:\cuda\lib /  cuda .lib
running install
running bdist_egg
running egg_info
writing requirements to pycuda.egg-info\requires.txt
writing pycuda.egg-info\PKG-INFO
writing top-level names to pycuda.egg-info\top_level.txt
writing dependency_links to pycuda.egg-info\dependency_links.txt
reading manifest file 'pycuda.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pycuda.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
creating build\bdist.win32
creating build\bdist.win32\egg
creating build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\autoinit.py ->
build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\compiler.py ->
build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\cumath.py -> build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\curandom.py ->
build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\driver.py -> build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\elementwise.py ->
build\bdist.win32\egg\pycuda
creating build\bdist.win32\egg\pycuda\gl
copying build\lib.win32-2.6\pycuda\gl\autoinit.py ->
build\bdist.win32\egg\pycuda\gl
copying build\lib.win32-2.6\pycuda\gl\__init__.py ->
build\bdist.win32\egg\pycuda\gl
copying build\lib.win32-2.6\pycuda\gpuarray.py ->
build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\reduction.py ->
build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\tools.py -> build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\_driver.pyd ->
build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\__init__.py ->
build\bdist.win32\egg\pycuda
byte-compiling build\bdist.win32\egg\pycuda\autoinit.py to autoinit.pyc
byte-compiling build\bdist.win32\egg\pycuda\compiler.py to compiler.pyc
byte-compiling build\bdist.win32\egg\pycuda\cumath.py to cumath.pyc
byte-compiling build\bdist.win32\egg\pycuda\curandom.py to curandom.pyc
byte-compiling build\bdist.win32\egg\pycuda\driver.py to driver.pyc
byte-compiling build\bdist.win32\egg\pycuda\elementwise.py to
elementwise.pyc
byte-compiling build\bdist.win32\egg\pycuda\gl\autoinit.py to autoinit.pyc
byte-compiling build\bdist.win32\egg\pycuda\gl\__init__.py to __init__.pyc
byte-compiling build\bdist.win32\egg\pycuda\gpuarray.py to gpuarray.pyc
byte-compiling build\bdist.win32\egg\pycuda\reduction.py to reduction.pyc
byte-compiling build\bdist.win32\egg\pycuda\tools.py to tools.pyc
byte-compiling build\bdist.win32\egg\pycuda\__init__.py to __init__.pyc
creating stub loader for pycuda\_driver.pyd
byte-compiling build\bdist.win32\egg\pycuda\_driver.py to _driver.pyc
installing package data to build\bdist.win32\egg
running install_data
creating build\bdist.win32\egg\include
creating build\bdist.win32\egg\include\pycuda
copying src\cuda\pycuda-helpers.hpp -> build\bdist.win32\egg\include\pycuda
creating build\bdist.win32\egg\EGG-INFO
copying pycuda.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying pycuda.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying pycuda.egg-info\dependency_links.txt ->
build\bdist.win32\egg\EGG-INFO
copying pycuda.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO
copying pycuda.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
writing build\bdist.win32\egg\EGG-INFO\native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating 'dist\pycuda-0.94beta-py2.6-win32.egg' and adding
'build\bdist.win32\egg' to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing pycuda-0.94beta-py2.6-win32.egg
creating c:\python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg
Extracting pycuda-0.94beta-py2.6-win32.egg to c:\python26\lib\site-packages
Adding pycuda 0.94beta to easy-install.pth file

Installed c:\python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg
Processing dependencies for pycuda==0.94beta
Searching for py==1.1.1
Best match: py 1.1.1
Processing py-1.1.1-py2.6.egg
py 1.1.1 is already the active version in easy-install.pth
Installing py.lookup-script.py script to C:\Python26\Scripts
Installing py.lookup.exe script to C:\Python26\Scripts
Installing py.countloc-script.py script to C:\Python26\Scripts
Installing py.countloc.exe script to C:\Python26\Scripts
Installing py.test-script.py script to C:\Python26\Scripts
Installing py.test.exe script to C:\Python26\Scripts
Installing py.which-script.py script to C:\Python26\Scripts
Installing py.which.exe script to C:\Python26\Scripts
Installing py.cleanup-script.py script to C:\Python26\Scripts
Installing py.cleanup.exe script to C:\Python26\Scripts
Installing py.svnwcrevert-script.py script to C:\Python26\Scripts
Installing py.svnwcrevert.exe script to C:\Python26\Scripts
Installing py.convert_unittest-script.py script to C:\Python26\Scripts
Installing py.convert_unittest.exe script to C:\Python26\Scripts

Using c:\python26\lib\site-packages\py-1.1.1-py2.6.egg
Searching for pytools==9
Best match: pytools 9
Processing pytools-9-py2.6.egg
pytools 9 is already the active version in easy-install.pth
Installing logtool script to C:\Python26\Scripts
Installing runalyzer script to C:\Python26\Scripts
Installing runalyzer-gather script to C:\Python26\Scripts

Using c:\python26\lib\site-packages\pytools-9-py2.6.egg
Finished processing dependencies for pycuda==0.94beta



C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda\examples>python demo.py
Traceback (most recent call last):
  File "demo.py", line 3, in <module>
    import pycuda.driver as cuda
  File
"C:\Python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg\pycuda\driver.py",
line 1, in <module>
    from _driver import *
ImportError: DLL load failed: The specified module could not be found.

C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda\examples>


For reference:
C:\Documents and Settings\parc\My Documents\Downloads\pycuda_git\pycuda>dir
c:\cuda\lib
 Volume in drive C has no label.
 Volume Serial Number is ACC0-A99C

 Directory of c:\cuda\lib

08/12/2009  14:22    <DIR>          .
08/12/2009  14:22    <DIR>          ..
03/08/2009  21:25            20,436 cublas.lib
03/08/2009  21:25            19,700 cublasemu.lib
03/08/2009  21:25            33,992 cuda.lib
03/08/2009  21:25            31,952 cudart.lib
03/08/2009  21:25             3,730 cufft.lib
03/08/2009  21:25             3,796 cufftemu.lib

Looking inside _driver.pyd:
C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda\build\lib.win32-2.6\pycuda\_driver.pyd
I see references to:
boost_python-vc90-mt-1_41.dll
boost_thread-vc90-mt-1_41.dll
nvcuda.dll
MSVCP90.dll
python26.dll
MSVCR90.dll
KERNEL32.dll

The following didn't exist in my <system32>:
MSVCP90.dll
MSVCR90.dll
so I've copied them over from:
C:\Program Files\Microsoft Visual Studio
9.0\VC\redist\x86\Microsoft.VC90.CRT
but I still get the same error above.

I've also installed the MS VC 2008 Redistributable Package:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en
and that made no difference either.

Thoughts happily received!

Cheers,
Ian.

-- 
Ian Ozsvald (Professional Screencaster)
[email protected]

http://ProCasts.co.uk/examples.html
http://TheScreencastingHandbook.com
http://IanOzsvald.com + http://ShowMeDo.com
http://twitter.com/ianozsvald
_______________________________________________
PyCUDA mailing list
[email protected]
http://tiker.net/mailman/listinfo/pycuda_tiker.net

Reply via email to