Note that there are some explanatory texts on larger screens.

plurals
  1. POPython - multithreading / multiprocessing
    text
    copied!<p><strong>Background</strong><br /> I have a collection of Python scripts used to build and execute Verilog-AMS tesbenches. The overall design was built with threading in mind, as each major test case is its own testbench and I have all of the supporting files / data output separate for each instance. The only shared items will be the launcher script and my data extraction script. The problem that I'm faced with is that my Verilog-AMS simulator does not natively support multithreading and for my test cases it takes a substantial amount of time to complete.</p> <p><strong>Problem</strong><br /> The machine I'm running this on has 32GiB of RAM and 8 "cores" available for me to use and I may be able to access a machine with 32. I would like to take advantage of the available computing power and execute the simulations simultaneously. What would be the best approach?</p> <p>I currently use <code>subprocess.call</code> to execute my simulation. I would like to execute up to <code>n</code> commands at once, with each one executing on a separate thread / as a separate process. Once a simulation has completed, the next one in the queue (if one exists) would execute.</p> <p>I'm pretty new to Python and haven't really written a threaded application. I would like some advice on how I should proceed. I saw <a href="https://stackoverflow.com/questions/1190206/threading-in-python">this</a> question, and from that I think the <code>multiprocessing</code> module may be better suited to my needs.</p> <p>What do you all recommend?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload