LLNL / maestrowf

A tool to easily orchestrate general computational workflows both locally and on supercomputers
https://maestrowf.readthedocs.io
MIT License
134 stars 43 forks source link

Batch additonal args does not work #447

Open EverettGrethel opened 1 month ago

EverettGrethel commented 1 month ago

The Maestro documentation states that custom arguments args can be passed to the batch block such that the user can specify additional scheduler writing steps that are not default keys in Maestro. The docs state that args is passed as a dictionary in the yaml file. For example:

batch:
    type: lsf
    host: lassen
    bank: flask
    queue: pdebug
    args:
      alloc_flags: ipisolate

which should result in writing a bash script like so:

#BSUB -nnodes 1
#BSUB -q pdebug
#BSUB -G flask
#BSUB -W 00:30
#BSUB -alloc_flags ipisolate

However, when in reality #BSUB -alloc_flags ipisolate does not show up in the file. My guess is that the code that should be writing this would be located in maestrowf/interfaces/script/lsfscriptadapter.py, but as far as I can tell, no code related to args is present.

jwhite242 commented 1 month ago

I think that's only wired up for the flux adapter at the moment: https://github.com/LLNL/maestrowf/blob/b9ea2f01dbcfc44000cf730019d8db3189209446/maestrowf/interfaces/script/fluxscriptadapter.py#L88 That implementation attaches them to the $(LAUNCHER) rendering (flux run ..) instead of the batch script/allocation, which isn't quite what you're looking for?

For a patch to the lsf adapter would you need any optional args passed to the $(LAUNCHER) (i.e. the jsrun ... ) in addition to the allocation flag you're looking for above? Might be nice to attach those args to the steps instead, starting a convention of batch block args = allocation, step 'args' being for launcher?

EverettGrethel commented 1 month ago

Yes, the ability to pass optional args for the launcher in addition to the allocation would be nice, in my opinion. That would be great. I agree that the step args being for the launcher makes sense. I've written up a solution for the allocation optional args, which I can submit a pull request for you to check out if you'd like.

jwhite242 commented 1 month ago

yeah, a pull request would be awesome for that!