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

Home » Public Forums » archive » Re: more - disk space allocation problem
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: more - disk space allocation problem [message #5751] Fri, 16 February 1996 00:00
robert is currently offline  robert
Messages: 3
Registered: February 1996
Junior Member
Jean C. Newman (jnewman@pmel.noaa.gov) wrote:
: Thanks for the help so far. I've done some tests and have a "more specific
: question". The problem is still that when I remove or compress a file from
: inside an idl routine the disk space doesn't get released. I wrote a little
: test routine and if all I do is uncompress the file and then remove it
: everything works fine but if I uncompress, then open the file, and then
: remove it, the disk space is not released. I've included the routines and
: output, any solutions? I'm working with IDL v4.0.1 on a Sun Solaris v2.4
: system.

The problem lies in your opening the file, which you then either remove or
compress _without_ closing it and freeing the lun. This means that the disk
space remains allocated until you quit idl (or maybe the program, I don't
know where the tidying up is done.
i.e.

Here you open the file..
: ; openr,unit,infil,/get_lun
: ;*********
: if(cmprss or dorm) then begin
And here you either create a compressed version, or delete the file,
: if(dorm) then filz = 'rm '+infil else filz = 'compress '+infil
: print,filz
: spawn,filz,/sh
: spawn,'df -k /scratch'
: endif
: return
: end
But the lun is not freed until here, when the disk space is finally released.

So what you need I think is to use free_lun,unit before deleteing. It's
not IDL which caught you, but the operating system. Although the file
has been rm'd from your directory tree, it still exists on the filesystem
while it is held open by a program.

Rob.

--
Robert Bunting E-mail: robert@aurora.york.ac.uk
Space Geophysics Group Tel:(+44)1904-432277,Home 414638
Dept of Physics, University of York, Fax:(+44)1904-432214
York YO1 5DD U.K. WWW: http://aurora.york.ac.uk/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Trouble with PICT-32 files
Next Topic: Re: Automatically Compiling IDL

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

Current Time: Wed Oct 08 17:35:19 PDT 2025

Total time taken to generate the page: 0.00572 seconds