Yes I find some chains finish earlier than others. To compare the parallel and serial runs (of advertisement attribution), the total runtime of the chains are different. In general, parallel takes longer than serial in all chains.

Let me paste the outputs below. It does looks like it’s actually using virtual cores, which shares the one physical core. If it is really the case, I don’t understand why the sharing of physical cores is consistent across 3 CPUs, and different from models (why some models like twelve cites do not share physical cores).

**serial outputs:**

SAMPLING FOR MODEL ‘ad_attribution’ NOW (CHAIN 1).

Chain 1, Iteration: 1 / 750 [ 0%] (Warmup)

Chain 1, Iteration: 75 / 750 [ 10%] (Warmup)

Chain 1, Iteration: 150 / 750 [ 20%] (Warmup)

Chain 1, Iteration: 225 / 750 [ 30%] (Warmup)

Chain 1, Iteration: 300 / 750 [ 40%] (Warmup)

Chain 1, Iteration: 375 / 750 [ 50%] (Warmup)

Chain 1, Iteration: 376 / 750 [ 50%] (Sampling)

Chain 1, Iteration: 450 / 750 [ 60%] (Sampling)

Chain 1, Iteration: 525 / 750 [ 70%] (Sampling)

Chain 1, Iteration: 600 / 750 [ 80%] (Sampling)

Chain 1, Iteration: 675 / 750 [ 90%] (Sampling)

Chain 1, Iteration: 750 / 750 [100%] (Sampling)

Elapsed Time: 338.999 seconds (Warm-up)

301.73 seconds (Sampling)

640.729 seconds (Total)

SAMPLING FOR MODEL ‘ad_attribution’ NOW (CHAIN 2).

Chain 2, Iteration: 1 / 750 [ 0%] (Warmup)

Chain 2, Iteration: 75 / 750 [ 10%] (Warmup)

Chain 2, Iteration: 150 / 750 [ 20%] (Warmup)

Chain 2, Iteration: 225 / 750 [ 30%] (Warmup)

Chain 2, Iteration: 300 / 750 [ 40%] (Warmup)

Chain 2, Iteration: 375 / 750 [ 50%] (Warmup)

Chain 2, Iteration: 376 / 750 [ 50%] (Sampling)

Chain 2, Iteration: 450 / 750 [ 60%] (Sampling)

Chain 2, Iteration: 525 / 750 [ 70%] (Sampling)

Chain 2, Iteration: 600 / 750 [ 80%] (Sampling)

Chain 2, Iteration: 675 / 750 [ 90%] (Sampling)

Chain 2, Iteration: 750 / 750 [100%] (Sampling)

Elapsed Time: 308.289 seconds (Warm-up)

185.655 seconds (Sampling)

493.944 seconds (Total)

SAMPLING FOR MODEL ‘ad_attribution’ NOW (CHAIN 3).

Chain 3, Iteration: 1 / 750 [ 0%] (Warmup)

Chain 3, Iteration: 75 / 750 [ 10%] (Warmup)

Chain 3, Iteration: 150 / 750 [ 20%] (Warmup)

Chain 3, Iteration: 225 / 750 [ 30%] (Warmup)

Chain 3, Iteration: 300 / 750 [ 40%] (Warmup)

Chain 3, Iteration: 375 / 750 [ 50%] (Warmup)

Chain 3, Iteration: 376 / 750 [ 50%] (Sampling)

Chain 3, Iteration: 450 / 750 [ 60%] (Sampling)

Chain 3, Iteration: 525 / 750 [ 70%] (Sampling)

Chain 3, Iteration: 600 / 750 [ 80%] (Sampling)

Chain 3, Iteration: 675 / 750 [ 90%] (Sampling)

Chain 3, Iteration: 750 / 750 [100%] (Sampling)

Elapsed Time: 344.956 seconds (Warm-up)

181.927 seconds (Sampling)

526.883 seconds (Total)

SAMPLING FOR MODEL ‘ad_attribution’ NOW (CHAIN 4).

Chain 4, Iteration: 1 / 750 [ 0%] (Warmup)

Chain 4, Iteration: 75 / 750 [ 10%] (Warmup)

Chain 4, Iteration: 150 / 750 [ 20%] (Warmup)

Chain 4, Iteration: 225 / 750 [ 30%] (Warmup)

Chain 4, Iteration: 300 / 750 [ 40%] (Warmup)

Chain 4, Iteration: 375 / 750 [ 50%] (Warmup)

Chain 4, Iteration: 376 / 750 [ 50%] (Sampling)

Chain 4, Iteration: 450 / 750 [ 60%] (Sampling)

Chain 4, Iteration: 525 / 750 [ 70%] (Sampling)

Chain 4, Iteration: 600 / 750 [ 80%] (Sampling)

Chain 4, Iteration: 675 / 750 [ 90%] (Sampling)

Chain 4, Iteration: 750 / 750 [100%] (Sampling)

Elapsed Time: 333.21 seconds (Warm-up)

182.352 seconds (Sampling)

515.562 seconds (Total)

Inference for Stan model: ad_attribution.

4 chains, each with iter=750; warmup=375; thin=1;

post-warmup draws per chain=375, total post-warmup draws=1500.

```
mean se_mean sd 2.5% 25% 50% 75% 97.5% n_eff
```

lp__ -1721.08 0.51 10.92 -1743.65 -1728.15 -1720.99 -1714.18 -1700.02 462

Rhat

lp__ 1.01

