Skip to content

Commit

Permalink
Fix wrongly reported CUE_HT attribute
Browse files Browse the repository at this point in the history
This attribute is only used on the GUI and API to report whether a
host CPU architecture is hyperthreaded or not. For some reason I
couldn't get to the bottom of, this attribute was always hardcode
to true.
  • Loading branch information
DiegoTavares committed Jan 9, 2025
1 parent 9c72a3e commit f063905
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion rqd/rqd/rqcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,10 @@ def __createEnvVariables(self):
self.frameEnv['CUE_THREADS'] = str(max(
int(self.frameEnv['CUE_THREADS']),
len(self.runFrame.attributes['CPU_LIST'].split(','))))
self.frameEnv['CUE_HT'] = "True"
if self.rqCore.machine.getHyperthreadingMultiplier() > 1:
self.frameEnv['CUE_HT'] = "True"
else:
self.frameEnv['CUE_HT'] = "False"

# Add GPU's to use all assigned GPU cores
if 'GPU_LIST' in self.runFrame.attributes:
Expand Down
4 changes: 2 additions & 2 deletions rqd/rqd/rqmachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def getLoadAvg(self):
with open(rqd.rqconstants.PATH_LOADAVG, "r", encoding='utf-8') as loadAvgFile:
loadAvg = int(float(loadAvgFile.read().split()[0]) * 100)
if self.__enabledHT():
loadAvg = loadAvg // self.__getHyperthreadingMultiplier()
loadAvg = loadAvg // self.getHyperthreadingMultiplier()
loadAvg = loadAvg + rqd.rqconstants.LOAD_MODIFIER
loadAvg = max(loadAvg, 0)
return loadAvg
Expand Down Expand Up @@ -893,7 +893,7 @@ def getBootReport(self):
def __enabledHT(self):
return 'hyperthreadingMultiplier' in self.__renderHost.attributes

def __getHyperthreadingMultiplier(self):
def getHyperthreadingMultiplier(self):
return int(self.__renderHost.attributes['hyperthreadingMultiplier'])

def setupTaskset(self):
Expand Down

0 comments on commit f063905

Please sign in to comment.