<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Texte de bulles Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.TextedebullesCar
{mso-style-name:"Texte de bulles Car";
mso-style-priority:99;
mso-style-link:"Texte de bulles";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">For the moment I use mpi4py.MPI.COMM_WORLD to test everything. The following minimal example replicates my problem:<o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US">import mpi4py.MPI<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span lang="EN-US">import vtk<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span lang="EN-US">comm = mpi4py.MPI.COMM_WORLD<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span lang="EN-US">coprocessor = vtk.vtkPVCatalystPython.vtkCPProcessor()<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span lang="EN-US">coprocessor.Initialize(vtk.vtkMPI4PyCommunicator.ConvertToVTK(comm))<o:p></o:p></span></i></p>
<p class="MsoNormal"><span lang="EN-US">The last line fails with this message:<o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US">TypeError: Initialize argument 1: method requires a vtkMPICommunicatorOpaqueComm, a vtkMPICommunicator was provided.<o:p></o:p></span></i></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I hope I post on the right mailing list as this could actually be a problem in VTK.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thank you for your help.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Yohann V.<o:p></o:p></span></p>
</div>
<p>#<br>
" 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."<br>
******<br>
" 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."<br>
#</p></body>
</html>