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

Function TestPStream

Filters/ParallelFlowPaths/Testing/Cxx/TestPStream.cxx:236–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236int TestPStream(int argc, char* argv[])
237{
238 vtkMPIController* contr = vtkMPIController::New();
239 contr->Initialize(&argc, &argv);
240 contr->CreateOutputWindow();
241
242 // When using MPI, the number of processes is determined
243 // by the external program which launches this application.
244 // However, when using threads, we need to set it ourselves.
245 if (contr->IsA("vtkThreadedController"))
246 {
247 // Set the number of processes to 2 for this example.
248 contr->SetNumberOfProcesses(2);
249 }
250
251 // Added for regression test.
252 // ----------------------------------------------
253 int retVal;
254 PStreamArgs_tmp args;
255 args.retVal = &retVal;
256 args.argc = argc;
257 args.argv = argv;
258 // ----------------------------------------------
259
260 contr->SetSingleMethod(MyMain, &args);
261 contr->SingleMethodExecute();
262
263 contr->Finalize();
264 contr->Delete();
265
266 return !retVal;
267}

Callers

nothing calls this directly

Calls 9

CreateOutputWindowMethod · 0.80
IsAMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
InitializeMethod · 0.45
SetNumberOfProcessesMethod · 0.45
SetSingleMethodMethod · 0.45
SingleMethodExecuteMethod · 0.45
FinalizeMethod · 0.45

Tested by

no test coverage detected