flatironinstitute / mountainsort5

MountainSort spike sorting algorithm, version 5
Apache License 2.0
34 stars 8 forks source link

Python version support #2

Closed carlacodes closed 1 year ago

carlacodes commented 1 year ago

Hi, do you know which versions of Python mountainsort5 supports? I'm running into compilation errors when installing mountainsort5 on a virtual environment on a cluster computing account using Python 3.8.

magland commented 1 year ago

Should work with Python 3.8. Could you provide the output for the compiler error?

carlacodes commented 1 year ago

The failure is when installing the isosplit6 dependency, error below:

  ERROR: Command errored out with exit status 1:
   command: /lustre/home/zceccgr/envlib/spkenvms5/bin/python /lustre/home/zceccgr/envlib/spkenvms5/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp6vw86orv
       cwd: /tmp/pip-install-gqjtluih/isosplit6_1e6675b89c0744b5b592e788419583d4
  Complete output (23 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-39
  creating build/lib.linux-x86_64-cpython-39/isosplit6
  copying isosplit6/__init__.py -> build/lib.linux-x86_64-cpython-39/isosplit6
  running build_ext
  building 'isosplit6_cpp' extension
  creating build/temp.linux-x86_64-cpython-39
  creating build/temp.linux-x86_64-cpython-39/src
  gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-env-8ua3aiha/overlay/lib/python3.9/site-packages/pybind11/include -I/lustre/home/zceccgr/envlib/spkenvms5/include -I/shared/ucl/apps/python/3.9.10/gnu-4.9.2/include/python3.9 -c src/isocut5.cpp -o build/temp.linux-x86_64-cpython-39/src/isocut5.o -fvisibility=hidden -g0
  In file included from /lustre/shared/ucl/apps/gcc/4.9.2/include/c++/4.9.2/cstdint:35:0,
                   from src/isocut5.h:20,
                   from src/isocut5.cpp:16:
  /lustre/shared/ucl/apps/gcc/4.9.2/include/c++/4.9.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
   #error This file requires compiler and library support for the \
    ^
  In file included from src/isocut5.cpp:16:0:
  src/isocut5.h:25:27: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
       bool already_sorted = false;
                             ^
  error: command '/shared/ucl/apps/gcc/4.9.2/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for isosplit6
Failed to build isosplit6
ERROR: Could not build wheels for isosplit6 which use PEP 517 and cannot be installed directly

I think this is because my cluster (UCL, Myriad) only supports gnu-4.9.2, while isosplit6 was developed on a later version compiler

magland commented 1 year ago

Looks like you need a more recent version of gcc. Is it possible to load a more recent version on your cluster?

carlacodes commented 1 year ago

Thanks for this, after reading the cluster's documentation I loaded a hidden gcc /10.2.0 in the cluster's 'beta modules' section--closing this issue now.

magland commented 1 year ago

Glad it's working. If you want, you can report back in a separate issue your feedback about how spike sorting is working for you using ms5.