-
Notifications
You must be signed in to change notification settings - Fork 211
Refactor mpi_cmd_for so we can just grab an MPI execution command #3259
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
Conversation
@boegel I've set this up so that it could be templated in an easyconfig but to do that I would need a toolchain instance for the easyconfig since I would rely on knowing the MPI family. Not sure where to do that though |
None, 'store', None), | ||
'mpi-exec-template': ("Template for MPI execution string to precede commands (template keys: %(nr_ranks)s", |
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.
Do we really need a separate configuration setting?
We can just replace %(cmd)s
with an empty string whenever we need just the mpirun ...
bit without the trailing command?
template values are collected via You can pass down the toolchain instance from the template_values = template_constant_dict(self, ignore=ignore, toolchain=self.toolchain) and then in def template_constant_dict(..., toolchain=None):
...
if toolchain is not None and hasattr(toolchain, 'mpi_cmd_for'):
# use empty string as command, to only get prefix for commands to be run with mpirun
mpi_cmd_prefix = toolchain.mpi_cmd_for('', 1)
template_values['mpi_cmd_prefix'] = mpi_cmd_prefix
|
I could have done this without making any other changes...I think I might just replace this PR rather than row back all the other changes. |
Closed in favour of #3264 |
No description provided.