# HG changeset patch # User wenzelm # Date 1707924627 -3600 # Node ID f1df99019b508c68dd23acaa752561d3facfa028 # Parent 118504de9d0d5e3ad0beddbf3d3cbbddd7720c9e prefer physical processors (see also 4b014e6c1dfe and 26a43785590b); diff -r 118504de9d0d -r f1df99019b50 src/Pure/System/host.scala --- a/src/Pure/System/host.scala Wed Feb 14 15:29:52 2024 +0100 +++ b/src/Pure/System/host.scala Wed Feb 14 16:30:27 2024 +0100 @@ -122,24 +122,12 @@ } catch { case ERROR(_) => None } - def num_cpus(ssh: SSH.System = SSH.Local): Int = - if (ssh.is_local) Runtime.getRuntime.availableProcessors - else { - val command = - if (ssh.isabelle_platform.is_macos) "sysctl -n hw.ncpu" else "nproc" - val result = ssh.execute(command).check - Library.trim_line(result.out) match { - case Value.Int(n) => n - case _ => 1 - } - } - object Info { def init( hostname: String = SSH.LOCAL, ssh: SSH.System = SSH.Local, score: Option[Double] = None - ): Info = Info(hostname, numa_nodes(ssh = ssh), num_cpus(ssh = ssh), score) + ): Info = Info(hostname, numa_nodes(ssh = ssh), Multithreading.num_processors(ssh = ssh), score) } sealed case class Info(