Changeset b4272a2 in sasmodels


Ignore:
Timestamp:
Feb 1, 2018 10:01:35 AM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
f6fd413
Parents:
3221de0
Message:

restructure handling of opencl flags so it works with sasview

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernelcl.py

    r3221de0 rb4272a2  
    148148    This provides an OpenCL context and one queue per device. 
    149149    """ 
    150     if not HAVE_OPENCL: 
    151         warnings.warn("OpenCL startup failed with ***" 
    152                       + OPENCL_ERROR + "***; using C compiler instead") 
    153     elif ENV is None: 
     150    if ENV is None: 
     151        if not HAVE_OPENCL: 
     152            raise RuntimeError("OpenCL startup failed with ***" 
     153                            + OPENCL_ERROR + "***; using C compiler instead") 
    154154        reset_environment() 
     155        if ENV is None: 
     156            raise RuntimeError("SAS_OPENCL=None in environment") 
    155157    return ENV 
    156158 
Note: See TracChangeset for help on using the changeset viewer.