0 votes
I have access to a 4 Core PC with total 16GB of RAM.

I was thinking if anyone has some experience running multiprocessing scripts while doing Monte Carlo analysis (preferably saving each iteration impacts in a csv/excel file)

Any answers or hints are welcome.

in openLCA by (180 points)

1 Answer

0 votes
by (4.2k points)
I've done this using olca-ipc. There are already instructions on doing the monte-carlo using the ipc (https://github.com/GreenDelta/olca-ipc.py#monte-carlo-simulations). So with this and python multiprocessing, I open up 4 copies of a given product system and divide my total Monte Carlo runs between the 4 instances. I used multiprocessing.pool.starmap so that I could pass parameter redefinitions into my product systems. Not sure if you need more information this but know that it can be done!
by (180 points)
Thanks for the answer!
I actually found the solution and forgot to comment here. Implementing a runner in Java using multithreading was rather complex but does not require to split the iterations.

The results can then be saved into a CSV or into a database w/o much more trouble.
I will publish the scripts once I finish my calculations.