[Paraview-developers] MPI_Init during standalone ParaView operation

Moreland, Kenneth kmorel at sandia.gov
Fri Oct 30 14:18:00 EDT 2009


I'm not paying much attention to this thread, but shouldn't the DSM (or whatever is using it) be able to check to see if MPI is running by calling MPI_Initialized to check to see if MPI_Init has been called.  If you are wrapping things in a plugin, it makes sense to have some autostart code do this.  I'm not sure how to safely call MPI_Finalize, though.

Be careful about calling MPI_Init in a "stand alone" application.  The main reason why ParaView does not always call this is that some versions of MPI will fail if MPI_Init is called if the application was not run under mpirun.  This was a real pain several years ago when the ParaView application could be run parallel.

-Ken


On 10/29/09 11:32 AM, "Biddiscombe, John A." <biddisco at cscs.ch> wrote:

Fabian



reusing the sim's mpi_world and need to have that shared into paraview's stuff?  Or is it using something else?
The sim's communicator is joined to the app's communicator using an  MPI_accept / MPI_Connect pair where the app calls accpt and the sim connects - via the dsm.  Any old communicator will do me on the app side, so lojng as paraview runs. It's really because debug/testing is too slow when you have to init pvservers and attach debuggers and wotnot. Much easier to run standalone.
Otherwise, I think the paraview client initializes the global controller with Dummy, but I think perhaps you could safely replace that when you detect the need by initializing a new MPIController and SetGlobalController().


OK. I tried MPI_Init and all is well, then I create a new controller and assign it to the DSM manager and setit globally, and all seems to be working. The DSM is not doing what it is supposed to, but the app is not crashing, so I think paraview is fooled "enough". If I can fix the DSM to work as it is, then I'm happy. Thanks for the pointers.
JB
NB. MPI_Init_thread(blah) is not working since we need to start (win32) with "-channel mt" on the command line, so I guess I may need to run as an mpi app anyway <sigh>
     vtkSmartPointer<vtkMPIController> controller = vtkSmartPointer<vtkMPIController>::New();
     controller->Initialize(&argc, &_argv, 1);
     this->SetController(controller);
     vtkMPIController::SetGlobalController(controller);




   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20091030/4fac0f1e/attachment.htm>


More information about the Paraview-developers mailing list