Ruud H.G. van Tol on Sun, 03 Dec 2023 16:05:57 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: PARI/GP pthread questions |
On 2023-12-03 15:31, Bill Allombert wrote:
On Sun, Dec 03, 2023 at 03:09:49PM +0100, Karim Belabas wrote: [...]For systems with hyper-threading, one can get the number of physical cores as follows on my laptop: # grep '^cpu cores' /proc/cpuinfo | uniq cpu cores : 4This is only work if you have a single CPU!
$ grep '^physical id[^:]*:' /proc/cpuinfo |sort |uniq |wc -l 2 $ grep '^core id[^:]*:' /proc/cpuinfo |sort |uniq |wc -l 8 $ grep '^processor[^:]*:' /proc/cpuinfo |wc -l 32 $ grep '^cpu cores[^:]*:' /proc/cpuinfo |sort |uniq -c 32 cpu cores : 8 -- Ruud