[Ipopt] Same input, different output if executed in a loop (c++)
Jonathan Hogg
jonathan.hogg at stfc.ac.uk
Thu Jan 9 08:40:02 EST 2014
Assuming its not down to a bug in the Ipopt code, it could be any number
of factors:
1) Does the BLAS library used support reproducibility, and is this
enabled with the correct link line etc.
2) Does the sparse linear solver support reproducibility, is this enabled?
3) Is the memory alignment of all arrays consistent - can result in
different portions of loops being addressed with AVX vs x87 FP that can
give different answers.
One thing to try might be to recompile everything you can with AVX
(vectorization) disabled to force everything through the x87 path, and
disable any unsafe floating point optimization flags. If this fixes the
problem, at least you have a starting point.
Jonathan.
On 09/01/14 11:16, Roberto Verdelli wrote:
> Hi,
>
> I did some testing and I noticed that it also happens with the
> tutorial problem written on the ipopt website.
>
> My code looks like this:
>
> int main(int argv, char* argc[]){
>
> for(int i = 0; i < 15; i++)
> loop();
>
> }
>
> int loop(){
>
> // Create a new instance of your nlp
> // (use a SmartPtr, not raw)
> SmartPtr<TNLP> mynlp = new hs071_nlp(/*a,b,c,d*/);
>
> // Create a new instance of IpoptApplication
> ...
>
>
> The function called 'loop' contains the tutorial ipopt problem.
> If I lower the tolerance to 1e-3 (which shouldn't be a problem because
> if the algorithm is deterministic two consecutive runs should look the
> same, independently from the tolerance) I get this results:
> iterations
> 1.Objective...............: 1.7014117428683792e-007
> 1.7014117428683793e+001
> 2.Objective...............: 1.7014117428684237e-007
> 1.7014117428684237e+001
> 3.Objective...............: 1.7014117428684237e-007
> 1.7014117428684237e+001
> 4.Objective...............: 1.7014117428684237e-007
> 1.7014117428684237e+001
>
>
> Why the first iteration is different?
>
>
> Kind regards,
> Roberto.
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
--
Scanned by iCritical.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20140109/0063cddb/attachment.html>
More information about the Ipopt
mailing list