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

Home » Public Forums » archive » Trouble writing very large files
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
Trouble writing very large files [message #64729] Thu, 15 January 2009 12:39 Go to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
Vince Hradil posted a message in September about problems writing
large files. I am encountering the same problem, but with a
variation. Instead of giving a segmentation fault, IDL returns
without writing anything.

IDL> print,!version
{ x86_64 linux unix linux 7.0 Oct 25 2007 64 64}
IDL> im = intarr(4096,4096,256)
IDL> openw,1,'test.dat'
IDL> writeu,1,im
IDL> close,1
IDL> $ls -l test.dat
-rw-r--r-- 1 wlandsma shadow 0 2009-01-15 15:22 test.dat

If I instead do the same thing with a 4096 x 4096 x 255 array, then
IDL does crash with a segmentation fault. My guess is that an
internal IDL counter is not properly defined as 64 bit integer, and
so is being set to zero in my first case (where subscripts are a exact
multiple of two). In the second case it is being set to a negative
number and causing IDL to crash.

In any case this seems to be an internal IDL bug, since I should be
able to write these arrays on a 64 bit machine. --Wayne
Re: Trouble writing very large files [message #64819 is a reply to message #64729] Fri, 16 January 2009 00:35 Go to previous message
Bringfried Stecklum is currently offline  Bringfried Stecklum
Messages: 75
Registered: January 1996
Member
wlandsman wrote:
> Vince Hradil posted a message in September about problems writing
> large files. I am encountering the same problem, but with a
> variation. Instead of giving a segmentation fault, IDL returns
> without writing anything.
>
> IDL> print,!version
> { x86_64 linux unix linux 7.0 Oct 25 2007 64 64}
> IDL> im = intarr(4096,4096,256)
> IDL> openw,1,'test.dat'
> IDL> writeu,1,im
> IDL> close,1
> IDL> $ls -l test.dat
> -rw-r--r-- 1 wlandsma shadow 0 2009-01-15 15:22 test.dat
>
> If I instead do the same thing with a 4096 x 4096 x 255 array, then
> IDL does crash with a segmentation fault. My guess is that an
> internal IDL counter is not properly defined as 64 bit integer, and
> so is being set to zero in my first case (where subscripts are a exact
> multiple of two). In the second case it is being set to a negative
> number and causing IDL to crash.
>
> In any case this seems to be an internal IDL bug, since I should be
> able to write these arrays on a 64 bit machine. --Wayne

It seems to be a writeu bug since save works fine

IDL Version 6.4 (linux x86_64 m64). (c) 2007, ITT Visual Information Solutions
Installation number: 12207.
Licensed for use by: TLS Tautenburg
IDL> hhh=intarr(4096,4096,128)
IDL> openw,1,'hhh'
IDL> writeu,1,hhh
Segmentation fault

2nd attempt
IDL> hhh=intarr(4096,4096,128)
IDL> save,hhh,file='hhh'
IDL> exit

Regards,

Bringfried
Re: Trouble writing very large files [message #64820 is a reply to message #64729] Thu, 15 January 2009 19:35 Go to previous message
Andrew Cool is currently offline  Andrew Cool
Messages: 219
Registered: January 1996
Senior Member
On Jan 16, 6:39 am, wlandsman <wlands...@gmail.com> wrote:
> Vince Hradil posted a message in September about  problems writing
> large files.     I am encountering the same problem, but with a
> variation.     Instead of giving a segmentation fault, IDL returns
> without  writing anything.
>
> IDL> print,!version
> { x86_64 linux unix linux 7.0 Oct 25 2007      64      64}
> IDL> im = intarr(4096,4096,256)
> IDL> openw,1,'test.dat'
> IDL> writeu,1,im
> IDL> close,1
> IDL> $ls -l test.dat
> -rw-r--r-- 1 wlandsma shadow 0 2009-01-15 15:22 test.dat
>
> If I instead do the same thing with a 4096 x 4096 x 255 array, then
> IDL does crash with a segmentation fault.    My guess is that an
> internal IDL counter is not properly defined as  64 bit integer, and
> so is being set to zero in my first case (where subscripts are a exact
> multiple of two).     In the second case it is being set to a negative
> number and causing IDL to crash.
>
> In any case this seems to be an internal IDL bug, since I should be
> able to write these arrays on a 64 bit machine.    --Wayne

Wayne,

A similarly interesting response at the command line ;-

IDL Version 6.4, Microsoft Windows (Win32 x86 m32). (c) 2007, ITT
Visual Information Solutions
Installation number: 100512.
Licensed for use by: Surv Systems Div, DSTO

IDL> print,4096L*4096L*256L
0
IDL> print,4096L*4096L*255L
-16777216

And that's 32 bit Win.

Andrew
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: ENVI IDL script stops running abruptly
Next Topic: Re: Map Projection Bug

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

Current Time: Wed Oct 08 13:44:56 PDT 2025

Total time taken to generate the page: 0.00633 seconds