# Set a function on master and send it to all workers

**URL:** https://discourse.julialang.org/t/set-a-function-on-master-and-send-it-to-all-workers/21586
**Category:** Julia at Scale
**Created:** [March 7, 2019, 5:18pm UTC](https://discourse.julialang.org/t/set-a-function-on-master-and-send-it-to-all-workers/21586 "2019-03-07T17:18:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mleprovost](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mleprovost/32/7166_2.png) [@mleprovost](https://discourse.julialang.org/u/mleprovost)
#### Post date: [March 7, 2019, 5:18pm UTC](https://discourse.julialang.org/t/set-a-function-on-master-and-send-it-to-all-workers/21586/1 "2019-03-07T17:18:54Z")

</div>

Hello,  
I would like to construct an interpolation function from a very large dataset in a serialized way(master worker) and then send it to all workers for parallel computing.

I tried `sendto(workers(),interp_function=interp_function)` from ParallelDataTransfer.jl, but I got issues similar to [https://github.com/ChrisRackauckas/ParallelDataTransfer.jl/issues/16](https://github.com/ChrisRackauckas/ParallelDataTransfer.jl/issues/16).

Is there another function I can use?

Thank you for your help,

---

<div class="post-metadata">

### Author: ![konkam](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/konkam/32/6598_2.png) [@konkam](https://discourse.julialang.org/u/konkam)
#### Post date: [March 7, 2019, 6:21pm UTC](https://discourse.julialang.org/t/set-a-function-on-master-and-send-it-to-all-workers/21586/2 "2019-03-07T18:21:30Z")

</div>

Here’s an old but related question on StackOverflow: [for loop - Julia parallel programming - Making existing function available to all workers - Stack Overflow](https://stackoverflow.com/questions/30730507/julia-parallel-programming-making-existing-function-available-to-all-workers/38146308#38146308)

Maybe there’s a more recent answer, along using Threads ([Parallel Computing · The Julia Language](https://docs.julialang.org/en/v1/manual/parallel-computing/index.html#Multi-Threading-(Experimental)-1)) that share their memory
