From ab0b34255069c4eb1b06c9136eef42f79ad00fa3 Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Mon, 27 Feb 2017 17:58:16 +0000 Subject: [PATCH] Add logical cores to host info. --- gprMax/utilities.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gprMax/utilities.py b/gprMax/utilities.py index 4b3a697b..7cde9c81 100644 --- a/gprMax/utilities.py +++ b/gprMax/utilities.py @@ -159,7 +159,7 @@ def get_host_info(): """ hostinfo = {} - machineID = sockets = cpuID = physicalcores = osversion = ram = hyperthreading = 'unknown' + machineID = sockets = cpuID = physicalcores = logicalcores = osversion = ram = hyperthreading = 'unknown' # Windows if sys.platform == 'win32': @@ -243,6 +243,7 @@ def get_host_info(): 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['ram'] = psutil.virtual_memory().total return hostinfo