-
Notifications
You must be signed in to change notification settings - Fork 18
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
Update documentation to use new operation.with_directives decorator #128
Conversation
@atravitz and @Tobias-Dwyer will you guys have time to look at this sometime next week? We just merged glotzerlab/signac-flow#502 and this goes with that. |
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.
The changes look good, I checked docs.signac.io and saw that wall time and memory directives are missing. I'll make a PR that adds them.
Co-authored-by: Bradley Dice <[email protected]>
.. code-block:: python | ||
|
||
@FlowProject.operation | ||
@FlowProject.operation.with_directives({"np": 2}) | ||
@flow.cmd | ||
@flow.directives(np=2) | ||
def hello_mpi(job): | ||
return "mpiexec -n 2 mpi_program {job.ws}/input_file.txt" |
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.
Is this example still useful, or should we recommend the user to use the nranks
directive and adapt the command to remove mpiexec
?
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.
This whole section on MPI is out of date and actually would likely not work given the submit -> run -> exec
model. However, I don't know if it is in scope to modify this in this PR.
@kidrahahjo Did you want to make this PR? Thanks! |
Description
This changes the documentation to use the
FlowProject.operation.with_directives
decorator overflow.directives
. This is to teach a more coherent syntax withFlowGroupEntry.with_directives
.Motivation and Context
Is the corresponding documentation PR for glotzerlab/signac-flow#502.
Checklist: