Opened 14 months ago

Closed 3 months ago

#299 closed enhancement (migrated)

Profiling code slows runtime (CpuTime getrusage)

Reported by: bdavis Owned by: ipopt-team
Priority: normal Component: Ipopt
Version: 3.12 Severity: normal
Keywords: getrusage CpuTime runtime profiling Cc:


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.

Change History (2)

comment:1 Changed 14 months ago by bdavis

I was unable to attach my file as it was flagged as spam :-(

comment:2 Changed 3 months ago by stefan

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

This ticket has been migrated to GitHub and will be followed up there:

Note: See TracTickets for help on using tickets.