Changeset 0a88623 in sasview


Ignore:
Timestamp:
Dec 15, 2017 10:55:42 AM (4 months ago)
Author:
GitHub <noreply@…>
Branches:
master, ticket-1094-headless, ticket-818, ticket-976, ticket885, ticket885b, win64bit_conda_vm
Children:
8475d16, 11112b2, 19e584b, 6bd4235
Parents:
5bb05a4 (diff), 42a6e02 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Paul Kienzle <pkienzle@…> (12/15/17 10:55:42)
git-committer:
GitHub <noreply@…> (12/15/17 10:55:42)
Message:

Merge pull request #132 from rprospero/bug_995

ticket-995 OpenCL required on Linux even if turned off in GUI

File:
1 edited

Legend:

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

    r20fa5fe r42a6e02  
    88''' 
    99 
     10import logging 
    1011import os 
    1112import sys 
    12 import warnings 
    1313import wx 
    1414import sasmodels 
    1515from sas.sasgui.guiframe.documentation_window import DocumentationWindow 
     16 
     17logger = logging.getLogger(__name__) 
    1618 
    1719 
     
    168170            platforms = cl.get_platforms() 
    169171        except ImportError: 
    170             warnings.warn("pyopencl import failed. Using only CPU computations") 
     172            logger.warn("Unable to import the pyopencl package.  It may not " 
     173                        "have been installed.  If you wish to use OpenCL, try " 
     174                        "running pip install --user pyopencl") 
     175        except cl.LogicError as err: 
     176            logger.warn("Unable to fetch the OpenCL platforms.  This likely " 
     177                        "means that the opencl drivers for your system are " 
     178                        "not installed.") 
     179            logger.warn(err) 
    171180 
    172181        p_index = 0 
Note: See TracChangeset for help on using the changeset viewer.