Skip to content

Intermittent out of resources error clEnqueueReadBuffer failed #4

Description

@boulderZ

I can run multiple times and sometimes get error:
pyopencl.RuntimeError: clEnqueueReadBuffer failed: out of resources
after one or more iterations using the bike_a.png and bike_b.png files and main in demo mode straight from github. Sometimes it runs to completion and sometimes it stops part way through with above error.

Output on fail case:

Please wait a few seconds...
('file 0 = ', 'bike_a.png', ' file 1 = ', 'bike_b.png')
('img shape = ', (175, 239, 3))
('iteration', 1)
('mean block difference:', 11.847692226259401)
('iteration', 2)
('mean block difference:', 1.4053478590557273)
('iteration', 3)
('mean block difference:', 1.0751794090974331)
('iteration', 4)
('mean block difference:', 0.92336860183560998)
('iteration', 5)
('mean block difference:', 0.84552383540750564)
Traceback (most recent call last):
  File "main.py", line 195, in <module>
    patchmatch.match(files,Demo=True)
  File "main.py", line 186, in match
    self.execute();
  File "main.py", line 116, in execute
    cl.enqueue_read_buffer(self.queue, self.outputBuf, c).wait()
  File "/usr/lib/python2.7/dist-packages/pyopencl/__init__.py", line 860, in new_func
    return func(*args, **kwargs)
pyopencl.RuntimeError: clEnqueueReadBuffer failed: out of resources

When it runs successfully I get the following output:

Please wait a few seconds...
('file 0 = ', 'bike_a.png', ' file 1 = ', 'bike_b.png')
('img shape = ', (175, 239, 3))
('iteration', 1)
('mean block difference:', 11.847692226259401)
('iteration', 2)
('mean block difference:', 1.4053478590557273)
('iteration', 3)
('mean block difference:', 1.0751713650301336)
('iteration', 4)
('mean block difference:', 0.92228370782616687)
('iteration', 5)
('mean block difference:', 0.84449662336199371)
('iteration', 6)
('mean block difference:', 0.78995643332834575)
('iteration', 7)
('mean block difference:', 0.75182238942455692)
('iteration', 8)
('mean block difference:', 0.72269540056274861)
('iteration', 9)
('mean block difference:', 0.70064447195375668)
('iteration', 10)
('mean block difference:', 0.68212381211217721)
('iteration', 11)
('mean block difference:', 0.6671923072248922)
('iteration', 12)
('mean block difference:', 0.65498817675593513)
('iteration', 13)
('mean block difference:', 0.64466970594863771)
('iteration', 14)
('mean block difference:', 0.63470502613937019)
('iteration', 15)
('mean block difference:', 0.62660883279387825)
('iteration', 16)
('mean block difference:', 0.61789773527170389)
('iteration', 17)
('mean block difference:', 0.61108444301768117)
('iteration', 18)
('mean block difference:', 0.60394420541486304)
('iteration', 19)
('mean block difference:', 0.59827319833725168)
('iteration', 20)
('mean block difference:', 0.59298303466078317)
('randomfill', ':', 0.003, 'seconds')
('execute', ':', 0.137, 'seconds')
('init', ':', 0.519, 'seconds')
Done.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions