Re: NCL performance

From: Fan Fang <Fan.Fang_at_nyahnyahspammersnyahnyah>
Date: Tue Nov 30 2010 - 09:01:13 MST

Hi Mary,

I was able to reproduce the problem with the following simple script.
It largely resembles what was the most suspicious part of the code that
slowed down with 5.2.1. It does a calendar conversion and an assignment
in a loop. It doesn't look like that the do-loop itself slowed down.

Typically it is a 4-second run for 5.1.1, but >15 seconds for 5.2.1.

Thanks.

-Fan

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
x=new(1000,double)
y=new(1000,double)
wcStrtLooping = systemfunc("date")
yyyy = 2002
mm = 11
dd = 18
hh = 5
nn = 0
ss = 0
do i=0,999
    x@units = "days since 1900-01-01 00:00:00"
    x(i) = ut_inv_calendar(yyyy,mm,dd,hh,nn,ss,x@units,0)
    if(i.gt.100) then
        y(i) = 1.0
    else
        y(i) = 0.0
    end if
end do
wallClockElapseTime(wcStrtLooping, "Complete loop", 0)
end

Mary Haley wrote:
> Hi Fan,
>
> We need more information to see if there could be an issue.
>
> Please insert calls to "wallClockElapseTime in various sections in your script, and then rerun the script
> to get more timing results. There are some examples here:
>
> http://www.ncl.ucar.edu/Document/Functions/Contributed/wallClockElapseTime.shtml
>
> This will help us narrow down where the problem is. Some key areas, as Dennis pointed out,
> could have something to do with file I/O. It would be good to put these calls around
> functions that are dealing with large arrays, and any calls to "addfile". Also, any
> calls to a graphics routine might be a problem area.
>
> Thanks,
>
> --Mary
>
>
> On Nov 29, 2010, at 11:55 AM, Fan Fang wrote:
>
>
>>> uname -a
>>>
>> Linux discette 2.6.18-194.11.3.el5PAE #1 SMP Mon Aug 30 17:02:48 EDT
>> 2010 i686 i686 i386 GNU/Linux
>>
>> What I did was to install the two versions (below) at the same location,
>> and doing the same command-line (same input and output paths) using the
>> same script. I added "time" in front the command-line. Results below.
>> Let me know if you need more info. Thanks.
>>
>> -Fan
>>
>> ncl_ncarg-5.2.1.Linux_RedHat_i686_nodap_gcc412.tar.gz:
>> 172.341u 1.212s 2:54.65 99.3% 0+0k 0+0io 0pf+0w
>>
>> ncl_ncarg-5.1.1.Linux_i686_gcc412.tar.gz:
>> 50.035u 0.579s 0:50.87 99.4% 0+0k 0+0io 0pf+0w
>>
>> Dennis Shea wrote:
>>
>>> There should be no performance difference.
>>> All 5.2.1 updates are listed at:
>>> http://www.ncl.ucar.edu/current_release.shtml
>>>
>>> [1] If your files are on a NFS mounted file system, perhaps the
>>> network was having issues.
>>>
>>> [2] Whenever, you post a comment or question like this one,
>>> please include the output from
>>>
>>> %> uname -a
>>>
>>> THX
>>>
>>> On 11/29/10 9:12 AM, Fan Fang wrote:
>>>
>>>
>>>> With NCL 5.2.1, we noticed a factor of ~3 reduction in performance with
>>>> a x-y plot script. Our previous (and better performed) NCL version was
>>>> 5.1.1. Is this expected?
>>>>
>>>> The script is plotting time series. There are quite a bit array
>>>> manipulations in script. We haven't yet compared other scripts.
>>>>
>>>> -Fan
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 30 09:01:42 2010

This archive was generated by hypermail 2.1.8 : Mon Dec 06 2010 - 09:18:10 MST