panic: Segmentation violation -- stopping myself...
ruya
rmlopes at student.dei.uc.pt
Wed Jun 4 10:27:28 CDT 2008
Hi,
I am new to octave and I am using windows xp platform at the moment. How do
I apply this patch?
Thanks
Ian Nield wrote:
>
> Implementation: GNU Octave v 3.0.0 Windows XP
>
> Error message:
> panic: Segmentation violation -- stopping myself...
> attempting to save variables to `octave-core'...
> save to `octave-core' complete
>
> I offered to held solve this QP problem for a colleague at work.
> Attached is the code and data. Seems to generate the "panic" message
> after about the third main loop through the solver.
>
>
> Does anyone have any suggestions (I admit the code could be a lot tidier!)
>
> Regards,
>
>
> Ian Nield
>
>
>
>
>
>
> load -ascii Eqty.csv
> r = Eqty;
> dc = mean(r);
> [m, n] = size(r)
>
> for icol = 1:n
> for jrow = 1:m
> r(jrow,icol) = r(jrow, icol) - dc(icol);
> endfor
> endfor
>
> cr = cov(r);
> mcr = -1 * cr;
>
> q = zeros(n,1);
> xlower = zeros(n,1);
> xupper = ones(n,1)/10;
> xstart = ones(n,1)/n;
> b = [1];
> A = ones(1,n);
> Ain = A;
>
> W = dc';
>
> ctype = "S";
> vartype = repmat("C", n, 1);
> param.msglev = 2;
>
> # predefining information parameters for qp
> solveiter = 0;
> info = 0;
>
> [xopt, fmin, status, xtra] = glpk(W, A, b, xlower, xupper, ctype, vartype,
> -1, param)
>
> [x, obj, info, lambda] = qp(xstart, cr, q, A, b, xlower, xupper,
> [],Ain,[]);
>
> if ( (solveiter == 200) && (info == 3) )
> xstart = x;
> [x, obj, info, lambda] = qp(xstart, cr, q, A, b, xlower, xupper,
> [],Ain,[]);
> info
> endif
>
> xmin = x;
> xstart = ones(n,1)/n;
>
> [x, obj, info, lambda] = qp(xstart, mcr, q, A, b, xlower, xupper,
> [],Ain,[]);
>
> xstart = x;
>
> [x, obj, info, lambda] = qp(xstart, mcr, q, A, b, xlower, xupper,
> [],Ain,[]);
>
> info
>
> xmax = x;
>
> rmin = sqrt(xmin' * cr * xmin);
> rmax = sqrt(xmax' * cr * xmax);
>
> retmin = dc * xmin
> retmax = fmin
> retrange = linspace(retmin, retmax, 11);
>
> rrange = linspace(rmin, rmax, 10);
> rmat = zeros(n,10);
>
> rmat(:, 1) = xmin;
> rmat(:,10) = xmax;
>
> disp("Running main portfolio loop...")
>
> A = ones(2,n);
> b = ones(2,1);
> A(2,:) = dc';
>
> for icol = 1:11
>
> # q = 0.5*rrange(icol)^2*ones(n,1);
> # A(2,:) = (rrange(icol)^2/n)*ones(1,n)
> b(2,1) = retrange(icol);
> xstart = ones(n,1)/n;
> [x, obj, info, lambda] = qp(xstart, cr, q, A, b, xlower, xupper, [],
> Ain,[]);
>
> if ( (solveiter == 200) && (info =3) )
> xstart = x;
> [x, obj, info, lambda] = qp(xstart, cr, q, A, b, xlower, xupper,
> [],Ain,[]);
> info
> endif
>
> rmat(:, icol) = x;
> save -ascii EqtyRslt.csv rmat rrange retrange dc cr;
>
> disp(icol)
> endfor
>
> rrange = sqrt(12)*rrange;
>
> save -ascii EqtyRslt.csv rmat rrange retrange dc cr;
>
> _______________________________________________
> Bug-octave mailing list
> Bug-octave at octave.org
> https://www.cae.wisc.edu/mailman/listinfo/bug-octave
>
>
--
View this message in context: http://www.nabble.com/panic%3A-Segmentation-violation----stopping-myself...-tp16859691p17649479.html
Sent from the Octave - Bugs mailing list archive at Nabble.com.
More information about the Bug-octave
mailing list