<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>That's still wrong. Please read the documentation on how this function must be used. </div><div><br></div><div>Jeff<br><br>Sent from my iPhone</div><div><br>On Nov 28, 2013, at 5:48 PM, Danyang Su <<a href="mailto:danyang.su@gmail.com">danyang.su@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div>
  
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
  
  
    <div class="moz-cite-prefix">Hi Junchao,<br>
      <br>
      Thanks for pointing out this. It works after I changed the recvcnt
      value to the maximum number of elements in receive buffer
      (integer).<br>
      <br>
      Danyang<br>
      <br>
      On 28/11/2013 3:13 PM, Junchao Zhang wrote:<br>
    </div>
    <blockquote cite="mid:CA+MQGp8Oysvesy=GG+ZkCP6uV-cPrdN4o+zimd0ZaDspLCBwzA@mail.gmail.com" type="cite">
      <div dir="ltr">
        <div>The second scounts in your code is suspicious.</div>
        <div>According to <a moz-do-not-send="true" href="http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Scatterv.html">http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Scatterv.html</a>,
           sendcnts and recvcnt are of different types.</div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div>
          <div dir="ltr">--Junchao Zhang</div>
        </div>
        <br>
        <br>
        <div class="gmail_quote">On Thu, Nov 28, 2013 at 2:29 PM,
          Danyang Su <span dir="ltr"><<a moz-do-not-send="true" href="mailto:danyang.su@gmail.com" target="_blank">danyang.su@gmail.com</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"> Hi All,<br>
              <br>
              I ran into a problem with MPI_SCATTERV. When the
              sendcounts (scounts in code) is the same for every
              process, it works fine, but if the sendcounts is different
              (e.g., 1, 2, 3, 4 for 4 processes, respectively),  there
              will be error as follows:<br>
              <br>
              Fatal error in PMPI_Scatterv: Message truncated, error
              stack:<br>
              PMPI_Scatterv(376)................:
              MPI_Scatterv(sbuf=0000000000000000,
              scnts=0000000000E16CD0, displs=0000000000E16CA0,<br>
               MPI_INT, rbuf=0000000002BD0050, rcount=1, MPI_INT,
              root=0, MPI_COMM_WORLD) failed<br>
              MPIR_Scatterv_impl(187)...........:<br>
              MPIR_Scatterv(144)................:<br>
              MPIDI_CH3U_Receive_data_found(129): Message from rank 0
              and tag 6 truncated; 16 bytes received but buffer size is
              4<br>
              <br>
              The code is simple as follows:<br>
              <br>
              call MPI_SCATTERV(ja_in, <font color="#ff0000"><b>scounts</b></font>,
              displs, MPI_INT, ja, <font color="#ff0000"><b>scounts</b></font>,
              MPI_INT, 0, comm , ierr)<br>
              <br>
              ja_in is allocated for process #0 and ja is allocated for
              every process. The size of ja_in and ja is big enough to
              hold large dataset.<br>
              <br>
              Thanks and regards,<br>
              <br>
              Danyang </div>
            <br>
            _______________________________________________<br>
            discuss mailing list     <a moz-do-not-send="true" href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
            To manage subscription options or unsubscribe:<br>
            <a moz-do-not-send="true" href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
discuss mailing list     <a class="moz-txt-link-abbreviated" href="mailto:discuss@mpich.org">discuss@mpich.org</a>
To manage subscription options or unsubscribe:
<a class="moz-txt-link-freetext" href="https://lists.mpich.org/mailman/listinfo/discuss">https://lists.mpich.org/mailman/listinfo/discuss</a></pre>
    </blockquote>
    <br>
  

</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>discuss mailing list     <a href="mailto:discuss@mpich.org">discuss@mpich.org</a></span><br><span>To manage subscription options or unsubscribe:</span><br><span><a href="https://lists.mpich.org/mailman/listinfo/discuss">https://lists.mpich.org/mailman/listinfo/discuss</a></span></div></blockquote></body></html>