Skip to content

Conversation

@jarsi
Copy link
Contributor

@jarsi jarsi commented Jun 9, 2021

This PR adds timer functionality to NEST 2.14.1. The usage and functionality is similar to what is implemented in PR #1778 and addresses the issues raised in #1471.

These timers are implemented:

  • time_gather_spike_data
  • time_simulate (basic timer, always enabled)
    • nested in time_simulate:
      • time_update
      • time_gather_spike_data
        • nested in time_gather_spike_data:
          • time_collocate_spike_data
          • time_communicate_spike_data
          • time_deliver_spike_data

In contrast to PR #1778, these timers are not implemented due to the infrastructure change:

  • time_communicate_prepare (basic timer, always enabled)
    • nested in time_communicate_prepare:
      • time_gather_target_data
        • nested in time_gather_target_data:
          • time_communicate_target_data

I am not too familiar with the construction phases. Furthermore the order of collocate, communicate and delivery is different and I am not sure how this influences the time_gather_spike_data. So besides the normal review process, I'd ask specifically for input for these parts:

  • time_construction_create (basic timer, always enabled)
  • time_construction_connect (basic timer, always enabled)
  • time_gather_spike_data

@terhorstd terhorstd added I: User Interface Users may need to change their code due to changes in function calls S: Normal Handle this with default priority T: Enhancement New functionality, model or documentation labels Jun 9, 2021
@terhorstd terhorstd added this to the NEST 2.14.1 milestone Jun 9, 2021
@terhorstd terhorstd requested a review from ackurth June 10, 2021 08:08
@jarsi
Copy link
Contributor Author

jarsi commented Jun 11, 2021

Could one of you, @stinebuu or @hakonsbm, look at the use of time_construction_create and time_construction_connect? I could imagine these timers need some correction.

@jakobj, could you check whether time_gather_spike_data is implemented correctly?

@terhorstd terhorstd requested review from hakonsbm and jougs June 14, 2021 12:06
Copy link
Contributor

@hakonsbm hakonsbm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The time_construction_create timer looks fine.

For time_construction_connect there should be timers in the ConnectLayer function in topologymodule.cpp to get connection-times for spatial connections.

There should also be timers for DataConnect. Note that there are two high-level functions for DataConnect in nestmodule.cpp.

And see below for some other comments.

@jarsi
Copy link
Contributor Author

jarsi commented Jun 16, 2021

Thanks for the review @hakonsbm. I added and changed the functionality as you suggested. Could you have a look again?

Copy link
Contributor

@hakonsbm hakonsbm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good to me now.

@ackurth
Copy link
Contributor

ackurth commented Jun 16, 2021

I ran some microcircuit benchmarks (10 s of model time) comparing the older custom version of the timers with the one from the PR for the time spent in the different phases during simulate.
Attached you find the data, all times are in seconds.
I looked at both installations with and without MPI support.
There seems to be a (reproducible - checked it multiple times) drop in performance using the new timers in both cases. Also the tripling in the communicate time might be noteworthy.
Otherwise, there seems to be a rather good agreement.

Benchmark sim time update time collocate time communicate time deliver time
old timers, mpi=ON 7.99 3.13 0.24 0.30 3.34
old timers, mpi=OFF 8.45 3.87 0.63 0.03 3.54
new timers, mpi=ON 8.43 2.78 0.2 0.92 3.49
new timers, mpi=OFF 9.44 3.51 0.57 0.01 3.51

@jarsi
Copy link
Contributor Author

jarsi commented Jun 17, 2021

Thanks for you measurements. The difference in communication time is due to a now missing synchronization point. Previously this synchronization was not measured and excluded from the communication time. Now it's implicitly contained in the call to communicate.

Screenshot from 2021-06-17 10-55-28

Copy link
Contributor

@jougs jougs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ackurth: could you please indicate if @jarsi's last reply settles your concerns? Thanks!

@jougs
Copy link
Contributor

jougs commented Jul 21, 2021

Many thanks to everyone!

@terhorstd: let me know when you're in the mood for a release 🐱

@jougs jougs merged commit 40af368 into nest:2.14.1-develop Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I: User Interface Users may need to change their code due to changes in function calls S: Normal Handle this with default priority T: Enhancement New functionality, model or documentation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants