<div dir="ltr">Jeff,<div><br></div><div>Have you gotten this running? //with Berk's help on the transmit*piece part?</div><div><br></div><div>best wishes,</div><div class="gmail_extra"><br clear="all"><div><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a></div></div>
<br><div class="gmail_quote">On Wed, Aug 5, 2015 at 4:54 PM, Jeff Becker <span dir="ltr"><<a href="mailto:jeffrey.c.becker@nasa.gov" target="_blank">jeffrey.c.becker@nasa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Hi David and list. I'm still struggling
      with distributing my dataset (bmag) across nodes. My Python
      Programmable source script below produces correct output when run
      on a single node.<br>
      <br>
      contr = vtk.vtkMultiProcessController.GetGlobalController()<br>
      nranks = contr.GetNumberOfProcesses()<br>
      rank = contr.GetLocalProcessId()<br>
      <br>
      # read in bmag data and process<br>
      <br>
      executive = self.GetExecutive()<br>
      outInfo = executive.GetOutputInformation(0)<br>
      updateExtent = [executive.UPDATE_EXTENT().Get(outInfo, i) for i in
      xrange(6)]<br>
      imageData = self.GetOutput()<br>
      imageData.SetExtent(updateExtent)<br>
      myout = ns.numpy_to_vtk(bmag.ravel(),1,vtk.VTK_FLOAT)<br>
      myout.SetName("B field magnitude")<br>
      imageData.GetPointData().SetScalars(myout)<br>
      <br>
      <br>
      I then used the Filters/Parallel/Testing/Python/testTransmit.py
      test code as a basis to continue the script to work on multiple
      nodes. Following the last line above, I added:<br>
      <br>
      da = vtk.vtkIntArray()<br>
      da.SetNumberOfTuples(6)<br>
      if rank == 0:<br>
         ext = imageData.GetExtent()<br>
         for i in range(6):<br>
            da.SetValue(i,ext[i])<br>
      contr.Broadcast(da,0)<br>
      <br>
      ext = []<br>
      for i in range(6):<br>
         ext.append(da.GetValue(i))<br>
      ext = tuple(ext)<br>
      <br>
      tp = vtk.vtkTrivialProducer()<br>
      tp.SetOutput(imageData)<br>
      tp.SetWholeExtent(ext)<br>
      <br>
      xmit = vtk.vtkTransmitImageDataPiece()<br>
      xmit.SetInputConnection(tp.GetOutputPort())<br>
      xmit.UpdateInformation()<br>
      xmit.SetUpdateExtent(rank, nranks, 0)<br>
      xmit.Update()<br>
      <br>
      However, when I run this on two nodes, it looks like both of them
      get the same half of the data, rather than the whole dataset
      getting split between the two. Can anyone see what might be wrong?
      Thanks.<span><font color="#888888"><br>
      <br>
      -jeff</font></span><div><div><br>
      <br>
      On 07/23/2015 11:18 AM, David E DeMarle wrote:<br>
    </div></div></div><div><div>
    <blockquote type="cite">
      
      <div dir="ltr">Excellent.
        <div><br>
        </div>
        <div>No advice yet. Anyone have a worked out example ready? If
          so, post it to the wiki please.</div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div>
          <div>David E DeMarle<br>
            Kitware, Inc.<br>
            R&D Engineer<br>
            21 Corporate Drive<br>
            Clifton Park, NY 12065-8662<br>
            Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a></div>
        </div>
        <br>
        <div class="gmail_quote">On Thu, Jul 23, 2015 at 2:14 PM, Jeff
          Becker <span dir="ltr"><<a href="mailto:jeffrey.c.becker@nasa.gov" target="_blank">jeffrey.c.becker@nasa.gov</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div>Hi David,<span><br>
                  <br>
                  On 07/23/2015 10:57 AM, David E DeMarle wrote:<br>
                </span></div>
              <span>
                <blockquote type="cite">
                  <div dir="ltr">pyhon shell runs on the client side.
                    <div><br>
                    </div>
                    <div>try doing that within the python programmable
                      filter, which runs on the server side.</div>
                  </div>
                </blockquote>
                <br>
              </span> Yes that works. Thanks. Now I will try to use that
              and follow <br>
              <br>
              <a href="http://www.paraview.org/pipermail/paraview/2011-August/022421.html" target="_blank">http://www.paraview.org/pipermail/paraview/2011-August/022421.html</a><br>
              <br>
              to get my existing Image Data producing Python
              Programmable Source to distribute the data across the
              servers. Any additional advice? Thanks again.<span><font color="#888888"><br>
                  <br>
                  -jeff</font></span><span><br>
                <blockquote type="cite">
                  <div dir="ltr">
                    <div><br>
                      <div><br>
                      </div>
                    </div>
                  </div>
                  <div class="gmail_extra"><br clear="all">
                    <div>
                      <div>David E DeMarle<br>
                        Kitware, Inc.<br>
                        R&D Engineer<br>
                        21 Corporate Drive<br>
                        Clifton Park, NY 12065-8662<br>
                        Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a></div>
                    </div>
                    <br>
                    <div class="gmail_quote">On Thu, Jul 23, 2015 at
                      1:53 PM, Jeff Becker <span dir="ltr"><<a href="mailto:jeffrey.c.becker@nasa.gov" target="_blank">jeffrey.c.becker@nasa.gov</a>></span>
                      wrote:<br>
                      <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi. I do "mpirun -np 4
                        pvserver --client-host=xxx
                        --use-offscreen-rendering", and connect a
                        ParaView client viewer. I can see 4 nodes in the
                        memory inspector, but when I start a python
                        shell in ParaView, and do:<br>
                        <br>
                        from mpi4py import MPI<br>
                        print MPI.COMM_WORLD.Get_size()<br>
                        <br>
                        I get the answer 1. Shouldn't it be 4? Thanks.<br>
                        <br>
                        -jeff<br>
                        <br>
                        <br>
                        _______________________________________________<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/opensource/opensource.html</a><br>
                        <br>
                        Please keep messages on-topic and check the
                        ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
                        <br>
                        Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
                        <br>
                        Follow this link to subscribe/unsubscribe:<br>
                        <a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
                      </blockquote>
                    </div>
                    <br>
                  </div>
                </blockquote>
                <br>
              </span></div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div></div>