pyhawkes
pyhawkes copied to clipboard
Make GSL and OpenMP optional
A lot of people are having trouble installing due to the dependencies on GSL (via gslrandom
package) and OpenMP. I think we can make both of these optional, but the user will suffer a serious performance hit.
I've updated the code with the following changes:
-
gslrandom
is an optional dependency. If it's installed, pyhawkes will automatically use it for resampling the discrete parent variables. If it's not installed, pyhawkes will default to a slow python loop. -
OpenMP is optional. If you set
USE_OPENMP=True
before installing, pyhawkes will compile with OpenMP support. Otherwise, pyhawkes will default to a single threaded version. This part only affects the parent resampling for continuous time models; the discrete time models usegslrandom
for parallel resampling (see above). -
pip installation should work for most users, though it will default to the slow, single-threaded version.
See https://github.com/slinderman/pyhawkes/commit/e592afa752693bbad48a79cbdec1922289f528d9 and https://github.com/slinderman/pyhawkes/commit/fd610a104e8ef7c6cbb366236f2b36de28ab3b5b.