oseledets/TT-Toolbox

fmex doesn't compile

Closed this issue · 2 comments

I tried to use TT-Toolbox with tt-fort library but it doesn't compile.

I downloaded tt-fort to fmex/tt-fort and added Makefile.cpu to it with the following line:
CPU = i8-gnu
I also added Makefile.cpu to the fmex folder with the following content:
CPU = default

Finally I run 'make' from the fmex folder. tt-fort compiled correctly, but matlab bindings didn't:

 fort_mvk4_mex.F90:142.18:

 call tt_mvk4(d,n,m,rx,ra,crA,crX,crY,ry,eps,rmax,nswp=nswp,kickrank=kickra
              1
 Error: Type mismatch in argument 'd' at (1); passed INTEGER(4) to INTEGER(8)

mex: compile of ' "fort_mvk4_mex.F90"' failed.

 Error using mex (line 206)
 Unable to complete successfully.

I'm using
64 bit Ubuntu 13.10, 3.11.0-18-generic
64 bit Matlab R2013a
gcc version 4.8.1

It appeared that 4-byte ints were used in the "default" preset.
The 64 bit MATLAB uses 4-byte ints.

Makefile.in changed, please pull

On Mon, Mar 24, 2014 at 2:07 PM, Bihaqo notifications@github.com wrote:

I tried to use TT-Toolbox with tt-fort library but it doesn't compile.

I downloaded tt-fort to fmex/tt-fort and added Makefile.cpu to it with the
following line:
CPU = i8-gnu
I also added Makefile.cpu to the fmex folder with the following content:
CPU = default

Finally I run 'make' from the fmex folder. tt-fort compiled correctly, but
matlab bindings didn't:

fort_mvk4_mex.F90:142.18:

call tt_mvk4(d,n,m,rx,ra,crA,crX,crY,ry,eps,rmax,nswp=nswp,kickrank=kickra
1
Error: Type mismatch in argument 'd' at (1); passed INTEGER(4) to INTEGER(8)

mex: compile of ' "fort_mvk4_mex.F90"' failed.

Error using mex (line 206)
Unable to complete successfully.

I'm using
64 bit Ubuntu 13.10, 3.11.0-18-generic
64 bit Matlab R2013a
gcc version 4.8.1

Reply to this email directly or view it on GitHubhttps://github.com//issues/13
.

It works, thank you.