<div dir="ltr"><div><div><div>Hi Joan,<br><br></div>If you could write a self-contained piece of code that verifies the error I'd be happy to take a look at fixing it.<br><br></div>Best,<br></div>Andy<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 22, 2018 at 10:11 AM, Joan Baiges <span dir="ltr"><<a href="mailto:joan.baiges@upc.edu" target="_blank">joan.baiges@upc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Andy, thank you for your answer,<div><br></div><div>I have checked that the fname is different in each controller (it differs only in the folder where the files are written, the name of the file is the same),</div><div><br></div><div>Joan</div></div><div class="gmail_extra"><br clear="all"><div><div class="m_4296530362011347240gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font size="2" face="arial, helvetica, sans-serif"><b><span style="color:rgb(0,73,150)"><br>Joan Baiges<br></span></b></font><span style="color:rgb(120,120,120);font-family:arial,helvetica,sans-serif;font-size:small;line-height:13.5pt">Ph.D. Civil Engineer<br></span><span style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(120,120,120);line-height:13.5pt">T.<a href="tel:+34%20934%2001%2010%2048" value="+34934011048" target="_blank">(+34) 93 401 1048</a><br></span><span style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(120,120,120);line-height:13.5pt">C/ Gran Capità, s/n, Campus Nord UPC, Ed. C1, Despatx 109<br></span><span style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(120,120,120);line-height:13.5pt">08034 – Barcelona – Spain </span><br></div><div dir="ltr"><span style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(120,120,120);line-height:13.5pt"><br></span></div><div dir="ltr"><img src="https://docs.google.com/uc?export=download&id=0B7fgqSkcxa7RSDlXUlQwZXd1c2c&revid=0B7fgqSkcxa7RR2psTDhnNnZRZTN1OHNaMVVEeUFFQTJ1Z0QwPQ"><br><div><br></div><div><br></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(120,120,120);line-height:13.5pt"> </span><br></div></div></div></div></div></div></div></div><div><div class="h5">
<br><div class="gmail_quote">2018-02-21 17:21 GMT+01:00 Andy Bauer <span dir="ltr"><<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Joan,<br><br></div>Is fname different between the different MPI controllers? Other than that everything looks correct to me. If that's not the issue could you share some sample code that demonstrates the problem? I know I've done this sort of thing in the past and it worked properly but it's possible that this became broken somewhere along the way.<br><br></div>Best,<br></div>Andy<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_4296530362011347240h5">On Tue, Feb 20, 2018 at 1:07 PM, Joan Baiges <span dir="ltr"><<a href="mailto:joan.baiges@upc.edu" target="_blank">joan.baiges@upc.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_4296530362011347240h5"><div dir="ltr">Hello,<div>I am trying to write several .vtu and .pvtu files by using several MPI_Communicators. For this, I Splitinitialize a vtkMPIController object, and then set this controller as the controller for a vtkXMLPUnstructuredGridWriter.</div><div><br></div><div>However, when I ask the <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">vtkXMLPUnstructuredGridWri<wbr>ter->Write(), only one .pvtu file is written, while I would expect that one .pvtu file is written for each of the communicators the MPI_COMM_WORLD has been subdivided into. On the other hand, the .vtu files are written properly for all the processors in all the split mpi controllers.</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">The code I am writing looks approximately like this:</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><div>vtkMPIController* controller;</div><div>vtkMPICommunicator* communicator;</div><div><div>vtkSmartPointer<vtkUnstructure<wbr>dGrid> unstructuredGrid;</div><div>vtkSmartPointer<vtkXMLPUnstruc<wbr>turedGridWriter> parallelwriter;</div></div></span></div><div><br></div><div>//New communicator and spliting of the communicator</div><div><div>communicator = vtkMPICommunicator::New();</div><div>communicator = vtkMPICommunicator::GetWorldCo<wbr>mmunicator();</div><div>communicator->SplitInitialize(<wbr>communicator,MulticommColor,MP<wbr>Irank);<br></div><div><br></div><div>//Setting the split communicator as the communicator for the controller</div><div><div> controller = vtkMPIController::New();</div><div> controller->SetCommunicator(c<wbr>ommunicator);<br></div><div> controller->Initialize();<br></div><div> controller->SetGlobalControll<wbr>er(controller);<br></div></div><div><br></div><div>//Initializing the parallelwriter with the controller</div><div><div>parallelwriter = vtkSmartPointer<vtkXMLPUnstruc<wbr>turedGridWriter>::New();</div><div>   parallelwriter->SetController<wbr>(controller);</div><div>   parallelwriter->SetNumberOfPi<wbr>eces(MPIsize);</div><div>   parallelwriter->SetGhostLevel<wbr>(1);</div><div>   parallelwriter->SetStartPiece<wbr>(MPIrank);</div><div>   parallelwriter->SetEndPiece(M<wbr>PIrank);</div></div><div><br></div><div>//setting file name</div><div><div>fname = std::string(filename);</div><div><span style="white-space:pre-wrap">    </span>fname.append(".pvtu");</div><div><span style="white-space:pre-wrap"> </span>parallelwriter->SetFileName(fn<wbr>ame.c_str());</div></div><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br class="m_4296530362011347240m_5625139157207999529m_4571177740588631540gmail-Apple-interchange-newline">//Setting the grid</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">unstructuredGrid = vtkSmartPointer<vtkUnstructure<wbr>dGrid>::New();<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">parallelwriter->SetInputData(u<wbr>nstructuredGrid);</div><br></div><div><br></div><div>//After writing the grid info, we call the parallelwriter to write</div><div>parallelwriter->Write();<br></div><div><br></div><div>This final line causes all the processors to write the .vtu files, however only one processor writes the .pvtu file, while I would expect/like one .pvtu file per split mpi communicator.</div><div><br></div><div>Thank you in advance for your help,</div><div><br></div><div>Joan</div><div><br></div></div></div>
<br></div></div>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/listin<wbr>fo/vtkusers</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>