<div dir="ltr">For more information I copied some part of my code below:<br><br><div>double x_in[1024];/* buffer for random numbers */<br>int main(int argc,char** argv) <br>{<br>.....<br><br>MPI_Init(&argc,&argv);<br>
MPI_Comm_size(MPI_COMM_WORLD,&numtasks);<br>MPI_Comm_rank(MPI_COMM_WORLD,&rank);<br>if (rank == 0 && numtasks != 5) {<br> printf("Number of tasks = %d\n",numtasks);<br> printf("Only need 5 tasks - extra will be ignored...\n");<br>
}<br><br>MPI_Barrier(MPI_COMM_WORLD);<br><br>/******** Thread 0 ************************************/<br>if (rank == 0) {<br> <br> printf("task %d has started...\n", rank);<br> <br> dest = 1;<br><br> /* send message to worker - message tag set to 1. */<br>
/* If return code indicates error quit */<br><br> rc = MPI_Send(x_in, 1, MPI_DOUBLE, dest, tag, MPI_COMM_WORLD);<br> if (rc != MPI_SUCCESS) {<br> printf("Send error in task 0!\n");<br> MPI_Abort(MPI_COMM_WORLD, rc);<br>
exit(1);}<br>} <br>.<br>.<br>.<br>.<br>.<br><br></div><div>I am waiting for your advice.<br><br></div><div>Thanks,<br></div><div>Zahra<br></div><div><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jan 7, 2014 at 12:13 PM, Wesley Bland <span dir="ltr"><<a href="mailto:wbland@mcs.anl.gov" target="_blank">wbland@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It’s not clear what you’re asking for here. Could you provide a very small (not your complete code) code example showing what you’re talking about?<br>
<br>
Thanks,<br>
Wesley<br>
<div><div class="h5"><br>
On Jan 7, 2014, at 11:03 AM, Z.Rahmani <<a href="mailto:za.rahmani@gmail.com">za.rahmani@gmail.com</a>> wrote:<br>
<br>
> Dear all,<br>
><br>
> I want to send / receive a vector of integer values via mpich in a 5-thread plan but it seems each send function just sending one value, the first one. How can I resolve this problem? can I use loop commands inside a mpi function?<br>
><br>
> thanks,<br>
> Zahra<br>
</div></div>> _______________________________________________<br>
> discuss mailing list <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
> To manage subscription options or unsubscribe:<br>
> <a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
<br>
_______________________________________________<br>
discuss mailing list <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
</blockquote></div><br></div>