# Lock error with parallelized dvc repro

**URL:** <https://discuss.dvc.org/t/lock-error-with-parallelized-dvc-repro/929>\
**Category:** Questions\
**Created:** [October 20, 2021, 7:00am UTC](https://discuss.dvc.org/t/lock-error-with-parallelized-dvc-repro/929 "2021-10-20T07:00:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Paffciu](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@Paffciu](https://discuss.dvc.org/u/Paffciu)\
**Post date:** [October 26, 2021, 6:57pm UTC](https://discuss.dvc.org/t/lock-error-with-parallelized-dvc-repro/929/2 "2021-10-26T18:57:42Z")

</div>

Hi @maartenb sorry for late response,  
So the problem here is that both stages (while different due to parameters use) use the same dependency:

- my\_script.py

dvc is locking it and hence you get an error. So this is a little bit different use case than the one linked by you in your post, where the pipelines are separate completely.  
I am afraid there is no straightforward workaround for that, besides creating several copies of the script and naming them differently, though that would probably not be very elegant.

Having said so, you might be interested in `exp` command, which should allow you to achieve your goal:

> **[exp run](https://dvc.org/doc/command-reference/exp/run#exp-run)**
>
> Open-source version control system for Data Science and Machine Learning projects. Git-like experience to organize your data, models, and experiments.

You could get parallel execution with the following commands:

`dvc exp run setup@sim1 --queue`  
`dvc exp run setup@sim2 --queue`  
`dvc exp run -j {2}`

Please read on `exp` and share your thoughts on whether this is something you might find useful.

---

_[View the full topic](https://discuss.dvc.org/t/lock-error-with-parallelized-dvc-repro/929)._
