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
5 changes: 5 additions & 0 deletions toolchain/mfc/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ def build_target(mfc, name: str, history: typing.List[str] = None):
if history is None:
history = []

if mfc.args["no_build"]:
cons.print("--no-build specified, skipping...")
cons.unindent()
return

if name in history:
cons.print("Already built, skipping...")
cons.unindent()
Expand Down
11 changes: 6 additions & 5 deletions toolchain/mfc/run/engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def __init__(self) -> None:

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

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


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

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

try:
self.bWorks = q.get(block=False)
self.bKnowWorks = q.get(block=False)
except queue.Empty as e:
self.bWorks = False
self.bKnowWorks = False

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