Certainly you may call MPI functions many times, the problem is that you
need to have matching receives (or collectives) at your slave nodes, which
is only determined at run-time. Perhaps this could be done with two
communications, the first broadcast the type of communications to the slaves
(for example, 1 for collective broadcast, 2 for scatter, etc.), you encode
whatever you wish in an integer. Once the slaves receive the code they'll
respond correspondingly, posting the corresponding MPI receive. Clearly, a
way to allow the slaves to exit the while loop is needed if you want the
slaves to exit cleanly, the exit code can also be encoded in the integer you
On Tue, Mar 1, 2011 at 12:39 AM, Eye RCS 51 <eye.rcs.51_at_[hidden]> wrote:
> In an effort to make a Qt gui using MPI, I have the following:
> 1. Gui started in master node.
> 2. In Gui, through a pushbutton, a global variable x is assigned some
> value; let say, x=1000;
> 3. I want this value to be know to all nodes. So I used broadcast in the
> function assigning it on the master node and all other nodes.
> 4. I printed values of x, which prints all 1000 in all nodes.
> 5. Now control has reached to MPI_Finalize in all nodes except master.
> Now If I want to reassign value of x using pushbutton in master node and
> again broadcast to and print in all nodes, can it be done??
> I mean, can I have an MPI function which through GUI is called many times
> and assigns and prints WHILE program is running.
> OR simply can I have a print function which is printing noderank value in
> all nodes whenever pushbutton is pressed while program is running.
> command i used is "mpirun -np 3 ./a.out".
> Any help will be appreciated.
> Thanks you very much.
> users mailing list
University of California, San Diego