I have a quite large algebraic equation system to solve, the system is so large, I can't post the example here, so I am posting it to pastebin.

The sympy.solve is taking ages: I started it this morning and it is still running on a single core. I have tried to use the optional arguments from the sympy documentation, like quick=True and warn=True, to speed things up and get warnings if the solver fails, but there was no warning given, and the solver is still dying.

Is there a way multiprocessing can be used or maybe mpi4py with the solve function in sympy. I have access to HPC resources, but I'm not sure how solve can be separated into different MPI processes.

Is there a way in sympy to get an idea if the system is solvable or if the solver is diverging? Something like runtime solver information, but without running in debug mode?

  • $\begingroup$ Besides being nonlinear, what kind of equations do you have? $\endgroup$ – nicoguaro Jan 24 '19 at 16:24
  • $\begingroup$ @nicoguaro: you can see what the equations are, I have posted the code in pastebin, the link is in the question. $\endgroup$ – tmaric Jan 24 '19 at 16:28
  • 1
    $\begingroup$ Your equations seem to be rational functions, but I can't tell because they are too long. $\endgroup$ – nicoguaro Jan 24 '19 at 16:51
  • 2
    $\begingroup$ A while ago I read this, which is a summary of some mathematical approaches to handling large polynomial systems: Solving Systems of Polynomial Equations by Bernd Sturmfels Some are theoretical, but quite a few are computational and practical, implemented in off-the-shelf software, so perhaps some techniques there might come in useful? Generally speaking, solving an arbitrary large polynomial system symbolically is intractable, and numerically it's merely very hard, so it has to have some special properties for you to make progress. $\endgroup$ – Kirill Jan 24 '19 at 17:01
  • 2
    $\begingroup$ @nicoguaro I cleared the fractions (not an equivalence transformation) and tried to get rid of common subexpressions: gist.github.com/ikirill/06c1dc70b239cff1b47e70d2493d561b $\endgroup$ – Kirill Jan 24 '19 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.