Skip to content

Commit d6b2343

Browse files
authored
Merge pull request #40 from henryleberre/master
2 parents ee15190 + 1856992 commit d6b2343

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

toolchain/mfc/build.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ def build_target(mfc, name: str, history: typing.List[str] = None):
105105
if history is None:
106106
history = []
107107

108+
if mfc.args["no_build"]:
109+
cons.print("--no-build specified, skipping...")
110+
cons.unindent()
111+
return
112+
108113
if name in history:
109114
cons.print("Already built, skipping...")
110115
cons.unindent()

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)