[Scilab-users] Problems using save

Matiasb matiasb at gmail.com
Tue Oct 21 18:24:41 CEST 2014


Hi, 

After executing a script that creates a lot of variables and big matrices,
I'm trying to make a backup of what it created. A good option would be to
save all variables to a file, as the  save
<https://help.scilab.org/docs/5.4.1/en_US/save.html>   function allows when
a list of variables is not specified. 
Something like: save('backup.dat')

But when I use this function I found 2 problems:
    1) Very strangely, it opens a graph window with some plots. Screenshot: 
Selection_420.png
<http://mailinglists.scilab.org/file/n4031410/Selection_420.png>  
    2) when there are a lot of variables it takes veeery long, the scilab
process uses 2GB of mem. If there are big matrices the scilab process hangs
completely. 

*For 1)* I tried to track it and I could reproduce with a simple example:
the problem occurs when I define a function that uses some graph function.
For example, creating a test.sce file with the following function:
// test.sce
function []=MyTest()
    xtitle("Testing save");    
endfunction

Then in the console:
  clear; // just to start from scratch
  exec('test.sce', -1);
  save('backup.dat'); // this opens the graph window!

*For 2)*, I'm using stacksize('max') to increase scilab's memory to the
maximum. I checked that saving variables individually (passing their names
to the save function) works fast as expected and scilab does not hang even
when saving big matrices. The problem is that i can not use that solution as
the process creates each time different variables so it is not practical to
name each variable one by one.

Maybe the problem in 2) is related with 1) but its hard for me to run the
process and not define those functions.

Is there a way for me to store all this created variables in a file without
these problems?
Maybe solving 1) will fix it. Maybe there is a way to put all the variables
in an array so that save can take that as a parameter.

Any help would be appreciated!
Thank you very much

Matias

PD: I'm using scilab 5.4.1 in Linux.









--
View this message in context: http://mailinglists.scilab.org/Problems-using-save-tp4031410.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list