# Pmap structure master process computes too

**URL:** https://discourse.julialang.org/t/pmap-structure-master-process-computes-too/24886
**Category:** Julia at Scale
**Created:** [June 3, 2019, 11:07am UTC](https://discourse.julialang.org/t/pmap-structure-master-process-computes-too/24886 "2019-06-03T11:07:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)
#### Post date: [June 3, 2019, 11:07am UTC](https://discourse.julialang.org/t/pmap-structure-master-process-computes-too/24886/1 "2019-06-03T11:07:30Z")

</div>

What does happen if the master process handles the part part after `remotecall_fetch` but computes itself as well? Does everything work or are there some catches?

I have two pmap like functions nested and the first calls the processors 2,4,6,… and each of them calls two procs well. What I currently do in the inner one is that processor 2 calls processor 2 and 3 in the `@async` part so it has to handle the calls and computes itself. (The handling is a quite small part) My question is: Should this be avoided?  
I’m not sure about just create new procs for it as the user specifies how many processors are used and it feels a little bit like cheating if I introduce new procs especially for benchmarking.

---

<div class="post-metadata">

### Author: ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)
#### Post date: [June 3, 2019, 11:18am UTC](https://discourse.julialang.org/t/pmap-structure-master-process-computes-too/24886/2 "2019-06-03T11:18:09Z")

</div>

One problem I see is that when I run `remotecall_fetch` and use the current proc then it can just call that function and when it’s done continue → the second proc is not really used?  
Which should be resolved when using all other processors beforehand and the master is the last that gets called?
