Skip to content

Commit 6be66d7

Browse files
committedJul 15, 2014
Move the host count to the beginning: [count*]...
1 parent 987ee67 commit 6be66d7

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed
 

‎base/client.jl

+4-6
Original file line numberDiff line numberDiff line change
@@ -330,13 +330,11 @@ end
330330
function load_machine_file(path::String)
331331
machines = String[]
332332
for line in split(readall(path),'\n',false)
333-
m = match(r"^([^\s*]+)\*(\d+)(.*)",line)
334-
if m == nothing
335-
push!(machines,line)
333+
s = split(line,'*',false)
334+
if length(s) > 1
335+
append!(machines,fill(s[2],int(s[1])))
336336
else
337-
(host, count, rest) = m.captures
338-
count = (count != nothing) ? int(count) : 1
339-
append!(machines,fill(string(host,rest),count))
337+
push!(machines,line)
340338
end
341339
end
342340
return machines

‎doc/manual/getting-started.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ processes, while ``--machinefile file`` will launch a worker for each line in
7171
file ``file``. The machines defined in ``file`` must be accessible via a
7272
passwordless ``ssh`` login, with Julia installed at the same location as the
7373
current host. Each machine definition takes the form
74-
``[user@]host[:port][*count] [bind_addr]`` . ``user`` defaults to current user,
74+
``[count*][user@]host[:port] [bind_addr]`` . ``user`` defaults to current user,
7575
``port`` to the standard ssh port. ``count`` is the number of workers to spawn
7676
on the node, and defaults to 1. Optionally, in case of multi-homed hosts,
7777
``bind_addr`` may be used to explicitly specify an interface.

0 commit comments

Comments
 (0)
Please sign in to comment.