Skip to content

Commit

Permalink
BUG: Allow the mpirun/srun commands to have a prefix when parsing…
Browse files Browse the repository at this point in the history
… the PLAMS .run files (#265)
  • Loading branch information
BvB93 committed Oct 28, 2021
1 parent a91019d commit a8bab47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qmflows/parsers/cp2KParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ def get_cp2k_version(out_file: PathLike) -> CP2KVersion:
return CP2KVersion(0, 0)


EXECUTABLE_PATTERN = re.compile(r"(mpirun|srun)\s*(\S+)")
EXECUTABLE_PATTERN = re.compile(r"(\S+)?(mpirun|srun)\s*(\S+)")
VERSION_PATTERN = re.compile(r"\s+CP2K version (\d+).(\d+)")


Expand All @@ -748,7 +748,7 @@ def get_cp2k_version_run(run_file: PathLike) -> CP2KVersion:
for i in f:
match = EXECUTABLE_PATTERN.match(i)
if match is not None:
executable = match.groups()[1]
executable = match.groups()[2]
break
else:
filename = os.fsdecode(run_file)
Expand Down

0 comments on commit a8bab47

Please sign in to comment.