# Code availability macro for \`pmap\`

**URL:** <https://discourse.julialang.org/t/code-availability-macro-for-pmap/77065>\
**Category:** General Usage\
**Tags:** question, parallel, distributed\
**Created:** [February 25, 2022, 1:26pm UTC](https://discourse.julialang.org/t/code-availability-macro-for-pmap/77065 "2022-02-25T13:26:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uroc327](https://avatars.discourse-cdn.com/v4/letter/u/eb8c5e/32.png) [@Uroc327](https://discourse.julialang.org/u/Uroc327)\
**Post date:** [February 25, 2022, 1:26pm UTC](https://discourse.julialang.org/t/code-availability-macro-for-pmap/77065/1 "2022-02-25T13:26:01Z")

</div>

Is there a macro similar to `@distributed for` for `pmap` (or some `pmapreduce`, which I’d love to have in official repos, btw), that takes care of making sure all functions and variables and everything is available at the worker?

I enjoy that one can (almost) just sprinkle `@distributed` over a module and whenever the caller of a function has `Distributed` loaded and some workers added, the code is executed on all workers. I’m looking for a similarly low-friction way to do this with load balancing `pmap`.
