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

Home » Public Forums » archive » make_array function bug
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
make_array function bug [message #88815] Mon, 23 June 2014 16:10 Go to next message
Ken G is currently offline  Ken G
Messages: 14
Registered: September 2006
Junior Member
I discovered an odd bug in make_array()

Try this
plot, make_array(99999L, start=10d, /index, increment=2d, /double)

Then this
plot, make_array(99999L+1L, start=10d, /index, increment=2d, /double)

It looks to me like there's a typecasting problem going on inside the routine, causing problems! I see that the increment keyword was added in 8.3, so there could be a newish bug there.

In this example, once the number of elements grows to 100k, the output is a sawtooth, no longer smooth.
Re: make_array function bug [message #88838 is a reply to message #88815] Wed, 25 June 2014 01:41 Go to previous messageGo to next message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Tuesday, June 24, 2014 1:10:18 AM UTC+2, Ken G wrote:
> I discovered an odd bug in make_array()
>
> Try this
>
> plot, make_array(99999L, start=10d, /index, increment=2d, /double)
>
> Then this
>
> plot, make_array(99999L+1L, start=10d, /index, increment=2d, /double)
>
> It looks to me like there's a typecasting problem going on inside the routine, causing problems! I see that the increment keyword was added in 8.3, so there could be a newish bug there.


Seems to be a bug in multithreading, the start values for the threads are set incorrectly. It works as expected with 'cpu, tpool_nthreads=1'.

regards,
Lajos
Re: make_array function bug [message #88839 is a reply to message #88838] Wed, 25 June 2014 02:05 Go to previous messageGo to next message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
Good catch!

You should definitely open a bug report for this one...
Re: make_array function bug [message #88912 is a reply to message #88839] Thu, 03 July 2014 02:30 Go to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Wednesday, June 25, 2014 6:05:16 PM UTC+9, Fabien wrote:
> Good catch!
>
>
>
> You should definitely open a bug report for this one...

Ack. That's too funny. I just discovered this bug at around the same time. It also affects the [0:n:inc] method of creating arrays.

I'll fix it for the next release of IDL.

Cheers,
Chris
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Question about coord_transform keyword in axis function
Next Topic: Multiple plot with mapCoord

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

Current Time: Wed Oct 08 11:37:11 PDT 2025

Total time taken to generate the page: 0.00399 seconds