set mpi group init flag after add group (#9293)

This commit is contained in:
Tang, Cheng 2021-10-07 10:09:16 -07:00 committed by GitHub
parent 4f4875b0e8
commit c002dc86a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,6 +169,8 @@ void MPIContext::AddMPIGroup(WorkerGroupType group_type, WorkerGroup& group) {
ORT_ENFORCE(this->mpi_groups_[group_type].communicator != MPI_COMM_NULL,
"Failed to add new MPI group for worker group: ",
DistributedRunContext::GetInstance().GetWorkerGroupName(group_type));
//set the group initialized flag
this->mpi_groups_[group_type].is_group_initialized = true;
#else
ORT_THROW("ORT must be built with MPI to add ", DistributedRunContext::GetInstance().GetWorkerGroupName(group_type), " with group id: ", group.group_id);
#endif