Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ def main():
mpi_command = get_mpirun_command(
host_count=host_count,
host_list=host_list,
num_processes=process_count,
# -np is the total number of ranks: process_count per host on every host.
num_processes=process_count * host_count,
additional_options=distributed_config["mpi_additional_options"] or [],
entry_script_path=entry_script,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ def main():
mpi_command = get_mpirun_command(
host_count=host_count,
host_list=host_list,
num_processes=process_count,
# -np is the total number of ranks: process_count per host on every host.
num_processes=process_count * host_count,
additional_options=distributed_config["mpi_additional_options"] or [],
entry_script_path=entry_script,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ def test_mpi_driver_master(
mock_start_sshd_daemon.assert_called_once()
mock_bootstrap_master_node.assert_called_once()
mock_get_mpirun_command.assert_called_once()
# mpirun -np is the total number of ranks across all hosts, not the per-host count.
assert mock_get_mpirun_command.call_args.kwargs["host_list"] == ["algo-1:2", "algo-2:2"]
assert mock_get_mpirun_command.call_args.kwargs["num_processes"] == 4
mock_execute_commands.assert_called_once_with(DUMMY_MPI_COMMAND)
mock_write_status_file_to_workers.assert_called_once()

Expand Down
Loading