Skip to main content
added 159 characters in body
Source Link
Jagra
  • 14.7k
  • 1
  • 40
  • 84

Perhaps``Perhaps just an extended comment (with some speculation) rather than a specific answer, but I'll hazard a few lines.

I think you've made some assumptions about how ParallelTable works that you may have as an artifact of procedural coding? Mathematica and specifically ParallelTable might, but ought not to have to loop through nested loops.

(Note: @Szabolcs comment above that ParallelTable only parallels "...with respect to the 1st iterator." I'd have guessed it was cleverer than that).

As all of the applications of your function f stand independent, I see no reason that Mathematica wouldn't employ all available kernels to calculate them. Positing equal time for each calculation, it could employ each of your 100 available kernels 6 times.

Kind of interesting to think about how Mathematica might do this internally. Why wouldn't it create a matrix of all the paired x's and y's then run f on them.

You might try creating such a matrix thanthen just MapMap or ParallelMapParallelMap f to the matrix.

You can monitor this to some degree from the Evaluation menu item. Click through to Parallel Status and observe as you run the calculation.

Perhaps just an extended comment (with some speculation) rather than a specific answer, but I'll hazard a few lines.

I think you've made some assumptions about how ParallelTable works that you may have as an artifact of procedural coding? Mathematica and specifically ParallelTable might, but ought not to have to loop through nested loops.

As all of the applications of your function f stand independent, I see no reason that Mathematica wouldn't employ all available kernels to calculate them. Positing equal time for each calculation, it could employ each of your 100 available kernels 6 times.

Kind of interesting to think about how Mathematica might do this internally. Why wouldn't it create a matrix of all the paired x's and y's then run f on them.

You might try creating such a matrix than just Map or ParallelMap f to the matrix.

You can monitor this to some degree from the Evaluation menu item. Click through to Parallel Status and observe as you run the calculation.

``Perhaps just an extended comment (with some speculation) rather than a specific answer, but I'll hazard a few lines.

I think you've made some assumptions about how ParallelTable works that you may have as an artifact of procedural coding? Mathematica and specifically ParallelTable might, but ought not to have to loop through nested loops.

(Note: @Szabolcs comment above that ParallelTable only parallels "...with respect to the 1st iterator." I'd have guessed it was cleverer than that).

As all of the applications of your function f stand independent, I see no reason that Mathematica wouldn't employ all available kernels to calculate them. Positing equal time for each calculation, it could employ each of your 100 available kernels 6 times.

Kind of interesting to think about how Mathematica might do this internally. Why wouldn't it create a matrix of all the paired x's and y's then run f on them.

You might try creating such a matrix then just Map or ParallelMap f to the matrix.

You can monitor this to some degree from the Evaluation menu item. Click through to Parallel Status and observe as you run the calculation.

Source Link
Jagra
  • 14.7k
  • 1
  • 40
  • 84

Perhaps just an extended comment (with some speculation) rather than a specific answer, but I'll hazard a few lines.

I think you've made some assumptions about how ParallelTable works that you may have as an artifact of procedural coding? Mathematica and specifically ParallelTable might, but ought not to have to loop through nested loops.

As all of the applications of your function f stand independent, I see no reason that Mathematica wouldn't employ all available kernels to calculate them. Positing equal time for each calculation, it could employ each of your 100 available kernels 6 times.

Kind of interesting to think about how Mathematica might do this internally. Why wouldn't it create a matrix of all the paired x's and y's then run f on them.

You might try creating such a matrix than just Map or ParallelMap f to the matrix.

You can monitor this to some degree from the Evaluation menu item. Click through to Parallel Status and observe as you run the calculation.