[Ipopt] IPOPT takes very long before the first iteration

Uwe Nowak uwe.nowak at itwm.fraunhofer.de
Thu Oct 1 08:16:26 EDT 2009


Hello!

Thank you for the hint with the "print_timing_statistics". Actually most 
of the time is spent in the "InitializeIterates" (between 50% and 90% of 
the total run time, depending on the number of iterations and the 
problem size), most of the rest is spent in the convergence check 
(probably because I do some pretty expensive tracing in the 
intermediate_callback method).

I did not find time to try another linear solver, but I will try 
Paradiso next week an tell you the results.

Thank you very much four your help,

Uwe


Andreas Waechter schrieb:
> Hi Uwe,
> 
> The derivative checker is not run by default, so this cannot be the reason.
> 
> What happens before the first iteration is that Ipopt calls the linear 
> solver (your output tells me that it is MA27) to compute initial values 
> for the multiplers.  here, it first does a "symbolic factorization" (an 
> initialization step that is done once at the beginning but not in 
> further iterations), and depending on your matrix structure, this can 
> take a long time.   Similarly, the factorization itself can take time.  
> (You could switch off the initialization of the multipliers by setting 
> constr_mult_init_max to 0, but that would just postpone the problem to 
> the point where Ipopt has to compute the search direction in the first 
> iteration.)
> 
> To find out what the specific step is that runs so slow you can set the 
> option
> 
> print_timing_statistics yes
> 
> This should show you in more detail, which part of the run takes most of 
> the time.
> 
> In order to fix your problem, you probably want to consider 
> experimenting with a different linear solver (there a bunch of options 
> [see documentation], and Olaf already suggest to use Pardiso, which 
> seems to work very efficiently).  But of course you need to compile 
> Ipopt with such a linear solver.
> 
> Hope this helps,
> 
> Andreas
> 
> 
> 
> On Tue, 29 Sep 2009, Uwe Nowak wrote:
> 
>> Hello!
>>
>> Thank you for your guess. I already deactivated the derivative check.
>> The list of user options is
>>
>>                                     Name   Value                used
>>                           acceptable_tol = 1                     yes
>>                         file_print_level = 6                     yes
>>                    hessian_approximation = limited-memory        yes
>>                                 max_iter = 1000                  yes
>>                                  max_soc = 0                     yes
>>                       nlp_scaling_method = none                  yes
>>                              output_file = ipopt.out             yes
>>                              print_level = 5                     yes
>>                       print_user_options = yes                   yes
>>                                      tol = 1                     yes
>>          watchdog_shortened_iter_trigger = 0                     yes
>>
>> Thank you,
>> Uwe
>>
>>
>> Sebastian Walter schrieb:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> My speculative guess: It's the derivative checker of IPOPT that is 
>>> the resource hog.
>>> Depending on the dimension of your problem, the computation of finite 
>>> differences approximations of gradient and jacobian
>>> can take much longer than the evaluation your implemented  gradient 
>>> and jacobian function.
>>>
>>> The derivative check is performed once before the iteration starts.
>>>
>>>
>>> regards,
>>> Sebastian
>>>
>>>
>>>
>>>
>>> Uwe Nowak schrieb:
>>>> Hello!
>>>>
>>>> I am using IPOPT and really like the solver. But with larger problem
>>>> instances the solver takes very long time before the first iteration.
>>>>
>>>> Below there is the output. After the first line ("This is IPOPT...") 
>>>> the
>>>> solver takes (estimated) 350 CPU seconds.
>>>>
>>>> What does IPOPT do there? Is there a way to speed this part of IPOPT 
>>>> up?
>>>> The Iterations itself are fast enough.
>>>>
>>>> I am using IPOPT to successively solve nonlinear problems that have
>>>> similar, but not equal structure. So I usually expect only few
>>>> iterations to be
>>>> necessary.
>>>>
>>>> Thank you,
>>>> Uwe Nowak
>>>>
>>>>
>>>> ------------------------- OUTPUT ------------------------------
>>>>
>>>>
>>>> This is Ipopt version 3.7.0, running with linear solver ma27.
>>>>
>>>> Number of nonzeros in equality constraint Jacobian...: 196
>>>> Number of nonzeros in inequality constraint Jacobian.: 13624
>>>> Number of nonzeros in Lagrangian Hessian.............: 0
>>>>
>>>> Total number of variables............................: 180
>>>>   variables with only lower bounds: 0
>>>>   variables with lower and upper bounds: 0
>>>>   variables with only upper bounds: 0
>>>> Total number of equality constraints.................: 49
>>>> Total number of inequality constraints...............: 1703
>>>>   inequality constraints with only lower bounds: 1703
>>>>   inequality constraints with lower and upper bounds: 0
>>>>   inequality constraints with only upper bounds: 0
>>>>
>>>> [...]
>>>>
>>>> Number of Iterations....: 15
>>>>
>>>> [...]
>>>>
>>>> Number of objective function evaluations = 18
>>>> Number of objective gradient evaluations = 16
>>>> Number of equality constraint evaluations = 18
>>>> Number of inequality constraint evaluations = 18
>>>> Number of equality constraint Jacobian evaluations = 16
>>>> Number of inequality constraint Jacobian evaluations = 16
>>>> Number of Lagrangian Hessian evaluations = 0
>>>> Total CPU secs in IPOPT (w/o function evaluations) = 392.561
>>>> Total CPU secs in NLP function evaluations = 8.939
>>>>
>>>> EXIT: Optimal Solution Found.
>>>>
>>>> _______________________________________________
>>>> Ipopt mailing list
>>>> Ipopt at list.coin-or.org
>>>> http://list.coin-or.org/mailman/listinfo/ipopt
>>>
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v2.0.4-svn0 (GNU/Linux)
>>> Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
>>>
>>> iD8DBQFKwe4q9PBA5IG0h0ARAqbKAJ0TLmQ338eEUGQCBH78mmRtRypOxgCfaKhl
>>> Om47RZaa6iFbgE7j9RqDlsg=
>>> =CvjV
>>> -----END PGP SIGNATURE-----
>>
>> _______________________________________________
>> Ipopt mailing list
>> Ipopt at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/ipopt
>>
>>



More information about the Ipopt mailing list