Skip to content

Commit 29973b0

Browse files
committed
Add support for SlurmJobGenerator
JobGenerators are selected by job_generator_factory based on the cluster's name. We use a more flexible, duck typing approach for Slurm clusters. If cluster name is not known, or not any of the if-case clauses in the factory, then we look at which launchers are available in the system. If it is sbatch, then a SlurmJobGenerator is built, a JobGenerator otherwise.
1 parent 972a1ab commit 29973b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

smartdispatch/job_generator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ def job_generator_factory(queue, commands, prolog=[], epilog=[], command_params=
1515
return HeliosJobGenerator(queue, commands, prolog, epilog, command_params, base_path)
1616
elif cluster_name == "hades":
1717
return HadesJobGenerator(queue, commands, prolog, epilog, command_params, base_path)
18+
elif utils.get_launcher(cluster_name) == "sbatch":
19+
return SlurmJobGenerator(queue, commands, prolog, epilog, command_params, base_path)
1820

1921
return JobGenerator(queue, commands, prolog, epilog, command_params, base_path)
2022

0 commit comments

Comments
 (0)