Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8932 > unrolled thread

Re: much power to mathematica

Started byBill Rowe <readnews@sbcglobal.net>
First post2012-03-09 11:09 +0000
Last post2012-03-10 11:20 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: much power to mathematica Bill Rowe <readnews@sbcglobal.net> - 2012-03-09 11:09 +0000
    Re: much power to mathematica Alexey Kornetov <aleks.post@gmail.com> - 2012-03-10 11:20 +0000

#8932 — Re: much power to mathematica

FromBill Rowe <readnews@sbcglobal.net>
Date2012-03-09 11:09 +0000
SubjectRe: much power to mathematica
Message-ID<jjcocu$q7b$1@smc.vnet.net>
On 3/8/12 at 4:41 AM, dave@removedbailey.co.uk (David Bailey) wrote:

>On 06/03/2012 10:59, Bill Rowe wrote:
>>On 3/5/12 at 1:03 AM, aleks.post@gmail.com (Alexey Kornetov) wrote:

>>>Hmm.. You are right. I'm new in mathematica if there is the way to
>>>allocate evolution between the cores to gain much speed?

>>To allocate processing between cores you need to write your code to
>>make use of functions such as ParallelTable. That is, your code
>>needs to take advantage of parallel processing. Note, parallel
>>processing can and will speed up some things but not all things.

>Since you say you are a newcomer to Mathematica, I would be very
>wary about plunging into parallel constructs unless you are sure
>your code cannot be speeded up in other ways, such as:

>Use of functional constructs.

>Ensuring all arrays are 'packed'.

>etc.

>Remember that the maximum possible gain from parallelisation is
>given by the number of cores on your machine, whereas other speedup
>tricks can often achieve larger savings.

This is most excellent advice. In fact, I should have made it
clear I myself seldom use things like Compile or parallel
processing to achieve speed improvements. I've found simply
understanding my problem throughly and applying the correct
functional constructs generally gives the performance I need.

Both Compile and parallel processing can produce significant
performance gains for some code and some problems. Compile is
often particularly effective for procedural code. But it is very
important to know neither Compile nor parallel processing will
always produce performance gains. For a great many problems both
can actually degrade performance of well written functional code
in Mathematica.

Getting maximum performance from Mathematica very much requires
a complete understanding of the problem you are trying to solve
and some effort in looking at how your code is working. There is
no single simple approach guaranteed to always speed up
Mathematica code.

[toc] | [next] | [standalone]


#8951

FromAlexey Kornetov <aleks.post@gmail.com>
Date2012-03-10 11:20 +0000
Message-ID<jjfdd8$816$1@smc.vnet.net>
In reply to#8932
thank you all, I've started to use paralleltable it is great,
Nintegrate which I use is already include Compile function as I know,
parallelisation gave 8 times gain in evolution time on my work
machine.. its really acceptable now..
thanks for help.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web