Skip to content

Commit

Permalink
Adding sys info printout for all nodes (#1559)
Browse files Browse the repository at this point in the history
  • Loading branch information
opotowsky authored Dec 18, 2023
1 parent b117430 commit ddce755
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions armi/bookkeeping/report/reportingUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import os
import pathlib
import re
import subprocess
import sys
import tabulate
import textwrap
Expand Down Expand Up @@ -170,6 +171,7 @@ def _writeMachineInformation():
processorNames = context.MPI_NODENAMES
uniqueNames = set(processorNames)
nodeMappingData = []
sysInfo = ""
for uniqueName in uniqueNames:
matchingProcs = [
str(rank)
Expand All @@ -180,6 +182,13 @@ def _writeMachineInformation():
nodeMappingData.append(
(uniqueName, numProcessors, ", ".join(matchingProcs))
)
# If this is on Windows: run sys info on each unique node too
if "win" in sys.platform:
sysInfoCmd = 'systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version" /B /C:"Processor" && systeminfo | findstr /E /C:"Mhz"'
out = subprocess.run(
sysInfoCmd, capture_output=True, text=True, shell=True
)
sysInfo += out.stdout
runLog.header("=========== Machine Information ===========")
runLog.info(
tabulate.tabulate(
Expand All @@ -188,6 +197,9 @@ def _writeMachineInformation():
tablefmt="armi",
)
)
if sysInfo:
runLog.header("=========== System Information ===========")
runLog.info(sysInfo)

def _writeReactorCycleInformation(o, cs):
"""Verify that all the operating parameters are defined for the same number of cycles."""
Expand Down

0 comments on commit ddce755

Please sign in to comment.