LCA-ActivityBrowser / activity-browser

GUI for brightway2
GNU Lesser General Public License v3.0
147 stars 57 forks source link

PyPardiso preventing threaded Monte Carlo simulation? #217

Closed bsteubing closed 3 years ago

bsteubing commented 5 years ago

Hi Adrian,

I added a Monte Carlo tab in this branch: https://github.com/LCA-ActivityBrowser/activity-browser/tree/LU_231_LCA_results

I would like to put that into a thread, but have failed so far. One possible explanation could be that it is linked to the PyPardiso issue of:

pypardsio_solver is used for the 'spsolve' and 'factorized' functions. Python crashes on windows if multiple

    # instances of PyPardisoSolver make calls to the Pardiso library

I can make a single instance of such a worker thread (see here: MonteCarloWorkerThread). If I create that thread "on the fly" for each MC simulation, it crashes.

I can, however, run a MC simulation in the AB at the same time as, e.g., in a notebook... which seems to contradict your statement above for multiple instances...

If you have a better understanding of this, I would much appreciate your feedback!

StpdFox commented 3 years ago

Closed for inactivity, If you think this is still a current issue please reopen the ticket with an up to date example

haasad commented 3 years ago

@bsteubing, just got notified of this issue because it was closed. I can look into it if it's still relevant.