scilab 5.5.2 Mac OS X 10.10 (Yosemite) crash using bvode
Reported by carles
mac_error_bvode.txt (121.62 KB, text/plain)
mac error report
BUG DESCRIPTION:
----------------
running bvode or bvodeS scilab 5.5.1 and 5.5.2 Mac OS X 10.10 under Yosemite crash and close Scilab. Hardware: Mac Book Pro.
ERROR LOG:
----------
attached is the Mac error report
HOW TO REPRODUCE THE BUG:
-------------------------
for example, running de first example for bvode in Scilab help. I have tried other scripts and the behaviour of Scilab is always the same when using bvode or bvodeS, it crashes.
script from Scilab help:
N=1;// just one differential equation
m=4;//a fourth order differential equation
M=sum(m);
x_low=1;
x_up=2; // the x limits
zeta=[x_low,x_low,x_up,x_up]; //two constraints (on the value of u and its second derivative) on each bound.
//The external functions
//These functions are called by the solver with zu=[u(x);u'(x);u''(x);u'''(x)]
// - The function which computes the right hand side of the differential equation
function f=fsub(x, zu)
f=(1-6*x^2*zu(4)-6*x*zu(3))/x^3
endfunction
// - The function which computes the derivative of fsub with respect to zu
function df=dfsub(x, zu)
df=[0,0,-6/x^2,-6/x]
endfunction
// - The function which computes the ith constraint for a given i
function g=gsub(i, zu),
select i
case 1 then //x=zeta(1)=1
g=zu(1) //u(1)=0
case 2 then //x=zeta(2)=1
g=zu(3) //u''(1)=0
case 3 then //x=zeta(3)=2
g=zu(1) //u(2)=0
case 4 then //x=zeta(4)=2
g=zu(3) //u''(2)=0
end
endfunction
// - The function which computes the derivative of gsub with respect to z
function dg=dgsub(i, z)
select i
case 1 then //x=zeta(1)=1
dg=[1,0,0,0]
case 2 then //x=zeta(2)=1
dg=[0,0,1,0]
case 3 then //x=zeta(3)=2
dg=[1,0,0,0]
case 4 then //x=zeta(4)=2
dg=[0,0,1,0]
end
endfunction
// - The function which computes the initial guess, unused here
function [zu, mpar]=guess(x)
zu=0;
mpar=0;
endfunction
//define the function which computes the exact value of u for a given x ( for testing purposes)
function zu=trusol(x)
zu=0*ones(4,1)
zu(1) = 0.25*(10*log(2)-3)*(1-x) + 0.5 *( 1/x + (3+x)*log(x) - x)
zu(2) = -0.25*(10*log(2)-3) + 0.5 *(-1/x^2 + (3+x)/x + log(x) - 1)
zu(3) = 0.5*( 2/x^3 + 1/x - 3/x^2)
zu(4) = 0.5*(-6/x^4 - 1/x/x + 6/x^3)
endfunction
fixpnt=[ ];//All boundary conditions are located at x_low and x_up
// nonlin collpnt n ntol ndimf ndimi iprint iread iguess rstart nfxpnt
ipar=[0 0 1 2 2000 200 1 0 0 0 0 ]
ltol=[1,3];//set tolerance control on zu(1) and zu(3)
tol=[1.e-11,1.e-11];//set tolerance values for these two controls
xpoints=x_low:0.01:x_up;
zu=bvode(xpoints,N,m,x_low,x_up,zeta,ipar,ltol,tol,fixpnt,...
fsub,dfsub,gsub,dgsub,guess)
//check the constraints
zu([1,3],[1 $]) //should be zero
plot(xpoints,zu(1,:)) // the evolution of the solution u
zu1=[];
for x=xpoints
zu1=[zu1,trusol(x)];
end;
norm(zu-zu1)
OTHER INFORMATION:
------------------