~ubuntu-branches/debian/experimental/ipython/experimental

« back to all changes in this revision

Viewing changes to docs/source/parallel/parallel_intro.txt

  • Committer: Package Import Robot
  • Author(s): Julian Taylor
  • Date: 2013-02-02 11:14:27 UTC
  • mfrom: (1.4.1) (10.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20130202111427-kehypljxret7idvu
Tags: 0.13.2~rc2-1
* New upstream release candidate (LP: #1161818, #1162112)
* pass -a to xvfb-run
* drop DM-Upload-Allowed, not needed anymore
* don't link documentation of ipython-doc so ipython3 does not depend on
  ipython (Closes: #695554)
  Requires ipython-doc.preinst to not lose copyright on upgrade
* add ipython3 and ipython3-qtconsole desktop files (Closes: #693612)
* fix detection of cython modules for multiarch python (Closes: #697704)
* don't install tests for notebook and qtconsole
* bump standard to 3.9.4, no changes required
* add autopkgtests running testsuite and testing tools, cython magics
  and incomplete install message
* fix crash on tracebacks without line numbers (Closes: #701597)
* add tkinter package to debianize-error-messages.patch (Closes: #701707)
* use canonical vcs fields in control

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
Overview and getting started
5
5
============================
6
6
 
 
7
 
 
8
Examples
 
9
========
 
10
 
 
11
We have various example scripts and notebooks for using IPython.parallel in our
 
12
:file:`docs/examples/parallel` directory, or they can be found `on GitHub`__.
 
13
Some of these are covered in more detail in the :ref:`examples
 
14
<parallel_examples>` section.
 
15
 
 
16
.. __: https://github.com/ipython/ipython/tree/master/docs/examples/parallel
 
17
 
7
18
Introduction
8
19
============
9
20
 
60
71
Architecture overview
61
72
=====================
62
73
 
 
74
.. figure:: figs/wideView.png
 
75
    :width: 300px
 
76
 
 
77
 
63
78
The IPython architecture consists of four components:
64
79
 
65
80
* The IPython engine.
99
114
The controller also provides a single point of contact for users who wish to
100
115
utilize the engines connected to the controller. There are different ways of
101
116
working with a controller. In IPython, all of these models are implemented via
102
 
the client's :meth:`.View.apply` method, with various arguments, or
 
117
the :meth:`.View.apply` method, after
103
118
constructing :class:`.View` objects to represent subsets of engines. The two
104
119
primary models for interacting with engines are:
105
120
 
181
196
    but since the controller may listen on different ports for clients and
182
197
    engines, it is stored separately.
183
198
 
 
199
ipcontroller-client.json will look something like this, under default localhost
 
200
circumstances:
 
201
 
 
202
.. sourcecode:: python
 
203
 
 
204
    {
 
205
      "url":"tcp:\/\/127.0.0.1:54424",
 
206
      "exec_key":"a361fe89-92fc-4762-9767-e2f0a05e3130",
 
207
      "ssh":"",
 
208
      "location":"10.19.1.135"
 
209
    }
 
210
 
 
211
If, however, you are running the controller on a work node on a cluster, you will likely
 
212
need to use ssh tunnels to connect clients from your laptop to it.  You will also
 
213
probably need to instruct the controller to listen for engines coming from other work nodes
 
214
on the cluster.  An example of ipcontroller-client.json, as created by::
 
215
 
 
216
    $> ipcontroller --ip=0.0.0.0 --ssh=login.mycluster.com
 
217
 
 
218
 
 
219
.. sourcecode:: python
 
220
 
 
221
    {
 
222
      "url":"tcp:\/\/*:54424",
 
223
      "exec_key":"a361fe89-92fc-4762-9767-e2f0a05e3130",
 
224
      "ssh":"login.mycluster.com",
 
225
      "location":"10.0.0.2"
 
226
    }
184
227
More details of how these JSON files are used are given below.
185
228
 
186
229
A detailed description of the security model and its implementation in IPython
205
248
:command:`ipcluster` command. To start a controller and 4 engines on your
206
249
localhost, just do::
207
250
 
208
 
    $ ipcluster start --n=4
 
251
    $ ipcluster start -n 4
209
252
 
210
253
More details about starting the IPython controller and engines can be found
211
254
:ref:`here <parallel_process>`
248
291
 
249
292
.. sourcecode:: ipython
250
293
 
251
 
    In [2]: c = Client(sshserver='myhub.example.com')
 
294
    In [2]: c = Client('/path/to/my/ipcontroller-client.json', sshserver='me@myhub.example.com')
252
295
 
253
296
Where 'myhub.example.com' is the url or IP address of the machine on
254
297
which the Hub process is running (or another machine that has direct access to the Hub's ports).