Skip to content

a potential bug in numpy multivariate_normal  #8185

Closed

Description

@1a1a11a

See here: http://stackoverflow.com/questions/40100340/numpy-multivariate-normal-bug-when-dimension-too-high.

Here is the test code:
p = 5000
cov_true = np.eye(p)
mean_true = np.zeros(p)
beta_true = multivariate_normal(mean_true, cov_true, size=1).T

Firstly, the last line takes great amount of time, second it doesn't make too much difference when I run it on 48 core machine and 4 core machine while it eats all cores(48 and 4 in each case). I guess it might be a bug?

Activity

  1. 1a1a11a commented on Oct 20, 2016

    @1a1a11a
    Author

    testing environment, python3.4, python3.5, python2.7 with numpy 1.11.0.

  2. pv commented on Oct 20, 2016

    @pv
    Member
  3. 1a1a11a commented on Oct 20, 2016

    @1a1a11a
    Author

    can I upgrade Openblas?

  4. juliantaylor commented on Oct 20, 2016

    @juliantaylor
    Contributor

    probably the actual work to do per threads is to small with dimensions of 5000 and 48 cores, so openblas is just burning cpu cycles running sched_yield in all threads, that is a function you should never be using on linux but unfortunately openblas does.
    Thats why you get no speedup with more cores, you are probably lucky that it does not get slower
    There isn't really much numpy can do about this.

  5. seberg commented on Nov 19, 2022

    @seberg
    Member

    The openblas issue (where this belongs anyway) is closed, so closing this one as well.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions