Re: ncl performance

From: Micah Sklut <micahs2005_at_nyahnyahspammersnyahnyah>
Date: Mon, 15 Jun 2009 17:39:39 -0400

Mary and Dennis,

Thanks for the suggestions. I am looking to buy a new computer that will be
spending most of its time running ncl scripts.
So, outside of writing the code as efficient as possible, I am looking for
the best buy that will run individual NCL scripts as fast as possible.

So, if NCL does NOT make use of multiple processors in one script, then
there would be no point in me buying a dual or quad core machine. So, it
looks like I should then focus on purchasing a single processor machine, and
the higher the speed, the better.

Micah

On Mon, Jun 15, 2009 at 4:15 PM, Mary Haley <haley_at_ucar.edu> wrote:

>
> Hi Micah,
>
> Just as an FYI: you can improveme performance in a general by
> watching out for the following things:
>
> - Nested "do" loops: try to keep things out of a do loop
> if possible. Check for code that can be moved out of
> a loop. Use NCL's array arithmetic capabilities where
> possible.
>
> - If you are reordering the same variable again and again,
> then you store it to another local variable, and use this instead.
>
> - In V5.1.0 (soon), we have some new dim_xxxx_n functions that
> operate on any dimension (unlike dim_xxxx which only operates
> on the rightmost dimension). Use these functions to avoid
> reordering.
>
> - Delete arrays (especially large ones) if you no longer need them,
> using the "delete" procedure:
>
> delete(x)
>
> - If you don't need metadata to be copied, then do straight
> variable copies with:
>
> xnew = (/x/)
>
> instead of:
>
> xnew = x
>
> - If you are 1) generating several images in a single file,
> 2) using the same gsn_xxxxx call over and over, and
> 3) just changing a few resources inside the do loop,
> then instead of calling gsn_xxxxx every time, it can
> be more efficient to call it once outside the loop and
> then use "setvalues" to change the data and resources.
>
> See example 1 at:
>
> http://www.ncl.ucar.edu/Applications/animate.shtml
>
> --Mary
>
>
> On Fri, 12 Jun 2009, Micah Sklut wrote:
>
> Hi NCL,
>>
>> Its been a while, since my last questions, but I believe I have a straight
>> forward one here.
>>
>> What is the best way to increase performance for ncl scripts.
>> I have batch jobs where I read in large grib files, and output lots of
>> images.
>>
>> Will performance improve by increasing RAM ?
>> Will performance improve by increasing Processor Speed?
>>
>> My guess, is that the memory is going to be the biggest factor, and then
>> processor speed second.
>>
>> Thanks for your help!
>>
>> Micah
>>
>>
Received on Mon Jun 15 2009 - 15:39:39 MDT

This archive was generated by hypermail 2.2.0 : Tue Jun 16 2009 - 10:05:45 MDT