Skip to content
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

SolveProblem_ExactHessian_NumberOfIterationsLessThanOrEqualToHessianApprox unit test failing in Debug/x86 mode #4

Closed
cureos opened this issue Jan 3, 2012 · 4 comments
Labels
Milestone

Comments

@cureos
Copy link
Collaborator

cureos commented Jan 3, 2012

System.AccessViolationException : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Cureos.Numerics.IpoptAdapter.IpoptSolve(IntPtr ipopt_problem, Double[] x, Double[] g, ref Double obj_val, Double[] mult_g, Double[] mult_x_L, Double[] mult_x_U, IntPtr user_data)
at Cureos.Numerics.IpoptProblem.SolveProblem(Double[] x, ref Double obj_val, Double[] g, Double[] mult_g, Double[] mult_x_L, Double[] mult_x_U) in IpoptProblem.cs: line 574
at Cureos.Numerics.HS040NativeTests.SolveProblem_ExactHessian_NumberOfIterationsLessThanOrEqualToHessianApprox() in HS040NativeTests.cs: line 94
@cureos
Copy link
Collaborator Author

cureos commented Jan 4, 2012

I used the 3.9.2 Ipopt DLL, debug, x86 version.

@cureos
Copy link
Collaborator Author

cureos commented Jan 5, 2012

There might be a problem with the Debug, x86 Ipopt DLL? The above unit test is now succeeding, whereas the SolveProblem_StandardOptions_OptimalObjectiveValueReturned is now instead failing (only in Debug/x86 mode) with the following report:

SolveProblem_StandardOptions_OptimalObjectiveValueReturned : Failed  
Expected: 17.014017299999999d +/- 1.9999999999999999E-07d
But was:  16.109692919198878d
at NUnit.Framework.Assert.That(Object actual, IResolveConstraint expression, String message, Object[] args)
at NUnit.Framework.Assert.AssertDoublesAreEqual(Double expected, Double actual, Double delta, String message, Object[] args)
at NUnit.Framework.Assert.AreEqual(Double expected, Double actual, Double delta)
at Cureos.Numerics.HS071NativeTests.SolveProblem_StandardOptions_OptimalObjectiveValueReturned() in HS071NativeTests.cs: line 64 

@cureos
Copy link
Collaborator Author

cureos commented Jan 5, 2012

Alternatively, the unit test is aborted altogether. The failure only seems to arise when running the unit tests as a suite (concurrency issues)? When running the unit test separately, it passes.

@cureos
Copy link
Collaborator Author

cureos commented Jan 10, 2012

The issue appears to be Ipopt*.DLL dependent. Have tested 3.8.1 DLL:s, and these do not yield any error in any configuration. The 3.9.1 DLL:s also yield no error in any configuration, except that x64/Debug results in C++ runtime error for most tests (interestingly enough not for the HS071 tests...)
Based on this investigation, I am urged to conclude that the issue is within the compilation of the Ipopt DLL:s and not csipopt. I will for now consider this issue completed. The recommendation is to use Release Ipopt DLL:s in production code involving csipopt.

@cureos cureos closed this as completed Jan 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants