Skip to content

Commit

Permalink
Corrected core reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Nilsson committed Dec 5, 2024
1 parent 61670c5 commit 2d4e5b4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion PILOTVERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.2.39
3.9.2.41
2 changes: 1 addition & 1 deletion pilot/util/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
RELEASE = '3' # released number should be fixed at 3 for Pilot 3
VERSION = '9' # version number is '1' for first release, '0' until then, increased for bigger updates
REVISION = '2' # revision number should be reset to '0' for every new version release, increased for small updates
BUILD = '39' # build number should be reset to '1' for every new development cycle
BUILD = '41' # build number should be reset to '1' for every new development cycle

SUCCESS = 0
FAILURE = 1
Expand Down
4 changes: 2 additions & 2 deletions pilot/util/workernode.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,13 +381,13 @@ def get_cpu_cores(modelstring):
logger.info(f'found {number_of_cores} cores ({cores_per_socket} cores per socket, {sockets} sockets)')

logger.debug(f'current model string: {modelstring}')
if number_of_cores > 0 and '-Core' not in modelstring:
if number_of_cores > 0:
if '-Core Processor' in modelstring: # NN-Core info already in string - update it
pattern = r'(\d+)\-Core Processor'
_nn = re.findall(pattern, modelstring)
if _nn:
modelstring = modelstring.replace(f'{_nn[0]}-Core', f'{number_of_cores}-Core')
if 'Core Processor' in modelstring:
elif 'Core Processor' in modelstring:
modelstring = modelstring.replace('Core', '%d-Core' % number_of_cores)
elif 'Processor' in modelstring:
modelstring = modelstring.replace('Processor', '%d-Core Processor' % number_of_cores)
Expand Down

0 comments on commit 2d4e5b4

Please sign in to comment.