Show More
@@ -386,23 +386,39 b' Is the same as adding:' | |||||
386 | to your config file. Key/Value arguments *always* take a value, separated by '=' |
|
386 | to your config file. Key/Value arguments *always* take a value, separated by '=' | |
387 | and no spaces. |
|
387 | and no spaces. | |
388 |
|
388 | |||
|
389 | Common Arguments | |||
|
390 | **************** | |||
|
391 | ||||
|
392 | Since the strictness and verbosity of the KVLoader above are not ideal for everyday | |||
|
393 | use, common arguments can be specified as flags_ or aliases_. | |||
|
394 | ||||
|
395 | Flags and Aliases are handled by :mod:`argparse` instead, allowing for more flexible | |||
|
396 | parsing. In general, flags and aliases are prefixed by ``--``, except for those | |||
|
397 | that are single characters, in which case they can be specified with a single ``-``, e.g.: | |||
|
398 | ||||
|
399 | .. code-block:: bash | |||
|
400 | ||||
|
401 | $> ipython -i -c "import numpy; x=numpy.linspace(0,1)" --profile testing --colors=lightbg | |||
|
402 | ||||
389 | Aliases |
|
403 | Aliases | |
390 | ------- |
|
404 | ------- | |
391 |
|
405 | |||
392 | For convenience, applications have a mapping of commonly |
|
406 | For convenience, applications have a mapping of commonly used traits, so you don't have | |
393 | used traits, so you don't have to specify the whole class name. For these **aliases**, the class need not be specified: |
|
407 | to specify the whole class name: | |
394 |
|
408 | |||
395 | .. code-block:: bash |
|
409 | .. code-block:: bash | |
396 |
|
410 | |||
|
411 | $> ipython --profile myprofile | |||
|
412 | # and | |||
397 | $> ipython --profile='myprofile' |
|
413 | $> ipython --profile='myprofile' | |
398 |
# |
|
414 | # are equivalent to | |
399 | $> ipython --BaseIPythonApplication.profile='myprofile' |
|
415 | $> ipython --BaseIPythonApplication.profile='myprofile' | |
400 |
|
416 | |||
401 | Flags |
|
417 | Flags | |
402 | ----- |
|
418 | ----- | |
403 |
|
419 | |||
404 | Applications can also be passed **flags**. Flags are options that take no |
|
420 | Applications can also be passed **flags**. Flags are options that take no | |
405 |
arguments |
|
421 | arguments. They are simply wrappers for | |
406 | setting one or more configurables with predefined values, often True/False. |
|
422 | setting one or more configurables with predefined values, often True/False. | |
407 |
|
423 | |||
408 | For instance: |
|
424 | For instance: | |
@@ -412,13 +428,17 b' For instance:' | |||||
412 | $> ipcontroller --debug |
|
428 | $> ipcontroller --debug | |
413 | # is equivalent to |
|
429 | # is equivalent to | |
414 | $> ipcontroller --Application.log_level=DEBUG |
|
430 | $> ipcontroller --Application.log_level=DEBUG | |
415 |
# and |
|
431 | # and | |
416 | $> ipython --pylab |
|
432 | $> ipython --pylab | |
417 | # is equivalent to |
|
433 | # is equivalent to | |
418 | $> ipython --pylab=auto |
|
434 | $> ipython --pylab=auto | |
|
435 | # or | |||
|
436 | $> ipython --no-banner | |||
|
437 | # is equivalent to | |||
|
438 | $> ipython --TerminalIPythonApp.display_banner=False | |||
419 |
|
439 | |||
420 | Subcommands |
|
440 | Subcommands | |
421 | ----------- |
|
441 | *********** | |
422 |
|
442 | |||
423 |
|
443 | |||
424 | Some IPython applications have **subcommands**. Subcommands are modeled after |
|
444 | Some IPython applications have **subcommands**. Subcommands are modeled after |
@@ -83,7 +83,7 b' All options with a [no] prepended can be specified in negated form' | |||||
83 | ``--[no-]banner`` |
|
83 | ``--[no-]banner`` | |
84 | Print the initial information banner (default on). |
|
84 | Print the initial information banner (default on). | |
85 |
|
85 | |||
86 |
``- |
|
86 | ``-c <command>`` | |
87 | execute the given command string. This is similar to the -c |
|
87 | execute the given command string. This is similar to the -c | |
88 | option in the normal Python interpreter. |
|
88 | option in the normal Python interpreter. | |
89 |
|
89 | |||
@@ -158,7 +158,7 b' All options with a [no] prepended can be specified in negated form' | |||||
158 | ipython_log.py in your current directory (which prevents logs |
|
158 | ipython_log.py in your current directory (which prevents logs | |
159 | from multiple IPython sessions from trampling each other). You |
|
159 | from multiple IPython sessions from trampling each other). You | |
160 | can use this to later restore a session by loading your |
|
160 | can use this to later restore a session by loading your | |
161 |
logfile with ``ipython - |
|
161 | logfile with ``ipython -i ipython_log.py`` | |
162 |
|
162 | |||
163 | ``--logplay=<name>`` |
|
163 | ``--logplay=<name>`` | |
164 |
|
164 |
@@ -205,7 +205,7 b' simply start a controller and engines on a single host using the' | |||||
205 | :command:`ipcluster` command. To start a controller and 4 engines on your |
|
205 | :command:`ipcluster` command. To start a controller and 4 engines on your | |
206 | localhost, just do:: |
|
206 | localhost, just do:: | |
207 |
|
207 | |||
208 |
$ ipcluster start - |
|
208 | $ ipcluster start -n 4 | |
209 |
|
209 | |||
210 | More details about starting the IPython controller and engines can be found |
|
210 | More details about starting the IPython controller and engines can be found | |
211 | :ref:`here <parallel_process>` |
|
211 | :ref:`here <parallel_process>` |
@@ -52,7 +52,7 b' The easiest approach is to use the `MPIExec` Launchers in :command:`ipcluster`,' | |||||
52 | which will first start a controller and then a set of engines using |
|
52 | which will first start a controller and then a set of engines using | |
53 | :command:`mpiexec`:: |
|
53 | :command:`mpiexec`:: | |
54 |
|
54 | |||
55 |
$ ipcluster start - |
|
55 | $ ipcluster start -n 4 --elauncher=MPIExecEngineSetLauncher | |
56 |
|
56 | |||
57 | This approach is best as interrupting :command:`ipcluster` will automatically |
|
57 | This approach is best as interrupting :command:`ipcluster` will automatically | |
58 | stop and clean up the controller and engines. |
|
58 | stop and clean up the controller and engines. | |
@@ -105,7 +105,7 b' distributed array. Save the following text in a file called :file:`psum.py`:' | |||||
105 |
|
105 | |||
106 | Now, start an IPython cluster:: |
|
106 | Now, start an IPython cluster:: | |
107 |
|
107 | |||
108 |
$ ipcluster start --profile=mpi - |
|
108 | $ ipcluster start --profile=mpi -n 4 | |
109 |
|
109 | |||
110 | .. note:: |
|
110 | .. note:: | |
111 |
|
111 |
@@ -19,7 +19,7 b' To follow along with this tutorial, you will need to start the IPython' | |||||
19 | controller and four IPython engines. The simplest way of doing this is to use |
|
19 | controller and four IPython engines. The simplest way of doing this is to use | |
20 | the :command:`ipcluster` command:: |
|
20 | the :command:`ipcluster` command:: | |
21 |
|
21 | |||
22 |
$ ipcluster start - |
|
22 | $ ipcluster start -n 4 | |
23 |
|
23 | |||
24 | For more detailed information about starting the controller and engines, see |
|
24 | For more detailed information about starting the controller and engines, see | |
25 | our :ref:`introduction <parallel_overview>` to using IPython for parallel computing. |
|
25 | our :ref:`introduction <parallel_overview>` to using IPython for parallel computing. |
@@ -109,7 +109,7 b' The simplest way to use ipcluster requires no configuration, and will' | |||||
109 | launch a controller and a number of engines on the local machine. For instance, |
|
109 | launch a controller and a number of engines on the local machine. For instance, | |
110 | to start one controller and 4 engines on localhost, just do:: |
|
110 | to start one controller and 4 engines on localhost, just do:: | |
111 |
|
111 | |||
112 |
$ ipcluster start - |
|
112 | $ ipcluster start -n 4 | |
113 |
|
113 | |||
114 | To see other command line options, do:: |
|
114 | To see other command line options, do:: | |
115 |
|
115 | |||
@@ -174,7 +174,7 b' There, instruct ipcluster to use the MPIExec launchers by adding the lines:' | |||||
174 |
|
174 | |||
175 | If the default MPI configuration is correct, then you can now start your cluster, with:: |
|
175 | If the default MPI configuration is correct, then you can now start your cluster, with:: | |
176 |
|
176 | |||
177 |
$ ipcluster start - |
|
177 | $ ipcluster start -n 4 --profile=mpi | |
178 |
|
178 | |||
179 | This does the following: |
|
179 | This does the following: | |
180 |
|
180 | |||
@@ -324,7 +324,7 b' connections on all its interfaces, by adding in :file:`ipcontroller_config`:' | |||||
324 |
|
324 | |||
325 | You can now run the cluster with:: |
|
325 | You can now run the cluster with:: | |
326 |
|
326 | |||
327 |
$ ipcluster start --profile=pbs - |
|
327 | $ ipcluster start --profile=pbs -n 128 | |
328 |
|
328 | |||
329 | Additional configuration options can be found in the PBS section of :file:`ipcluster_config`. |
|
329 | Additional configuration options can be found in the PBS section of :file:`ipcluster_config`. | |
330 |
|
330 |
@@ -24,7 +24,7 b' To follow along with this tutorial, you will need to start the IPython' | |||||
24 | controller and four IPython engines. The simplest way of doing this is to use |
|
24 | controller and four IPython engines. The simplest way of doing this is to use | |
25 | the :command:`ipcluster` command:: |
|
25 | the :command:`ipcluster` command:: | |
26 |
|
26 | |||
27 |
$ ipcluster start - |
|
27 | $ ipcluster start -n 4 | |
28 |
|
28 | |||
29 | For more detailed information about starting the controller and engines, see |
|
29 | For more detailed information about starting the controller and engines, see | |
30 | our :ref:`introduction <parallel_overview>` to using IPython for parallel computing. |
|
30 | our :ref:`introduction <parallel_overview>` to using IPython for parallel computing. |
@@ -257,7 +257,7 b' Starting the cluster profile' | |||||
257 | Once a cluster profile has been configured, starting an IPython cluster using |
|
257 | Once a cluster profile has been configured, starting an IPython cluster using | |
258 | the profile is simple:: |
|
258 | the profile is simple:: | |
259 |
|
259 | |||
260 |
ipcluster start --profile=mycluster - |
|
260 | ipcluster start --profile=mycluster -n 32 | |
261 |
|
261 | |||
262 | The ``-n`` option tells :command:`ipcluster` how many engines to start (in |
|
262 | The ``-n`` option tells :command:`ipcluster` how many engines to start (in | |
263 | this case 32). Stopping the cluster is as simple as typing Control-C. |
|
263 | this case 32). Stopping the cluster is as simple as typing Control-C. |
General Comments 0
You need to be logged in to leave comments.
Login now