← Back to team overview

yade-mpi team mailing list archive

Re: mpi interactivity

 

Hi there,
We approach full interactivity and it will make things much more flexible.
It is now possible to execute mpirun(n,N) in an ordinary script executed
with yade [1].
It will spawn a pool of N-1 workers which will work together with initial
(master) process.
After mpirun we are back to ip shell and Qt windows.

A unique feature of the interactive mode is that it lets instructions be
sent to individual workers.
It is therefore possible to get values from subdmain and virtually achieve
complex tasks.
An exemple at the end of [1], which can also be typed in the python prompt
after running the script:

O.subD.comm.send("Ek=utils.kineticEnergy();O.subD.comm.send(Ek,dest=0)",dest=1,tag=mp._MASTER_COMMAND_);
k=O.subD.comm.recv(source=1); print("Ek="+str(k))

We can certainly encapsulate this long thing in a function. ;)

Bruno


[1]
https://gitlab.com/yade-dev/trunk/commit/ca80142c0c2b6eca5f3bf3c3ce40997052d82669



On Thu, 13 Jun 2019 at 23:34, Bruno Chareyre <bruno.chareyre@xxxxxxxxxxxxxxx>
wrote:

>
>
> On Thu, 13 Jun 2019 at 11:13, Bruno Chareyre <
> bruno.chareyre@xxxxxxxxxxxxxxx> wrote:
>
>>  the idea of full interactivity combined with mpi execution is chimeric.
>>
>
> Maybe not.
> The attached script spawn mpi runners on the fly and send scene to them,
> in a very simple way.
> Just run it with yade (compiled with mpi support), and you'll get qt
> interface as usual.
> Bruno
>
>
>
>

-- 
-- 
_______________
Bruno Chareyre
Associate Professor
ENSE³ - Grenoble INP
Lab. 3SR
BP 53
38041 Grenoble cedex 9
Tél : +33 4 56 52 86 21
________________

Email too brief?
Here's why: email charter
<https://marcuselliott.co.uk/wp-content/uploads/2017/04/emailCharter.jpg>

References