<div dir="ltr">Thanks so much, Dominic. I'll let you know soon how this branch works for my code. <div><br></div><div>Ashwin</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 18, 2014 at 7:33 PM, Dominic Meiser <span dir="ltr"><<a href="mailto:dmeiser@txcorp.com" target="_blank">dmeiser@txcorp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Hi Ashwin,<br>
      <br>
      I've been working on this issue the last couple of days and wanted
      to give you an update. First off, thanks for the test case. This
      has helped a lot in tracking down the issues. I've created a
      couple of unit tests based on your test case.<br>
      <br>
      There were several independent bugs that prevented the VecView to
      work with -dm_vec_type cusp. I've fixed some of them in this
      branch:<br>
      <br>
      <a href="https://bitbucket.org/dmeiser/petsc/branch/fix-cusp-dmda" target="_blank">https://bitbucket.org/dmeiser/petsc/branch/fix-cusp-dmda</a><br>
      <br>
      Viewing a vector created from a DM should now be possible. For
      instance the test case you provided should work with this branch.<br>
      <br>
      There are still some issues remaining. DMGlobalToLocalBegin/End
      and DMLocalToGlobalBegin/End are not working. I haven't been able
      to track these down yet. I'll return to this next week.<br>
      <br>
      Cheers,<br>
      Dominic<div><div class="h5"><br>
      <br>
      <br>
      On 06/24/2014 08:15 PM, Ashwin Srinath wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">
        <div>Hello, petsc-users<br>
          <br>
          I'm having trouble <i>viewing</i> an mpicusp vector. Here's
          the simplest case that reproduces the problem:<br>
          <br>
          <span style="font-family:courier new,monospace">int main(int
            argc, char** argv) {<br>
            <br>
                    PetscInitialize(&argc, &argv, NULL, NULL);<br>
            <br>
                    DM da;<br>
                    Vec V;<br>
            <br>
                    DMDACreate2d(   PETSC_COMM_WORLD,<br>
                                    DM_BOUNDARY_NONE, DM_BOUNDARY_NONE,<br>
                                    DMDA_STENCIL_BOX,<br>
                                    5, 5,<br>
                                    PETSC_DECIDE, PETSC_DECIDE,<br>
                                    1,<br>
                                    1,<br>
                                    NULL, NULL,<br>
                                    &da);<br>
            <br>
                    DMCreateGlobalVector(da, &V);<br>
            <br>
                    VecSet(V, 1);<br>
          </span></div>
        <div><span style="font-family:courier new,monospace">       
            VecView(V, PETSC_VIEWER_STDOUT_WORLD);<br>
            <br>
                    PetscFinalize();<br>
                    return 0;<br>
            }<br>
          </span><br>
        </div>
        <div>I get the error<span style="font-family:courier new,monospace">:<br>
            [1]PETSC ERROR: Null argument, when expecting valid pointer<br>
            [0]PETSC ERROR: Trying to copy from a null pointer</span><br>
          <br>
          I executed with the following command:<br>
        </div>
        <div>
          <div>
            <div><span style="font-family:courier new,monospace">mpiexec
                -n 2 ./main -dm_vec_type cusp -vec_type cusp</span><br>
            </div>
            <div>Both GPUs are attached to two different processes. <br>
            </div>
            <div><br>
              This program works fine for vecmpi vectors, i.e.,
              -dm_vec_type mpi and -vec_type mpi. Also, I don't get an
              error unless I try to <i>view</i> the vector. Can someone
              please point out what I'm doing wrong?<br>
              <br>
              Thanks for your time,<br>
            </div>
            <div>Ashwin Srinath<br>
            </div>
            <div><br>
            </div>
            <div><br>
              <br>
              <br>
              <br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <br>
    </div></div><span class="HOEnZb"><font color="#888888"><pre cols="72">-- 
Dominic Meiser
Tech-X Corporation
5621 Arapahoe Avenue
Boulder, CO 80303
USA
Telephone: <a href="tel:303-996-2036" value="+13039962036" target="_blank">303-996-2036</a>
Fax: <a href="tel:303-448-7756" value="+13034487756" target="_blank">303-448-7756</a>
<a href="http://www.txcorp.com" target="_blank">www.txcorp.com</a></pre>
  </font></span></div>

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