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

Function ParallelIso

IO/MPIImage/Testing/Cxx/ParallelIso.cxx:224–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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