Subject: Bug#745456 closed by Debian FTP Masters <[email-masked]> (Bug#748785: Removed package(s) from unstable)

From: [email-masked] (Debian Bug Tracking System)
Date: Mon, 26 May 2014 11:54:38 +0000

This is an automatic notification regarding your Bug report
which was filed against the src:pyopencl package:

#745456: create_some_context() can fail if multiple ICDs installed

It has been closed by Debian FTP Masters <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Debian FTP Masters <[email-masked]> by
replying to this email.

-- 
745456: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745456
Debian Bug Tracking System
Contact [email-masked] with problems

Subject: Bug#748785: Removed package(s) from unstable
From: Debian FTP Masters <[email-masked]>
To: [email-masked],[email-masked],[email-masked],[email-masked],[email-masked],[email-masked],
Cc: [email-masked], [email-masked]
Date: Mon, 26 May 2014 11:53:00 +0000

Version: 2013.2-1+rm

Dear submitter,

as the package pyopencl has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/748785

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
[email-masked].

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

Subject: create_some_context() can fail if multiple ICDs installed
From: "Rebecca N. Palmer" <[email-masked]>
To: [email-masked]
Date: Mon, 21 Apr 2014 22:57:57 +0100

Source: pyopencl
Version: 2013.2-1
Tags: patch

In non-interactive mode, create_some_context currently always
chooses the first device of the first platform.  This fails if
this has no devices (eg. it is the wrong one for the available
hardware), and will be slow if if is the CPU.

This patch makes it search through the platforms for a device,
preferring a GPU if available.  As discussed earlier, this will allow 
making OpenCL just work (at least for hardware that has a free ICD) by 
defaulting to installing all ICDs.

This requires the "Make get_devices() return an empty list instead of 
erroring out" fix you just sent upstream.
Description: Don't fail if the first platform has no devices

In non-interactive mode, create_some_context currently always
chooses the first device of the first platform.  This fails if
this has no devices (eg. it is the wrong one for the available
hardware), and will be slow if if is the CPU.

This patch makes it search through the platforms for a device,
preferring a GPU if available.

Author: Rebecca Palmer
Forwarded: no

--- pyopencl-2013.2.orig/pyopencl/__init__.py
+++ pyopencl-2013.2/pyopencl/__init__.py
@@ -776,9 +776,22 @@ def create_some_context(interactive=True
             for i, pf in enumerate(platforms):
                 cc_print("[%d] %s" % (i, pf))
 
-        answer = get_input("Choice [0]:")
+        answer = get_input("Choice:")
         if not answer:
-            platform = platforms[0]
+            for pf in platforms:
+                devices = pf.get_devices(device_type=device_type.GPU)
+                if devices:
+                    platform = pf
+                    default_device = devices[0]
+                    break
+            if not devices: # No GPUs found
+                for pf in platforms:
+                    devices = pf.get_devices()
+                    if devices:
+                        platform = pf
+                        default_device = devices[0]
+                        break
+
         else:
             platform = None
             try:
@@ -828,9 +841,9 @@ def create_some_context(interactive=True
             for i, dev in enumerate(devices):
                 cc_print("[%d] %s" % (i, dev))
 
-        answer = get_input("Choice, comma-separated [0]:")
+        answer = get_input("Choice, comma-separated:")
         if not answer:
-            devices = [devices[0]]
+            devices = [default_device]
         else:
             devices = [parse_device(i) for i in answer.split(",")]