custom parallel source using pythonalgorithm

Hi Kitware,

I am trying to develop a parallel plugin using vtkpythonalgorithmbase. This plugin is a parallel source which reads the raw simulation data. Further, it is a parallel, i.e, each processor reads its part of the data and UpdataExtent() key is updated accordingly.

However, I am some issues when running paraview in client sever mode, where pvserver is run on multiple processors, only the processor 0 is calling RequestData and rest of processors are not going past RequestInformation.

I have attached the plugin below. Any help is appreciated. Thanks in advance

Regards,
Hari
pv_plugin.py (6.3 KB)

Hi Harikrishna,

For working in parallel in client-server mode I have in RequestInformation():

def RequestInformation(self, request, inInfoVec, outInfoVec):
                
        outInfo = outInfoVec.GetInformationObject(0)
        outInfo.Set(vtkAlgorithm.CAN_HANDLE_PIECE_REQUEST(), 1)

        ...

and in RequestData():

def RequestData(self, request, inInfoVec, outInfoVec):
                  
        executive = self.GetExecutive()        
        outInfo = executive.GetOutputInformation(0)        
        
        # MPI info:        
        part = outInfo.Get(executive.UPDATE_PIECE_NUMBER())        
        nparts = outInfo.Get(executive.UPDATE_NUMBER_OF_PIECES())        
        nghosts = outInfo.Get(executive.UPDATE_NUMBER_OF_GHOST_LEVELS())

        ...

This will work also without MPI mode (with single pvserver running).

Please let me know if it is still actual for you.

Best Regards,
Pavel