Parallel calculations in Mathematica

Click For Summary
SUMMARY

The discussion focuses on optimizing calculations in Mathematica by utilizing parallel processing with NDSolve outputs. The user seeks to direct evaluations to specific kernels to handle chunks of complex values sequentially while waiting for additional data. A suggested solution involves using the Table function combined with Parallelize to efficiently manage the computation of these chunks. This approach allows for the effective distribution of tasks across multiple kernels, enhancing overall performance.

PREREQUISITES
  • Familiarity with Mathematica's NDSolve function
  • Understanding of parallel computing concepts in Mathematica
  • Knowledge of kernel management in Mathematica
  • Experience with the Table and Parallelize functions in Mathematica
NEXT STEPS
  • Research how to manage multiple kernels in Mathematica
  • Learn about the Table function in Mathematica for generating data sets
  • Explore advanced parallel computing techniques in Mathematica
  • Investigate performance optimization strategies for NDSolve in Mathematica
USEFUL FOR

Mathematica users, computational scientists, and anyone looking to optimize performance in numerical simulations or complex calculations using parallel processing techniques.

Inve
Messages
7
Reaction score
0
Hello PF.
I wanted to optimize time expenditure on some calculation that I'm doing. A natural way to do this can be by computing parts in parallel.

Now when I say "parts" I don't mean that some computations are wholly independent of other computations. My situation is that I have a bunch of solutions given from NDSolve from which I sample some data (I get a list of complex values).
This list of complex values is something I need for another time consuming computation - but that is all I need from the NDSolve solutions.

Now these lists of complex values comes available in chunks and so I should be able to start the other computation with these values at hand and further wait for the next batch of complex values to continue.

I am here wondering how I can direct evaluations to specific kernels. So that when a chunk of values are obtained on one kernel, this is distributed to the other (second) kernel which starts when this input is given. The second kernel then waits for another chunk of data, and so on..

Someone got any ideas on this matter? Or maybe a better way to do it? (I was considering just 'parallelize' but I don't know if the second calculation will be done "properly", etc).

Thanks in advance :)
 
Physics news on Phys.org
The lists of complex values and the other time consuming computation are not parallel, they are serial. You say that the lists of complex values come in chunks and that you can start the other time consuming computation on a chunk. So your parallel element is your chunks. The easiest way to parallelize then would be to do a Table of chunks and run Parallelize across that.
 

Similar threads

  • · Replies 0 ·
Replies
0
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 18 ·
Replies
18
Views
5K