<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">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.<br>
      <br>
      -jeff<br>
      <br>
      On 07/23/2015 11:18 AM, David E DeMarle wrote:<br>
    </div>
    <blockquote
cite="mid:CANjZAi-2kECbCfGX1kYp12Rfa5rH2PYAPyVZy-sEMmJ_KsxAOA@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <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 class="gmail_signature">David E DeMarle<br>
            Kitware, Inc.<br>
            R&D Engineer<br>
            21 Corporate Drive<br>
            Clifton Park, NY 12065-8662<br>
            Phone: 518-881-4909</div>
        </div>
        <br>
        <div class="gmail_quote">On Thu, Jul 23, 2015 at 2:14 PM, Jeff
          Becker <span dir="ltr"><<a moz-do-not-send="true"
              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 class=""><br>
                  <br>
                  On 07/23/2015 10:57 AM, David E DeMarle wrote:<br>
                </span></div>
              <span class="">
                <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 moz-do-not-send="true"
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
                class="HOEnZb"><font color="#888888"><br>
                  <br>
                  -jeff</font></span><span class=""><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 moz-do-not-send="true"
                          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
                          moz-do-not-send="true"
                          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 moz-do-not-send="true"
                          href="http://www.kitware.com" rel="noreferrer"
                          target="_blank">www.kitware.com</a><br>
                        <br>
                        Visit other Kitware open-source projects at <a
                          moz-do-not-send="true"
                          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 moz-do-not-send="true"
                          href="http://paraview.org/Wiki/ParaView"
                          rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
                        <br>
                        Search the list archives at: <a
                          moz-do-not-send="true"
                          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 moz-do-not-send="true"
                          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>
  </body>
</html>