Disk space eaten up

View: New views
5 Messages — Rating Filter:   Alert me  

Disk space eaten up

by vej :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello!

I'm not sure if this is a bug since it only occurs when I kill the Octave process but I'd appreciate your help in this matter. If anyone tells me it's a bug then I apologise and I'll post in the bug section.

I have two simple scripts. One performs a simple monte carlo integration with N random numbers, and the other sends in values of N into the first and plots a graph (value on integral vs N) to show that precision is improved for larger N values.

I first set up my scripts to plot around 10000 different points which took such a long time I decided to kill the process and start again with fewer points. The second time I did it (with fewer points) it stalled halfway leaving me with no option but to kill Octave this time as well. It turned out that it stalled because of a lack of diskspace. Octave had been taking up disk space which it normally gave back to me when I quit, but since the Octave process was killed on both occasions it didn't. I now have 1.5Gb missing somewhere on my hard drive.

Shouldn't Octave delete any temp files when it is restarted?

I've looked for my 1.5Gb in /tmp, every directory and sub-directory with 'octave' in the name and in my home folder with no luck. I have also tried the usual reboot of my computer and restarting Octave.

Anyone know where the diskspace is being eaten up?

I really appreciate your time reading this.

Thanks in advance.

Sam

ps. Useful information:

Octave version 2.9.9 (i686-redhat-linux-gnu)
OS: Fedora 7

Here are my scripts:

vectorMC.m
function MCint = vectorMC(N)
x=rand(1,N+1);
y=e.^x;
yMC=(e^1)*rand(1,N+1);
check=(yMC<=y);
Ninside=sum(check);
MCint=(e^1)*Ninside/N;
end


p1mccon.m
for i=100:10:5000;
x=i;
y=vectorMC(i);
plot(x,y,'o')
hold on
end
grid on
plot([0 5000],[(e^1-1) (e^1-1)])
xlabel('The total number of random points')
ylabel('Value of integral')

Re: Disk space eaten up

by Dmitri A. Sergatskov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Feb 2, 2008 5:54 AM, vej <samwedge@...> wrote:

>  Shouldn't Octave delete any temp files when it is restarted?

No. It relies on OS to clean up mess in /tmp (eventually)
>
>  I've looked for my 1.5Gb in /tmp, every directory and sub-directory with
> 'octave' in the name and in my home folder with no luck.

I think the file names are oct-...

> I have also tried
> the usual reboot of my computer and restarting Octave.
>

This is a pernicious habit...

>  Anyone know where the diskspace is being eaten up?
>

You can try to get octave-3 rpm from fedora-development.
It does work on Fedora 8, but I am not sure about Fedora 7.
Octave-3.0 uses pipes rather than tmp files, should work
better and faster for the cases like yours.

>  I really appreciate your time reading this.
>
>  Thanks in advance.
>
>  Sam
>
>

Regards,

Dmitri.
--
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: Disk space eaten up

by Francesco Potortì :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>Shouldn't Octave delete any temp files when it is restarted?

Have you tried, at the Octave prompt
 purge_tmp_files

if you are sing Octave 2.1.  Or else, upgrade to Octave 3?
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: Disk space eaten up

by Przemek Klosowski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I had this problem once: I had a long-running optimization problem
where I wanted to see the solution evolving and plotted a bunch of
data every iteration. It created several hundred thousand files in
/tmp; everything on the system that even tried to look at contents of
/tmp would hang for minutes; just deleting those files took several hours.

The tempfile situation is changing, because most temp files were
created for Gnuplot, and the plotting method is changing to piping
data and eventually completely away from Gnuplot. Still, for large
plotting tasks it's probably wise to do system('rm /tmp/oct*') periodically.
This seems a little crude---can anyone think of a better way?
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: Disk space eaten up

by Francesco Potortì :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>I had this problem once: I had a long-running optimization problem
>where I wanted to see the solution evolving and plotted a bunch of
>data every iteration. It created several hundred thousand files in
>/tmp; everything on the system that even tried to look at contents of
>/tmp would hang for minutes; just deleting those files took several hours.

You can issue
  purge_tmp_files
at the Octave 2.1 prompt to get rid of those.

>The tempfile situation is changing, because most temp files were
>created for Gnuplot, and the plotting method is changing to piping
>data and eventually completely away from Gnuplot. Still, for large
>plotting tasks it's probably wise to do system('rm /tmp/oct*') periodically.

In Octave 3 there should be no need to do that.  Am I wrong?

--
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: Potorti@...
Web: http://fly.isti.cnr.it/           Key:   fly.isti.cnr.it/public.key
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave