-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 15/10/13 00:08, Andreas Kloeckner wrote: > Antoine Martin <[email protected]> writes: >> Does anyone know why this works: >> python -c "import gtk;import >> pyopencl;context=pyopencl.create_some_context(False);pyopencl.Program(context,'').build()" >> >> But this does not: >> python -c "import >> pyopencl;context=pyopencl.create_some_context(False);pyopencl.Program(context,'').build();import >> gtk" >> >> It fails with: >> Traceback (most recent call last): >> File "<string>", line 1, in <module> >> File "/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py", >> line 40, in <module> >> from gtk import _gtk >> ImportError: dlopen: cannot load any more object with static TLS >> >> Note: it is the build() call that ends up triggering this TLS conflict. >> Take it out and it works. >> The same thing happens with PyCUDA. >> >> Re-ordering the imports worked around this particular issue, but I seem >> to be getting other issues when I do that ('atexit' not firing and other >> weirdness). >> So this may have just papered over the real issue. How would I fix that? >> (preferably without touching pygtk2...) > > What OpenCL implementation are you using (sounds like Nvidia...)? Can > you try another (say AMD CPU)? The OpenCL implementation does not matter, the TLS problem is constant. Did you somehow manage to run the example I posted without hitting the TLS error?
To double check I have just tested again with all of these: [0] <pyopencl.Platform 'FreeOCL' at 0x7f73d72f88c8> [1] <pyopencl.Platform 'Portable Computing Language' at 0x7f73d6e65340> [2] <pyopencl.Platform 'AMD Accelerated Parallel Processing' at 0x7f73d648efc0> [3] <pyopencl.Platform 'Intel(R) OpenCL' at 0x1923910> And the AMD one was even tested with both GPU and CPU backends. I also remember testing the Nvidia implementation with the same results, and on an Intel CPU too (above is AMD). Antoine -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlJcMhEACgkQGK2zHPGK1rtjdQCdEEMBHMTv0gYDsb5q8owGQiit CY4An0x841r/S94NY2QK66AvxWbSW9B9 =1/Mj -----END PGP SIGNATURE----- _______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
