[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63412] Octave Optim not working with parallel
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #63412] Octave Optim not working with parallel package |
Date: |
Thu, 24 Nov 2022 06:29:45 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?63412>
Summary: Octave Optim not working with parallel package
Project: GNU Octave
Submitter: None
Submitted: Thu 24 Nov 2022 11:29:43 AM UTC
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name: Oliver
Originator Email: savannah-gnu@oss-wald.de
Open/Closed: Open
Release: 6.2.0
Discussion Lock: Any
Operating System: Microsoft Windows
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 24 Nov 2022 11:29:43 AM UTC By: Anonymous
Hello,
I installed the optim and the parallel package to perform a nonlin_curvefit
much faster. Even if for the example below, the parallel optimization is
defintely not needed, I wish to have it for my data and refeinement function.
Using
options.parallel_local = false;
all works fine and the result is as expected.
For
options.parallel_local = true;
an error occurs:
>> could not save variable.
could not save variable.
could not save variable.
could not save variable.
could not save variable.
could not save variable.
errorerror: octave_base_value::load_binary(): wrong type argument 'cs-list'
>> : octave_base_value::save_binary(): wrong type argument 'cs-list'
error: octave_base_value::save_binary(): wrong type argument 'cs-list'
error: oeerror: octave_base_value::save_binary(): wrong type argument
'cs-list'
ctave_base_value::save_binary(): wrong type argument 'cs-list'rrorerror:
octave_base_value::save_binary(): wrong type argument 'cs-list'
: octave_base_value::save_binary(): wrong type argument 'cs-list'
Here is the full script:
#Theoretical values
a = 5;
b = 4;
c = 3;
#Start values for refinement
m = 1;
n = 1;
o = 1;
#Lower and upper bounds
lb = [0; 0; 0];
ub = [10; 10; 10];
#Noice Level
s = 0.0;
#Load optim package
pkg load optim;
#Load optim package
pkg load parallel;
x=-100:100;
for i = 1:length(x)
yTemp = a*x(i)^3 + b*x(i)^2 + c*x(i);
y(i) = s*randn(1)*yTemp+yTemp;
endfor
x = x;
y = y;
options.parallel_local = true;
fun = @ (p, x) p(1)*x.^3 + p(2)*x.^2 + p(3)*x;
paramn = [m; n; o];
[param, f, cvg, outp] = nonlin_curvefit(fun, paramn, x, y, options);
a = a
b = b
c = c
aRes = param(1)
bRes = param(2)
cRes = param(3)
for i = 1:length(x)
yRes(i) = aRes*x(i)^3 + bRes*x(i)^2 + cRes*x(i);
endfor
plot(x, y, ".k;Data points;", "markersize", 10, x, yRes, "r;Result;",
"LineWidth", 3);
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 24 Nov 2022 11:29:43 AM UTC Name: Parallel-Test.m Size: 854B By:
None
<http://savannah.gnu.org/bugs/download.php?file_id=54003>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63412>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #63412] Octave Optim not working with parallel package,
anonymous <=