# pmap usage pmap(xxxx,i) where i is large than nprocs

**URL:** https://discourse.julialang.org/t/pmap-usage-pmap-xxxx-i-where-i-is-large-than-nprocs/11470
**Category:** General Usage
**Tags:** pmap
**Created:** [June 6, 2018, 1:27pm UTC](https://discourse.julialang.org/t/pmap-usage-pmap-xxxx-i-where-i-is-large-than-nprocs/11470 "2018-06-06T13:27:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ersoacc](https://avatars.discourse-cdn.com/v4/letter/e/9d8465/32.png) [@ersoacc](https://discourse.julialang.org/u/ersoacc)
#### Post date: [June 6, 2018, 1:27pm UTC](https://discourse.julialang.org/t/pmap-usage-pmap-xxxx-i-where-i-is-large-than-nprocs/11470/1 "2018-06-06T13:27:51Z")

</div>

Hello.

I use pmap to calculate Jacobian matrix by multi-colored finite differences.  
My Jacobians are large and sparse. Thus, there are approximately 18 colors.

Following is the line that computes all colors(colums).

```julia
Jacobian = pmap(j -> ( F(u + colors[:,j], Fparam, Si) - FATu ) / epsilon, 1:cn)

```

where cn is the number of colors.

When nprocs() are less then cn, my code stops doing its work and all cores become 0% and nothing happens.  
Simply code becomes as it is paused.

I dont not want to use 18 procs because of the memory considerations.  
Each proc uses nearly 400-700 mb memory in my complicated and large system solver code.

How can use pmap with 4 nprocs where `cn` is more than 4?
