exoplanet-dev / celerite2

Fast & scalable Gaussian Processes in one dimension
https://celerite2.readthedocs.io
MIT License
70 stars 11 forks source link

Installation from source fails on centos 7 with gcc 4.8.5 #26

Open tagordon opened 3 years ago

tagordon commented 3 years ago

Hi,

I'm trying to install from source following the directions here. The reason I'm installing from source rather than the pre-compiled binaries is that I'm hoping to try out the Kronecker functionality. It works fine on my mac, but when I try to install on the cluster I get the error:

ERROR: Command errored out with exit status -11: /gscratch/home/tagordon/jwst/celerite2/env/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/gscratch/home/tagordon/jwst/celerite2/setup.py'"'"'; file='"'"'/gscratch/home/tagordon/jwst/celerite2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

This happens regardless of whether I'm install from the kron branch or not. Any help is appreciated!

Thanks, Tyler

dfm commented 3 years ago

I think this is the same issue as https://github.com/exoplanet-dev/celerite2/issues/3 and the problem is that the compilation uses an unreasonable amount of memory because of how it's handling fixed size matrices.

A temporary fix would probably be to replace lines 27-107 in python/celerite2/driver.hpp with something like:

#define UNWRAP_CASES_FEW                     \
  switch (J) {                               \
    case 1: FIXED_SIZE_MAP(1); break;        \
    case 2: FIXED_SIZE_MAP(2); break;        \
    default: FIXED_SIZE_MAP(Eigen::Dynamic); \
  }

#define UNWRAP_CASES UNWRAP_CASES_FEW
#define UNWRAP_CASES_MOST UNWRAP_CASES_FEW
dfm commented 3 years ago

I have plans for better fixes but I have plans for lots of things…

tagordon commented 3 years ago

So, making that substitution didn't seem to change anything but I was able to install it by increasing my memory allocation on the cluster, which must mean that you diagnosed the problem correctly. Thanks!

dfm commented 3 years ago

Bizarre that that isn't the source of the problem though… Thanks for the update!