[vtk-developers] VTK/Python in Parallel

Andy Cedilnik andy.cedilnik at kitware.com
Fri Dec 13 14:55:17 EST 2002


Hi Jeff,

Two unrelated questions here. Let me try to answer both, then if you
guys don't agree, correct me.

1. Why do we need vtk and vtkpython executables?

Tclsh, Wish, and Python executables are all compiled with C. On some
platforms (read HPUX, SunOS, Irix,...) when loading C++ library into C,
C++ initialization might not happen correctly, hence the code might not
work. I saw this happening on SunOS. Vtk and vtkpython executables are
compiled with C++ so they do the right thing.

2. Why do we need pvtk and pvtkpython executables?

MPI has to modify argc and argv to run correctly. The code in pvtk and
pvtkpython does that using vtkMPIController.

			Andy

On Fri, 2002-12-13 at 13:50, Jeff Lee wrote:
> Why not let vtkMPIController::Initialize(...) and Finalize do the trick? 
>  There is really no need for the wrapper languages to know about 
> MPI_Init and MPI_Finalize, is there?  The only trick is allowing the 
> wrapper languages to pass in argv, argc (which is why 
> vtkMPICommunicator::Initialize(...) isn't wrapped).  Also, doesn't the 
> vtk static initialization happen when the lib is loaded into the wrapper 
> language?  Then you could just run your python or java code which loads 
> the vtk libs (which triggers static initialization) and then just call 
> vtkMPIController::Initialize(...).  Am I missing something (probably)?





More information about the vtk-developers mailing list