diff --git a/lib/ramble/ramble/workflow_manager.py b/lib/ramble/ramble/workflow_manager.py index 50b882a6f..a8f4ad3f3 100644 --- a/lib/ramble/ramble/workflow_manager.py +++ b/lib/ramble/ramble/workflow_manager.py @@ -56,6 +56,12 @@ 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}"