oseledets / TT-Toolbox

The git repository for the TT-Toolbox
Other
193 stars 73 forks source link

Error calling tt_gmres #63

Open nicolacavallini opened 1 year ago

nicolacavallini commented 1 year ago

Dears,

the following adaptation of test_amen_laplace.m triggers this error.

error: 'fcnchk' undefined near line 17, column 18
error: called from
    tt_iterchk at line 17 column 16
    tt_gmres at line 29 column 22
    test_amen_laplace at line 31 column 20

apparently you missed to include a function in the github repo.

thanks a lot, N

% Run file to produce the Poisson experiment from the paper
%   S. Dolgov, D. Savostyanov,
%   "Alternating minimal energy methods for linear systems in higher
%   dimensions"

d = 16;
L = 6;

%!!! Last run: on dx360-11, E5-2670 0 @ 2.60GHz  !!!!!!!

tol = 1e-6;
nswp = 5;
kickrank = 4;

tol_gmres = 1e-3; % I would not set anything lower

% Matrix, RHS
A = tt_qlaplace_dd(L*ones(1,d))*(2^L+1)^2;
A = tt_reshape(A, 2^L*ones(d,2)); 
f = tt_ones(2^L, d);

% Reference solution

[U_gmres,td_gmres] = tt_gmres(core(A), core(f), tol_gmres, 4, 15, tol_gmres, tol_gmres, [], [], [], [], 3);
dolgov commented 1 year ago

Hello, this looks like a broken Matlab installation. fcnchk is a part of Matlab's funfun, not TT-Toolbox. On my laptop, for example, it's stored in /home/dc/ml22binst/toolbox/matlab/funfun/fcnchk.m Best, Sergey.

nicolacavallini commented 1 year ago

Thanks a lot for the reply,

my bad I was trying to use TT-Toolbox in octave and fcnchk is not available.

It's a bit of a pity to be so dependent on matlab licensing, do you plan to support octave in the future?

thanks alot, Nicola