-
Notifications
You must be signed in to change notification settings - Fork 5
refactor: refine shell and scheduler arguments #805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
- move `Scheduler.options` to `QueuedScheduler` and rename (with deprecation warning) as `directives` since it only applies to schedulers that use a job submission system - remove `Scheduler` attributes `shell_args` and `shebang_args` (and class variables `DEFAULT_SHELL_ARGS` and `DEFAULT_SHEBANG_ARGS`) and replace with `Scheduler.shebang_executable`, which will typically not be used, and is a way to override the shell's executable and executable arguments in the jobscript shebang line. - remove unused `DEFAULT_SHELL_EXECUTABLE` class variable from `Scheduler` sub-classes - add `Shell.executable_args` and include this in `Shell.executable`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subject to one question, this is fine.
The question: what's the way of handling adding extra bits to a shebang line? The classic example of that is running a script interpreter with PATH searching using: #!/usr/bin/env interpreter
though I've also seen an occasional need to pass other options there too. It's more common with Perl scripts I suppose...
In any case, as long as there is a documented answer, whatever it is, I'm happy with this PR.
Thanks Adam. I made a new nenv and installed hpcflow using On CSF3 using SGE it has worked :) Using SLURM, it doesn't. I updated the config like this:
But the workflow wouldn't submit.
|
Scheduler.options
toQueuedScheduler
and rename (with deprecation warning) asdirectives
since it only applies to schedulers that use a job submission systemScheduler
attributesshell_args
andshebang_args
(and class variablesDEFAULT_SHELL_ARGS
andDEFAULT_SHEBANG_ARGS
) and replace withScheduler.shebang_executable
, which will typically not be used, and is a way to override the shell's_executable
andexecutable_args
in the jobscript shebang line.DEFAULT_SHELL_EXECUTABLE
class variable fromScheduler
sub-classesShell.executable_args
(e.g. for using bash in--login
mode) and include this inShell.executable
@gcapes please could you test this PR on CSF3 and check if it resolves your issue?
Recommended changes to configuration files
If the
schedulers.[scheduler-name].defaults.shebang_args
is used in a configuration file, this will need to be removed and added to the shell's newexecutable_args
configuration, e.g.shells.bash.defaults.executable_args
, which should be a list of strings. An example change is shown here.Recommended changes to workflow template files
The
Scheduler
argumentoptions
(for verbatim scheduler directives) has been renameddirectives
. Theoptions
key can still be used, but a deprecation warning will be printed.