E3SM-Project / HOMMEXX

Clone of ACME for CMDV-SE project to convert HOMME to C++
11 stars 0 forks source link

Timers #230

Open ambrad opened 6 years ago

ambrad commented 6 years ago

Timers are not free. I'd like to remove all timers in Fortran and C++ that bookend insubstantial contributions to total time. Objections? @mfdeakin-sandia @bartgol

bartgol commented 6 years ago

Can we remove most of them, and leave the other ones "optional" (via macro)? They still help us identifying which big region of the code (caar, hvf, esf, vr, mpi) has the biggest potential for improvement, no?

ambrad commented 6 years ago

Sounds good. How about htimstart, htimstop (host timer start/stop), and then htimstartd1 for details level 1 (with top-level being 0 and implied in the bare htimstart). The only timers on by default would be the ones that measure big things, like HVF as a whole, ESF as a whole, etc.

bartgol commented 6 years ago

Yes. I think a couple of levels are a great idea. I mostly would like level 0, but sometimes it may be we want to inspect a subkernel, so a level 1 may be needed. If one needs even more, he/she can add a timer in his/her branch, I think.

ambrad commented 6 years ago

We need to differentiate between host and kernel timers b/c of GPU. I'll make a k-prefixed symbol for those.