LoLab-MSM / pysb

Python framework for Systems Biology modeling [Lopez Lab Mods]
BSD 2-Clause "Simplified" License
6 stars 8 forks source link

lsoda cpu multiprocessing #46

Closed ortega2247 closed 5 years ago

ortega2247 commented 6 years ago

This is an attempt to do cpu multiprocessing with lsoda. It requires the library pathos because the built-in multiprocessing can't pickle the function. Would you please take a look @alubbock ?

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.1%) to 74.891% when pulling 60eaf7826af048dea0766c2a99059a22cee83ee4 on multi into fe202ee445bc5ce18b2defc35f89c758fb404c3d on master.

alubbock commented 6 years ago

@ortega2247 Your build failures on travis and appveyor are because solve_ivp requires scipy>=1.0, which is not yet in the anaconda channels used by our builds. I've already updated travis and appveyor configuration in a separate pull request (pysb/pysb#335), so you'll need to wait for that before merging this PR. You can of course still test locally with nosetests.

ortega2247 commented 6 years ago

@alubbock thank you for your review. Tests are running well locally. I had to make some changes to the tests, though. For some reason the LSODA integrator from solve_ivp can't integrate the tyson_oscillator so I changed it to BDF and it works. This version of LSODA does not receive all the arguments than the version from lsoda and i couldn't figure out parameters that could integrate the model. I couldn't implement the jacobian for multiprocessing, as there are problems with the function being pickled. @JamesPino Also, apparently implementing solve_ivp introduces a lot of overhead because in order to pass parameter to the functions and jacobian I have to use the partial function