← Back to team overview

yade-mpi team mailing list archive

mpi interactivity

 

Hi,
After speaking with François and turning the problems in various ways I
feel that the idea of full interactivity combined with mpi execution is
chimeric.

The only realistic solution I come up with, would use the HD to communicate
the scene to a mpi system call. O.mpirun() run would do something like this
if called outside mpi context (i.e. interactively):

O.save("tmp.yade")
import subprocess
subprocess.run(["mpiexec -n N yade --mpi -niter=1000 userscript.py"])
O.load("tmp.yade")

The "--mpi" option would trigger:
O.load("tmp.yade") #if master
O.mpirun() #the real, current, mpi behavior
O.save("tmp.yade") #by master, after a mergeScene()

It probably requires that the userscript encapsulates function definitions,
that's a small constraint:

def main():
    def function():
        ....

if __name__ == "__main__":
  main()


Let me know if you see other alternatives.

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>

Follow ups