From 38d665f0bcdd4f96856403b12cd5a0924302d61d Mon Sep 17 00:00:00 2001 From: pearce8 Date: Thu, 14 Nov 2024 11:46:57 -0600 Subject: [PATCH 01/14] System variant: no scheduler --- systems/tioga/system.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systems/tioga/system.py b/systems/tioga/system.py index a485f9d71..f2f0a649f 100644 --- a/systems/tioga/system.py +++ b/systems/tioga/system.py @@ -33,8 +33,8 @@ class Tioga(System): def initialize(self): super().initialize() - - self.scheduler = "flux" + if (self.spec.variants["scheduler"][0]): + self.scheduler = "flux" self.sys_cores_per_node = "64" self.sys_gpus_per_node = "4" From 58d09000b5d1d764cef756744af09943a8d4530a Mon Sep 17 00:00:00 2001 From: pearce8 Date: Thu, 14 Nov 2024 11:49:41 -0600 Subject: [PATCH 02/14] Parent system.py introduces the variant --- lib/benchpark/system.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/benchpark/system.py b/lib/benchpark/system.py index 9fb1982e6..995097428 100644 --- a/lib/benchpark/system.py +++ b/lib/benchpark/system.py @@ -72,6 +72,13 @@ class System(ExperimentSystemBase): Tuple["benchpark.variant.Variant", "benchpark.spec.ConcreteSystemSpec"], ] + variant( + "scheduler", + default=True, + values=("true", "false"), + description="Use the scheduler on the system, or generate scripts without the scheduler commands", + ) + def __init__(self, spec): self.spec: "benchpark.spec.ConcreteSystemSpec" = spec super().__init__() @@ -82,7 +89,7 @@ def initialize(self): self.sys_cores_per_node = None self.sys_gpus_per_node = None self.sys_mem_per_node = None - self.scheduler = None + self.scheduler = "mpi" self.timeout = "120" self.queue = None From 78a11f3de0a8fd886ce1ad953c04a2fe749c79ae Mon Sep 17 00:00:00 2001 From: pearce8 Date: Thu, 14 Nov 2024 12:01:00 -0600 Subject: [PATCH 03/14] Importing variant directive --- lib/benchpark/system.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/benchpark/system.py b/lib/benchpark/system.py index 995097428..360f6c535 100644 --- a/lib/benchpark/system.py +++ b/lib/benchpark/system.py @@ -11,6 +11,7 @@ import benchpark.paths from benchpark.directives import ExperimentSystemBase +from benchpark.directives import variant import benchpark.repo from benchpark.runtime import RuntimeResources From 59bca77d291ae446735d4e9333eeb7967160ded5 Mon Sep 17 00:00:00 2001 From: pearce8 Date: Thu, 14 Nov 2024 12:01:53 -0600 Subject: [PATCH 04/14] lint --- systems/tioga/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systems/tioga/system.py b/systems/tioga/system.py index f2f0a649f..6e965b955 100644 --- a/systems/tioga/system.py +++ b/systems/tioga/system.py @@ -33,7 +33,7 @@ class Tioga(System): def initialize(self): super().initialize() - if (self.spec.variants["scheduler"][0]): + if self.spec.variants["scheduler"][0]: self.scheduler = "flux" self.sys_cores_per_node = "64" self.sys_gpus_per_node = "4" From 6a7cc4b7666061fab898df6196ae0e40268f0f04 Mon Sep 17 00:00:00 2001 From: pearce8 Date: Thu, 14 Nov 2024 12:40:56 -0600 Subject: [PATCH 05/14] Working around lack of binary variants --- lib/benchpark/system.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/benchpark/system.py b/lib/benchpark/system.py index 360f6c535..c1328365f 100644 --- a/lib/benchpark/system.py +++ b/lib/benchpark/system.py @@ -75,8 +75,8 @@ class System(ExperimentSystemBase): variant( "scheduler", - default=True, - values=("true", "false"), + default="yes", + values=("yes", "none"), description="Use the scheduler on the system, or generate scripts without the scheduler commands", ) From 6b8ebb927576af94694dd73d342d1d2cc420c598 Mon Sep 17 00:00:00 2001 From: pearce8 Date: Thu, 14 Nov 2024 12:44:25 -0600 Subject: [PATCH 06/14] Set system specific scheduler --- systems/tioga/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systems/tioga/system.py b/systems/tioga/system.py index 6e965b955..3bb884bb5 100644 --- a/systems/tioga/system.py +++ b/systems/tioga/system.py @@ -33,7 +33,7 @@ class Tioga(System): def initialize(self): super().initialize() - if self.spec.variants["scheduler"][0]: + if self.spec.satisfies("scheduler=yes"): self.scheduler = "flux" self.sys_cores_per_node = "64" self.sys_gpus_per_node = "4" From 944864dd9c02295b7110eb21a9a5b40db7243e25 Mon Sep 17 00:00:00 2001 From: pearce8 Date: Thu, 14 Nov 2024 12:56:11 -0600 Subject: [PATCH 07/14] Spec check --- systems/tioga/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systems/tioga/system.py b/systems/tioga/system.py index 3bb884bb5..1871328ef 100644 --- a/systems/tioga/system.py +++ b/systems/tioga/system.py @@ -33,7 +33,7 @@ class Tioga(System): def initialize(self): super().initialize() - if self.spec.satisfies("scheduler=yes"): + if self.spec.variants["scheduler"][0]=="yes": self.scheduler = "flux" self.sys_cores_per_node = "64" self.sys_gpus_per_node = "4" From d50cd843db3d7f1557fdfe6e448c04233ad04375 Mon Sep 17 00:00:00 2001 From: pearce8 Date: Tue, 19 Nov 2024 16:17:10 -0500 Subject: [PATCH 08/14] Base system uses mpi without scheduler commands --- lib/benchpark/system.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/benchpark/system.py b/lib/benchpark/system.py index c1328365f..0323089d1 100644 --- a/lib/benchpark/system.py +++ b/lib/benchpark/system.py @@ -75,9 +75,9 @@ class System(ExperimentSystemBase): variant( "scheduler", - default="yes", - values=("yes", "none"), - description="Use the scheduler on the system, or generate scripts without the scheduler commands", + default="mpi", + values=("mpi"), + description="Base generates scripts without the scheduler commands", ) def __init__(self, spec): @@ -90,7 +90,7 @@ def initialize(self): self.sys_cores_per_node = None self.sys_gpus_per_node = None self.sys_mem_per_node = None - self.scheduler = "mpi" + self.scheduler = self.spec.variants["scheduler"].value self.timeout = "120" self.queue = None From 98ec6edd4eed897812bf52563ffbd4c1841bcb56 Mon Sep 17 00:00:00 2001 From: pearce8 Date: Tue, 19 Nov 2024 16:18:48 -0500 Subject: [PATCH 09/14] Derived system uses flux scheduler by default --- systems/tioga/system.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/systems/tioga/system.py b/systems/tioga/system.py index 1871328ef..06041713b 100644 --- a/systems/tioga/system.py +++ b/systems/tioga/system.py @@ -33,8 +33,7 @@ class Tioga(System): def initialize(self): super().initialize() - if self.spec.variants["scheduler"][0]=="yes": - self.scheduler = "flux" + variant("scheduler", values=("flux", "mpi"), default="flux", sticky=True, description="Scheduler to use on the system") self.sys_cores_per_node = "64" self.sys_gpus_per_node = "4" From 721a8665011683ca0cb86b71a50c51634032079b Mon Sep 17 00:00:00 2001 From: pearce8 Date: Tue, 19 Nov 2024 16:25:32 -0500 Subject: [PATCH 10/14] lint --- systems/tioga/system.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/systems/tioga/system.py b/systems/tioga/system.py index 06041713b..f2250d6d0 100644 --- a/systems/tioga/system.py +++ b/systems/tioga/system.py @@ -33,7 +33,13 @@ class Tioga(System): def initialize(self): super().initialize() - variant("scheduler", values=("flux", "mpi"), default="flux", sticky=True, description="Scheduler to use on the system") + variant( + "scheduler", + values=("flux", "mpi"), + default="flux", + sticky=True, + description="Scheduler to use on the system" + ) self.sys_cores_per_node = "64" self.sys_gpus_per_node = "4" From d3c1ce3590b67fc5e27899a7d5e11d3341ef35d5 Mon Sep 17 00:00:00 2001 From: pearce8 Date: Thu, 21 Nov 2024 12:11:15 -0500 Subject: [PATCH 11/14] lint --- systems/tioga/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systems/tioga/system.py b/systems/tioga/system.py index c48baa931..4387fae1c 100644 --- a/systems/tioga/system.py +++ b/systems/tioga/system.py @@ -38,7 +38,7 @@ def initialize(self): values=("flux", "mpi"), default="flux", sticky=True, - description="Scheduler to use on the system" + description="Scheduler to use on the system", ) self.sys_cores_per_node = "64" self.sys_gpus_per_node = "4" From c24f40af4ef1d42b8fb29b20bcd4676d5c904fda Mon Sep 17 00:00:00 2001 From: pearce8 Date: Tue, 26 Nov 2024 11:16:03 -0600 Subject: [PATCH 12/14] Adding comma --- lib/benchpark/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/benchpark/system.py b/lib/benchpark/system.py index 0323089d1..1ba3356ae 100644 --- a/lib/benchpark/system.py +++ b/lib/benchpark/system.py @@ -76,7 +76,7 @@ class System(ExperimentSystemBase): variant( "scheduler", default="mpi", - values=("mpi"), + values=("mpi",), description="Base generates scripts without the scheduler commands", ) From e392dc8d1f214cf261e9e4bccf0ac2e3317e1294 Mon Sep 17 00:00:00 2001 From: pearce8 Date: Tue, 26 Nov 2024 11:25:33 -0600 Subject: [PATCH 13/14] Array access to scheduler values --- lib/benchpark/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/benchpark/system.py b/lib/benchpark/system.py index 1ba3356ae..e32362d04 100644 --- a/lib/benchpark/system.py +++ b/lib/benchpark/system.py @@ -90,7 +90,7 @@ def initialize(self): self.sys_cores_per_node = None self.sys_gpus_per_node = None self.sys_mem_per_node = None - self.scheduler = self.spec.variants["scheduler"].value + self.scheduler = self.spec.variants["scheduler"][0] self.timeout = "120" self.queue = None From 9290fed481b1268ae12ecff6ab40492995bc00e7 Mon Sep 17 00:00:00 2001 From: pearce8 Date: Tue, 26 Nov 2024 11:40:43 -0600 Subject: [PATCH 14/14] Removing use of unimplemented sticky variant --- systems/tioga/system.py | 1 - 1 file changed, 1 deletion(-) diff --git a/systems/tioga/system.py b/systems/tioga/system.py index 4387fae1c..1450fa426 100644 --- a/systems/tioga/system.py +++ b/systems/tioga/system.py @@ -37,7 +37,6 @@ def initialize(self): "scheduler", values=("flux", "mpi"), default="flux", - sticky=True, description="Scheduler to use on the system", ) self.sys_cores_per_node = "64"