title: Multiprocessing map with multiple arguments
body: <p>In view of randomized structure of my algorithm, I want to run it hundreds of times in parallel. Parameters stay the same every time. </p>
  
  <p>Both of implementations raise some kind of exception (PicklingError, or TypeError).</p>
  
  <pre><code>from multiprocessing import Pool
  from itertools import izip, repeat
  
  if __name__ == '__main__':
      G = Class1Object()
      S = Class2Object()
  
      pool = multiprocessing.Pool(processes=multiprocessing.cpu_count())
  
      # take 1 tuple input
      # parfun = lambda (G,S): fun(G,S)
      # T = pool.map(parfun, izip(repeat(G, 2), repeat(S, 2)))
  
      # take 2 arguments
      T = pool.map(fun, [G]*2, [S]*2)
  </code></pre>
  
  <p>What is the fastest and most convenient way to run function with multiple arguments in parallel?</p>