Samples were drawn using NUTS(diag_e) at Mon Jul 10 05:17:32 2017.

For each parameter, n_eff is a crude measure of effective sample size,

and Rhat is the potential scale reduction factor on split chains (at

convergence, Rhat=1).

**parallel outputs:**

SAMPLING FOR MODEL ‘ad_attribution’ NOW (CHAIN 1).

SAMPLING FOR MODEL ‘ad_attribution’ NOW (CHAIN 2).

SAMPLING FOR MODEL ‘ad_attribution’ NOW (CHAIN 3).

Chain 1, Iteration: 1 / 750 [ 0%] (Warmup)

SAMPLING FOR MODEL ‘ad_attribution’ NOW (CHAIN 4).

Chain 2, Iteration: 1 / 750 [ 0%] (Warmup)

Chain 3, Iteration: 1 / 750 [ 0%] (Warmup)

Chain 4, Iteration: 1 / 750 [ 0%] (Warmup)

Chain 3, Iteration: 75 / 750 [ 10%] (Warmup)

Chain 4, Iteration: 75 / 750 [ 10%] (Warmup)

Chain 1, Iteration: 75 / 750 [ 10%] (Warmup)

Chain 2, Iteration: 75 / 750 [ 10%] (Warmup)

Chain 3, Iteration: 150 / 750 [ 20%] (Warmup)

Chain 4, Iteration: 150 / 750 [ 20%] (Warmup)

Chain 2, Iteration: 150 / 750 [ 20%] (Warmup)

Chain 1, Iteration: 150 / 750 [ 20%] (Warmup)

Chain 3, Iteration: 225 / 750 [ 30%] (Warmup)

Chain 4, Iteration: 225 / 750 [ 30%] (Warmup)

Chain 4, Iteration: 300 / 750 [ 40%] (Warmup)

Chain 3, Iteration: 300 / 750 [ 40%] (Warmup)

Chain 2, Iteration: 225 / 750 [ 30%] (Warmup)

Chain 1, Iteration: 225 / 750 [ 30%] (Warmup)

Chain 4, Iteration: 375 / 750 [ 50%] (Warmup)

Chain 4, Iteration: 376 / 750 [ 50%] (Sampling)

Chain 3, Iteration: 375 / 750 [ 50%] (Warmup)

Chain 3, Iteration: 376 / 750 [ 50%] (Sampling)

Chain 2, Iteration: 300 / 750 [ 40%] (Warmup)

Chain 1, Iteration: 300 / 750 [ 40%] (Warmup)

Chain 4, Iteration: 450 / 750 [ 60%] (Sampling)

Chain 2, Iteration: 375 / 750 [ 50%] (Warmup)

Chain 2, Iteration: 376 / 750 [ 50%] (Sampling)

Chain 1, Iteration: 375 / 750 [ 50%] (Warmup)

Chain 1, Iteration: 376 / 750 [ 50%] (Sampling)

Chain 4, Iteration: 525 / 750 [ 70%] (Sampling)

Chain 3, Iteration: 450 / 750 [ 60%] (Sampling)

Chain 2, Iteration: 450 / 750 [ 60%] (Sampling)

Chain 1, Iteration: 450 / 750 [ 60%] (Sampling)

Chain 4, Iteration: 600 / 750 [ 80%] (Sampling)

Chain 2, Iteration: 525 / 750 [ 70%] (Sampling)

Chain 3, Iteration: 525 / 750 [ 70%] (Sampling)

Chain 1, Iteration: 525 / 750 [ 70%] (Sampling)

Chain 4, Iteration: 675 / 750 [ 90%] (Sampling)

Chain 2, Iteration: 600 / 750 [ 80%] (Sampling)

Chain 1, Iteration: 600 / 750 [ 80%] (Sampling)

Chain 4, Iteration: 750 / 750 [100%] (Sampling)

Elapsed Time: 595.036 seconds (Warm-up)

387.19 seconds (Sampling)

982.226 seconds (Total)

Chain 3, Iteration: 600 / 750 [ 80%] (Sampling)

Chain 2, Iteration: 675 / 750 [ 90%] (Sampling)

Chain 1, Iteration: 675 / 750 [ 90%] (Sampling)

Chain 2, Iteration: 750 / 750 [100%] (Sampling)

Elapsed Time: 727.999 seconds (Warm-up)

328.42 seconds (Sampling)

1056.42 seconds (Total)

Chain 1, Iteration: 750 / 750 [100%] (Sampling)

Elapsed Time: 738.686 seconds (Warm-up)

323.963 seconds (Sampling)

1062.65 seconds (Total)

Chain 3, Iteration: 675 / 750 [ 90%] (Sampling)

Chain 3, Iteration: 750 / 750 [100%] (Sampling)

Elapsed Time: 614.926 seconds (Warm-up)

530.843 seconds (Sampling)

1145.77 seconds (Total)

Inference for Stan model: ad_attribution.

4 chains, each with iter=750; warmup=375; thin=1;

post-warmup draws per chain=375, total post-warmup draws=1500.

```
mean se_mean sd 2.5% 25% 50% 75% 97.5% n_eff
```

lp__ -1722.65 0.53 11.58 -1745.98 -1730.4 -1722.15 -1714.47 -1701.15 485

Rhat

lp__ 1

Samples were drawn using NUTS(diag_e) at Fri Jul 7 13:58:40 2017.

For each parameter, n_eff is a crude measure of effective sample size,

and Rhat is the potential scale reduction factor on split chains (at

convergence, Rhat=1).