LutzGross / esys-escript.github.io

Other
29 stars 13 forks source link

Sympy #36

Open aellery opened 2 years ago

aellery commented 2 years ago

The latest version of sympy is not compatible with escript. If escript is compiled using python 3.7.5 and python sympy 1.3-2 (i.e. the latest versions in the debian 10 buster repo) then all of the sympy test fail. This seems to be due to some problem in escript/py_src/symbolic.py i.e. in the Symbol class.


As of version 1.2, the sympy lambdify function no longer generates lambda functions. Instead it generates the code for full python functions. This makes sympy much faster than it was but, unfortunately, has broken our code.

As a temporary fix, escript now checks to make sure that the version of sympy on the host computer is less than 1.2 during compilation. If version 1.2 or higher is found then escript builds without sympy and a warning message is displayed.