JuliaLang / Distributed.jl

Create and control multiple Julia processes remotely for distributed computing. Ships as a Julia stdlib.
https://docs.julialang.org/en/v1/stdlib/Distributed/
MIT License
23 stars 9 forks source link

Machine file example in documentation #75

Open junglegobs opened 3 years ago

junglegobs commented 3 years ago

Currently the section on Starting workers is quite brief. I guess all the information is there, but there is no example of a machine-file. For example, I currently do not understand how to specify the number of workers to start at each machine. Assuming user is user1 and host is host1 and I want to start 2 workers there, is it:

2 user1@host1
2*user1@host1

This would be cleared up with a simple example in that section.

fredrikekre commented 3 years ago

2*user1@host1 should work, and does so for me at least:

$ cat m 
2 * fredrik@localhost
2 * localhost

$ julia --machine-file=m -E 'workers()'
[2, 3, 4, 5]

But I agree that the documentation needs to be improved.