multithreading - How to execute parallel instances of a program with different parameters in Python? -


i have program takes long time finish, want execute 50 different parameters. simplify let consider following example:

parameters = {0: "001001", 1: "010001", 2: etc...}  # 50 params parameter in parameters:     perform_the_calculation (parameters[parameter]) 

the problem perform_the_calculation() takes long each parameter, (about 30 minutes each), if performed parallel excution, prety faster (5 parameters can done @ 45 minutes). did changing parametrs manually , run several instances of program in parallel (i use pycharm).

my question is: is there method run parallel calculations automatically?

note: have read multiprocessing, understood can used distribute processing on processor cores am right? noticed here processor cores working simultaneously, affraid multiprocessing may not useful me (please correct if wrong).

thanks in advance helps.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -