I am using pmap function to calculate and sum a function with different arguments such as:
function gparal(nsubs) Gs = pmap(i -> ASPINS1Sub(i, ...), 1:nsubs) return sum(Gs) end G = gparal(nsubs)
There is one more pmap code inside of a funciton within ASPINS1Sub .
Assume nsubs = 4 and 4 workers are computing seperatelly.
For example: Worker 2 computes ASPINS1Sub and when it comes to inside pmap, it does not work in parallel. Just worker 2 does the job (it seems there is no internal pmap).
How can I fix that? I want that internal code runs in parallel.