Hi,


I'm working on a Catalyst adaptor written in Python for one of the CFD codes I 
use at work and I'm having trouble setting the MPI communicator I want the 
vtkCPProcessor object to use (in order to use a subset of MPI_COMM_WORLD). The 
MPI communicator I create is a mpi4py.MPI_Comm object, which I convert to a 
vtkMPICommunicator object using vtk.vtkMPI4PyCommunicator.ConvertToVTK. However 
vtk.vtkPVCatalystPython.vtkCPProcessor.Initialize is expecting a 
vtkMPICommunicatorOpaqueComm object and there does not seem to be a way for me 
to create such an object from the Python interface. Am I missing something here 
or is something not wrapped correctly or wrong?



For the moment I use mpi4py.MPI.COMM_WORLD to test everything. The following 
minimal example replicates my problem:

import mpi4py.MPI

import vtk

comm = mpi4py.MPI.COMM_WORLD

coprocessor = vtk.vtkPVCatalystPython.vtkCPProcessor()

coprocessor.Initialize(vtk.vtkMPI4PyCommunicator.ConvertToVTK(comm))

The last line fails with this message:

TypeError: Initialize argument 1: method requires a 
vtkMPICommunicatorOpaqueComm, a vtkMPICommunicator was provided.



I hope I post on the right mailing list as this could actually be a problem in 
VTK.



Thank you for your help.



Best,

Yohann V.

#
" Ce courriel et les documents qui lui sont joints peuvent contenir des 
informations confidentielles, être soumis aux règlementations relatives au 
contrôle des exportations ou ayant un caractère privé. S'ils ne vous sont pas 
destinés, nous vous signalons qu'il est strictement interdit de les divulguer, 
de les reproduire ou d'en utiliser de quelque manière que ce soit le contenu. 
Toute exportation ou réexportation non autorisée est interdite Si ce message 
vous a été transmis par erreur, merci d'en informer l'expéditeur et de 
supprimer immédiatement de votre système informatique ce courriel ainsi que 
tous les documents qui y sont attachés."
******
" This e-mail and any attached documents may contain confidential or 
proprietary information and may be subject to export control laws and 
regulations. If you are not the intended recipient, you are notified that any 
dissemination, copying of this e-mail and any attachments thereto or use of 
their contents by any means whatsoever is strictly prohibited. Unauthorized 
export or re-export is prohibited. If you have received this e-mail in error, 
please advise the sender immediately and delete this e-mail and all attached 
documents from your computer system."
#
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to