Further update to Linux exception handling for host info.

这个提交包含在:
Craig Warren
2017-02-28 11:36:25 +00:00
父节点 f046c567c7
当前提交 bb31770f99

查看文件

@@ -242,10 +242,12 @@ def get_host_info():
hostinfo['cpuID'] = cpuID
hostinfo['osversion'] = osversion
hostinfo['hyperthreading'] = hyperthreading
hostinfo['physicalcores'] = psutil.cpu_count(logical=False) # Get number of physical CPU cores, i.e. avoid hyperthreading with OpenMP
hostinfo['logicalcores'] = psutil.cpu_count(logical=True)
hostinfo['logicalcores'] = psutil.cpu_count()
try:
hostinfo['physicalcores'] = psutil.cpu_count(logical=False) # Get number of physical CPU cores, i.e. avoid hyperthreading with OpenMP
except ValueError:
hostinfo['physicalcores'] = hostinfo['logicalcores']
hostinfo['ram'] = psutil.virtual_memory().total
return hostinfo