run demo in parallel

Asked by Chaffra Affouda

Are there some examples of how to run demos in parallel. I'd like in parrallel from ipython. Does anyone has eamples of how to do this?

Thanks,
Chaffra

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Domurath
Solved:
Last query:
Last reply:
Revision history for this message
Best Jan Domurath (jan-domurath) said :
#1

Hi Chaffra,

for simply running the examples in IPython you can do something like this:

1) start ipcluster (here with 4 processes)

  ipcluster start -n 4 --engines=MPIEngineSetLauncher

2) start IPython and enter the following (I use the Navier-Stokes demo as an
   example)

  In [1]: from IPython.parallel import Client

  In [2]: c = Client()

  In [3]: view = c[:]

  In [4]: view.activate()

  In [5]: view.run('demo_navier-stokes.py')
  Out[5]: <AsyncResult: _execute>

  In [6]:

3) to access the variables in the script

  In [7]: view['t']
  Out[7]: [3.00999999999998, 3.00999999999998, 3.00999999999998, 3.00999999999998]

I got this from http://ipython.org/ipython-doc/dev/parallel/parallel_mpi.html

There is a lot more to configure, see the page.

This is all I know, sorry.

Cheers,

Jan

Revision history for this message
Chaffra Affouda (chaffra) said :
#2

Thanks,Jan this is helpful.

Revision history for this message
Chaffra Affouda (chaffra) said :
#3

Thanks Jan Domurath, that solved my question.