# Initializing "late" workers

**URL:** <https://discourse.julialang.org/t/initializing-late-workers/36591>\
**Category:** General Usage\
**Tags:** distributed\
**Created:** [March 27, 2020, 11:29am UTC](https://discourse.julialang.org/t/initializing-late-workers/36591 "2020-03-27T11:29:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pfarndt](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@pfarndt](https://discourse.julialang.org/u/pfarndt)\
**Post date:** [March 27, 2020, 11:29am UTC](https://discourse.julialang.org/t/initializing-late-workers/36591/1 "2020-03-27T11:29:53Z")

</div>

I am using the `ClusterManagers.ElasticManager` to handle up to hundreds of julia processes in my cluster. Say I do:

```julia
using Distributed, ClusterManagers

c = ClusterManagers.ElasticManager(myip, port, "foobar")

```

and then start up several processes through our queueing system, which would start up julia processes with

```nohighlight
submit2queue echo "using ClusterManagers; ClusterManagers.elastic_worker(\"foobar\")" | julia 

```

Julia processes will start up over some period of time as resources become available. Once I have a considerable amount of workers I may start some computation:

```julia
@everywhere f(x) = (sleep(1); 2 * x)

results = pmap(f, 1:100)

```

This all works nice until a “late” worker is registered in the `ElasticManager` while the `pmap` is doing its job. Julia is smart and tries utilize also these workers. However they do not know what `f(x)` is, because they missed the `@everywhere ...` and therefore throw an error.

How can I initialize such late workers?
