Event callback slightly different per report#875
Conversation
…late in each event
|
still issues when launching with libsonata-report master |
| #endif | ||
| send(t + dt, nc, nt); | ||
| // Deterministic event time per report to avoid deadlocks | ||
| send(t + dt + report_t_shift_, nc, nt); |
There was a problem hiding this comment.
I guess that's the only way to do it without changing the API of reportinglib? it's a bit ugly that we need to add this artificial 1e-6*report_idx to fix the order.
pramodk
left a comment
There was a problem hiding this comment.
Some minor comments otherwise LGTM
| // extra new line: skip | ||
| report_conf.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); | ||
| } | ||
| report.report_index = report.format == "SONATA" ? i : 0; |
There was a problem hiding this comment.
| report.report_index = report.format == "SONATA" ? i : 0; | |
| report.report_index = i; |
I think we don't need to have this specialised for sonata only?
There was a problem hiding this comment.
This was causing differences in the binary reports in the CI.
There was a problem hiding this comment.
Hmm ok!
How many such reports are different? the new logic of "determinist ordering" of report recording seems cleaner right? In that case, I wonder if we should just change the report files.
| , report_dt(report_dt) | ||
| , vars_to_report(filtered_gids) { | ||
| , vars_to_report(filtered_gids) | ||
| , report_t_shift_(1e-6 * report_index) { |
There was a problem hiding this comment.
just to avoid hardcoded factor - what if we replace 1e-6 with dt/1e-3? i.e. whatever will be the value of dt in the future, we can always have this factor 1e3 times lower.
Description
Enforce deterministic report events