Skip to content

parallel test #32

Closed
Closed

Description

@fredRos

Check threading with multivariate proposal

Activity

  1. self-assigned this
    on Aug 24, 2015
  2. added this to the 1.0 milestone on Aug 24, 2015
  3. fredRos commented on Aug 25, 2015

    @fredRos
    ContributorAuthor

    The parallel_TEST reads in the samples from chain. We have to update it to the new format

  4. greenwald commented on Aug 31, 2015

    @greenwald
    Contributor

    Completed. Pull request will be submitted soon. Pending further issues to be addressed in #9

  5. added a commit that references this issue on Aug 31, 2015
    3538cc8
  6. fredRos commented on Aug 31, 2015

    @fredRos
    ContributorAuthor

    Sorry @greenwald, now we did the same work twice. Don't steal my issues 😆

  7. greenwald commented on Aug 31, 2015

    @greenwald
    Contributor

    Didn't realize there was an issue open until after I fixed it. Yours looks nicer anyway.

  8. fredRos commented on Aug 31, 2015

    @fredRos
    ContributorAuthor

    Commit 9923765 fixes the issues. Now both the factorized and the multivariate proposal are tested to yield identical results with 1 and 2 threads. parallel_TEST gives some timing output.

    For 5 parameters, I get

    previous time: 1.17563
    Difference in time taken between serial and parallel: 0.446478
    Time improvement factor: 1.61233
    product proposal> ends
    --
    previous time: 0.37267
    Difference in time taken between serial and parallel: 0.088136
    Time improvement factor: 1.30976
    multivariate proposal> ends
    
    

    30 parameters

    previous time: 6.18534
    Difference in time taken between serial and parallel: 2.15108
    Time improvement factor: 1.5332
    product proposal> ends
    --
    previous time: 1.03169
    Difference in time taken between serial and parallel: 0.337621
    Time improvement factor: 1.48644
    multivariate proposal> ends
    

    35

    previous time: 11.3664
    Difference in time taken between serial and parallel: 3.84182
    Time improvement factor: 1.51057
    product proposal> ends
    --
    previous time: 3.24501
    Difference in time taken between serial and parallel: 0.600265
    Time improvement factor: 1.22697
    multivariate proposal> ends
    

    40 parameters

    previous time: 8.22501
    Difference in time taken between serial and parallel: 2.6779
    Time improvement factor: 1.48276
    product proposal> ends
    --
    previous time: 6.47545
    Difference in time taken between serial and parallel: 1.79449
    Time improvement factor: 1.38336
    multivariate proposal> ends
    
    

    50 parameters

    previous time: 10.7387
    Difference in time taken between serial and parallel: 3.62209
    Time improvement factor: 1.50896
    product proposal> ends
    --
    previous time: 16.9412
    Difference in time taken between serial and parallel: 1.53451
    Time improvement factor: 1.0996
    multivariate proposal> ends
    
    

    and 100 parameters

    previous time: 28.6068
    Difference in time taken between serial and parallel: 4.71195
    Time improvement factor: 1.1972
    product proposal> ends
    --
    previous time: 52.4865
    Difference in time taken between serial and parallel: -2.34735
    Time improvement factor: 0.957192
    multivariate proposal> ends
    

    So the factorized proposal scales almost linearly with dimension as expected. The multivariate is much faster for low to medium number of dimensions but slower in 50D and 100D. Is it for the D^2 scaling of the matrix operations? I'm really surprised it's that bad. Perhaps we can optimize this. What is happening for D=35? Some cache size issue? Both proposal are much slower than for D=30. Perhaps this is worth another issue, the original issue is solved now.
    For a fair comparison, we'd have to measure the effective sample size but from what I saw in the performance test suite, the autocorrelation looked rather similar for both proposal and targets that both can handle well. In parallel_TEST, it's a unit Gaussian, so an easy target

  9. greenwald commented on Aug 31, 2015

    @greenwald
    Contributor

    Right now we use ROOT structures for the matrix algebra. My guess is that this is not the fastest on the market. If we saw a significant improvement with something like Boost (or even CLHEP), we could think to make it a configure option. I'd say something to investigate for 1.1 for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions