MatterMiners/tardis

Potential flaw in the SLURM Overlay Batch System Adapter Documentation

Closed this issue · 2 comments

According to the documentation additonal options to the sinfo call can be specified the following way:

BatchSystem:
  adapter: Slurm
  max_age: 1
  options:
    partition: express

However, looking at the code in

options_string = submit_cmd_option_formatter(options)
and
def submit_cmd_option_formatter(options: AttributeDict) -> str:
option_prefix = dict(short="-", long="--")
option_separator = dict(short=" ", long="=")
option_string = ""
for option_type in ("short", "long"):
try:
tmp_option_string = cmd_option_formatter(
getattr(options, option_type),
prefix=option_prefix[option_type],
separator=option_separator[option_type],
)
except AttributeError:
pass
else:
# add additional space between short and long options
if option_string:
option_string += " "
option_string += tmp_option_string
return option_string.strip()
it seems that the following syntax is right.

BatchSystem:
  adapter: Slurm
  max_age: 1
  options:
     long:
       partition: express

@stefan-k could you confirm, please?

Yes, good catch, the documentation is wrong and should be as you suggested.

Is fixed in #195.