Skip to content

Commit

Permalink
Merge pull request #4 from boegel/gpuinfo
Browse files Browse the repository at this point in the history
tweak GPU part of output produced by --show-system-info
  • Loading branch information
branfosj authored Sep 29, 2021
2 parents db8a157 + ab90fa1 commit 298db34
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions easybuild/tools/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -1318,11 +1318,6 @@ def show_system_info(self):
" -> speed: %s" % system_info['cpu_speed'],
" -> cores: %s" % system_info['core_count'],
" -> features: %s" % ','.join(cpu_features),
'',
"* software:",
" -> glibc version: %s" % system_info['glibc_version'],
" -> Python binary: %s" % sys.executable,
" -> Python version: %s" % sys.version.split(' ')[0],
])

if gpu_info:
Expand All @@ -1333,7 +1328,15 @@ def show_system_info(self):
for vendor in gpu_info:
lines.append(" -> %s" % vendor)
for gpu, num in gpu_info[vendor].items():
lines.append(" -> %s: %s" % (gpu, num))
lines.append(" -> %sx %s" % (num, gpu))

lines.extend([
'',
"* software:",
" -> glibc version: %s" % system_info['glibc_version'],
" -> Python binary: %s" % sys.executable,
" -> Python version: %s" % sys.version.split(' ')[0],
])

return '\n'.join(lines)

Expand Down
2 changes: 1 addition & 1 deletion easybuild/tools/systemtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def get_gpu_info():
nvidia_gpu_info.setdefault(line, 0)
nvidia_gpu_info[line] += 1
else:
_log.debug("None zero exit (%s) from nvidia-smi: %s" % (ec, out))
_log.debug("None zero exit (%s) from nvidia-smi: %s", ec, out)
except Exception as err:
_log.debug("Exception was raised when running nvidia-smi: %s", err)
_log.info("No NVIDIA GPUs detected")
Expand Down

0 comments on commit 298db34

Please sign in to comment.