Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Optimizing parallelization' topicStudent Support Forum > General > "Optimizing parallelization"

Next Comment >Help | Reply To Topic
Author Comment/Response
Avijeet Prasad
07/25/12 11:58pm

Hi,

Consider the following the problem:

f[n_]= Some complicated function of n.

I have to evaluate the function for 8 values
of n. So I use the command:

LaunchKernels[]
DistributeDefinitions[f];
tab = Table[ParallelSubmit[{n}, f[n]], {n, 1, 8}]
ans = WaitAll[tab]

The above code splits the job into 8 subkernels
and I get a speedup of around 7.96, as shown by
the Parallel Kernel Status. But I have a system
with 24 cores and I would like to use all the
24 subkernels (not only 8) for getting faster
results. How should I change the above code that
it can use more than 8 subkernels?

URL: ,

Subject (listing for 'Optimizing parallelization')
Author Date Posted
Optimizing parallelization Avijeet Prasad 07/25/12 11:58pm
Re: Optimizing parallelization Michael 07/26/12 6:52pm
Next Comment >Help | Reply To Topic