[Os-project-managers] NaN in xs:double (OSrL)

Kipp Martin kmartin at chicagobooth.edu
Sat Feb 5 23:59:48 EST 2011


Hi Gus:

> 
> I`m from Missouri, sometimes, and I am a firm believer in KISS (the 
> principle, not the rock band :^) ), so I tried the following:

Ah yes, KISS. Prior to this email I fortunately had forgotten this truly 
pathetic, miserable excuse for a band. I would not even classify KISS as 
a rock band. I would classify KISS as random, loud, noise makers. I am 
certain Natasha howling at the moon is far more pleasant to the ears. I 
will not even comment on their appearance.

Now to the business at hand.

The problem with our code is that for your problem instance

SparseHessianMatrix *sparseHessian = 
osinstance->getLagrangianHessianSparsityPattern();

returns NULL, which indeed it should. Then in line 120 when we hit

nnz_h_lag = sparseHessian->hessDimension;

and get the segfault you discovered since we have a NULL object. I have 
replaced

nnz_h_lag = sparseHessian->hessDimension;

with

if(sparseHessian != NULL){
    nnz_h_lag = sparseHessian->hessDimension;
}else{
	nnz_h_lag = 0;
}


When I run your test problem I get the OSoL snippet below, which I think 
is reasonable.


I have added this example to data/osilFiles as nanTest.osil. I think it 
is a nice example. This is a good catch on your part. I added it to 
configure.ac, reran BuildTools and committed.


Cheers


%%%%%%%%%%%%%%%%%%%%%%%%%

<optimization numberOfSolutions="1" numberOfVariables="2" 
numberOfConstraints="0" numberOfObjectives="1">
<solution targetObjectiveIdx="-1">
<status type="error" description="INVALID_NUMBER_DETECTED[IPOPT]: 
Algorithm received an invalid number (such as NaN or Inf) from the NLP; 
see also option check_derivatives_for_naninf.">
</status>

%%%%%%%%%%%%%%%%%%%%%%%


> 
> <nonlinearExpressions numberOfNonlinearExpressions="1">
>     <nl idx="-1">
>         <divide>
>             <number type="real" value="1.0 "/>
>             <number type="real" value="0.0 "/>
>         </divide>
>     </nl   >
> </nonlinearExpressions>
> 
> Here is the output:
> 
> ./OSSolverService -osil ../OS/data/osilFiles/NaNTest.osil -solver ipopt
> 
> Optimization Services Solver
> Main Authors: Horand Gassmann, Jun Ma, and Kipp Martin
> Distributed under the Eclipse Public License
> OS Version: trunk
> Build Date: Feb  1 2011
> SVN Version: 4041
> 
> 
> ****************************************************************************** 
> 
> This program contains Ipopt, a library for large-scale nonlinear 
> optimization.
>  Ipopt is released as open source code under the Eclipse Public License 
> (EPL).
>          For more information visit http://projects.coin-or.org/Ipopt
> ****************************************************************************** 
> 
> 
> NOTE: You are using Ipopt by default with the MUMPS linear solver.
>       Other linear solvers might be more efficient (see Ipopt 
> documentation).
> 
> Segmentation fault
> 
> 
> Haven't figured out yet where this comes from, but we obviously manage 
> to start Ipopt before it bombs. Is this something for Andreas?
> 
> Cheers
> 
> gus
> 
> 
> 
> 


-- 
Kipp Martin
Professor of Operations Research
and Computing Technology
Booth School of Business
University of Chicago
5807 South Woodlawn Avenue
Chicago, IL 60637
773-702-7456
kmartin at chicagobooth.edu
http://www.chicagobooth.edu/faculty/bio.aspx?person_id=12825325568
http://projects.coin-or.org/OS



More information about the Os-project-managers mailing list