I am having a little bit of trouble with multiprocessing in python.
I can easily run a one level multiprocessing. However, I am stuck when comes to upgrading it to a two level multiprocessing. Let me explain, what I am doing now:
I have NBC number of conductors, I want to compute the defining electrical parameters (R,L and C), so I run python script in a one level multiprocessing where R, L and C for each conductor are computed as follow:
for i in range(0,NBC):
compute_R_of_conductor()
compute_L_of_conductor()
compute_C_of_conductor()
where, well you guessed it, compute_R_of_conductor()
, compute_L_of_conductor()
and compute_C_of_conductor()
are predefined functions that are run perfectly simultaneously.
I would like to include the part for i in range(0,NBC)
in the second level of multiprocessing so that I have the electrical parameters of multiple conductors computed at once to speed up even more my computations.
How can I do that?
Thanks in advance :)