looking for sort procedure [message #7778] |
Wed, 15 January 1997 00:00  |
R. Bauer
Messages: 137 Registered: November 1996
|
Senior Member |
|
|
Hi,
It was surprising me that's idl's build-in sort procedure is very very
slow.
for this example it needs on may RS6000 AIX more than 2 minutes.
a = indgen(10000)
b = [a,a]
print,systime(0)
s = b(sort(b))
print,systime(0)
end
This is much too long.
Did someone have a better sort routine which I can have?
--
R.Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@kfa-juelich.de
|
|
|
Re: looking for sort procedure [message #7867 is a reply to message #7778] |
Tue, 21 January 1997 00:00   |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
llobet@elpp1.epfl.ch (Xavier Llobet i Sales EPFL-CRPP 1015 Lausanne CH) writes:
> In article <5blhri$ks1@post.gsfc.nasa.gov>, thompson@orpheus.nascom.nasa.gov
> (William Thompson) writes:
...
> =I also tried the above example on a DEC AXP 3000/600 where it took about 60
> =seconds. I wonder if there's something in the code that is optimized for Sun
> =workstations, maybe going back to the days when the first Unix port of IDL was
> =called SunIDL?
> =
> =Bill Thompson
> Here are the results on a DEC 3000 Model 400:
> IDL. Version 3.6.1 (vms alpha).
> [...]
> IDL> a = indgen(10000) & b=[a,a]
> IDL> print,systime(0) & s = b(sort(b)) & print,systime(0)
> Tue Jan 21 09:58:59 1997
> Tue Jan 21 09:59:00 1997
> IDL>
> IDL> a=lindgen(100000L) & b=[a,a]
> IDL> print,systime(0) & s = b(sort(b)) & print,systime(0)
> Tue Jan 21 10:00:18 1997
> Tue Jan 21 10:00:27 1997
> Which IDL version are you using?
I suspect that it has more to do with the operating system than with the
version of IDL. Here's the result on an AXP 3000/400 running VMS:
IDL> a=lindgen(100000L) & b=[a,a]
IDL> print,systime(0) & s = b(sort(b)) & print,systime(0)
Tue Jan 21 18:23:31 1997
Tue Jan 21 18:23:36 1997
whereas the same problem on a faster AXP 3000/600 running OSF seemed to take
forever. (I eventually gave up.) I decreased the size of A by a factor of 10,
which gave
IDL> a=lindgen(10000L) & b=[a,a]
IDL> print,systime(0) & s = b(sort(b)) & print,systime(0)
Tue Jan 21 23:35:39 1997
Tue Jan 21 23:36:48 1997
In both cases, I was using IDL v4.0.1, but I've also tried it with IDL v3.6.1
under OSF and got the same result.
It's interesting that the same problem with the same version of IDL on
essentially the same architecture gives completely different results for VMS
and Unix.
Bill Thompson
|
|
|
|
Re: looking for sort procedure [message #7871 is a reply to message #7778] |
Tue, 21 January 1997 00:00   |
llobet
Messages: 10 Registered: May 1993
|
Junior Member |
|
|
In article <5blhri$ks1@post.gsfc.nasa.gov>, thompson@orpheus.nascom.nasa.gov
(William Thompson) writes:
=kak@sat.ipp-garching.mpg.de (Karl Krieger) writes:
=
=>"R. Bauer" <r.bauer@kfa-juelich.de> writes:
[...]
=>>for this example it needs on may RS6000 AIX more than 2 minutes.
=
=>>a = indgen(10000)
=>>b = [a,a]
=>>print,systime(0)
=>>s = b(sort(b))
=>>print,systime(0)
=
=>>end
=
=>>This is much too long.
=
=>Hi all,
=
=>there seems to be a bug in the implementation of this routine:
=>I tested it on a SUN Ultrasparc and on an IBM RS6000, which
=>has about the same speed (at least for the Monte Carlo simulation
=>coded in F77, which usually runs on these boxes).
=
=>Result for SUN: below 1 second, 6 seconds for a=lindgen(100000L)
=>Result for IBM: about 145 seconds
=
=>Is this a known bug/feature? There seems to be a major problem
=>either in the implementation of sort or in the way it uses
=>the machine's resources (bad optimization?).
=
=I also tried the above example on a DEC AXP 3000/600 where it took about 60
=seconds. I wonder if there's something in the code that is optimized for Sun
=workstations, maybe going back to the days when the first Unix port of IDL was
=called SunIDL?
=
=Bill Thompson
Here are the results on a DEC 3000 Model 400:
IDL. Version 3.6.1 (vms alpha).
[...]
IDL> a = indgen(10000) & b=[a,a]
IDL> print,systime(0) & s = b(sort(b)) & print,systime(0)
Tue Jan 21 09:58:59 1997
Tue Jan 21 09:59:00 1997
IDL>
IDL> a=lindgen(100000L) & b=[a,a]
IDL> print,systime(0) & s = b(sort(b)) & print,systime(0)
Tue Jan 21 10:00:18 1997
Tue Jan 21 10:00:27 1997
Which IDL version are you using?
-xavier
|
|
|
|
|
|
Re: looking for sort procedure [message #7957 is a reply to message #7778] |
Wed, 29 January 1997 00:00   |
pford
Messages: 33 Registered: September 1996
|
Member |
|
|
del
>> =I also tried the above example on a DEC AXP 3000/600 where it took about 60
>> =seconds. I wonder if there's something in the code that is optimized for Sun
>> =workstations, maybe going back to the days when the first Unix port of
IDL was
>> =called SunIDL?
>> =
>> =Bill Thompson
>
>> Here are the results on a DEC 3000 Model 400:
>
>
>> IDL. Version 3.6.1 (vms alpha).
>> [...]
>
>> IDL> a = indgen(10000) & b=[a,a]
>> IDL> print,systime(0) & s = b(sort(b)) & print,systime(0)
>> Tue Jan 21 09:58:59 1997
>> Tue Jan 21 09:59:00 1997
>> IDL>
>> IDL> a=lindgen(100000L) & b=[a,a]
>> IDL> print,systime(0) & s = b(sort(b)) & print,systime(0)
>> Tue Jan 21 10:00:18 1997
>> Tue Jan 21 10:00:27 1997
>
>> Which IDL version are you using?
>
> I suspect that it has more to do with the operating system than with the
> version of IDL. Here's the result on an AXP 3000/400 running VMS:
>
> IDL> a=lindgen(100000L) & b=[a,a]
> IDL> print,systime(0) & s = b(sort(b)) & print,systime(0)
> Tue Jan 21 18:23:31 1997
> Tue Jan 21 18:23:36 1997
>
> whereas the same problem on a faster AXP 3000/600 running OSF seemed to take
> forever. (I eventually gave up.) I decreased the size of A by a factor of 10,
> which gave
>
> IDL> a=lindgen(10000L) & b=[a,a]
> IDL> print,systime(0) & s = b(sort(b)) & print,systime(0)
> Tue Jan 21 23:35:39 1997
> Tue Jan 21 23:36:48 1997
>
> In both cases, I was using IDL v4.0.1, but I've also tried it with IDL v3.6.1
> under OSF and got the same result.
>
> It's interesting that the same problem with the same version of IDL on
> essentially the same architecture gives completely different results for VMS
> and Unix.
>
> Bill Thompson
pro test
a = indgen(100000L)
b = [a,a]
print,systime(0)
s = b(sort(b))
print,systime(0)
end
IDL> test
Wed Jan 29 22:25:25 1997
Wed Jan 29 22:25:28 1997
IDL 4.01 on a PPC 604 132 Mhz Mac clone for what it is worth.
Patrick Ford
Baylor College of Medicine
|
|
|
Re: looking for sort procedure [message #8096 is a reply to message #7778] |
Mon, 03 February 1997 00:00  |
pit
Messages: 92 Registered: January 1996
|
Member |
|
|
In article <pford-2901972229000001@news.compassnet.com>,
pford@bcm.tmc.edu (Patrick Ford) writes:
> IDL> test
> Wed Jan 29 22:25:25 1997
> Wed Jan 29 22:25:28 1997
> IDL 4.01 on a PPC 604 132 Mhz Mac clone for what it is worth.
Really? What System load did you have?
Linux 4.01 on a Pentium 133 gives
IDL> a = indgen(100000L) & b = [a,a]
IDL> print,systime(0)&s = b(sort(b))&print,systime(0)
Mon Feb 3 13:18:45 1997
Mon Feb 3 13:18:46 1997
IDL> a = lindgen(100000L) & b = [a,a]
IDL> print,systime(0)&s = b(sort(b))&print,systime(0)
Mon Feb 3 13:20:36 1997
Mon Feb 3 13:20:37 1997
Peter
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
Peter "Pit" Suetterlin http://www.uni-sw.gwdg.de/~pit
Universitaets-Sternwarte Goettingen
Tel.: +49 551 39-5048 pit@uni-sw.gwdg.de
-- * -- * ...-- * -- * ...-- * -- * ...-- * -- * ...-- * -- * ...-- * --
Come and see the stars! http://www.kis.uni-freiburg.de/~ps/SFB
Sternfreunde Breisgau e.V. Tel.: +49 7641 3492
____________________________________________________________ ______________
|
|
|