BlackHolePerturbationToolkit / FastEMRIWaveforms

Blazingly fast EMRI waveforms
GNU General Public License v3.0
38 stars 26 forks source link

Installation issue on M2 Mac #85

Closed thompsonphys closed 7 months ago

thompsonphys commented 8 months ago

Hi all, I've tried using the new script for a fresh install and have bumped into an issue. Running the installation script via

bash install.sh env_name=few install_type=development

I run into an issue when getting to the unit tests. All four tests fail with the same traceback

======================================================================
ERROR: few.tests.test_few (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: few.tests.test_few
Traceback (most recent call last):
  File "/Users/jthompson/miniconda3/envs/few/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/Users/jthompson/miniconda3/envs/few/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/Users/jthompson/git/FastEMRIWaveforms/few/tests/test_few.py", line 6, in <module>
    from few.trajectory.inspiral import EMRIInspiral
  File "/Users/jthompson/git/FastEMRIWaveforms/few/trajectory/inspiral.py", line 28, in <module>
    from pyInspiral import pyInspiralGenerator
ModuleNotFoundError: No module named 'pyInspiral'

It seems that the pyInspiral extension is not compiling, and if I try to install manually in the created conda env by running

pip install -e .

then I get a compilation error

clang: error: unsupported option '-fopenmp'
error: command '/usr/bin/clang' failed with exit code 1

The internet tells me that I should be manually brew installing llvm and then passing in specific clang paths, but this seems to be a bit of a rabbit hole of a solution. Any comments or suggests to get this working in a more "out of the box" fashion?

thompsonphys commented 8 months ago

I'll add that in another attempt I noticed an output line from pip

Environment created. Installing additional packages before FEW install.
python: /Users/jthompson/miniconda3/envs/few/bin/python
pip: /Users/jthompson/miniconda3/envs/few/bin/pip

Usage:
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --ccbin

that indicates things are breaking down here

if [[ "$machine" == "arm64" ]]; then
    "$pip_here" install . --ccbin /usr/bin/
else
    "$pip_here" install .
fi
CChapmanbird commented 7 months ago

The same issue as #81?

joshbmat commented 2 months ago

What was the resolution? Two of us are getting this exact issue on different M2 machines.