Changes in / [ebfe223:cde0611] in sasview
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
build_tools/jenkins_ubuntu_build.sh
rfb3d974 rbc8750eb 3 3 4 4 ## Set up path for py36 - conda 5 export PATH=/home/sasview/ miniconda3/bin:$PATH5 export PATH=/home/sasview/anaconda3/bin:$PATH 6 6 7 7 -
run.py
r2e27cdb6 rdb05c44 145 145 import sas.qtgui.convertUI 146 146 147 # initialize OpenCL setting 148 SAS_OPENCL = sas.get_custom_config().SAS_OPENCL 149 if SAS_OPENCL and "SAS_OPENCL" not in os.environ: 150 os.environ["SAS_OPENCL"] = SAS_OPENCL 151 147 152 148 153 if __name__ == "__main__": -
src/sas/qtgui/Perspectives/Fitting/GPUOptions.py
raed0532 rdb05c44 34 34 clicked = False 35 35 sas_open_cl = None 36 cl_options = None 36 37 37 38 def __init__(self, parent=None): … … 49 50 cl_tuple = _get_clinfo() 50 51 self.sas_open_cl = os.environ.get("SAS_OPENCL", "") 52 53 # Keys are the names in the form "platform: device". Corresponding values are the combined indices, e.g. 54 # "0:1", for setting the SAS_OPENCL env. 55 self.cl_options = {} 56 51 57 for title, descr in cl_tuple: 52 58 # Create an item for each openCL option … … 55 61 check_box.setText(_translate("GPUOptions", descr, None)) 56 62 self.optionsLayout.addWidget(check_box) 57 if ( descr== self.sas_open_cl) or (63 if (title == self.sas_open_cl) or ( 58 64 title == "None" and not self.clicked): 59 65 check_box.click() 60 66 self.clicked = True 67 self.cl_options[descr] = title 61 68 self.openCLCheckBoxGroup.setMinimumWidth(self.optionsLayout.sizeHint().width()+10) 62 69 … … 76 83 checked = None 77 84 for box in self.openCLCheckBoxGroup.findChildren(QtWidgets.QCheckBox): 78 if box.isChecked() and (s tr(box.text())== self.sas_open_cl or (85 if box.isChecked() and (self.cl_options[str(box.text())] == self.sas_open_cl or ( 79 86 str(box.text()) == "No OpenCL" and self.sas_open_cl == "")): 80 87 box.setChecked(False) … … 82 89 checked = box 83 90 if hasattr(checked, "text"): 84 self.sas_open_cl = s tr(checked.text())91 self.sas_open_cl = self.cl_options[str(checked.text())] 85 92 else: 86 93 self.sas_open_cl = None … … 226 233 for cl_platform in cl_platforms: 227 234 d_index = 0 228 cl_ platforms = cl_platform.get_devices()229 for cl_ platform in cl_platforms:230 if len(cl_platforms) > 1 and len(cl_ platforms) > 1:235 cl_devices = cl_platform.get_devices() 236 for cl_device in cl_devices: 237 if len(cl_platforms) > 1 and len(cl_devices) > 1: 231 238 combined_index = ":".join([str(p_index), str(d_index)]) 232 239 elif len(cl_platforms) > 1: … … 234 241 else: 235 242 combined_index = str(d_index) 236 clinfo.append((combined_index, ": ".join([cl_platform.name,237 cl_ platform.name])))243 clinfo.append((combined_index, ": ".join([cl_platform.name, 244 cl_device.name]))) 238 245 d_index += 1 239 246 p_index += 1
Note: See TracChangeset
for help on using the changeset viewer.