Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] using MPI through Qt
From: David Zhang (solarbikedz_at_[hidden])
Date: 2011-03-01 11:05:01

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
sent out.

On Tue, Mar 1, 2011 at 12:39 AM, Eye RCS 51 <eye.rcs.51_at_[hidden]> wrote:

> Hi,
> 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.
> --
> eye51
> _______________________________________________
> users mailing list
> users_at_[hidden]

David Zhang
University of California, San Diego