comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Slow array indexing
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Slow array indexing [message #29178] Thu, 07 February 2002 10:09
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
trouble wrote:

> Nigel Wade <nmw@ion.le.ac.uk> wrote in message
> news:<a3rp08$1ub5$1@rook.le.ac.uk>...
>>
>> Is it really taking that much time or is it miscalculating systime()?
>>
>> What happens if you run strace on idl? E.g. put the commands in a file
>> (script.pro) and run
>>
>> strace idl script.pro
>>
>
> Yes, it really is taking that long. I tried strace - got syntax error
> messages. Is strace an IDL command ? Or linux ? There's no manual
> entry for 'strace' in either unfortunately, so I'm a bit confused.
>

It's a Linux command. Maybe it's not installed on your machine.
In RH 7.2 there's a separate RPM, strace.

From your other post it seems like it's an issue between IDL 5.5 and Alpha
Linux. Maybe some problem in library compatability. Do you still have IDL
5.4 on that machine, or can you re-install it? It would be interesting to
see if they have different library dependencies.

--
-----------------------------------------------------------
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523568, Fax : +44 (0)116 2523555
Re: Slow array indexing [message #29182 is a reply to message #29178] Thu, 07 February 2002 09:17 Go to previous message
the_cacc is currently offline  the_cacc
Messages: 104
Registered: October 2001
Senior Member
Nigel Wade <nmw@ion.le.ac.uk> wrote in message news:<a3tibs$55n4$1@rook.le.ac.uk>...
>
> It may be due to hardware. Alpha is 64 bit hardware, isn't it? Maybe Linux
> is very poor when using 8 and 16 bit data types.
>
> Is it just IDL, or do other applications suffer bad performance with 8/16
> bit data types.?


IDL5.4 ran just fine on this very machine.

Man, my programs are running so slow now... you wouldn't believe.
Re: Slow array indexing [message #29200 is a reply to message #29182] Thu, 07 February 2002 02:21 Go to previous message
the_cacc is currently offline  the_cacc
Messages: 104
Registered: October 2001
Senior Member
Nigel Wade <nmw@ion.le.ac.uk> wrote in message news:<a3rp08$1ub5$1@rook.le.ac.uk>...
>
> Is it really taking that much time or is it miscalculating systime()?
>
> What happens if you run strace on idl? E.g. put the commands in a file
> (script.pro) and run
>
> strace idl script.pro
>

Yes, it really is taking that long. I tried strace - got syntax error
messages. Is strace an IDL command ? Or linux ? There's no manual
entry for 'strace' in either unfortunately, so I'm a bit confused.

BTW, if anyone else out there is on a Linux Alpha, could they try
running the program listed earlier in the thread ? Thanks.
Re: Slow array indexing [message #29204 is a reply to message #29200] Thu, 07 February 2002 01:45 Go to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
trouble wrote:

> Only seems to apply to BYTARR, INTARR and UINDGEN. The program below
> gives the following output on IDL5.5 Aplha Linux:
>

It may be due to hardware. Alpha is 64 bit hardware, isn't it? Maybe Linux
is very poor when using 8 and 16 bit data types.

Is it just IDL, or do other applications suffer bad performance with 8/16
bit data types.?

--
-----------------------------------------------------------
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523568, Fax : +44 (0)116 2523555
Re: Slow array indexing [message #29214 is a reply to message #29204] Wed, 06 February 2002 09:26 Go to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
trouble wrote:

> Hi,
>
> Another array query - accessing arrays seems very slow in 5.5 (Alpha
> Linux)
>
> IDL> array = INTARR(256,256,10)
> IDL> iz = [0,2,4,6,8]
> IDL> t=systime(1)&new = array[*,*,iz]&print,systime(1)-t
> 11.529402
>

Is it really taking that much time or is it miscalculating systime()?

>
> Compare this with 5.4 (Alpha OSF unix) on a slower machine:
> 0.039039969
>
>

That's about what I get with IRIX, Solaris and Linux/x86.

> Anyone know what's going on here ?

Not a clue. Something strange in Alpha Linux.


What happens if you run strace on idl? E.g. put the commands in a file
(script.pro) and run

strace idl script.pro

If the IDL executable is similar for Alpha as it is for x86 there should be
two calls to gettimeofday (one each for the calls to systime()). Is
anything strange going on in between them (all I get is two calls to mmap2
and one call to munmap, presumably allocating/releasing storage for the
arrays created).?

--
-----------------------------------------------------------
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523568, Fax : +44 (0)116 2523555
Re: Slow array indexing [message #29215 is a reply to message #29214] Wed, 06 February 2002 09:15 Go to previous message
the_cacc is currently offline  the_cacc
Messages: 104
Registered: October 2001
Senior Member
Only seems to apply to BYTARR, INTARR and UINDGEN. The program below
gives the following output on IDL5.5 Aplha Linux:

IDL> test
% Compiled module: TEST.
{ alpha linux unix linux 5.5 Aug 28 2001 64 64}
1 3.2928760
2 2.3732140
3 0.047249913
4 0.047480941
5 0.0059390068
6 0.0069260597
9 0.0088199377
12 2.3164300
13 0.0047600269
14 0.0057559013
15 0.0054670572


------------------------------------
PRO test

n = 256
index = lindgen(n)
type = [1,2,3,4,5,6,9,12,13,14,15]

print,!version

FOR i = 0,10 DO BEGIN
arr = MAKE_ARRAY(n,n,TYPE=type[i])
t=systime(1)
temp=arr[*,index]
print,type[i],systime(1)-t
ENDFOR

END
-------------------------------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Fast shear
Next Topic: Setting XSIZE in Droplist Widget

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:53:34 PDT 2025

Total time taken to generate the page: 0.00468 seconds