sim setup-silent produces float values for ppn in machine.ini file
Issue #2537
resolved
Running sim setup-silent
on a freshly updates macOS BigSur x86 VM I get:
% ./simfactory/bin/sim whoami Error: value for key ppn in section osx-homebrew is not of required type int Aborting Simfactory.
On that system python3 happens to be Python 3.8.2.
This can be fixed by:
diff --git a/lib/simdt.py b/lib/simdt.py index 6b51053f..c1a63cea 100644 --- a/lib/simdt.py +++ b/lib/simdt.py @@ -528,7 +528,7 @@ class DecisionTree: # Throughout, we ignore hyperthreading. That can be added later. if platform.system()== 'Darwin': SocketsPerNode = int(cpu_info['hw.packages']) - CoresPerSocket = int(cpu_info['hw.physicalcpu']) / SocketsPerNode + CoresPerSocket = int(cpu_info['hw.physicalcpu']) // SocketsPerNode else: CoresPerSocket = int(cpu_info['Core(s) per socket']) SocketsPerNode = int(cpu_info['Socket(s)'])
which should be backported.
Comments (7)
-
reporter -
reporter Please review
-
reporter - changed status to open
-
reporter -
assigned issue to
-
assigned issue to
-
Please apply.
-
reporter Thank you.
Applied as git hash 15f1764 "simdt: avoid producing float types when computing cores" of simfactory2 on ET_2021_05
Applied as git hash 577204f "simdt: avoid producing float types when computing cores" of simfactory2 on master
-
reporter - changed status to resolved
- Log in to comment
Pull request is https://bitbucket.org/simfactory/simfactory2/pull-requests/58/simdt-avoid-producing-float-types-when