Skip to content

Commit 1856992

Browse files
committed
[Regression] Disable MPI interactive engine checks with --no-mpi
1 parent 8abd13f commit 1856992

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

toolchain/mfc/run/engines.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ def __init__(self) -> None:
5757

5858
def _init(self) -> None:
5959
self.mpibin = mpi_bins.get_binary(self.mfc.args)
60-
self.bWorks = False # We don't know yet whether this engine works
60+
# If using MPI, we don't know yet whether this engine works
61+
self.bKnowWorks = not self.mfc.args["mpi"]
6162

6263
def get_args(self) -> str:
6364
return f"""\
@@ -79,7 +80,7 @@ def get_exec_cmd(self, target_name: str) -> typing.List[str]:
7980

8081

8182
def run(self, names: typing.List[str]) -> None:
82-
if not self.bWorks:
83+
if not self.bKnowWorks:
8384
# Fix MFlowCode/MFC#21: Check whether attempting to run a job will hang
8485
# forever. This can happen when using the wrong queue system.
8586

@@ -102,11 +103,11 @@ def run(self, names: typing.List[str]) -> None:
102103
p.join(work_timeout)
103104

104105
try:
105-
self.bWorks = q.get(block=False)
106+
self.bKnowWorks = q.get(block=False)
106107
except queue.Empty as e:
107-
self.bWorks = False
108+
self.bKnowWorks = False
108109

109-
if p.is_alive() or not self.bWorks:
110+
if p.is_alive() or not self.bKnowWorks:
110111
raise common.MFCException(
111112
"The [bold magenta]Interactive Engine[/bold magenta] appears to hang or exit with a non-zero status code. "
112113
+ "This may indicate that the wrong MPI binary is being used to launch parallel jobs. You can specify the correct one for your system "

0 commit comments

Comments
 (0)