From 13fe551c839103b647c3b77b3cb6d081b8f98747 Mon Sep 17 00:00:00 2001 From: Bob Bird Date: Thu, 30 Jan 2025 09:08:09 -0700 Subject: [PATCH] Add default variable to define likely hostfile path --- lib/ramble/ramble/workflow_manager.py | 4 ++++ .../repos/builtin/workflow_managers/slurm/workflow_manager.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ramble/ramble/workflow_manager.py b/lib/ramble/ramble/workflow_manager.py index 50b882a6f..848c464ae 100644 --- a/lib/ramble/ramble/workflow_manager.py +++ b/lib/ramble/ramble/workflow_manager.py @@ -56,6 +56,10 @@ class WorkflowManagerBase(metaclass=WorkflowManagerMeta): description="Hostfile command to apply within execution templates for the workflow", ) + workflow_manager_variable( + "hostfile", default="{experiment_run_dir}/hostfile", description="Default hostfile path" + ) + def __init__(self, file_path): super().__init__() diff --git a/var/ramble/repos/builtin/workflow_managers/slurm/workflow_manager.py b/var/ramble/repos/builtin/workflow_managers/slurm/workflow_manager.py index eabea63f6..e21e5537c 100644 --- a/var/ramble/repos/builtin/workflow_managers/slurm/workflow_manager.py +++ b/var/ramble/repos/builtin/workflow_managers/slurm/workflow_manager.py @@ -271,4 +271,4 @@ def get_partitions(self): } def get_hostfile_cmd(self): - return "scontrol show hostnames > {experiment_run_dir}/hostfile" + return "scontrol show hostnames > {hostfile}"