Changeset 66285f5 in sasview for src/sas/sasgui


Ignore:
Timestamp:
Dec 12, 2017 10:16:36 AM (7 years ago)
Author:
Adam Washington <adam.washington@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
42a6e02
Parents:
5bb05a4
Message:

Catch OpenCL errors thrown during platform detection.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/gpu_options.py

    r20fa5fe r66285f5  
    168168            platforms = cl.get_platforms() 
    169169        except ImportError: 
    170             warnings.warn("pyopencl import failed. Using only CPU computations") 
     170            warnings.warn("Unable to import the pyopencl package.  It may not \ 
     171            have been installed.  If you wish to use OpenCL, try running pip \ 
     172            install --user pyopencl") 
     173        except cl.LogicError as e: 
     174            warnings.warn("Unable to fetch the OpenCL platforms.  This likely \ 
     175            means that the opencl drivers for your system are not installed.") 
     176            warnings.warn(e) 
    171177 
    172178        p_index = 0 
Note: See TracChangeset for help on using the changeset viewer.