@@ -56,23 +56,30 @@ arguments (see below). In particular, the `exename` keyword can be used to speci
56
56
the path to the `julia` binary on the remote machine(s).
57
57
58
58
`machines` is a vector of "machine specifications" which are given as strings of
59
- the form `[user@]host[:port] [bind_addr[:port]]`. `user` defaults to current user and `port`
60
- to the standard SSH port. If `[bind_addr[:port]]` is specified, other workers will connect
61
- to this worker at the specified `bind_addr` and `port`.
59
+ the form `[user@]host[:ssh_port] [bind_addr[:bind_port]]`. `user` defaults to
60
+ current user and `ssh_port` to the standard SSH port. If
61
+ `[bind_addr[:bind_port]]` is specified, other workers will connect to this
62
+ worker at the specified `bind_addr` and `bind_port`. `bind_port` can be a
63
+ specific port like in `addr:9000`, but it can also specify a port hint by
64
+ enclosing it in brackets like `addr:[9000]`.
62
65
63
66
It is possible to launch multiple processes on a remote host by using a tuple in the
64
67
`machines` vector or the form `(machine_spec, count)`, where `count` is the number of
65
68
workers to be launched on the specified host. Passing `:auto` as the worker count will
66
- launch as many workers as the number of CPU threads on the remote host.
69
+ launch as many workers as the number of CPU threads on the remote host. If the
70
+ `bind_port` is specified then the first worker will bind to `bind_port` and all
71
+ other workers on the host will use `bind_port` as a port hint.
67
72
68
73
**Examples**:
69
74
```julia
70
75
addprocs([
71
- "remote1", # one worker on 'remote1' logging in with the current username
72
- "user@remote2", # one worker on 'remote2' logging in with the 'user' username
73
- "user@remote3:2222", # specifying SSH port to '2222' for 'remote3'
74
- ("user@remote4", 4), # launch 4 workers on 'remote4'
75
- ("user@remote5", :auto), # launch as many workers as CPU threads on 'remote5'
76
+ "remote1", # one worker on 'remote1' logging in with the current username
77
+ "user@remote2", # one worker on 'remote2' logging in with the 'user' username
78
+ "user@remote3:2222", # specifying SSH port to '2222' for 'remote3'
79
+ "user@remote4 10.1.1.1:8000" # specify the address for the worker to bind to on 'remote4'
80
+ "user@remote5 10.1.1.1:[8000]" # same as above, but with a port hint instead of a specific port
81
+ ("user@remote4", 4), # launch 4 workers on 'remote4'
82
+ ("user@remote5", :auto), # launch as many workers as CPU threads on 'remote5'
76
83
])
77
84
```
78
85
0 commit comments