File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff 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 "
You can’t perform that action at this time.
0 commit comments