# HG changeset patch # User wenzelm # Date 1536438079 -7200 # Node ID 8be4030394b83162d378f22cf2a1d70f460588b5 # Parent 89a12af9c330ffbd0bbc25a6a05b12437c3d349b implicit use of NUMA policy, absorbing potential errors; diff -r 89a12af9c330 -r 8be4030394b8 src/Pure/System/numa.scala --- a/src/Pure/System/numa.scala Sat Sep 08 22:09:52 2018 +0200 +++ b/src/Pure/System/numa.scala Sat Sep 08 22:21:19 2018 +0200 @@ -39,7 +39,7 @@ def policy(node: Int): String = if (numactl_available) "numactl -m" + node + " -N" + node else "" - def policy_options(options: Options, numa_node: Option[Int]): Options = + def policy_options(options: Options, numa_node: Option[Int] = Some(0)): Options = numa_node match { case None => options case Some(n) => options.string("ML_process_policy") = policy(n) @@ -48,6 +48,10 @@ /* shuffling of CPU nodes */ + def enabled: Boolean = + try { nodes().length >= 2 && numactl_available } + catch { case ERROR(_) => false } + def enabled_warning(progress: Progress, enabled: Boolean): Boolean = { def warning = diff -r 89a12af9c330 -r 8be4030394b8 src/Pure/Tools/dump.scala --- a/src/Pure/Tools/dump.scala Sat Sep 08 22:09:52 2018 +0200 +++ b/src/Pure/Tools/dump.scala Sat Sep 08 22:21:19 2018 +0200 @@ -79,7 +79,8 @@ def make_options(options: Options, aspects: List[Aspect]): Options = { - val options1 = options + "completion_limit=0" + "ML_statistics=false" + "parallel_proofs=0" + val options0 = if (NUMA.enabled) NUMA.policy_options(options) else options + val options1 = options0 + "completion_limit=0" + "ML_statistics=false" + "parallel_proofs=0" (options1 /: aspects)({ case (opts, aspect) => (opts /: aspect.options)(_ + _) }) }