Giter Club home page Giter Club logo

Comments (15)

ahoarau avatar ahoarau commented on July 28, 2024 1

Then you can try to surround the solve() call with

Eigen::internal::set_is_malloc_allowed(false);
solver->solver();
Eigen::internal::set_is_malloc_allowed(true);

NOTE: Don't forget to compile in Debug with EIGEN_RUNTIME_NO_MALLOC defined somewhere.

from proxsuite.

fennel-labs avatar fennel-labs commented on July 28, 2024 1

I tried with 3.4.0, allocations still happen. Here is the corresponding call graph:

callgraph_Eigen3 4 0

@fabinsch You can find all relevant function names with allocations in the figure.

from proxsuite.

ahoarau avatar ahoarau commented on July 28, 2024

Seems to be eigen stuff. It has the nice Eigen::internal::set_is_malloc_allowed(false); function to detect runtime allocations.

With https://gitlab.com/libeigen/eigen/-/merge_requests/1055 it even supports reallocs.

from proxsuite.

fennel-labs avatar fennel-labs commented on July 28, 2024

It is definitely Eigen, as the lowest node of the call graph above already reveals. This means, that Eigen is used wrong or has some unknown version incompatibility with ProxQP.

from proxsuite.

jcarpent avatar jcarpent commented on July 28, 2024

@fennel-labs Thanks for raising this issue.
Could you try with Eigen 3.4.0?

from proxsuite.

fabinsch avatar fabinsch commented on July 28, 2024

With @Bambade we checked the dense backend and we could find that we actually have some allocations in the dense factorize function. It fails if we set_malloc_allowed to false here.

from proxsuite.

jcarpent avatar jcarpent commented on July 28, 2024

@fennel-labs We have fixed the heap allocations in the code in #92.
Hope it will solve your issue.

from proxsuite.

fennel-labs avatar fennel-labs commented on July 28, 2024

@jcarpent I can confirm, that this fixes the issue under Eigen 3.4.0. With 3.3.4 heap allocations are still observed.

from proxsuite.

jcarpent avatar jcarpent commented on July 28, 2024

Could provide the call graph for 3.3.4 after the fix?

from proxsuite.

jcarpent avatar jcarpent commented on July 28, 2024

@fennel-labs I've just updated the PR with further fixes. Should be fine hopefully.

from proxsuite.

fennel-labs avatar fennel-labs commented on July 28, 2024

You were a minute faster than me, here is the call graph. I will try the new changes immediately.

callgraph_Eigen3 3 4_patches

from proxsuite.

fennel-labs avatar fennel-labs commented on July 28, 2024

@jcarpent Some allocations are still left:
callgraph_Eigen3 3 4_patches2

from proxsuite.

jcarpent avatar jcarpent commented on July 28, 2024

@fennel-labs 2ec747d should fix the issue on Eigen 3.3.4

from proxsuite.

fennel-labs avatar fennel-labs commented on July 28, 2024

@jcarpent Yes, allocations are gone now for both, 3.3.4 and 3.4.0. Thank you so much!

from proxsuite.

jcarpent avatar jcarpent commented on July 28, 2024

Thanks @fennel-labs for the quick feedback. We really appreciate it.

from proxsuite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.