StochSS / GillesPy2

Modeling toolkit for biochemical simulation
http://gillespy2.readthedocs.io/
GNU General Public License v3.0
72 stars 32 forks source link

Contradicting error message #880

Closed vwiela closed 1 year ago

vwiela commented 2 years ago

While trying to run a Tau-Leaping algorithm I found some confusing error message. In core.model.py line 1166 and 1167 the programm tests whether C++ or/and Numpy are installed.

 if not can_use_cpp and can_use_numpy:
            raise ModelError("Please install C++ or Numpy to use GillesPy2 solvers.")

The error message reads as if it is sufficient to have either C++ or Numpy installed and one does not need both, since the program selects the solver accordingly. But the if clause is written in a way that the error is raised unless one has installed C++.

Hence, for me the if-clause is not matching the error message. And if I understood the rest of the code correctly the error message is correct and one should be able to run the programm without having C++ installed. But then one ends up getting this error because of the misstated if-clause.

BryanRumsey commented 2 years ago

Thank you for reporting this issue it will be addressed in the next release. To clarify the confusion, NumPy is a requirement for GillesPy2.

vwiela commented 2 years ago

Thanks. But is it possible to use gillespy2 just havingNumPy installed and not C++? Because that is what I was trying and it did not work, but I got that error message all the time, which states that it should work solely with NumPy.

BryanRumsey commented 2 years ago

Yes, we have the following solvers that work without the C++ dependencies:

gillespy2.ODESovler
gillespy2.NumPySSASolver
gillespy2.CLESolver
gillespy2.TauLeapingSolver
gillespy2.TauHybridSolver

To avoid the incorrect error message you could omit the algorithm argument from the model.run call or replace it with the solver argument.