Hi there, Finally nVidia released Cuda (partially) 3.0 in 64 bits for Mac (not beta version!)
So I gave a try with pycuda. I used pycuda git (Sun Apr 11 10:54:51) with python 2.6 from Fink, 64 bits. I changed siteconf.py: BOOST_INC_DIR = ['/sw/include'] BOOST_LIB_DIR = ['/sw/lib'] BOOST_COMPILER = 'gcc43' BOOST_PYTHON_LIBNAME = ['boost_python-mt'] BOOST_THREAD_LIBNAME = ['boost_thread-mt'] CUDA_TRACE = False CUDA_ENABLE_GL = False CUDADRV_LIB_DIR = [] CUDADRV_LIBNAME = ['cuda'] CXXFLAGS = []#['-m64'] LDFLAGS = []#['-m64'] CXXFLAGS.extend(['-isysroot', '/Developer/SDKs/MacOSX10.6.sdk']) LDFLAGS.extend(['-isysroot', '/Developer/SDKs/MacOSX10.6.sdk']) and setup.py: diff --git a/setup.py b/setup.py index 319f18b..7e2ee05 100644 --- a/setup.py +++ b/setup.py @@ -220,9 +220,11 @@ def main(): # also, default to 32-bit build, since there doesn't appear to be a # 64-bit CUDA on Mac yet. if "-arch" not in conf["CXXFLAGS"]: - conf["CXXFLAGS"].extend(['-arch', 'i386', '-m32']) + #conf["CXXFLAGS"].extend(['-arch', 'i386', '-m32']) + conf["CXXFLAGS"].extend(['-arch', 'x86_64', '-m64']) if "-arch" not in conf["LDFLAGS"]: - conf["LDFLAGS"].extend(['-arch', 'i386', '-m32']) + #conf["LDFLAGS"].extend(['-arch', 'i386', '-m32']) + conf["LDFLAGS"].extend(['-arch', 'x86_64', '-m64']) ext_kwargs = dict() and did: make #(apparently all went fine, despite several warnings) sudo make install #(all went fine) Then: cd test python test_driver.py and it didn't work: =========================================================== test session starts ============================================================ python: platform darwin -- Python 2.6.4 -- pytest-1.2.1 test object 1: test_driver.py test_driver.py FFFFFFFFFFFFFFFFFF ================================================================= FAILURES ================================================================= _____________________________________________________ TestDriver.test_simple_kernel_2 ______________________________________________________ def f(*args, **kwargs): import pycuda.driver # appears to be idempotent, i.e. no harm in calling it more than once pycuda.driver.init() ctx = make_default_context() try: assert isinstance(ctx.get_device().name(), str) assert isinstance(ctx.get_device().compute_capability(), tuple) assert isinstance(ctx.get_device().get_attributes(), dict) inner_f(*args, **kwargs) finally: > ctx.pop() E LaunchError: cuCtxPopCurrent failed: launch failed /sw/lib/python2.6/site-packages/pycuda-0.94rc-py2.6-macosx-10.6-i386.egg/pycuda/tools.py:504: LaunchError ------------------------------------------------------------- Captured stderr -------------------------------------------------------------- PyCUDA WARNING: a clean-up operation failed (dead context maybe?) cuMemFree failed: invalid context PyCUDA WARNING: a clean-up operation failed (dead context maybe?) cuModuleUnload failed: invalid context PyCUDA WARNING: a clean-up operation failed (dead context maybe?) cuMemFree failed: invalid context PyCUDA WARNING: a clean-up operation failed (dead context maybe?) cuMemFree failed: invalid context ... [snip] ... /sw/lib/python2.6/site-packages/pycuda-0.94rc-py2.6-macosx-10.6-i386.egg/pycuda/tools.py:216: RuntimeError ======================================================== 18 failed in 0.27 seconds ========================================================= Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/sw/lib/python2.6/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) LogicError: cuCtxPopCurrent failed: invalid context Error in sys.exitfunc: Traceback (most recent call last): File "/sw/lib/python2.6/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) pycuda._driver.LogicError: cuCtxPopCurrent failed: invalid context ------------------------------------------------------------------- PyCUDA ERROR: The context stack was not empty upon module cleanup. ------------------------------------------------------------------- A context was still active when the context stack was being cleaned up. At this point in our execution, CUDA may already have been deinitialized, so there is no way we can finish cleanly. The program will be aborted now. Use Context.pop() to avoid this problem. ------------------------------------------------------------------- [1] 31869 abort python test_driver.py Any help would be very appreciated. Many thanks, Alan -- Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate Department of Biochemistry, University of Cambridge. 80 Tennis Court Road, Cambridge CB2 1GA, UK. >>http://www.bio.cam.ac.uk/~awd28<<
_______________________________________________ PyCUDA mailing list pyc...@host304.hostmonster.com http://host304.hostmonster.com/mailman/listinfo/pycuda_tiker.net