# Q: is Distributed not supported in Pluto?

**URL:** <https://discourse.julialang.org/t/q-is-distributed-not-supported-in-pluto/56277>\
**Category:** Pluto\
**Created:** [March 1, 2021, 7:15pm UTC](https://discourse.julialang.org/t/q-is-distributed-not-supported-in-pluto/56277 "2021-03-01T19:15:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![threadedblue](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/threadedblue/32/19247_2.png) [@threadedblue](https://discourse.julialang.org/u/threadedblue)\
**Post date:** [March 1, 2021, 7:15pm UTC](https://discourse.julialang.org/t/q-is-distributed-not-supported-in-pluto/56277/1 "2021-03-01T19:15:45Z")

</div>

Q: is Distributed not supported in Pluto?

I am liking Pluto so far but today I ran into this:

Only process 1 can add and remove workers

1. **cluster\_mgmt\_from\_master\_check** @ _cluster.jl:974_ [inlined]
2. **#addprocs#37** (::Base.Iterators.Pairs{Symbol,Any,NTuple{6,Symbol},NamedTuple{(:tunnel, :multiplex, :sshflags, :max\_parallel, :exename, :dir),Tuple{Bool,Bool,Cmd,Int64,Cmd,String}}}, ::typeof(addprocs), ::Distributed.SSHManager)@ _cluster.jl:440_
3. **#addprocs#241** @ _managers.jl:120_ [inlined]
4. **top-level scope** @ _[Local: 4](http://localhost:1234/edit?id=81d96ebc-7ac1-11eb-3110-cfe5238f8e95#)_

```julia
begin
	using Distributed
	workers = ["gcr@haz00"]
	addprocs(workers; tunnel=true, exename=`julia`, dir="/home/gcr", sshflags=`-i "~/.ssh/id_rsa"`)
end

```

---

<div class="post-metadata">

**Author:** ![stillyslalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stillyslalom/32/45687_2.png) [@stillyslalom](https://discourse.julialang.org/u/stillyslalom)\
**Post date:** [March 2, 2021, 2:33am UTC](https://discourse.julialang.org/t/q-is-distributed-not-supported-in-pluto/56277/2 "2021-03-02T02:33:19Z")

</div>

Pluto uses Distributed.jl to launch a worker process for each notebook’s computations, and workers cannot have workers of their own, so no, it isn’t supported by default. There’s some discussion in this issue, including a keyword-argument workaround: [https://github.com/fonsp/Pluto.jl/issues/300](https://github.com/fonsp/Pluto.jl/issues/300)

---

<div class="post-metadata">

**Author:** ![threadedblue](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/threadedblue/32/19247_2.png) [@threadedblue](https://discourse.julialang.org/u/threadedblue)\
**Post date:** [March 2, 2021, 1:15pm UTC](https://discourse.julialang.org/t/q-is-distributed-not-supported-in-pluto/56277/3 "2021-03-02T13:15:47Z")

</div>

Alas, I was liking Pluto so very much. But these show stoppers do occur from time to time. It’s all part of the game.

Thanks for the response.

---

<div class="post-metadata">

**Author:** ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)\
**Post date:** [March 2, 2021, 1:34pm UTC](https://discourse.julialang.org/t/q-is-distributed-not-supported-in-pluto/56277/4 "2021-03-02T13:34:31Z")

</div>

```julia
import Pluto; Pluto.run(workspace_use_distributed=false)

```

Is this not working for you?

It has some drawbacks, therefore it is not the default, but none of them should be showstopper.

---

<div class="post-metadata">

**Author:** ![threadedblue](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/threadedblue/32/19247_2.png) [@threadedblue](https://discourse.julialang.org/u/threadedblue)\
**Post date:** [March 2, 2021, 1:39pm UTC](https://discourse.julialang.org/t/q-is-distributed-not-supported-in-pluto/56277/5 "2021-03-02T13:39:32Z")

</div>

I saw in the issue #300 (linked above) that…

> But this makes the notebook server unresponsive while any notebook is running code, and the stop button is disabled.

Still, I suppose it’s worth a try. I’ll let you know.

---

<div class="post-metadata">

**Author:** ![threadedblue](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/threadedblue/32/19247_2.png) [@threadedblue](https://discourse.julialang.org/u/threadedblue)\
**Post date:** [March 2, 2021, 3:22pm UTC](https://discourse.julialang.org/t/q-is-distributed-not-supported-in-pluto/56277/6 "2021-03-02T15:22:27Z")

</div>

I tried the suggestion (above).

```julia
begin
	using Distributed
	workers = ["gcr@haz00"]
	addprocs(workers; tunnel=true, exename=`julia`, dir="/home/gcr", sshflags=`-i "~/.ssh/id_rsa"`)
end

```

I got a process number back. Then I ran something simple and nothing, no response. The same in Jupyter works. I get the hostname as expected.

`@everywhere println(gethostname())`
