diff --git a/jarvis_util/shell/mpi_exec.py b/jarvis_util/shell/mpi_exec.py index f72abca..30e5419 100644 --- a/jarvis_util/shell/mpi_exec.py +++ b/jarvis_util/shell/mpi_exec.py @@ -144,9 +144,11 @@ def __init__(self, cmd, exec_info): def mpicmd(self): params = [f'mpiexec -n {self.nprocs}'] if self.ppn is not None: - params.append(f'-ppn {self.ppn}') + params.append(f'--ppn {self.ppn}') if len(self.hostfile): - if self.hostfile.is_subset() or self.hostfile.path is None: + if self.hostfile.hosts[0] == 'localhost' and len(self.hostfile) == 1: + pass + elif self.hostfile.is_subset() or self.hostfile.path is None: params.append(f'--hosts {",".join(self.hostfile.hosts)}') else: params.append(f'--hostfile {self.hostfile.path}')