# Is there any way to describe worker number in each machine?

**URL:** <https://discourse.julialang.org/t/is-there-any-way-to-describe-worker-number-in-each-machine/8249>\
**Category:** Julia at Scale\
**Tags:** question\
**Created:** [January 9, 2018, 4:27pm UTC](https://discourse.julialang.org/t/is-there-any-way-to-describe-worker-number-in-each-machine/8249 "2018-01-09T16:27:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jwu/32/3775_2.png) [@jwu](https://discourse.julialang.org/u/jwu)\
**Post date:** [January 9, 2018, 4:27pm UTC](https://discourse.julialang.org/t/is-there-any-way-to-describe-worker-number-in-each-machine/8249/1 "2018-01-09T16:27:23Z")

</div>

I know that one way is repeating the hostname N times to have N workers. Is there a way to explicitly say  
`hostname N` ?

---

<div class="post-metadata">

**Author:** ![vchuravy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vchuravy/32/8_2.png) [@vchuravy](https://discourse.julialang.org/u/vchuravy)\
**Post date:** [January 9, 2018, 8:16pm UTC](https://discourse.julialang.org/t/is-there-any-way-to-describe-worker-number-in-each-machine/8249/2 "2018-01-09T20:16:09Z")

</div>

You can use a machinefile

> Julia can be started in parallel mode with either the -p or the --machinefile options. -p n will launch an additional n worker processes, while --machinefile file will launch a worker for each line in file file. The machines defined in file must be accessible via a passwordless ssh login, with Julia installed at the same location as the current host. Each machine definition takes the form [count\*][user@]host[:port] [bind\_addr[:port]] . user defaults to current user, port to the standard ssh port. count is the number of workers to spawn on the node, and defaults to 1. The optional bind-to bind\_addr[:port] specifies the ip-address and port that other workers should use to connect to this worker.

From [https://docs.julialang.org/en/stable/manual/getting-started/#Getting-Started-1](https://docs.julialang.org/en/stable/manual/getting-started/#Getting-Started-1)

So something like `5*hostname` should do the trick.

---

<div class="post-metadata">

**Author:** ![jwu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jwu/32/3775_2.png) [@jwu](https://discourse.julialang.org/u/jwu)\
**Post date:** [January 9, 2018, 8:23pm UTC](https://discourse.julialang.org/t/is-there-any-way-to-describe-worker-number-in-each-machine/8249/3 "2018-01-09T20:23:20Z")

</div>

ah, thanks! did not noticed the documentation! I was looking at the parallel computing section.
