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