--- a/src/Pure/System/host.scala Mon Mar 06 19:09:17 2023 +0100
+++ b/src/Pure/System/host.scala Mon Mar 06 19:13:27 2023 +0100
@@ -12,6 +12,19 @@
object Host {
+ /* process policy via numactl tool */
+
+ def numactl(node: Int): String = "numactl -m" + node + " -N" + node
+ def numactl_ok(node: Int): Boolean = Isabelle_System.bash(numactl(node) + " true").ok
+
+ def process_policy(options: Options, numa_node: Option[Int]): Options =
+ numa_node match {
+ case None => options
+ case Some(node) =>
+ options.string("process_policy") = if (numactl_ok(node)) numactl(node) else ""
+ }
+
+
/* allocated resources */
object Node_Info { def none: Node_Info = Node_Info("", None) }
@@ -57,19 +70,6 @@
- /* process policy via numactl tool */
-
- def numactl(node: Int): String = "numactl -m" + node + " -N" + node
- def numactl_ok(node: Int): Boolean = Isabelle_System.bash(numactl(node) + " true").ok
-
- def process_policy(options: Options, numa_node: Option[Int]): Options =
- numa_node match {
- case None => options
- case Some(node) =>
- options.string("process_policy") = if (numactl_ok(node)) numactl(node) else ""
- }
-
-
/* shuffling of NUMA nodes */
def numa_check(progress: Progress, enabled: Boolean): Boolean = {