Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/uwtools/drivers/mpassit.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,12 @@ def _runcmd(self) -> str:
"""
The full command-line component invocation.
"""
executable = self.config[STR.execution][STR.executable]
return "%s %s" % (executable, self._input_config_path.name)
execution = self.config.get(STR.execution, {})
mpiargs = execution.get(STR.mpiargs, [])
components = [
execution.get(STR.mpicmd), # MPI run program
*[str(x) for x in mpiargs], # MPI arguments
execution[STR.executable], # component executable name
self._input_config_path.name, # namelist name
]
return " ".join(filter(None, components))
2 changes: 1 addition & 1 deletion src/uwtools/tests/drivers/test_mpassit.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ def test_MPASSIT__input_config_path(driverobj, tmp_path):


def test_MPASSIT__runcmd(driverobj):
assert driverobj._runcmd == "/path/to/mpassit mpassit.nml"
assert driverobj._runcmd == "srun /path/to/mpassit mpassit.nml"
1 change: 1 addition & 0 deletions src/uwtools/tests/test_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ def mpas_streams():
MPASSIT_CONFIG = {
"execution": {
"executable": "/path/to/mpassit",
"mpicmd": "srun",
},
"namelist": {
"update_values": {
Expand Down