Coder Social home page Coder Social logo

Comments (8)

EveCharbie avatar EveCharbie commented on July 22, 2024 1

Working on it :)

from bioptim.

mickaelbegon avatar mickaelbegon commented on July 22, 2024 1

Is it possible to add this information somewhere that realtime plots may affect speed of about 15%?

from bioptim.

pariterre avatar pariterre commented on July 22, 2024

Make sure the communication between the processors are using UDP and not TCP, which could slow things down otherwise

from bioptim.

EveCharbie avatar EveCharbie commented on July 22, 2024

It does slow down IPOPT. I tested with maximize_predicted_height_CoM, results are as follow:

  1. Test for t = 5, ns = 200
    With plots : 19.38321542739868 s
    Without plots : 18.32109808921814 s
  2. Test for t = 50, ns = 200
    With plots : 342.2361035346985 s
    Without plots : 307.77546977996826 s

I think the problem is at recv : "[recv] Bloque jusqu'à ce que quelque chose soit reçu." https://docs.python.org/fr/3/library/multiprocessing.html

Possible avenues for solution:

  1. Treat arg[0] as a socket data flow with recvfrom (class socket) which is the UDP version of recv. https://pythontic.com/socketserver/threadingudpserver/introduction
  2. Use multiprocessing.sharedctypes to access shared memory (bypass recv). https://docs.python.org/fr/3/library/multiprocessing.html

from bioptim.

EveCharbie avatar EveCharbie commented on July 22, 2024

I implemented the shared memory option. It still slows down Ipopt :(
Results for 30 trials of maximized_predicted_height_CoM:
with plots : 20.52554191748301 +- 1.12808514596442
without plots : 17.647579884529115 +- 0.39544275397521056

from bioptim.

pariterre avatar pariterre commented on July 22, 2024

So it is the same order of magnitude? Could you redo the one which was taking 5 minutes? If it gives the same thing, then I think we can leave it as is (since we will never do faster than shared memory)

from bioptim.

EveCharbie avatar EveCharbie commented on July 22, 2024

maximized_predicted_height_CoM, ns = 200, t = 50:
with graphs results : 323.4463245312373 +- 18.840376615154913
without graphs results : 282.86038216749824 +- 5.873278186064388

from bioptim.

pariterre avatar pariterre commented on July 22, 2024

It seems that shared memory or send/recv are equivalent. Since the one already implemented works, I think we will keep it. Thanks for answering this Issue!
GJ :)

from bioptim.

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.