MCPcopy Create free account
hub / github.com/Kitware/VTK / Finalize

Method Finalize

Parallel/MPI/vtkMPIController.cxx:164–185  ·  view source on GitHub ↗

Good-bye world There should be no MPI calls after this. (Except maybe MPI_XXX_free()) unless finalized externally.

Source from the content-addressed store, hash-verified

162// There should be no MPI calls after this.
163// (Except maybe MPI_XXX_free()) unless finalized externally.
164void vtkMPIController::Finalize(int finalizedExternally)
165{
166 if (vtkMPIController::Initialized)
167 {
168 vtkMPIController::WorldRMICommunicator->Delete();
169 vtkMPIController::WorldRMICommunicator = nullptr;
170 vtkMPICommunicator::WorldCommunicator->Delete();
171 vtkMPICommunicator::WorldCommunicator = nullptr;
172 this->SetCommunicator(nullptr);
173 if (this->RMICommunicator)
174 {
175 this->RMICommunicator->Delete();
176 this->RMICommunicator = nullptr;
177 }
178 if (finalizedExternally == 0)
179 {
180 MPI_Finalize();
181 }
182 vtkMPIController::Initialized = 0;
183 this->Modified();
184 }
185}
186
187// Called by SetCommunicator and constructor. It frees but does
188// not set RMIHandle (which should not be set by using MPI_Comm_dup

Callers 12

TestDIYUtilitiesFunction · 0.45
TestDIYDataExchangerFunction · 0.45
FinalizeFunction · 0.45
TestGenericCommunicatorFunction · 0.45
TestPProbeFunction · 0.45
TestPSystemToolsFunction · 0.45
TestProcessFunction · 0.45
TestMPIControllerFunction · 0.45
TestPExecutableRunnerFunction · 0.45
TestPDirectoryFunction · 0.45

Calls 3

SetCommunicatorMethod · 0.95
DeleteMethod · 0.65
ModifiedMethod · 0.45

Tested by 10

TestDIYUtilitiesFunction · 0.36
TestDIYDataExchangerFunction · 0.36
TestGenericCommunicatorFunction · 0.36
TestPProbeFunction · 0.36
TestPSystemToolsFunction · 0.36
TestProcessFunction · 0.36
TestMPIControllerFunction · 0.36
TestPExecutableRunnerFunction · 0.36
TestPDirectoryFunction · 0.36