-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in Optim pluggin with --with-debug #384
Comments
chez moi, je n'ai pas cette erreur en compilant ibex_LSmear.cpp en mode debug 133/202] Compiling plugins/optim/src/bisector/ibex_LSmear.cpp |
Il doit effectivement y avoir un bug dans LSmear. x in [1,+oo] Voici la trace :
Gilles |
ce probleme chez moi passe sans bug en mode debug (dans la branche que j'avais déposée)
Variables
x in [1,+oo];
minimize x;
constraints
x >=0;
end
../../../__build__/plugins/optim/ibexopt ess.bch
************************ setup ************************
file loaded: ess.bch
output COV file: ess.cov
*******************************************************
running............
optimization successful!
f* in [0.999000000001,1]
(best bound)
x* = (1)
(best feasible point)
relative precision on f*: 0.001 [passed]
absolute precision on f*: 0.001
cpu time used: 0s
number of cells: 0
results written in ess.cov
De: "Gilles Chabert" <notifications@github.com>
À: "ibex-team/ibex-lib" <ibex-lib@noreply.github.com>
Cc: "Neveu" <Bertrand.Neveu@enpc.fr>, "Comment" <comment@noreply.github.com>
Envoyé: Mercredi 5 Juin 2019 10:16:43
Objet: Re: [ibex-team/ibex-lib] Bug in Optim pluggin with --with-debug (#384)
Il doit effectivement y avoir un bug dans LSmear.
Bertrand, c'est peut être un cas extrême auquel vous n'avez pas pensé: le test qui échoue consiste à résoudre:
x in [1,+oo]
minimiser x
sous la contrainte x>=0
Voici la trace :
#3 0x00007ffff7ab0142 in __GI___assert_fail (assertion=0x555555829028 "i>=0 && i<n", file=0x555555829008 "../src/arithmetic/ibex_Vector.h", line=291,
function=0x555555829a60 <ibex::Vector::operator[](int)::__PRETTY_FUNCTION__> "double& ibex::Vector::operator[](int)") at assert.c:101
#4 0x000055555559319e in ibex::Vector::operator[] (this=0x7fffffffd6e0, i=3) at ../src/arithmetic/ibex_Vector.h:291
#5 0x000055555564a9fc in ibex::LSmear::getdual (this=0x555555950c40, J=..., box=..., dual=...) at ../plugins/optim/src/bisector/ibex_LSmear.cpp:91
#6 0x000055555564accd in ibex::LSmear::var_to_bisect (this=0x555555950c40, J=..., box=...) at ../plugins/optim/src/bisector/ibex_LSmear.cpp:121
#7 0x00005555555b4816 in ibex::SmearFunction::choose_var (this=0x555555950c40, cell=...) at ../src/bisector/ibex_SmearFunction.cpp:82
#8 0x000055555559f33c in ibex::Bsc::bisect (this=0x555555950c40, cell=...) at ../src/bisector/ibex_Bsc.h:153
#9 0x000055555559db8c in ibex::Optimizer::optimize (this=0x7fffffffda60) at ../plugins/optim/src/strategy/ibex_Optimizer.cpp:404
#10 0x000055555559d165 in ibex::Optimizer::optimize (this=0x7fffffffda60, init_box=..., obj_init_bound=1e-10) at ../plugins/optim/src/strategy/ibex_Optimizer.cpp:268
Gilles
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub , or mute the thread . [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "#384?email_source=notifications\u0026email_token=AB567I7XFOGRXW4F6EJNYMTPY5Y6VA5CNFSM4HS4XBM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW66SMY#issuecomment-498985267", "url": "#384?email_source=notifications\u0026email_token=AB567I7XFOGRXW4F6EJNYMTPY5Y6VA5CNFSM4HS4XBM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW66SMY#issuecomment-498985267", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
|
Pardon, il faut prendre x in [-oo,+oo]. |
c'est toujours bon avec x in [-oo,+oo] et x>=0
le bug se produit quand il n'y a pas de contraintes.
c'est effectivement un cas que je n'avais pas considéré : minimiser une seule variable sans contrainte.
Variables
x in [-oo,+oo];
minimize x;
il faut donc continuer dans ce cas à prendre en compte l'objectif
patch à faire dans le code de ibex_LSmear.cpp
remplacer dans la fonction
LPSolver::Status_Sol LSmear::getdual(IntervalMatrix& J, const IntervalVector& box, Vector& dual)
le test
else if (goal_to_consider(J,i))
par
else if (goal_to_consider(J,i) || sys.f_ctrs.image_dim()==1 )
et le bug disparait
../../../__build__/plugins/optim/ibexopt ess.bch
running............
possibly unbounded objective (f*=-oo)
f* in [-inf,inf]
(best bound)
x* = --
(no feasible point found)
relative precision on f*: inf
absolute precision on f*: inf
cpu time used: 0s
number of cells: 4
|
Merci pour le patch, je l'ai appliqué mais il ne résout pas notre problème. Mais, bref, peu importe, pour éviter de te faire perdre encore du temps inutilement, j'ai créé le petit bout de code c++ qui, normalement, reproduit le problème:
Peux-tu me dire si tu parviens à le reproduire cette fois? |
J'ai reproduit le bug.
C'est dû aux dernières modifs que j'ai faites dans Lsmear.
Je vais le corriger.
De: "Gilles Chabert" <notifications@github.com>
À: "ibex-team/ibex-lib" <ibex-lib@noreply.github.com>
Cc: "Neveu" <Bertrand.Neveu@enpc.fr>, "Comment" <comment@noreply.github.com>
Envoyé: Mercredi 5 Juin 2019 14:35:12
Objet: Re: [ibex-team/ibex-lib] Bug in Optim pluggin with --with-debug (#384)
Merci pour le patch, je l'ai appliqué mais il ne résout pas notre problème.
Cela dit, tu as raison, j'ai été trop vite car le système est résolu sans problème si on lance une optimisation classique. En fait, dans le test unitaire qui pose problème, l'erreur se produit car on utilise un loup initial.
Mais, bref, peu importe, pour éviter de te faire perdre encore du temps inutilement, j'ai créé le petit bout de code c++ qui, normalement, reproduit le problème:
SystemFactory f;
const ExprSymbol& x=ExprSymbol::new_();
f.add_var(x);
f.add_ctr(x>=0);
f.add_goal(x);
System sys(f);
ExtendedSystem ext_sys(sys);
IntervalVector box(2);
box[0]=Interval::neg_reals();
box[1]=Interval::zero();
LSmear lsmear(ext_sys,0.1);
lsmear.bisect(box);
Peux-tu me dire si tu parviens à le reproduire cette fois?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub , or mute the thread . [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "#384?email_source=notifications\u0026email_token=AB567I5QVH5SHXBIQLCNJCLPY6XIBA5CNFSM4HS4XBM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW7R3WI#issuecomment-499064281", "url": "#384?email_source=notifications\u0026email_token=AB567I5QVH5SHXBIQLCNJCLPY6XIBA5CNFSM4HS4XBM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW7R3WI#issuecomment-499064281", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
|
J'ai corrigé le bug ; Voici la nouvelle version de ibex_LSmear.cpp (je n'arrive pas à attacher le fichier cpp) //============================================================================ #include "ibex_LSmear.h" using std::pair; namespace ibex { LSmear::~LSmear() { LPSolver::Status_Sol LSmear::getdual(IntervalMatrix& J, const IntervalVector& box, Vector& dual) const {
} int LSmear::var_to_bisect(IntervalMatrix& J, const IntervalVector& box) const {
} } /* namespace ibex */ |
Merci Bertrand. |
C'est fait.
git push origin develop2.8
Username for 'https://github.com': bneveu
Password for 'https://bneveu@github.com':
Counting objects: 44, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 971 bytes | 0 bytes/s, done.
Total 7 (delta 5), reused 0 (delta 0)
remote: Resolving deltas: 100% (5/5), completed with 5 local objects.
remote:
remote: Create a pull request for 'develop2.8' on GitHub by visiting:
remote: https://github.com/ibex-team/ibex-lib/pull/new/develop2.8
remote:
To https://github.com/ibex-team/ibex-lib.git
* [new branch] develop2.8 -> develop2.8
De: "Gilles Chabert" <notifications@github.com>
À: "ibex-team/ibex-lib" <ibex-lib@noreply.github.com>
Cc: "Neveu" <Bertrand.Neveu@enpc.fr>, "Comment" <comment@noreply.github.com>
Envoyé: Jeudi 6 Juin 2019 11:59:24
Objet: Re: [ibex-team/ibex-lib] Bug in Optim pluggin with --with-debug (#384)
Merci Bertrand.
Pourquoi ne fais-tu pas un "push" du code (plutôt que de le copier ici)?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub , or mute the thread . [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "#384?email_source=notifications\u0026email_token=AB567I42UL5BVH7YVDBE633PZDNXZA5CNFSM4HS4XBM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXCLNGI#issuecomment-499431065", "url": "#384?email_source=notifications\u0026email_token=AB567I42UL5BVH7YVDBE633PZDNXZA5CNFSM4HS4XBM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXCLNGI#issuecomment-499431065", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
|
J'ai refait le patch de gaol pour supprimer tous les warnings en mode debug |
The text was updated successfully, but these errors were encountered: