| 210 | } |
| 211 | |
| 212 | int 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 | } |
nothing calls this directly
no test coverage detected