# Modelingtoolkit and multithreading

**URL:** <https://discourse.julialang.org/t/modelingtoolkit-and-multithreading/101739>\
**Category:** Modelling & Simulations\
**Tags:** question, package, modelingtoolkit\
**Created:** [July 18, 2023, 4:41pm UTC](https://discourse.julialang.org/t/modelingtoolkit-and-multithreading/101739 "2023-07-18T16:41:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [July 18, 2023, 4:41pm UTC](https://discourse.julialang.org/t/modelingtoolkit-and-multithreading/101739/1 "2023-07-18T16:41:25Z")

</div>

I have model, based on Modelingtoolkit and I am solving it with DifferentialEquations. Now I try to solve n models in parallel (well, it is mostly the same model, but with different parameters).

It currently gives wrong results. Is there anything specific to these packages that has to be taken into account when you want to run different simulations in parallel using multiple threads?

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [July 18, 2023, 4:45pm UTC](https://discourse.julialang.org/t/modelingtoolkit-and-multithreading/101739/2 "2023-07-18T16:45:51Z")

</div>

It would be good to see an MWE. MTK is doing some weird stuff, but I don’t see off-hand what would be going on without an example.
