llnl / llnl/maestrowf

Enable pass through of extra scheduler arguments

Open
#293 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Specification
Dominant language
Python
Stars
161
Forks
49
PR merge metrics
No merged PRs in 30d

Description

Slurm has numerous optional arguments for both sbatch and srun. Rather than trying to enumerate all of them with their own keys in the batch/step blocks, I'd like to propose adding a way to pass through user defined arguments. Consider something like the following examples, using the normal yaml key:val syntax nested inside a new registered key such as 'extra_args'

batch:
    type        : slurm
    host        : quartz
    bank        : baasic
    queue       : pbatch
    gres        : ignore
    reservation : test_reservation
    extra_args:
        begin: "02:30:00"            # delay execution by 2.5 hours
        depends: 238474            # start after job with id 238474
        ... 


study:
    ...
    - name: run-lulesh
      description: Run LULESH.
      run:
          cmd: |
            $(LAUNCHER) $(LULESH)/build/lulesh2.0 -s $(SIZE) -i $(ITERATIONS) -p > $(outfile)
          depends: [make-lulesh]
          nodes: 2
          procs: 27
          exclusive   : True
          walltime: "00:10:00"
          extra_args:
              cpus-per-task: 4            # Run task with 4 threads
       

So in this case the batch block extra_args would get dumped into the sbatch header while the extra_args in the step would be for the $(LAUNCHER) expansion.

This does put some of the syntax checking on the user side of course, has issues as well. This might be even more useful for schedulers like Flux that are still changing more rapidly, making any baked in syntax checking/registration more fragile.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the batch and study run blocks are converted into sbatch and srun arguments. Compare the proposed extra_args mappings with existing registered scheduler keys and determine how YAML values should be passed through. Done means extra_args works in both contexts without breaking existing Slurm arguments, with coverage for the examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
hpc
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.