Changeset a738209 in sasmodels for sasmodels/compare.py


Ignore:
Timestamp:
Jul 15, 2016 7:33:33 AM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
def2c1b
Parents:
98ba1fc
Message:

simplify kernels by remove coordination parameter logic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    rf2f67a6 ra738209  
    460460    Return a model calculator using the OpenCL calculation engine. 
    461461    """ 
    462     try: 
    463         model = core.build_model(model_info, dtype=dtype, platform="ocl") 
    464     except Exception as exc: 
    465         print(exc) 
    466         print("... trying again with single precision") 
    467         model = core.build_model(model_info, dtype='single', platform="ocl") 
     462    if not core.HAVE_OPENCL: 
     463        raise RuntimeError("OpenCL not available") 
     464    model = core.build_model(model_info, dtype=dtype, platform="ocl") 
    468465    calculator = DirectModel(data, model, cutoff=cutoff) 
    469466    calculator.engine = "OCL%s"%DTYPE_MAP[dtype] 
Note: See TracChangeset for help on using the changeset viewer.