Re: plot_3dbox : array has too many elements [message #42568] |
Wed, 16 February 2005 09:12 |
Ralf Schaa
Messages: 37 Registered: June 2001
|
Member |
|
|
Paolo Grigis wrote:
>
>
> Ralf Schaa wrote:
>
>> Dear All,
>>
>> I like to use the plot_3dbox procedure to plot a satellite orbit. The
>> cartesian positionvectors consists each of 27292 elements. I tried
>> 27292L and 27292LL when initializing, but I keep getting the same
>> error message : 'array has too many elements'.
>>
>
> Well, it looks like the program is trying to build an array (assuming
> of float type) of 27292 by 27292 elements, which you just can't do in
> idl on 32 bit systems:
>
> IDL> a=fltarr(27292L,27292L)
> % Array has too many elements.
That's it.
Plot_3dbox calls: Surface, FltArr(Xcnt,Xcnt) with Xcnt are my 27292
elements.
Thanks.
-Ralf
> To estimate the maximum size of an IDL array one can use the formula:
>
> maxsize = (2L^31-1) / typesize
>
> where typesize is the size of your datatype in byte (4 bytes
> for float, 2 bytes for integers, 8 bytes for doubles etc.).
> This means that the maximum size in bytes of a single array should
> not be larger than 2GB.
>
>
> Cheers,
> Paolo
>
>
>> What to do?
>>
>> Thanks already
>>
>> -Ralf
|
|
|
Re: plot_3dbox : array has too many elements [message #42570 is a reply to message #42568] |
Wed, 16 February 2005 07:47  |
Paolo Grigis
Messages: 171 Registered: December 2003
|
Senior Member |
|
|
Ralf Schaa wrote:
> Dear All,
>
> I like to use the plot_3dbox procedure to plot a satellite orbit. The
> cartesian positionvectors consists each of 27292 elements. I tried
> 27292L and 27292LL when initializing, but I keep getting the same error
> message : 'array has too many elements'.
>
Well, it looks like the program is trying to build an array (assuming
of float type) of 27292 by 27292 elements, which you just can't do in
idl on 32 bit systems:
IDL> a=fltarr(27292L,27292L)
% Array has too many elements.
To estimate the maximum size of an IDL array one can use the formula:
maxsize = (2L^31-1) / typesize
where typesize is the size of your datatype in byte (4 bytes
for float, 2 bytes for integers, 8 bytes for doubles etc.).
This means that the maximum size in bytes of a single array should
not be larger than 2GB.
Cheers,
Paolo
> What to do?
>
> Thanks already
>
> -Ralf
|
|
|
Re: plot_3dbox : array has too many elements [message #42571 is a reply to message #42570] |
Wed, 16 February 2005 06:29  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ralf Schaa writes:
> I like to use the plot_3dbox procedure to plot a satellite orbit. The
> cartesian positionvectors consists each of 27292 elements. I tried
> 27292L and 27292LL when initializing, but I keep getting the same error
> message : 'array has too many elements'.
>
> What to do?
I think I would rip those lazy SURFACE commands out
of PLOT_3DBOX and replace them with something a lot
more sensible, like SCALE3. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|