[ET Trac] #2537: sim setup-silent produces float values for ppn in machine.ini file

Roland Haas trac-noreply at einsteintoolkit.org
Fri Jun 4 12:35:00 CDT 2021


#2537: sim setup-silent produces float values for ppn in machine.ini file

 Reporter: Roland Haas
   Status: new
Milestone: 
  Version: development version
     Type: bug
 Priority: critical
Component: SimFactory

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
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.

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2537/sim-setup-silent-produces-float-values-for
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/trac/attachments/20210604/07931e95/attachment.html 


More information about the Trac mailing list