{"action":"created","issue":{"url":"https://api.github.com/repos/geggo/gpyfft/issues/15","labels_url":"https://api.github.com/repos/geggo/gpyfft/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/geggo/gpyfft/issues/15/comments","events_url":"https://api.github.com/repos/geggo/gpyfft/issues/15/events","html_url":"https://github.com/geggo/gpyfft/issues/15","id":116124229,"number":15,"title":"starting a QtGui app kills gpyfft","user":{"login":"dboonz","id":2338263,"avatar_url":"https://avatars.githubusercontent.com/u/2338263?v=3","gravatar_id":"","url":"https://api.github.com/users/dboonz","html_url":"https://github.com/dboonz","followers_url":"https://api.github.com/users/dboonz/followers","following_url":"https://api.github.com/users/dboonz/following{/other_user}","gists_url":"https://api.github.com/users/dboonz/gists{/gist_id}","starred_url":"https://api.github.com/users/dboonz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dboonz/subscriptions","organizations_url":"https://api.github.com/users/dboonz/orgs","repos_url":"https://api.github.com/users/dboonz/repos","events_url":"https://api.github.com/users/dboonz/events{/privacy}","received_events_url":"https://api.github.com/users/dboonz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-10T15:04:47Z","updated_at":"2015-11-10T16:56:58Z","closed_at":null,"body":"Thanks for the repository! In general it works great. I just found out one weird issue, though. If I create a transform plan after I created a QT application (it does not matter wether you take pyside of pyqt4), gpyfft fails with a horrible message. Please see the minimal working example below. Do you have any idea how to fix this?\r\n\r\n## Code\r\n\r\n    # from PyQt4 import QtGui\r\n    from PySide import QtGui  # it does not matter which backend we choose\r\n    import sys\r\n    import numpy as np\r\n    import gpyfft\r\n    import pyopencl.array as cl_array\r\n    import pyopencl as cl\r\n\r\n    ctx = cl.create_some_context(interactive=False)\r\n    queue = cl.CommandQueue(ctx)\r\n\r\n    # numpy data\r\n    np_data = np.random.rand(64, 64)\r\n    gpu_data = cl_array.to_device(queue, np_data)\r\n\r\n    print \"Initializing transform before creating QT app\"\r\n    transform = gpyfft.fft.FFT(ctx, queue, [gpu_data])\r\n\r\n    # creating a QT gui application\r\n    app = QtGui.QApplication(sys.argv)\r\n\r\n    print \"Initializing the same transform after creating QT app\"\r\n    np_data = np.random.rand(64, 64)\r\n    gpu_data = cl_array.to_device(queue, np_data)\r\n    transform = gpyfft.fft.FFT(ctx, queue, [gpu_data])\r\n    print \"Successful\"\r\n\r\n    print \"Initializing a new with a different shape after creating QT app\"\r\n    np_data = np.random.rand(64, 128)\r\n    gpu_data = cl_array.to_device(queue, np_data)\r\n    transform = gpyfft.fft.FFT(ctx, queue, [gpu_data])  # FAILS\r\n\r\n\r\n### last part of the error message:\r\n\r\n            ^\r\n    <kernel>:80:47: error: invalid digit 'f' in decimal constant\r\n    (float2)(-0,9807852804032304305792422383092344f,     -0,1950903220161286089062713244857150f),\r\n                                              ^\r\n    <kernel>:81:47: error: invalid digit 'f' in decimal constant\r\n    (float2)(-0,2902846772544632747425907837168779f, 0,9569403357322086023373231000732630f),\r\n                                              ^\r\n    <kernel>:541:8: warning: assigning to '__global float2     *__attribute__((address_space(16776963)))' from 'const __global float2 *' discards qualifiers\r\n        lwbIn = gbIn + iOffset;\r\n              ^ ~~~~~~~~~~~~~~\r\n    <kernel>:570:8: warning: assigning to '__global float2  *__attribute__((address_space(16776963)))' from 'const __global float2 *' discards qualifiers\r\n        lwbIn = gbIn + iOffset;\r\n              ^ ~~~~~~~~~~~~~~\r\n\r\n    ************************************************\r\n    Traceback (most recent call last):\r\n       File \"minimal_error.py\", line 32, in <module>\r\n     transform = gpyfft.fft.FFT(ctx, queue, [gpu_data])  # FAILS\r\n     File \"/home/dbs660/research_subjects/fresnel_imaging/dev/gpyfft/gpyfft/fft.py\", line 51, in __init__\r\n     plan.bake(self.queue)\r\n     File \"gpyfftlib.pyx\", line 415, in gpyfft.gpyfftlib.Plan.bake (gpyfft/gpyfftlib.c:5008)\r\n     File \"gpyfftlib.pyx\", line 47, in gpyfft.gpyfftlib.errcheck (gpyfft/gpyfftlib.c:1522)\r\n     gpyfft.gpyfftlib.GpyFFT_Error: 'BUILD_PROGRAM_FAILURE'\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/geggo/gpyfft/issues/comments/155485586","html_url":"https://github.com/geggo/gpyfft/issues/15#issuecomment-155485586","issue_url":"https://api.github.com/repos/geggo/gpyfft/issues/15","id":155485586,"user":{"login":"geggo","id":968371,"avatar_url":"https://avatars.githubusercontent.com/u/968371?v=3","gravatar_id":"","url":"https://api.github.com/users/geggo","html_url":"https://github.com/geggo","followers_url":"https://api.github.com/users/geggo/followers","following_url":"https://api.github.com/users/geggo/following{/other_user}","gists_url":"https://api.github.com/users/geggo/gists{/gist_id}","starred_url":"https://api.github.com/users/geggo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geggo/subscriptions","organizations_url":"https://api.github.com/users/geggo/orgs","repos_url":"https://api.github.com/users/geggo/repos","events_url":"https://api.github.com/users/geggo/events{/privacy}","received_events_url":"https://api.github.com/users/geggo/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T16:56:58Z","updated_at":"2015-11-10T16:56:58Z","body":"\n> Am 10.11.2015 um 16:04 schrieb Dirk B. <notifications@github.com>:\n> \n> Thanks for the repository! In general it works great. I just found out one weird issue, though. If I create a transform plan after I created a QT application (it does not matter wether you take pyside of pyqt4), gpyfft fails with a horrible message. Please see the minimal working example below. Do you have any idea how to fix this?\n> \n> Code\n> \n> # from PyQt4 import QtGui\n> from PySide import QtGui  # it does not matter which backend we choose\n> import sys\n> import numpy as np\n> import gpyfft\n> import pyopencl.array as cl_array\n> import pyopencl as cl\n> \n> ctx = cl.create_some_context(interactive=False)\n> queue = cl.CommandQueue(ctx)\n> \n> # numpy data\n> np_data = np.random.rand(64, 64)\n> gpu_data = cl_array.to_device(queue, np_data)\n> \n> print \"Initializing transform before creating QT app\"\n> transform = gpyfft.fft.FFT(ctx, queue, [gpu_data])\n> \n> # creating a QT gui application\n> app = QtGui.QApplication(sys.argv)\n> \n> print \"Initializing the same transform after creating QT app\"\n> np_data = np.random.rand(64, 64)\n> gpu_data = cl_array.to_device(queue, np_data)\n> transform = gpyfft.fft.FFT(ctx, queue, [gpu_data])\n> print \"Successful\"\n> \n> print \"Initializing a new with a different shape after creating QT app\"\n> np_data = np.random.rand(64, 128)\n> gpu_data = cl_array.to_device(queue, np_data)\n> transform = gpyfft.fft.FFT(ctx, queue, [gpu_data])  # FAILS\n> last part of the error message:\n> \n>         ^\n> <kernel>:80:47: error: invalid digit 'f' in decimal constant\n> (float2)(-0,9807852804032304305792422383092344f,     -0,1950903220161286089062713244857150f),\n\nHi Dirk,\n\ninteresting feature! It seems that Qt changes the locale settings, and the clFFT library uses the locale settings for printing floats, using , instead of . for the decimal point. Could you try changing the the settings (locale.setlocale(…)) after initializing the Qt app?\n\nGregor\n\nPS: which OS?\n\n\n>                                           ^\n> <kernel>:81:47: error: invalid digit 'f' in decimal constant\n> (float2)(-0,2902846772544632747425907837168779f, 0,9569403357322086023373231000732630f),\n>                                           ^\n> <kernel>:541:8: warning: assigning to '__global float2     *__attribute__((address_space(16776963)))' from 'const __global float2 *' discards qualifiers\n>     lwbIn = gbIn + iOffset;\n>           ^ ~~~~~~~~~~~~~~\n> <kernel>:570:8: warning: assigning to '__global float2  *__attribute__((address_space(16776963)))' from 'const __global float2 *' discards qualifiers\n>     lwbIn = gbIn + iOffset;\n>           ^ ~~~~~~~~~~~~~~\n> \n> ************************************************\n> Traceback (most recent call last):\n>    File \"minimal_error.py\", line 32, in <module>\n>  transform = gpyfft.fft.FFT(ctx, queue, [gpu_data])  # FAILS\n>  File \"/home/dbs660/research_subjects/fresnel_imaging/dev/gpyfft/gpyfft/fft.py\", line 51, in __init__\n>  plan.bake(self.queue)\n>  File \"gpyfftlib.pyx\", line 415, in gpyfft.gpyfftlib.Plan.bake (gpyfft/gpyfftlib.c:5008)\n>  File \"gpyfftlib.pyx\", line 47, in gpyfft.gpyfftlib.errcheck (gpyfft/gpyfftlib.c:1522)\n>  gpyfft.gpyfftlib.GpyFFT_Error: 'BUILD_PROGRAM_FAILURE'\n> —\n> Reply to this email directly or view it on GitHub <https://github.com/geggo/gpyfft/issues/15>.\n> \n\n"}}