Show More
@@ -50,7 +50,7 to your configuration file:: | |||
|
50 | 50 | 'myextension' |
|
51 | 51 | ] |
|
52 | 52 | |
|
53 |
To load that same extension at runtime, use the ``%load_ext`` magic: |
|
|
53 | To load that same extension at runtime, use the ``%load_ext`` magic: | |
|
54 | 54 | |
|
55 | 55 | .. sourcecode:: ipython |
|
56 | 56 |
@@ -336,7 +336,7 Let's start by showing how a profile is used: | |||
|
336 | 336 | |
|
337 | 337 | .. code-block:: bash |
|
338 | 338 | |
|
339 | $ ipython profile=sympy | |
|
339 | $ ipython --profile=sympy | |
|
340 | 340 | |
|
341 | 341 | This tells the :command:`ipython` command line program to get its configuration |
|
342 | 342 | from the "sympy" profile. The file names for various profiles do not change. The |
@@ -350,7 +350,7 The general pattern is this: simply create a new profile with: | |||
|
350 | 350 | ipython profile create <name> |
|
351 | 351 | |
|
352 | 352 | which adds a directory called ``profile_<name>`` to your IPython directory. Then |
|
353 | you can load this profile by adding ``profile=<name>`` to your command line | |
|
353 | you can load this profile by adding ``--profile=<name>`` to your command line | |
|
354 | 354 | options. Profiles are supported by all IPython applications. |
|
355 | 355 | |
|
356 | 356 | IPython ships with some sample profiles in :file:`IPython/config/profile`. If |
@@ -374,7 +374,7 object. Values are assigned in much the same way as in a config file: | |||
|
374 | 374 | |
|
375 | 375 | .. code-block:: bash |
|
376 | 376 | |
|
377 | $> ipython InteractiveShell.use_readline=False BaseIPythonApplication.profile='myprofile' | |
|
377 | $> ipython --InteractiveShell.use_readline=False --BaseIPythonApplication.profile='myprofile' | |
|
378 | 378 | |
|
379 | 379 | Is the same as adding: |
|
380 | 380 | |
@@ -394,9 +394,9 used traits, so you don't have to specify the whole class name. For these **alia | |||
|
394 | 394 | |
|
395 | 395 | .. code-block:: bash |
|
396 | 396 | |
|
397 | $> ipython profile='myprofile' | |
|
397 | $> ipython --profile='myprofile' | |
|
398 | 398 | # is equivalent to |
|
399 | $> ipython BaseIPythonApplication.profile='myprofile' | |
|
399 | $> ipython --BaseIPythonApplication.profile='myprofile' | |
|
400 | 400 | |
|
401 | 401 | Flags |
|
402 | 402 | ----- |
@@ -411,11 +411,11 For instance: | |||
|
411 | 411 | |
|
412 | 412 | $> ipcontroller --debug |
|
413 | 413 | # is equivalent to |
|
414 | $> ipcontroller Application.log_level=DEBUG | |
|
414 | $> ipcontroller --Application.log_level=DEBUG | |
|
415 | 415 | # and |
|
416 | 416 | $> ipython --pylab |
|
417 | 417 | # is equivalent to |
|
418 | $> ipython pylab=auto | |
|
418 | $> ipython --pylab=auto | |
|
419 | 419 | |
|
420 | 420 | Subcommands |
|
421 | 421 | ----------- |
@@ -427,14 +427,14 Some IPython applications have **subcommands**. Subcommands are modeled after | |||
|
427 | 427 | |
|
428 | 428 | .. code-block:: bash |
|
429 | 429 | |
|
430 | $> ipython qtconsole profile=myprofile | |
|
430 | $> ipython qtconsole --profile=myprofile | |
|
431 | 431 | |
|
432 | 432 | and :command:`ipcluster` is simply a wrapper for its various subcommands (start, |
|
433 | 433 | stop, engines). |
|
434 | 434 | |
|
435 | 435 | .. code-block:: bash |
|
436 | 436 | |
|
437 | $> ipcluster start profile=myprofile n=4 | |
|
437 | $> ipcluster start --profile=myprofile --n=4 | |
|
438 | 438 | |
|
439 | 439 | |
|
440 | 440 | To see a list of the available aliases, flags, and subcommands for an IPython application, simply pass ``-h`` or ``--help``. And to see the full list of configurable options (*very* long), pass ``--help-all``. |
@@ -349,7 +349,8 We basically need to be able to test the following types of code: | |||
|
349 | 349 | Nose will pick them up as long as they conform to the (flexible) conventions |
|
350 | 350 | used by nose to recognize tests. |
|
351 | 351 | |
|
352 |
2. Python files containing doctests. |
|
|
352 | 2. Python files containing doctests. Here, we have two possibilities: | |
|
353 | ||
|
353 | 354 | - The prompts are the usual ``>>>`` and the input is pure Python. |
|
354 | 355 | - The prompts are of the form ``In [1]:`` and the input can contain extended |
|
355 | 356 | IPython expressions. |
@@ -361,6 +362,7 We basically need to be able to test the following types of code: | |||
|
361 | 362 | |
|
362 | 363 | 3. ReStructuredText files that contain code blocks. For this type of file, we |
|
363 | 364 | have three distinct possibilities for the code blocks: |
|
365 | ||
|
364 | 366 | - They use ``>>>`` prompts. |
|
365 | 367 | - They use ``In [1]:`` prompts. |
|
366 | 368 | - They are standalone blocks of pure Python code without any prompts. |
@@ -20,7 +20,7 configurable. | |||
|
20 | 20 | ``%loadpy`` |
|
21 | 21 | =========== |
|
22 | 22 | |
|
23 |
The ``%loadpy`` magic |
|
|
23 | The new ``%loadpy`` magic takes any python | |
|
24 | 24 | script (must end in '.py'), and pastes its contents as your next input, so you can edit it |
|
25 | 25 | before executing. The script may be on your machine, but you can also specify a url, and |
|
26 | 26 | it will download the script from the web. This is particularly useful for playing with |
@@ -28,8 +28,7 examples from documentation, such as matplotlib. | |||
|
28 | 28 | |
|
29 | 29 | .. sourcecode:: ipython |
|
30 | 30 | |
|
31 | In [6]: %loadpy | |
|
32 | http://matplotlib.sourceforge.net/plot_directive/mpl_examples/mplot3d/contour3d_demo.py | |
|
31 | In [6]: %loadpy http://matplotlib.sourceforge.net/plot_directive/mpl_examples/mplot3d/contour3d_demo.py | |
|
33 | 32 | |
|
34 | 33 | In [7]: from mpl_toolkits.mplot3d import axes3d |
|
35 | 34 | ...: import matplotlib.pyplot as plt |
@@ -64,12 +63,13 them in your document. This is especially useful for saving_ your work. | |||
|
64 | 63 | |
|
65 | 64 | .. _inline: |
|
66 | 65 | |
|
67 | ``pylab=inline`` | |
|
66 | ``--pylab=inline`` | |
|
68 | 67 | ****************** |
|
69 | 68 | |
|
70 | 69 | If you want to have all of your figures embedded in your session, instead of calling |
|
71 |
:func:`pastefig`, you can specify ``pylab=inline`` |
|
|
72 | will show up in your document, as if you had called :func:`pastefig`. | |
|
70 | :func:`pastefig`, you can specify ``--pylab=inline`` when you start the console, | |
|
71 | and each time you make a plot, it will show up in your document, as if you had | |
|
72 | called :func:`pastefig`. | |
|
73 | 73 | |
|
74 | 74 | |
|
75 | 75 | .. _saving: |
@@ -116,7 +116,7 if unspecified, will be guessed based on the chosen style. Similarly, there are | |||
|
116 | 116 | styles associated with each ``colors`` option. |
|
117 | 117 | |
|
118 | 118 | |
|
119 | Screenshot of ``ipython qtconsole colors=linux``, which uses the 'monokai' theme by | |
|
119 | Screenshot of ``ipython qtconsole --colors=linux``, which uses the 'monokai' theme by | |
|
120 | 120 | default: |
|
121 | 121 | |
|
122 | 122 | .. image:: figs/colors_dark.png |
@@ -147,7 +147,7 Fonts | |||
|
147 | 147 | The QtConsole has configurable via the ConsoleWidget. To change these, set the ``font_family`` |
|
148 | 148 | or ``font_size`` traits of the ConsoleWidget. For instance, to use 9pt Anonymous Pro:: |
|
149 | 149 | |
|
150 | $> ipython qtconsole ConsoleWidget.font_family="Anonymous Pro" ConsoleWidget.font_size=9 | |
|
150 | $> ipython qtconsole --ConsoleWidget.font_family="Anonymous Pro" --ConsoleWidget.font_size=9 | |
|
151 | 151 | |
|
152 | 152 | Process Management |
|
153 | 153 | ================== |
@@ -167,7 +167,7 do not have to all be qt frontends - any IPython frontend can connect and run co | |||
|
167 | 167 | When you start ipython qtconsole, there will be an output line, like:: |
|
168 | 168 | |
|
169 | 169 | To connect another client to this kernel, use: |
|
170 | --external shell=62109 iopub=62110 stdin=62111 hb=62112 | |
|
170 | --external --shell=62109 --iopub=62110 --stdin=62111 --hb=62112 | |
|
171 | 171 | |
|
172 | 172 | Other frontends can connect to your kernel, and share in the execution. This is great for |
|
173 | 173 | collaboration. The `-e` flag is for 'external'. Starting other consoles with that flag |
@@ -178,7 +178,7 By default (for security reasons), the kernel only listens on localhost, so you | |||
|
178 | 178 | connect multiple frontends to the kernel from your local machine. You can specify to |
|
179 | 179 | listen on an external interface by specifying the ``ip`` argument:: |
|
180 | 180 | |
|
181 | $> ipython qtconsole ip=192.168.1.123 | |
|
181 | $> ipython qtconsole --ip=192.168.1.123 | |
|
182 | 182 | |
|
183 | 183 | If you specify the ip as 0.0.0.0, that refers to all interfaces, so any computer that can |
|
184 | 184 | see yours can connect to the kernel. |
@@ -35,7 +35,7 version 0.11, these have been removed. Please see the new ``%gui`` | |||
|
35 | 35 | magic command or :ref:`this section <gui_support>` for details on the new |
|
36 | 36 | interface, or specify the gui at the commandline:: |
|
37 | 37 | |
|
38 | $ ipython gui=qt | |
|
38 | $ ipython --gui=qt | |
|
39 | 39 | |
|
40 | 40 | |
|
41 | 41 | Regular Options |
@@ -59,7 +59,7 All options with a [no] prepended can be specified in negated form | |||
|
59 | 59 | See :ref:`Matplotlib support <matplotlib_support>` |
|
60 | 60 | for more details. |
|
61 | 61 | |
|
62 | ``autocall=<val>`` | |
|
62 | ``--autocall=<val>`` | |
|
63 | 63 | Make IPython automatically call any callable object even if you |
|
64 | 64 | didn't type explicit parentheses. For example, 'str 43' becomes |
|
65 | 65 | 'str(43)' automatically. The value can be '0' to disable the feature, |
@@ -83,11 +83,11 All options with a [no] prepended can be specified in negated form | |||
|
83 | 83 | ``--[no-]banner`` |
|
84 | 84 | Print the initial information banner (default on). |
|
85 | 85 | |
|
86 | ``c=<command>`` | |
|
86 | ``--c=<command>`` | |
|
87 | 87 | execute the given command string. This is similar to the -c |
|
88 | 88 | option in the normal Python interpreter. |
|
89 | 89 | |
|
90 | ``cache_size=<n>`` | |
|
90 | ``--cache_size=<n>`` | |
|
91 | 91 | size of the output cache (maximum number of entries to hold in |
|
92 | 92 | memory). The default is 1000, you can change it permanently in your |
|
93 | 93 | config file. Setting it to 0 completely disables the caching system, |
@@ -100,7 +100,7 All options with a [no] prepended can be specified in negated form | |||
|
100 | 100 | Gives IPython a similar feel to the classic Python |
|
101 | 101 | prompt. |
|
102 | 102 | |
|
103 | ``colors=<scheme>`` | |
|
103 | ``--colors=<scheme>`` | |
|
104 | 104 | Color scheme for prompts and exception reporting. Currently |
|
105 | 105 | implemented: NoColor, Linux and LightBG. |
|
106 | 106 | |
@@ -135,7 +135,7 All options with a [no] prepended can be specified in negated form | |||
|
135 | 135 | feature is off by default [which means that you have both |
|
136 | 136 | normal reload() and dreload()]. |
|
137 | 137 | |
|
138 | ``editor=<name>`` | |
|
138 | ``--editor=<name>`` | |
|
139 | 139 | Which editor to use with the %edit command. By default, |
|
140 | 140 | IPython will honor your EDITOR environment variable (if not |
|
141 | 141 | set, vi is the Unix default and notepad the Windows one). |
@@ -144,12 +144,12 All options with a [no] prepended can be specified in negated form | |||
|
144 | 144 | small, lightweight editor here (in case your default EDITOR is |
|
145 | 145 | something like Emacs). |
|
146 | 146 | |
|
147 | ``ipython_dir=<name>`` | |
|
147 | ``--ipython_dir=<name>`` | |
|
148 | 148 | name of your IPython configuration directory IPYTHON_DIR. This |
|
149 | 149 | can also be specified through the environment variable |
|
150 | 150 | IPYTHON_DIR. |
|
151 | 151 | |
|
152 | ``logfile=<name>`` | |
|
152 | ``--logfile=<name>`` | |
|
153 | 153 | specify the name of your logfile. |
|
154 | 154 | |
|
155 | 155 | This implies ``%logstart`` at the beginning of your session |
@@ -160,7 +160,7 All options with a [no] prepended can be specified in negated form | |||
|
160 | 160 | can use this to later restore a session by loading your |
|
161 | 161 | logfile with ``ipython --i ipython_log.py`` |
|
162 | 162 | |
|
163 | ``logplay=<name>`` | |
|
163 | ``--logplay=<name>`` | |
|
164 | 164 | |
|
165 | 165 | NOT AVAILABLE in 0.11 |
|
166 | 166 | |
@@ -201,7 +201,7 All options with a [no] prepended can be specified in negated form | |||
|
201 | 201 | of nested data structures. If you like it, you can turn it on |
|
202 | 202 | permanently in your config file (default off). |
|
203 | 203 | |
|
204 | ``profile=<name>`` | |
|
204 | ``--profile=<name>`` | |
|
205 | 205 | |
|
206 | 206 | Select the IPython profile by name. |
|
207 | 207 | |
@@ -263,7 +263,7 All options with a [no] prepended can be specified in negated form | |||
|
263 | 263 | IPython's readline and syntax coloring fine, only 'emacs' (M-x |
|
264 | 264 | shell and C-c !) buffers do not. |
|
265 | 265 | |
|
266 | ``TerminalInteractiveShell.screen_length=<n>`` | |
|
266 | ``--TerminalInteractiveShell.screen_length=<n>`` | |
|
267 | 267 | number of lines of your screen. This is used to control |
|
268 | 268 | printing of very long strings. Strings longer than this number |
|
269 | 269 | of lines will be sent through a pager instead of directly |
@@ -276,16 +276,16 All options with a [no] prepended can be specified in negated form | |||
|
276 | 276 | reason this isn't working well (it needs curses support), specify |
|
277 | 277 | it yourself. Otherwise don't change the default. |
|
278 | 278 | |
|
279 | ``TerminalInteractiveShell.separate_in=<string>`` | |
|
279 | ``--TerminalInteractiveShell.separate_in=<string>`` | |
|
280 | 280 | |
|
281 | 281 | separator before input prompts. |
|
282 | 282 | Default: '\n' |
|
283 | 283 | |
|
284 | ``TerminalInteractiveShell.separate_out=<string>`` | |
|
284 | ``--TerminalInteractiveShell.separate_out=<string>`` | |
|
285 | 285 | separator before output prompts. |
|
286 | 286 | Default: nothing. |
|
287 | 287 | |
|
288 | ``TerminalInteractiveShell.separate_out2=<string>`` | |
|
288 | ``--TerminalInteractiveShell.separate_out2=<string>`` | |
|
289 | 289 | separator after output prompts. |
|
290 | 290 | Default: nothing. |
|
291 | 291 | For these three options, use the value 0 to specify no separator. |
@@ -304,7 +304,7 All options with a [no] prepended can be specified in negated form | |||
|
304 | 304 | |
|
305 | 305 | ``--version`` print version information and exit. |
|
306 | 306 | |
|
307 | ``xmode=<modename>`` | |
|
307 | ``--xmode=<modename>`` | |
|
308 | 308 | |
|
309 | 309 | Mode for exception reporting. |
|
310 | 310 |
@@ -103,7 +103,7 calculation, we will need two top-level functions from :file:`pidigits.py`: | |||
|
103 | 103 | |
|
104 | 104 | .. literalinclude:: ../../examples/newparallel/pidigits.py |
|
105 | 105 | :language: python |
|
106 |
:lines: 4 |
|
|
106 | :lines: 47-62 | |
|
107 | 107 | |
|
108 | 108 | We will also use the :func:`plot_two_digit_freqs` function to plot the |
|
109 | 109 | results. The code to run this calculation in parallel is contained in |
@@ -195,7 +195,7 simply start a controller and engines on a single host using the | |||
|
195 | 195 | :command:`ipcluster` command. To start a controller and 4 engines on your |
|
196 | 196 | localhost, just do:: |
|
197 | 197 | |
|
198 | $ ipcluster start n=4 | |
|
198 | $ ipcluster start --n=4 | |
|
199 | 199 | |
|
200 | 200 | More details about starting the IPython controller and engines can be found |
|
201 | 201 | :ref:`here <parallel_process>` |
@@ -4,11 +4,6 | |||
|
4 | 4 | Using MPI with IPython |
|
5 | 5 | ======================= |
|
6 | 6 | |
|
7 | .. note:: | |
|
8 | ||
|
9 | Not adapted to zmq yet | |
|
10 | This is out of date wrt ipcluster in general as well | |
|
11 | ||
|
12 | 7 | Often, a parallel algorithm will require moving data between the engines. One |
|
13 | 8 | way of accomplishing this is by doing a pull and then a push using the |
|
14 | 9 | multiengine client. However, this will be slow as all the data has to go |
@@ -57,7 +52,7 The easiest approach is to use the `MPIExec` Launchers in :command:`ipcluster`, | |||
|
57 | 52 | which will first start a controller and then a set of engines using |
|
58 | 53 | :command:`mpiexec`:: |
|
59 | 54 | |
|
60 | $ ipcluster start n=4 elauncher=MPIExecEngineSetLauncher | |
|
55 | $ ipcluster start --n=4 --elauncher=MPIExecEngineSetLauncher | |
|
61 | 56 | |
|
62 | 57 | This approach is best as interrupting :command:`ipcluster` will automatically |
|
63 | 58 | stop and clean up the controller and engines. |
@@ -68,14 +63,14 Manual starting using :command:`mpiexec` | |||
|
68 | 63 | If you want to start the IPython engines using the :command:`mpiexec`, just |
|
69 | 64 | do:: |
|
70 | 65 | |
|
71 | $ mpiexec n=4 ipengine mpi=mpi4py | |
|
66 | $ mpiexec n=4 ipengine --mpi=mpi4py | |
|
72 | 67 | |
|
73 | 68 | This requires that you already have a controller running and that the FURL |
|
74 | 69 | files for the engines are in place. We also have built in support for |
|
75 | 70 | PyTrilinos [PyTrilinos]_, which can be used (assuming is installed) by |
|
76 | 71 | starting the engines with:: |
|
77 | 72 | |
|
78 | $ mpiexec n=4 ipengine mpi=pytrilinos | |
|
73 | $ mpiexec n=4 ipengine --mpi=pytrilinos | |
|
79 | 74 | |
|
80 | 75 | Automatic starting using PBS and :command:`ipcluster` |
|
81 | 76 | ------------------------------------------------------ |
@@ -110,7 +105,7 distributed array. Save the following text in a file called :file:`psum.py`: | |||
|
110 | 105 | |
|
111 | 106 | Now, start an IPython cluster:: |
|
112 | 107 | |
|
113 | $ ipcluster start profile=mpi n=4 | |
|
108 | $ ipcluster start --profile=mpi --n=4 | |
|
114 | 109 | |
|
115 | 110 | .. note:: |
|
116 | 111 |
@@ -19,7 +19,7 To follow along with this tutorial, you will need to start the IPython | |||
|
19 | 19 | controller and four IPython engines. The simplest way of doing this is to use |
|
20 | 20 | the :command:`ipcluster` command:: |
|
21 | 21 | |
|
22 | $ ipcluster start n=4 | |
|
22 | $ ipcluster start --n=4 | |
|
23 | 23 | |
|
24 | 24 | For more detailed information about starting the controller and engines, see |
|
25 | 25 | our :ref:`introduction <ip1par>` to using IPython for parallel computing. |
@@ -35,7 +35,7 the ``ip`` argument on the command-line, or the ``HubFactory.ip`` configurable i | |||
|
35 | 35 | If your machines are on a trusted network, you can safely instruct the controller to listen |
|
36 | 36 | on all public interfaces with:: |
|
37 | 37 | |
|
38 | $> ipcontroller ip=* | |
|
38 | $> ipcontroller --ip=* | |
|
39 | 39 | |
|
40 | 40 | Or you can set the same behavior as the default by adding the following line to your :file:`ipcontroller_config.py`: |
|
41 | 41 | |
@@ -109,7 +109,7 The simplest way to use ipcluster requires no configuration, and will | |||
|
109 | 109 | launch a controller and a number of engines on the local machine. For instance, |
|
110 | 110 | to start one controller and 4 engines on localhost, just do:: |
|
111 | 111 | |
|
112 | $ ipcluster start n=4 | |
|
112 | $ ipcluster start --n=4 | |
|
113 | 113 | |
|
114 | 114 | To see other command line options, do:: |
|
115 | 115 | |
@@ -121,7 +121,7 Configuring an IPython cluster | |||
|
121 | 121 | |
|
122 | 122 | Cluster configurations are stored as `profiles`. You can create a new profile with:: |
|
123 | 123 | |
|
124 | $ ipython profile create --parallel profile=myprofile | |
|
124 | $ ipython profile create --parallel --profile=myprofile | |
|
125 | 125 | |
|
126 | 126 | This will create the directory :file:`IPYTHONDIR/profile_myprofile`, and populate it |
|
127 | 127 | with the default configuration files for the three IPython cluster commands. Once |
@@ -162,7 +162,7 The mpiexec/mpirun mode is useful if you: | |||
|
162 | 162 | |
|
163 | 163 | If these are satisfied, you can create a new profile:: |
|
164 | 164 | |
|
165 | $ ipython profile create --parallel profile=mpi | |
|
165 | $ ipython profile create --parallel --profile=mpi | |
|
166 | 166 | |
|
167 | 167 | and edit the file :file:`IPYTHONDIR/profile_mpi/ipcluster_config.py`. |
|
168 | 168 | |
@@ -174,7 +174,7 There, instruct ipcluster to use the MPIExec launchers by adding the lines: | |||
|
174 | 174 | |
|
175 | 175 | If the default MPI configuration is correct, then you can now start your cluster, with:: |
|
176 | 176 | |
|
177 | $ ipcluster start n=4 profile=mpi | |
|
177 | $ ipcluster start --n=4 --profile=mpi | |
|
178 | 178 | |
|
179 | 179 | This does the following: |
|
180 | 180 | |
@@ -219,7 +219,7 The PBS mode uses the Portable Batch System (PBS) to start the engines. | |||
|
219 | 219 | |
|
220 | 220 | As usual, we will start by creating a fresh profile:: |
|
221 | 221 | |
|
222 | $ ipython profile create --parallel profile=pbs | |
|
222 | $ ipython profile create --parallel --profile=pbs | |
|
223 | 223 | |
|
224 | 224 | And in :file:`ipcluster_config.py`, we will select the PBS launchers for the controller |
|
225 | 225 | and engines: |
@@ -253,7 +253,7 to specify your own. Here is a sample PBS script template: | |||
|
253 | 253 | cd $PBS_O_WORKDIR |
|
254 | 254 | export PATH=$HOME/usr/local/bin |
|
255 | 255 | export PYTHONPATH=$HOME/usr/local/lib/python2.7/site-packages |
|
256 | /usr/local/bin/mpiexec -n {n} ipengine profile_dir={profile_dir} | |
|
256 | /usr/local/bin/mpiexec -n {n} ipengine --profile_dir={profile_dir} | |
|
257 | 257 | |
|
258 | 258 | There are a few important points about this template: |
|
259 | 259 | |
@@ -288,7 +288,7 The controller template should be similar, but simpler: | |||
|
288 | 288 | cd $PBS_O_WORKDIR |
|
289 | 289 | export PATH=$HOME/usr/local/bin |
|
290 | 290 | export PYTHONPATH=$HOME/usr/local/lib/python2.7/site-packages |
|
291 | ipcontroller profile_dir={profile_dir} | |
|
291 | ipcontroller --profile_dir={profile_dir} | |
|
292 | 292 | |
|
293 | 293 | |
|
294 | 294 | Once you have created these scripts, save them with names like |
@@ -324,7 +324,7 connections on all its interfaces, by adding in :file:`ipcontroller_config`: | |||
|
324 | 324 | |
|
325 | 325 | You can now run the cluster with:: |
|
326 | 326 | |
|
327 | $ ipcluster start profile=pbs n=128 | |
|
327 | $ ipcluster start --profile=pbs --n=128 | |
|
328 | 328 | |
|
329 | 329 | Additional configuration options can be found in the PBS section of :file:`ipcluster_config`. |
|
330 | 330 | |
@@ -349,7 +349,7 nodes and :command:`ipcontroller` can be run remotely as well, or on localhost. | |||
|
349 | 349 | |
|
350 | 350 | As usual, we start by creating a clean profile:: |
|
351 | 351 | |
|
352 | $ ipython profile create --parallel profile=ssh | |
|
352 | $ ipython profile create --parallel --profile=ssh | |
|
353 | 353 | |
|
354 | 354 | To use this mode, select the SSH launchers in :file:`ipcluster_config.py`: |
|
355 | 355 | |
@@ -374,7 +374,7 The controller's remote location and configuration can be specified: | |||
|
374 | 374 | # note that remotely launched ipcontroller will not get the contents of |
|
375 | 375 | # the local ipcontroller_config.py unless it resides on the *remote host* |
|
376 | 376 | # in the location specified by the `profile_dir` argument. |
|
377 | # c.SSHControllerLauncher.program_args = ['--reuse', 'ip=*', 'profile_dir=/path/to/cd'] | |
|
377 | # c.SSHControllerLauncher.program_args = ['--reuse', '--ip=*', '--profile_dir=/path/to/cd'] | |
|
378 | 378 | |
|
379 | 379 | .. note:: |
|
380 | 380 | |
@@ -390,7 +390,7 on that host. | |||
|
390 | 390 | |
|
391 | 391 | c.SSHEngineSetLauncher.engines = { 'host1.example.com' : 2, |
|
392 | 392 | 'host2.example.com' : 5, |
|
393 | 'host3.example.com' : (1, ['profile_dir=/home/different/location']), | |
|
393 | 'host3.example.com' : (1, ['--profile_dir=/home/different/location']), | |
|
394 | 394 | 'host4.example.com' : 8 } |
|
395 | 395 | |
|
396 | 396 | * The `engines` dict, where the keys are the host we want to run engines on and |
@@ -403,7 +403,7 a single location: | |||
|
403 | 403 | |
|
404 | 404 | .. sourcecode:: python |
|
405 | 405 | |
|
406 | c.SSHEngineSetLauncher.engine_args = ['profile_dir=/path/to/profile_ssh'] | |
|
406 | c.SSHEngineSetLauncher.engine_args = ['--profile_dir=/path/to/profile_ssh'] | |
|
407 | 407 | |
|
408 | 408 | Current limitations of the SSH mode of :command:`ipcluster` are: |
|
409 | 409 | |
@@ -471,12 +471,12 can do this: | |||
|
471 | 471 | |
|
472 | 472 | * Put :file:`ipcontroller-engine.json` in the :file:`~/.ipython/profile_<name>/security` |
|
473 | 473 | directory on the engine's host, where it will be found automatically. |
|
474 | * Call :command:`ipengine` with the ``file=full_path_to_the_file`` | |
|
474 | * Call :command:`ipengine` with the ``--file=full_path_to_the_file`` | |
|
475 | 475 | flag. |
|
476 | 476 | |
|
477 | 477 | The ``file`` flag works like this:: |
|
478 | 478 | |
|
479 | $ ipengine file=/path/to/my/ipcontroller-engine.json | |
|
479 | $ ipengine --file=/path/to/my/ipcontroller-engine.json | |
|
480 | 480 | |
|
481 | 481 | .. note:: |
|
482 | 482 |
@@ -248,75 +248,6 capabilities based authentication model, in conjunction with SSH tunneled | |||
|
248 | 248 | TCP/IP channels, address the core potential vulnerabilities in the system, |
|
249 | 249 | while still enabling user's to use the system in open networks. |
|
250 | 250 | |
|
251 | Other questions | |
|
252 | =============== | |
|
253 | ||
|
254 | .. note:: | |
|
255 | ||
|
256 | this does not apply to ZMQ, but I am sure there will be questions. | |
|
257 | ||
|
258 | About keys | |
|
259 | ---------- | |
|
260 | ||
|
261 | Can you clarify the roles of the certificate and its keys versus the FURL, | |
|
262 | which is also called a key? | |
|
263 | ||
|
264 | The certificate created by IPython processes is a standard public key x509 | |
|
265 | certificate, that is used by the SSL handshake protocol to setup encrypted | |
|
266 | channel between the controller and the IPython engine or client. This public | |
|
267 | and private key associated with this certificate are used only by the SSL | |
|
268 | handshake protocol in setting up this encrypted channel. | |
|
269 | ||
|
270 | The FURL serves a completely different and independent purpose from the | |
|
271 | key pair associated with the certificate. When we refer to a FURL as a | |
|
272 | key, we are using the word "key" in the capabilities based security model | |
|
273 | sense. This has nothing to do with "key" in the public/private key sense used | |
|
274 | in the SSL protocol. | |
|
275 | ||
|
276 | With that said the FURL is used as an cryptographic key, to grant | |
|
277 | IPython engines and clients access to particular capabilities that the | |
|
278 | controller offers. | |
|
279 | ||
|
280 | Self signed certificates | |
|
281 | ------------------------ | |
|
282 | ||
|
283 | Is the controller creating a self-signed certificate? Is this created for per | |
|
284 | instance/session, one-time-setup or each-time the controller is started? | |
|
285 | ||
|
286 | The Foolscap network protocol, which handles the SSL protocol details, creates | |
|
287 | a self-signed x509 certificate using OpenSSL for each IPython process. The | |
|
288 | lifetime of the certificate is handled differently for the IPython controller | |
|
289 | and the engines/client. | |
|
290 | ||
|
291 | For the IPython engines and client, the certificate is only held in memory for | |
|
292 | the lifetime of its process. It is never written to disk. | |
|
293 | ||
|
294 | For the controller, the certificate can be created anew each time the | |
|
295 | controller starts or it can be created once and reused each time the | |
|
296 | controller starts. If at any point, the certificate is deleted, a new one is | |
|
297 | created the next time the controller starts. | |
|
298 | ||
|
299 | SSL private key | |
|
300 | --------------- | |
|
301 | ||
|
302 | How the private key (associated with the certificate) is distributed? | |
|
303 | ||
|
304 | In the usual implementation of the SSL protocol, the private key is never | |
|
305 | distributed. We follow this standard always. | |
|
306 | ||
|
307 | SSL versus Foolscap authentication | |
|
308 | ---------------------------------- | |
|
309 | ||
|
310 | Many SSL connections only perform one sided authentication (the server to the | |
|
311 | client). How is the client authentication in IPython's system related to SSL | |
|
312 | authentication? | |
|
313 | ||
|
314 | We perform a two way SSL handshake in which both parties request and verify | |
|
315 | the certificate of their peer. This mutual authentication is handled by the | |
|
316 | SSL handshake and is separate and independent from the additional | |
|
317 | authentication steps that the CLIENT and SERVER perform after an encrypted | |
|
318 | channel is established. | |
|
319 | ||
|
320 | 251 | .. [RFC5246] <http://tools.ietf.org/html/rfc5246> |
|
321 | 252 | |
|
322 | 253 | .. [OpenSSH] <http://www.openssh.com/> |
@@ -24,7 +24,7 To follow along with this tutorial, you will need to start the IPython | |||
|
24 | 24 | controller and four IPython engines. The simplest way of doing this is to use |
|
25 | 25 | the :command:`ipcluster` command:: |
|
26 | 26 | |
|
27 | $ ipcluster start n=4 | |
|
27 | $ ipcluster start --n=4 | |
|
28 | 28 | |
|
29 | 29 | For more detailed information about starting the controller and engines, see |
|
30 | 30 | our :ref:`introduction <ip1par>` to using IPython for parallel computing. |
@@ -350,9 +350,9 The built-in routing schemes: | |||
|
350 | 350 | |
|
351 | 351 | To select one of these schemes, simply do:: |
|
352 | 352 | |
|
353 | $ ipcontroller scheme=<schemename> | |
|
353 | $ ipcontroller --scheme=<schemename> | |
|
354 | 354 | for instance: |
|
355 | $ ipcontroller scheme=lru | |
|
355 | $ ipcontroller --scheme=lru | |
|
356 | 356 | |
|
357 | 357 | lru: Least Recently Used |
|
358 | 358 |
@@ -204,7 +204,7 security keys. The naming convention for cluster directories is: | |||
|
204 | 204 | To create a new cluster profile (named "mycluster") and the associated cluster |
|
205 | 205 | directory, type the following command at the Windows Command Prompt:: |
|
206 | 206 | |
|
207 | ipython profile create --parallel profile=mycluster | |
|
207 | ipython profile create --parallel --profile=mycluster | |
|
208 | 208 | |
|
209 | 209 | The output of this command is shown in the screenshot below. Notice how |
|
210 | 210 | :command:`ipcluster` prints out the location of the newly created cluster |
@@ -257,7 +257,7 Starting the cluster profile | |||
|
257 | 257 | Once a cluster profile has been configured, starting an IPython cluster using |
|
258 | 258 | the profile is simple:: |
|
259 | 259 | |
|
260 | ipcluster start profile=mycluster n=32 | |
|
260 | ipcluster start --profile=mycluster --n=32 | |
|
261 | 261 | |
|
262 | 262 | The ``-n`` option tells :command:`ipcluster` how many engines to start (in |
|
263 | 263 | this case 32). Stopping the cluster is as simple as typing Control-C. |
@@ -300,7 +300,7 Backwards incompatible changes | |||
|
300 | 300 | from the command-line with the same syntax as in a configuration file. |
|
301 | 301 | |
|
302 | 302 | * The command line options ``-wthread``, ``-qthread`` and |
|
303 | ``-gthread`` have been removed. Use ``gui=wx``, ``gui=qt``, ``gui=gtk`` | |
|
303 | ``-gthread`` have been removed. Use ``--gui=wx``, ``--gui=qt``, ``--gui=gtk`` | |
|
304 | 304 | instead. |
|
305 | 305 | |
|
306 | 306 | * The extension loading functions have been renamed to |
General Comments 0
You need to be logged in to leave comments.
Login now