title: Using python multiprocessing with different random seed for each process
body: <p>I wish to run several instances of a simulation in parallel, but with each simulation having its own independent data set.</p>
  
  <p>Currently I implement this as follows:</p>
  
  <pre><code>P = mp.Pool(ncpus) # Generate pool of workers
  for j in range(nrun): # Generate processes
      sim = MDF.Simulation(tstep, temp, time, writeout, boundaryxy, boundaryz, relax, insert, lat,savetemp)
      lattice = MDF.Lattice(tstep, temp, time, writeout, boundaryxy, boundaryz, relax, insert, lat, kb, ks, kbs, a, p, q, massL, randinit, initvel, parangle,scaletemp,savetemp)
      adatom1 = MDF.Adatom(tstep, temp, time, writeout, boundaryxy, boundaryz, relax, insert, lat, ra, massa, amorse, bmorse, r0, z0, name, lattice, samplerate,savetemp)        
      P.apply_async(run,(j,sim,lattice,adatom1),callback=After) # run simulation and ISF analysis in each process
  P.close()
  P.join() # start processes  
  </code></pre>
  
  <p>where <code>sim</code>, <code>adatom1</code> and <code>lattice</code> are objects passed to the function <code>run</code> which initiates the simulation. </p>
  
  <p>However, I recently found out that each batch I run simultaneously (that is, each <code>ncpus</code> runs out of the total <code>nrun</code> of simulations runs) gives the exact same results.</p>
  
  <p>Can someone here enlighten how to fix this?</p>