for i in range(num_processes):
    p = mp.Process(target=Simulation, args=(inqueue, output))
jobs.append(p)
p.start()
for i in range(num_simulations):
    inqueue.put(i)
for i in range(num_processes):
    inqueue.put(sentinel)
for p in jobs:
    p.join()
output.put(None)
proc.join()
Write data to hdf file using multiprocessing