Opened 10 years ago

Closed 6 years ago

#86 closed enhancement (fixed)

access to timing statistics after nlp solve

Reported by: stefan Owned by: ipopt-team
Priority: normal Component: Ipopt
Version: 3.5 Severity: normal
Keywords: Cc:

Description

Hi,

I would like to access timing statistics that Ipopt collects during a NLP solve. While I can access the TimingStats() via the IpoptData object passed to TNLP::finalize(), I do not see a way to get the timing for function evaluations (without changing the Ipopt code).
It would be great if all timing data (those for ipopt internal routines and those for function evaluation) could be included into the SolveStatistics that one can retrieve from an IpoptApplication object after the solve is finished.

Thank you very much :-),
Stefan

Change History (1)

comment:1 Changed 6 years ago by stefan

  • Resolution set to fixed
  • Status changed from new to closed

With r2160, the TimedTask objects in an OrigIpoptNLP are now available.

To use them in TNLP::finalize(), you need to cast the IpoptNLP that is passed with IpoptCalculatedQuantities to an OrigIpoptNLP.

For example:

  OrigIpoptNLP* orignlp = NULL;
  if( ip_cq != NULL )
    orignlp = dynamic_cast<OrigIpoptNLP*>(GetRawPtr(ip_cq->GetIpoptNLP()));
  if( orignlp != NULL )
    printf("grad f eval time: %.20g\n", orignlp->grad_f_eval_time().TotalCpuTime());
Note: See TracTickets for help on using tickets.