Skip to content

Commit

Permalink
Don't pass hosts when its just local
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemartinlogan committed Oct 17, 2023
1 parent bdf8631 commit 51a9bf4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jarvis_util/shell/mpi_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
Expand Down

0 comments on commit 51a9bf4

Please sign in to comment.