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

Function main

Examples/ParallelProcessing/Generic/Cxx/ParallelIso.cxx:212–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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