Skip to content

Commit

Permalink
Ignore shell in parallel command construction
Browse files Browse the repository at this point in the history
  • Loading branch information
koning committed May 24, 2024
1 parent 297d9d5 commit 9185a01
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Applying filters for `merlin detailed-status` will now log debug statements instead of warnings
- Modified the unit tests for the `merlin status` command to use pytest rather than unittest
- Added fixtures for `merlin status` tests that copy the workspace to a temporary directory so you can see exactly what's run in a test
- Ignore the shell keyword in parallel command construction

### Fixed
- Bugfix for output of `merlin example openfoam_wf_singularity`
Expand Down
18 changes: 16 additions & 2 deletions merlin/study/script_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ def __init__(self, **kwargs):
"walltime",
}

# These are known valid step keywords not used in batch
self._ignored: Set[str] = {
"shell",
}

def get_priority(self, priority):
"""This is implemented to override the abstract method and fix a pylint error"""

Expand Down Expand Up @@ -173,7 +178,9 @@ def get_parallelize_command(self, procs, nodes=None, **kwargs):
for key in supported:
value = kwargs.get(key)
if key not in self._cmd_flags:
LOG.warning("'%s' is not supported -- ommitted.", key)
if key not in self._ignored:
LOG.warning("'%s' is not supported in parallel command -- ommitted.", key)
LOG.debug("'%s' is not supported in parallel command -- ommitted.", key)
continue
if value:
args += [self._cmd_flags[key], f"{str(value)}"]
Expand Down Expand Up @@ -236,6 +243,11 @@ def __init__(self, **kwargs):
]
self._unsupported: Set[str] = set(list(self._unsupported) + new_unsupported)

# These are known valid step keywords not used in batch
self._ignored: Set[str] = {
"shell",
}

def get_priority(self, priority):
"""This is implemented to override the abstract method and fix a pylint error"""

Expand Down Expand Up @@ -282,7 +294,9 @@ def get_parallelize_command(self, procs, nodes=None, **kwargs):
continue

if key not in self._cmd_flags:
LOG.warning("'%s' is not supported -- ommitted.", key)
if key not in self._ignored:
LOG.warning("'%s' is not supported in parallel command -- ommitted.", key)
LOG.debug("'%s' is not supported in parallel command -- ommitted.", key)
continue

if key == "walltime":
Expand Down

0 comments on commit 9185a01

Please sign in to comment.