Temp files created by octave

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Temp files created by octave

Juan I. Arribas
My dear colleges


                I have a big problem when using octave 2.0.5. It happens while running
a "small" program which plots some data. This plot is repeated quite a
lot of times, inside a for buckle, and the problem is that it starts
fulling all my /usr/temp folder with 100 Mbs and 100 Mbs of ASCII files
named oct-045100aa ....ab .....ca ...... etc, etc , which I edited and
seems to be the data generated inside my program.

Does anybody know why is this happening? Does anybody know how can I
solve it, because unfortunately, my hard disk is almost collapsed?

Thanks a lot
                                        Juan I.
               


--
Juan Ignacio Arribas               Universidad de Valladolid
Dept. de Teoria de Senal y         47011 Valladolid , SPAIN
Comunicaciones e Ing. Telemat.     tel:34-83-423260, fax:34-83-423261
E.T.S.Ing. de Telecomunicacion     e-mail: [hidden email]


Reply | Threaded
Open this post in threaded view
|

RE: Temp files created by octave

Ted.Harding
On 12-Nov-97 Juan I. Arribas wrote:

> My dear colleges
> I have a big problem when using octave 2.0.5. It happens while running
> a "small" program which plots some data. This plot is repeated quite a
> lot of times, inside a for buckle, and the problem is that it starts
> fulling all my /usr/temp folder with 100 Mbs and 100 Mbs of ASCII files
> named oct-045100aa ....ab .....ca ...... etc, etc , which I edited and
> seems to be the data generated inside my program.
>
> Does anybody know why is this happening? Does anybody know how can I
> solve it, because unfortunately, my hard disk is almost collapsed?
>
> Thanks a lot
>                                       Juan I.

These are temporary files created by octave which hold data which will be
sent to gnuplot. Keeping them there means that the "replot" command works:

*** though (John?) surely one doesn't need to keep them all for this
*** purpose?

However, octave should automatically delete these when you quit octave.
If that doesn't happen, then something is wrong.

You can also, however, delete them from time to time within octave with the
command "purge_tmp_files", though this then means that "replot" will not
work until you have made a new plot from scratch.

If your "for" loop doesn't use "replot", and the plot is created anew each
time round the loop, then it's probably safe to do "purge_tmp_files" each
time (this shouldn't affect things you have "set", such a title, key,
xlabel, ylabel, etc).

Hope this helps,
Ted.

--------------------------------------------------------------------
E-Mail: Ted Harding <[hidden email]>
Date: 12-Nov-97                                       Time: 11:17:30
--------------------------------------------------------------------


Reply | Threaded
Open this post in threaded view
|

RE: Temp files created by octave

John W. Eaton-6
On 12-Nov-1997, Ted Harding <[hidden email]> wrote:

| These are temporary files created by octave which hold data which will be
| sent to gnuplot. Keeping them there means that the "replot" command works:
|
| *** though (John?) surely one doesn't need to keep them all for this
| *** purpose?

| If your "for" loop doesn't use "replot", and the plot is created anew each
| time round the loop, then it's probably safe to do "purge_tmp_files" each
| time (this shouldn't affect things you have "set", such a title, key,
| xlabel, ylabel, etc).

Octave can't delete them automatically because it has no way of
knowing when gnuplot is finished with them, even when there are no
replot commands involved.  The reason for this is that Octave
communicates with gnuplot through a pipe, and depending on the amount
of data and the complexity of the plot (simple x-y, 3d with hidden
lines, etc.) gnuplot may not be finished with the first set of data by
the time Octave executes the next plot command.  For example, on my
system,

  for i = 1:10; plot (rand (10,1)); purge_tmp_files; end

nearly always works and displays a `movie' of random lines, but

  for i = 1:10; plot (rand (1000,1)); purge_tmp_files; end

I typically see 2-3 failures.

I think gnuplot 3.6 allows data to be included directly with the plot
commands, so this problem can probably be avoided in future releases,
but I have not had time to fix it yet, and no one else has contributed
patches.

jwe