pyhawkes icon indicating copy to clipboard operation
pyhawkes copied to clipboard

Make GSL and OpenMP optional

Open slinderman opened this issue 7 years ago • 1 comments

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.

slinderman avatar Mar 27 '17 18:03 slinderman

I've updated the code with the following changes:

  1. 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.

  2. 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 use gslrandom for parallel resampling (see above).

  3. 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.

slinderman avatar Mar 28 '17 00:03 slinderman