Called by SetCommunicator and constructor. It frees but does not set RMIHandle (which should not be set by using MPI_Comm_dup during construction).
| 188 | // not set RMIHandle (which should not be set by using MPI_Comm_dup |
| 189 | // during construction). |
| 190 | void vtkMPIController::InitializeCommunicator(vtkMPICommunicator* comm) |
| 191 | { |
| 192 | if (this->Communicator != comm) |
| 193 | { |
| 194 | if (this->Communicator != nullptr) |
| 195 | { |
| 196 | this->Communicator->UnRegister(this); |
| 197 | } |
| 198 | this->Communicator = comm; |
| 199 | if (this->Communicator != nullptr) |
| 200 | { |
| 201 | this->Communicator->Register(this); |
| 202 | } |
| 203 | |
| 204 | this->Modified(); |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | // Delete the previous RMI communicator and creates a new one |
| 209 | // by duplicating the user communicator. |
no test coverage detected