logo       

Re: MacOS X 10.3.9 build but load-save.m test failure: msg#00064

gnu.octave.bugs

Subject: Re: MacOS X 10.3.9 build but load-save.m test failure

David Bateman wrote:

If you do this

% mv binary.mat binary.mat.gz
% gunzip binary.mat.gz
% octave
octave:1> load binary.mat


On Sparc/Solaris:
[dima@kochia test]$ cp binary.mat test11.mat.gz
[dima@kochia test]$ gunzip test11.mat.gz
[dima@kochia test]$ octave
GNU Octave, version 2.9.2 (sparc-sun-solaris2.8).
....

octave:1> load test11.mat
error: load: trouble reading binary file `test11.mat'
octave:1> whos

*** dynamically linked functions:

Prot Name Size Bytes Class
==== ==== ==== ===== =====
r-- __gnuplot_init__ -1x-1 0 dynamically-linked
function
r-- __gnuplot_set__ -1x-1 0 dynamically-linked
function
r-- dispatch -1x-1 0 dynamically-linked
function
r-- gset -1x-1 0 dynamically-linked
function

Total is 4 elements using 0 bytes

*** local user variables:

Prot Name Size Bytes Class
==== ==== ==== ===== =====
rw- __nargin__ 1x1 8 scalar
rwd a10 2x7 14 string
rwd a11 2x2 4 int8 matrix
rwd a12 2x2 8 int16 matrix
rwd a13 2x2 16 int32 matrix
rwd a14 2x2 32 int64 matrix
rwd a15 2x2 4 uint8 matrix
rwd a16 2x2 8 uint16 matrix
rwd a17 2x2 16 uint32 matrix
rwd a18 2x2 32 uint64 matrix
rwd a2 3x3 72 matrix
rwd a3 1x1 16 complex scalar
rwd a4 3x3 144 complex matrix
rwd a5 1x1 1 bool
rwd a6 1x10 10 bool matrix
rwd a7 1x10 24 range
rwd a8 1x1 24 struct
rwd a9 1x2 24 cell
rwd default_save_format 1x6 6 string

Total is 96 elements using 463 bytes

*** globally visible user variables:

Prot Name Size Bytes Class
==== ==== ==== ===== =====
rwd a1 1x1 8 scalar

Total is 1 element using 8 bytes

octave:2>


what happens? what is the reponse to whos? This will confirm that the problem is particular to the zlib code in the binary load issue? As crash happened at binary.mat, you didn't test the loading of the mat5.mat and mat7.may files.. What does

octave:1> load mat5.mat

That seems to be working:

octave:1> load mat5.mat
octave:2> whos

*** dynamically linked functions:

Prot Name Size Bytes Class
==== ==== ==== ===== =====
r-- __gnuplot_init__ -1x-1 0 dynamically-linked
function
r-- __gnuplot_set__ -1x-1 0 dynamically-linked
function
r-- dispatch -1x-1 0 dynamically-linked
function
r-- gset -1x-1 0 dynamically-linked
function

Total is 4 elements using 0 bytes

*** local user variables:

Prot Name Size Bytes Class
==== ==== ==== ===== =====
rw- __nargin__ 1x1 8 scalar
rwd a10 2x7 14 sq_string
rwd a11 2x2 4 int8 matrix
rwd a12 2x2 8 int16 matrix
rwd a13 2x2 16 int32 matrix
rwd a14 2x2 32 int64 matrix
rwd a15 2x2 4 uint8 matrix
rwd a16 2x2 8 uint16 matrix
rwd a17 2x2 16 uint32 matrix
rwd a18 2x2 32 uint64 matrix
rwd a19 100x100 1604 sparse matrix
rwd a2 3x3 72 matrix
rwd a20 100x100 4384 sparse complex
matrix
rwd a3 1x1 16 complex scalar
rwd a4 3x3 144 complex matrix
rwd a5 1x1 1 bool
rwd a6 1x10 10 bool matrix
rwd a7 1x10 80 matrix
rwd a8 1x1 24 struct
rwd a9 1x2 24 cell
rwd default_save_format 1x6 6 string

Total is 395 elements using 6507 bytes

*** globally visible user variables:

Prot Name Size Bytes Class
==== ==== ==== ===== =====
rwd a1 1x1 8 scalar

Total is 1 element using 8 bytes



and

octave:2> load mat7.mat

That is also looks fine:

octave:1> load mat7.mat
octave:2> whos

*** dynamically linked functions:

Prot Name Size Bytes Class
==== ==== ==== ===== =====
r-- __gnuplot_init__ -1x-1 0 dynamically-linked
function
r-- __gnuplot_set__ -1x-1 0 dynamically-linked
function
r-- dispatch -1x-1 0 dynamically-linked
function
r-- gset -1x-1 0 dynamically-linked
function

Total is 4 elements using 0 bytes

*** local user variables:

Prot Name Size Bytes Class
==== ==== ==== ===== =====
rw- __nargin__ 1x1 8 scalar
rwd a10 2x7 14 sq_string
rwd a11 2x2 4 int8 matrix
rwd a12 2x2 8 int16 matrix
rwd a13 2x2 16 int32 matrix
rwd a14 2x2 32 int64 matrix
rwd a15 2x2 4 uint8 matrix
rwd a16 2x2 8 uint16 matrix
rwd a17 2x2 16 uint32 matrix
rwd a18 2x2 32 uint64 matrix
rwd a19 100x100 1604 sparse matrix
rwd a2 3x3 72 matrix
rwd a20 100x100 4384 sparse complex
matrix
rwd a3 1x1 16 complex scalar
rwd a4 3x3 144 complex matrix
rwd a5 1x1 1 bool
rwd a6 1x10 10 bool matrix
rwd a7 1x10 80 matrix
rwd a8 1x1 24 struct
rwd a9 1x2 24 cell
rwd default_save_format 1x6 6 string

Total is 395 elements using 6507 bytes

*** globally visible user variables:

Prot Name Size Bytes Class
==== ==== ==== ===== =====
rwd a1 1x1 8 scalar

Total is 1 element using 8 bytes



gives. In particular what does "whos" give.

Matlab v7 files are a different issue than the other files. Individual data elements are zipped seperately with a header giving its size. So like you I suspect its an endianness issue in this header. However there are too many variable in this file to effectively debug the problem, so if someone with 2.9.2 on OS X can send me the file produced by

a = eye(10);
save -v7 mat7.mat a


I will do it in a private email.

it would allow me to much more effectively debug the problem...

Regards
David


Dmitri.
--



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise