# Pumas: ThreadsX bug

**URL:** <https://discourse.pumas.ai/t/pumas-threadsx-bug/941>\
**Category:** Pumas issues\
**Created:** [September 20, 2023, 7:37pm UTC](https://discourse.pumas.ai/t/pumas-threadsx-bug/941 "2023-09-20T19:37:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![donaldlee3](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/donaldlee3/32/165_2.png) [@donaldlee3](https://discourse.pumas.ai/u/donaldlee3)\
**Post date:** [September 20, 2023, 7:37pm UTC](https://discourse.pumas.ai/t/pumas-threadsx-bug/941/1 "2023-09-20T19:37:06Z")

</div>

Hello,

I am loading ThreadsX as such `Pumas: ThreadsX`.

When I simulate several reps inside of a `map`, utilization of `ThreadsX.map` will cause some reps to repeat the ids. So, there will be 2 sets of id 1-48, for example, and the random effects will be different for the duplicate ids. I tested this with and without `ensemblealg = EnsembleSerial()`. I’ve narrowed the issue down to the utilization of `ThreadsX.map`, as this doesn’t happen with `map`. In terms of frequency, if I run 100 reps, this problem will occur in about 2 of the 100 reps.

Edit: I’m using Pumas v2.4.0.

---

<div class="post-metadata">

**Author:** ![andreasnoack](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/andreasnoack/32/22_2.png) [@andreasnoack](https://discourse.pumas.ai/u/andreasnoack)\
**Post date:** [September 21, 2023, 8:41am UTC](https://discourse.pumas.ai/t/pumas-threadsx-bug/941/2 "2023-09-21T08:41:43Z")

</div>

Hello Donald,

Would you be able to share a reproducer of this? It would greatly help the debugging of this issue on our end.

Thanks  
Andreas
