# Making a struct definition available on the cluster

**URL:** https://discourse.julialang.org/t/making-a-struct-definition-available-on-the-cluster/17460
**Category:** Julia at Scale
**Tags:** question
**Created:** [November 13, 2018, 2:52am UTC](https://discourse.julialang.org/t/making-a-struct-definition-available-on-the-cluster/17460 "2018-11-13T02:52:02Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [November 13, 2018, 7:11am UTC](https://discourse.julialang.org/t/making-a-struct-definition-available-on-the-cluster/17460/2 "2018-11-13T07:11:26Z")

</div>

Define the struct everywhere according to

```julia
@everywhere struct Ctrl
    n::Int64
    q::Bool
end

```

This defines the struct on all workers that are running while the struct is defined, so start your workers before defining the struct like above.

PS: also, don’t forget to [quote your code](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530)

---

_[View the full topic](https://discourse.julialang.org/t/making-a-struct-definition-available-on-the-cluster/17460)._
