I need to run a simple ParallelTable
:
ParallelTable[
{tab1[[i1]], tab2[[i2]], tab3[[i3]], tab4[[i4]],
fun[tab1[[i1]],tab2[[i2]],tab3[[i3]],tab4[[i4]]]
},
{i1, 1, n1}, {i2, 1, n2}, {i3, 1,n3}, {i4, 1, n4}
]
The computation, however, is parallelized only on the outermost index i1
and not on all of them. The problem is that I have more cores than n1
and so I'm not computing this table as fast as I had hoped. Is there a simple way to run on as many cores as possible without having to rewrite the table in a flattened version?
ParallelTable
. You can useTuples
to make the parameter list.) $\endgroup$ – Szabolcs Jun 13 '12 at 13:32ni
are generally all equal to 2 in the specific case i'm dealing with $\endgroup$ – Valerio Jun 13 '12 at 13:50Tuples
to run a flattened version of the table? thanks $\endgroup$ – Valerio Jun 13 '12 at 13:52