Changeset 02dfcab in sasmodels


Ignore:
Timestamp:
Feb 24, 2015 12:21:22 PM (10 years ago)
Author:
ajj
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:
5134b2c
Parents:
43bdddc (diff), 84e01d2 (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.
Message:

Merge branch 'master' of https://github.com/SasView/sasmodels

Location:
sasmodels
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/core.py

    rf734e7d r84e01d2  
    1212try: 
    1313    from .kernelcl import load_model as load_model_cl 
    14 except ImportError,exc: 
     14except Exception,exc: 
    1515    load_model_cl = None 
    1616from .kerneldll import load_model as load_model_dll 
  • sasmodels/kernelcl.py

    rf734e7d r664c8e7  
    3030try: 
    3131    import pyopencl as cl 
    32 except ImportError,exc: 
     32    context = cl.create_some_context(interactive=False) 
     33    del context 
     34except Exception,exc: 
    3335    warnings.warn(str(exc)) 
    3436    raise RuntimeError("OpenCL not available") 
    35  
    36 try: 
    37     context = cl.create_some_context(interactive=False) 
    38     del context 
    39 except cl.RuntimeError, exc: 
    40     warnings.warn(str(exc)) 
    41     raise RuntimeError("OpenCl not available") 
    4237 
    4338from pyopencl import mem_flags as mf 
  • sasmodels/model_test.py

    r6137124 r84e01d2  
    145145        loaders = ['dll'] 
    146146        models = models[1:] 
     147    elif models and models[0] == 'opencl_and_dll': 
     148        if load_model_cl is None: 
     149            print >>sys.stderr, "opencl is not available" 
     150            sys.exit(1) 
     151        loaders = ['opencl', 'dll'] 
     152        models = models[1:] 
    147153    else: 
    148154        loaders = ['opencl', 'dll'] 
     
    151157        runner.run(suite(loaders, models)) 
    152158    else: 
    153         print >>sys.stderr, "usage: python -m sasmodels.model_test [opencl|dll] model1 model2 ..." 
     159        print >>sys.stderr, "usage: python -m sasmodels.model_test [opencl|dll|opencl_and_dll] model1 model2 ..." 
    154160        print >>sys.stderr, "if model1 is 'all', then all except the remaining models will be tested" 
    155161 
  • sasmodels/models/cylinder.py

    r143e2f7 r43bdddc  
    157157    sld=6, solvent_sld=1, 
    158158    #radius=5, length=20, 
    159     radius=260, length=290, 
    160     theta=30, phi=0, 
     159    radius=20, length=300, 
     160    theta=60, phi=60, 
    161161    radius_pd=.2, radius_pd_n=9, 
    162162    length_pd=.2,length_pd_n=10, 
    163     theta_pd=15, theta_pd_n=45, 
    164     phi_pd=15, phi_pd_n=1, 
     163    theta_pd=10, theta_pd_n=5, 
     164    phi_pd=10, phi_pd_n=5, 
    165165    ) 
    166166 
Note: See TracChangeset for help on using the changeset viewer.