| 222 | } // end anon namespace |
| 223 | |
| 224 | int 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 | } |
nothing calls this directly
no test coverage detected