[Ipopt-tickets] [Ipopt] #299: Profiling code slows runtime (CpuTime getrusage)
Ipopt
coin-trac at coin-or.org
Wed Feb 28 15:13:17 EST 2018
#299: Profiling code slows runtime (CpuTime getrusage)
------------------------------------------------+------------------------
Reporter: bdavis | Owner: ipopt-team
Type: enhancement | Status: new
Priority: normal | Component: Ipopt
Version: 3.12 | Severity: normal
Keywords: getrusage CpuTime runtime profiling |
------------------------------------------------+------------------------
I am running Ipopt on MacOS Sierra built with clang. I am using the Matlab
Interface on 2017a.
My problem order is low (2 variables, no constraints), but I need to run
many times with different input.
I ran a profile with Instruments and found that a large amount of time was
spent in the getrusage system call. This happens in IpUtils.cpp CpuTime()
and SysTime().
My hack solution (attached) was to add a compiler define around this to
bypass the calling of getrusage and simply return zero for the profile
times. This improved my runtime by about 33%.
I wish there was a more elegant solution to this (an option?) that could
be configured at runtime.
--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/299>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.
More information about the Ipopt-tickets
mailing list