add CcdCallBacksReset() to header file (or improve callback frequency)
Trying to poll the GPU every 0.1ms I get much lower frequency when the PE is busy. The expedient solution is to add a call to CcdCallBacksReset() immediately before every call to CcdCallFnAfter(). This resets the message skip count, which CcdCallBacks() tunes to 5ms, and instead typically checks the callback after every entry point.
I currently provide a CcdCallBacksReset() prototype in the NAMD source code, but it would be better to expose this function in a Charm++ header file, or call it automatically inside CcdCallFnAfter(). It would also help if CcdCallBacks() tuned nSkip to the shortest registered callback interval rather than a fixed 5ms.
#8 Updated by Michael Robson 11 months ago
Discussed with Ronak and Eric B. Decided to expose a timing knob to user (instead of the reset header). The semantics of calling CcdCallbackReset in user code is unclear. In the future we could automatically call CcdCallbackReset or have a new combined function, if this was requested. Additionally, I'm updating the documentation to both a) explicitly state the default polling resolution (5ms) and b) how to decrease this number. We decided that toggling resolution up and down should be sufficient for this use case. We also decided against automatically invoking CcdCallbackReset inside of CcdCallFnAfter because it might have bad hidden side effects ie increased time spent polling when not obvious/explicitly asked for. We couldn't agree on the best way to have an immediate/reset function. If, in the future, we want a one-time fast(er) function this can be implemented, which isn't the case here.
#9 Updated by Michael Robson 11 months ago
- Status changed from In Progress to Implemented