Cleans leak from unfreed wallcycle at end of mdrunner
Change-Id: I18c9a4eb961c1480230dda98c02f75e3796aa3b4
pmedata,
EI_DYNAMICS(inputrec->eI) && !isMultiSim(ms));
+ // clean up cycle counter
+ wallcycle_destroy(wcycle);
+
// Free PME data
if (pmedata)
{
return wc;
}
-/* TODO: Should be called from finish_run() or runner()
- void wallcycle_destroy(gmx_wallcycle_t wc)
- {
+void wallcycle_destroy(gmx_wallcycle_t wc)
+{
if (wc == nullptr)
{
return;
sfree(wc->wcsc);
}
sfree(wc);
- }
- */
+}
static void wallcycle_all_start(gmx_wallcycle_t wc, int ewc, gmx_cycles_t cycle)
{
* Returns NULL when cycle counting is not supported.
*/
+/* cleans up wallcycle structure */
+void wallcycle_destroy(gmx_wallcycle_t wc);
+
void wallcycle_start(gmx_wallcycle_t wc, int ewc);
/* Starts the cycle counter (and increases the call count) */