Changeset c1799d3 in sasmodels for sasmodels/compare.py
- Timestamp:
- Nov 9, 2018 12:16:05 PM (5 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- c11d09f
- Parents:
- 17695aa (diff), cf3d0ce (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
r17695aa rc1799d3 41 41 from . import kerneldll 42 42 from . import kernelcl 43 from . import kernelcuda 43 44 from .data import plot_theory, empty_data1D, empty_data2D, load_data 44 45 from .direct_model import DirectModel, get_mesh … … 115 116 === environment variables === 116 117 -DSAS_MODELPATH=path sets directory containing custom models 117 -DSAS_OPENCL=vendor:device| none sets the target OpenCLdevice118 -DSAS_OPENCL=vendor:device|cuda:device|none sets the target GPU device 118 119 -DXDG_CACHE_HOME=~/.cache sets the pyopencl cache root (linux only) 119 120 -DSAS_COMPILER=tinycc|msvc|mingw|unix sets the DLL compiler … … 352 353 353 354 # If it is a list of choices, pick one at random with equal probability 354 # In practice, the model specific random generator will override.355 355 par = model_info.parameters[name] 356 if len(par.limits) > 2: # choice list357 return np.random.randint(len(par. limits))356 if par.choices: # choice list 357 return np.random.randint(len(par.choices)) 358 358 359 359 # If it is a fixed range, pick from it with equal probability. … … 725 725 set_integration_size(model_info, ngauss) 726 726 727 if dtype != "default" and not dtype.endswith('!') and not kernelcl.use_opencl(): 727 if (dtype != "default" and not dtype.endswith('!') 728 and not (kernelcl.use_opencl() or kernelcuda.use_cuda())): 728 729 raise RuntimeError("OpenCL not available " + kernelcl.OPENCL_ERROR) 729 730
Note: See TracChangeset
for help on using the changeset viewer.