Skip to content

Commit

Permalink
document addprocs keyword arg topology
Browse files Browse the repository at this point in the history
  • Loading branch information
amitmurthy committed Jan 30, 2016
1 parent 4d1bf92 commit 111c493
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 19 deletions.
37 changes: 26 additions & 11 deletions base/docs/helpdb/Base.jl
Expand Up @@ -3300,7 +3300,7 @@ addprocs()

"""
```
addprocs(machines; tunnel=false, sshflags=``, max_parallel=10, exeflags=``) -> List of process identifiers
addprocs(machines; keyword_args...) -> List of process identifiers
```
Add processes on remote machines via SSH. Requires julia to be installed in the same
Expand All @@ -3320,23 +3320,38 @@ it will launch as many workers as the number of cores on the specific host.
Keyword arguments:
`tunnel`: if `true` then SSH tunneling will be used to connect to the worker from the
master process.
* `tunnel`: if `true` then SSH tunneling will be used to connect to the worker from the
master process. Default is `false`.
`sshflags`: specifies additional ssh options, e.g.
* `sshflags`: specifies additional ssh options, e.g.
sshflags=`-i /home/foo/bar.pem`
`max_parallel`: specifies the maximum number of workers connected to in parallel at a host.
Defaults to 10.
* `max_parallel`: specifies the maximum number of workers connected to in parallel at a host.
Defaults to 10.
`dir`: specifies the working directory on the workers. Defaults to the host's current
directory (as found by `pwd()`)
* `dir`: specifies the working directory on the workers. Defaults to the host's current
directory (as found by `pwd()`)
`exename`: name of the julia executable. Defaults to `"\$JULIA_HOME/julia"` or
`"\$JULIA_HOME/julia-debug"` as the case may be.
* `exename`: name of the julia executable. Defaults to `"\$JULIA_HOME/julia"` or
`"\$JULIA_HOME/julia-debug"` as the case may be.
* `exeflags`: additional flags passed to the worker processes.
* `topology`: Specifies how the workers connect to each other. Sending a message
between unconnected workers results in an error.
+ `:all_to_all` : All processes are connected to each other.
This is the default.
+ `:master_slave` : Only the driver process, i.e. pid 1 connects to the
workers. The workers do not connect to each other.
+ `:custom` : The `launch` method of the cluster manager specifes the
connection topology via fields `ident` and `connect_idents` in
`WorkerConfig`. A worker with a cluster manager identity `ident`
will connect to all workers specified in `connect_idents`.
`exeflags`: additional flags passed to the worker processes.
Environment variables :
Expand Down
2 changes: 1 addition & 1 deletion doc/stdlib/file.rst
Expand Up @@ -337,7 +337,7 @@

.. Docstring generated from Julia source
``@__FILE__`` expands to a string with the absolute file path of the file containing the macro. Returns ``nothing`` if run from a REPL or an empty string if evaluated by ``julia -e <expr>``. Alternatively see :data:`PROGRAM_FILE`.
``@__FILE__`` expands to a string with the absolute file path of the file containing the macro. Returns ``nothing`` if run from a REPL or an empty string if evaluated by ``julia -e <expr>``\ . Alternatively see ```PROGRAM_FILE`` <:data:`PROGRAM_FILE`>`_\ .

.. function:: @__LINE__ -> Int

Expand Down
22 changes: 15 additions & 7 deletions doc/stdlib/parallel.rst
Expand Up @@ -157,7 +157,7 @@ General Parallel Computing Support

Note that workers do not run a ``.juliarc.jl`` startup script, nor do they synchronize their global state (such as global variables, new method definitions, and loaded modules) with any of the other running processes.

.. function:: addprocs(machines; tunnel=false, sshflags=``, max_parallel=10, exeflags=``) -> List of process identifiers
.. function:: addprocs(machines; keyword_args...) -> List of process identifiers

.. Docstring generated from Julia source
Expand All @@ -173,21 +173,29 @@ General Parallel Computing Support

Keyword arguments:

``tunnel``\ : if ``true`` then SSH tunneling will be used to connect to the worker from the master process.
* ``tunnel``\ : if ``true`` then SSH tunneling will be used to connect to the worker from the master process. Default is ``false``\ .

``sshflags``\ : specifies additional ssh options, e.g.
* ``sshflags``\ : specifies additional ssh options, e.g.

.. code-block:: julia
sshflags=`-i /home/foo/bar.pem`
``max_parallel``\ : specifies the maximum number of workers connected to in parallel at a host. Defaults to 10.
* ``max_parallel``\ : specifies the maximum number of workers connected to in parallel at a host. Defaults to 10.

``dir``\ : specifies the working directory on the workers. Defaults to the host's current directory (as found by ``pwd()``\ )
* ``dir``\ : specifies the working directory on the workers. Defaults to the host's current directory (as found by ``pwd()``\ )

``exename``\ : name of the julia executable. Defaults to ``"$JULIA_HOME/julia"`` or ``"$JULIA_HOME/julia-debug"`` as the case may be.
* ``exename``\ : name of the julia executable. Defaults to ``"$JULIA_HOME/julia"`` or ``"$JULIA_HOME/julia-debug"`` as the case may be.

``exeflags``\ : additional flags passed to the worker processes.
* ``exeflags``\ : additional flags passed to the worker processes.

* ``topology``\ : Specifies how the workers connect to each other. Sending a message between unconnected workers results in an error.

* ``:all_to_all`` : All processes are connected to each other. This is the default.

* ``:master_slave`` : Only the driver process, i.e. pid 1 connects to the workers. The workers do not connect to each other.

* ``:custom`` : The ``launch`` method of the cluster manager specifes the connection topology via fields ``ident`` and ``connect_idents`` in ``WorkerConfig``\ . A worker with a cluster manager identity ``ident`` will connect to all workers specified in ``connect_idents``\ .

Environment variables :

Expand Down

0 comments on commit 111c493

Please sign in to comment.