Permalink
Browse files

Update command line args format in parallel docs section.

  • Loading branch information...
1 parent f62c102 commit a3a33eb99fbb64a6daa0bd60e95c4f89eb65779d @takluyver committed Jul 8, 2011
@@ -103,7 +103,7 @@ calculation, we will need two top-level functions from :file:`pidigits.py`:
.. literalinclude:: ../../examples/newparallel/pidigits.py
:language: python
- :lines: 41-56
+ :lines: 47-62
We will also use the :func:`plot_two_digit_freqs` function to plot the
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
:command:`ipcluster` command. To start a controller and 4 engines on your
localhost, just do::
- $ ipcluster start n=4
+ $ ipcluster start --n=4
More details about starting the IPython controller and engines can be found
:ref:`here <parallel_process>`
@@ -57,7 +57,7 @@ The easiest approach is to use the `MPIExec` Launchers in :command:`ipcluster`,
which will first start a controller and then a set of engines using
:command:`mpiexec`::
- $ ipcluster start n=4 elauncher=MPIExecEngineSetLauncher
+ $ ipcluster start --n=4 --elauncher=MPIExecEngineSetLauncher
This approach is best as interrupting :command:`ipcluster` will automatically
stop and clean up the controller and engines.
@@ -68,14 +68,14 @@ Manual starting using :command:`mpiexec`
If you want to start the IPython engines using the :command:`mpiexec`, just
do::
- $ mpiexec n=4 ipengine mpi=mpi4py
+ $ mpiexec n=4 ipengine --mpi=mpi4py
This requires that you already have a controller running and that the FURL
files for the engines are in place. We also have built in support for
PyTrilinos [PyTrilinos]_, which can be used (assuming is installed) by
starting the engines with::
- $ mpiexec n=4 ipengine mpi=pytrilinos
+ $ mpiexec n=4 ipengine --mpi=pytrilinos
Automatic starting using PBS and :command:`ipcluster`
------------------------------------------------------
@@ -110,7 +110,7 @@ distributed array. Save the following text in a file called :file:`psum.py`:
Now, start an IPython cluster::
- $ ipcluster start profile=mpi n=4
+ $ ipcluster start --profile=mpi --n=4
.. note::
@@ -19,7 +19,7 @@ To follow along with this tutorial, you will need to start the IPython
controller and four IPython engines. The simplest way of doing this is to use
the :command:`ipcluster` command::
- $ ipcluster start n=4
+ $ ipcluster start --n=4
For more detailed information about starting the controller and engines, see
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
If your machines are on a trusted network, you can safely instruct the controller to listen
on all public interfaces with::
- $> ipcontroller ip=*
+ $> ipcontroller --ip=*
Or you can set the same behavior as the default by adding the following line to your :file:`ipcontroller_config.py`:
@@ -109,7 +109,7 @@ The simplest way to use ipcluster requires no configuration, and will
launch a controller and a number of engines on the local machine. For instance,
to start one controller and 4 engines on localhost, just do::
- $ ipcluster start n=4
+ $ ipcluster start --n=4
To see other command line options, do::
@@ -121,7 +121,7 @@ Configuring an IPython cluster
Cluster configurations are stored as `profiles`. You can create a new profile with::
- $ ipython profile create --parallel profile=myprofile
+ $ ipython profile create --parallel --profile=myprofile
This will create the directory :file:`IPYTHONDIR/profile_myprofile`, and populate it
with the default configuration files for the three IPython cluster commands. Once
@@ -162,7 +162,7 @@ The mpiexec/mpirun mode is useful if you:
If these are satisfied, you can create a new profile::
- $ ipython profile create --parallel profile=mpi
+ $ ipython profile create --parallel --profile=mpi
and edit the file :file:`IPYTHONDIR/profile_mpi/ipcluster_config.py`.
@@ -174,7 +174,7 @@ There, instruct ipcluster to use the MPIExec launchers by adding the lines:
If the default MPI configuration is correct, then you can now start your cluster, with::
- $ ipcluster start n=4 profile=mpi
+ $ ipcluster start --n=4 --profile=mpi
This does the following:
@@ -219,7 +219,7 @@ The PBS mode uses the Portable Batch System (PBS) to start the engines.
As usual, we will start by creating a fresh profile::
- $ ipython profile create --parallel profile=pbs
+ $ ipython profile create --parallel --profile=pbs
And in :file:`ipcluster_config.py`, we will select the PBS launchers for the controller
and engines:
@@ -253,7 +253,7 @@ to specify your own. Here is a sample PBS script template:
cd $PBS_O_WORKDIR
export PATH=$HOME/usr/local/bin
export PYTHONPATH=$HOME/usr/local/lib/python2.7/site-packages
- /usr/local/bin/mpiexec -n {n} ipengine profile_dir={profile_dir}
+ /usr/local/bin/mpiexec -n {n} ipengine --profile_dir={profile_dir}
There are a few important points about this template:
@@ -288,7 +288,7 @@ The controller template should be similar, but simpler:
cd $PBS_O_WORKDIR
export PATH=$HOME/usr/local/bin
export PYTHONPATH=$HOME/usr/local/lib/python2.7/site-packages
- ipcontroller profile_dir={profile_dir}
+ ipcontroller --profile_dir={profile_dir}
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`:
You can now run the cluster with::
- $ ipcluster start profile=pbs n=128
+ $ ipcluster start --profile=pbs --n=128
Additional configuration options can be found in the PBS section of :file:`ipcluster_config`.
@@ -349,7 +349,7 @@ nodes and :command:`ipcontroller` can be run remotely as well, or on localhost.
As usual, we start by creating a clean profile::
- $ ipython profile create --parallel profile=ssh
+ $ ipython profile create --parallel --profile=ssh
To use this mode, select the SSH launchers in :file:`ipcluster_config.py`:
@@ -374,7 +374,7 @@ The controller's remote location and configuration can be specified:
# note that remotely launched ipcontroller will not get the contents of
# the local ipcontroller_config.py unless it resides on the *remote host*
# in the location specified by the `profile_dir` argument.
- # c.SSHControllerLauncher.program_args = ['--reuse', 'ip=*', 'profile_dir=/path/to/cd']
+ # c.SSHControllerLauncher.program_args = ['--reuse', '--ip=*', '--profile_dir=/path/to/cd']
.. note::
@@ -390,7 +390,7 @@ on that host.
c.SSHEngineSetLauncher.engines = { 'host1.example.com' : 2,
'host2.example.com' : 5,
- 'host3.example.com' : (1, ['profile_dir=/home/different/location']),
+ 'host3.example.com' : (1, ['--profile_dir=/home/different/location']),
'host4.example.com' : 8 }
* The `engines` dict, where the keys are the host we want to run engines on and
@@ -403,7 +403,7 @@ a single location:
.. sourcecode:: python
- c.SSHEngineSetLauncher.engine_args = ['profile_dir=/path/to/profile_ssh']
+ c.SSHEngineSetLauncher.engine_args = ['--profile_dir=/path/to/profile_ssh']
Current limitations of the SSH mode of :command:`ipcluster` are:
@@ -471,12 +471,12 @@ can do this:
* Put :file:`ipcontroller-engine.json` in the :file:`~/.ipython/profile_<name>/security`
directory on the engine's host, where it will be found automatically.
-* Call :command:`ipengine` with the ``file=full_path_to_the_file``
+* Call :command:`ipengine` with the ``--file=full_path_to_the_file``
flag.
The ``file`` flag works like this::
- $ ipengine file=/path/to/my/ipcontroller-engine.json
+ $ ipengine --file=/path/to/my/ipcontroller-engine.json
.. note::
@@ -24,7 +24,7 @@ To follow along with this tutorial, you will need to start the IPython
controller and four IPython engines. The simplest way of doing this is to use
the :command:`ipcluster` command::
- $ ipcluster start n=4
+ $ ipcluster start --n=4
For more detailed information about starting the controller and engines, see
our :ref:`introduction <ip1par>` to using IPython for parallel computing.
@@ -350,9 +350,9 @@ The built-in routing schemes:
To select one of these schemes, simply do::
- $ ipcontroller scheme=<schemename>
+ $ ipcontroller --scheme=<schemename>
for instance:
- $ ipcontroller scheme=lru
+ $ ipcontroller --scheme=lru
lru: Least Recently Used
@@ -204,7 +204,7 @@ security keys. The naming convention for cluster directories is:
To create a new cluster profile (named "mycluster") and the associated cluster
directory, type the following command at the Windows Command Prompt::
- ipython profile create --parallel profile=mycluster
+ ipython profile create --parallel --profile=mycluster
The output of this command is shown in the screenshot below. Notice how
:command:`ipcluster` prints out the location of the newly created cluster
@@ -257,7 +257,7 @@ Starting the cluster profile
Once a cluster profile has been configured, starting an IPython cluster using
the profile is simple::
- ipcluster start profile=mycluster n=32
+ ipcluster start --profile=mycluster --n=32
The ``-n`` option tells :command:`ipcluster` how many engines to start (in
this case 32). Stopping the cluster is as simple as typing Control-C.

0 comments on commit a3a33eb

Please sign in to comment.