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

Function ParallelIso2

IO/MPIImage/Testing/Cxx/ParallelIso2.cxx:222–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220} // end anon namespace
221
222int ParallelIso2(int argc, char* argv[])
223{
224 // This is here to avoid false leak messages from vtkDebugLeaks when
225 // using mpich. It appears that the root process which spawns all the
226 // main processes waits in MPI_Init() and calls exit() when
227 // the others are done, causing apparent memory leaks for any objects
228 // created before MPI_Init().
229 MPI_Init(&argc, &argv);
230
231 // Note that this will create a vtkMPIController if MPI
232 // is configured, vtkThreadedController otherwise.
233 vtkMPIController* controller = vtkMPIController::New();
234
235 controller->Initialize(&argc, &argv, 1);
236
237 // Added for regression test.
238 // ----------------------------------------------
239 int retVal = 1;
240 ParallelIsoArgs_tmp args;
241 args.retVal = &retVal;
242 args.argc = argc;
243 args.argv = argv;
244 // ----------------------------------------------
245
246 controller->SetSingleMethod(MyMain, &args);
247 controller->SingleMethodExecute();
248
249 controller->Finalize();
250 controller->Delete();
251
252 return !retVal;
253}

Callers

nothing calls this directly

Calls 6

DeleteMethod · 0.65
NewFunction · 0.50
InitializeMethod · 0.45
SetSingleMethodMethod · 0.45
SingleMethodExecuteMethod · 0.45
FinalizeMethod · 0.45

Tested by

no test coverage detected