JiaweiZhuang / xESMF

Universal Regridder for Geospatial Data
http://xesmf.readthedocs.io/
MIT License
269 stars 49 forks source link

pytest fails on macOS: Illegal instruction #103

Open mathomp4 opened 3 years ago

mathomp4 commented 3 years ago

All,

In looking at #102, where I installed miniconda +xesmf, etc on a Linux cluster, I also tried locally on my macOS laptop. The miniconda install and all the subsequent conda install steps all succeeded, so I then tried the pytest and:

❯ pytest -v --pyargs xesmf
================================================================= test session starts ==================================================================
platform darwin -- Python 3.8.5, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 -- /Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/bin/python
cachedir: .pytest_cache
rootdir: /Users/mathomp4/MOM6-Python/MOM6-AnalysisCookbook
collected 42 items

../tests/test_backend.py::test_warn_f_on_array PASSED                                                                                            [  2%]
../tests/test_backend.py::test_warn_f_on_grid PASSED                                                                                             [  4%]
../tests/test_backend.py::test_warn_lat_range PASSED                                                                                             [  7%]
../tests/test_backend.py::test_esmf_grid_with_corner PASSED                                                                                      [  9%]
../tests/test_backend.py::test_esmf_build_bilinear PASSED                                                                                        [ 11%]
../tests/test_backend.py::test_regrid Fatal Python error: Illegal instruction

Current thread 0x000000011000ddc0 (most recent call first):
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/ESMF/interface/cbindings.py", line 2188 in ESMP_FieldRegridStoreFile
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/ESMF/util/decorators.py", line 52 in new_func
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/ESMF/api/regrid.py", line 138 in __init__
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/ESMF/util/decorators.py", line 64 in new_func
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/xesmf/backend.py", line 277 in esmf_regrid_build
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/xesmf/tests/test_backend.py", line 138 in test_regrid
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/_pytest/python.py", line 180 in pytest_pyfunc_call
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/_pytest/python.py", line 1567 in runtest
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/_pytest/runner.py", line 153 in pytest_runtest_call
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/_pytest/runner.py", line 247 in <lambda>
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/_pytest/runner.py", line 294 in from_call
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/_pytest/runner.py", line 246 in call_runtest_hook
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/_pytest/runner.py", line 207 in call_and_report
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/_pytest/runner.py", line 117 in runtestprotocol
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/_pytest/runner.py", line 100 in pytest_runtest_protocol
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/_pytest/main.py", line 321 in pytest_runtestloop
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/_pytest/main.py", line 296 in _main
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/_pytest/main.py", line 240 in wrap_session
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/_pytest/main.py", line 289 in pytest_cmdline_main
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/lib/python3.8/site-packages/_pytest/config/__init__.py", line 157 in main
  File "/Users/mathomp4/MINIpyD/latest_py3.8/2020-07-30/bin/pytest", line 11 in <module>
[1]    87148 illegal hardware instruction  pytest -v --pyargs xesmf

I am quite baffled by this. "illegal hardware instruction" is interesting to say the least!

Has anyone else encountered this?

Thomas-Moore-Creative commented 3 years ago

Yes, frustratingly just had the same / similar issue trying to get xesmf to pass on Mac OSX.

File "/Users/XXXX/miniconda3/envs/xesmf_v0/bin/pytest", line 8 in <module> Illegal instruction: 4

After failing to get xesmf to run on my HPC I think I need to take a break from it while I still have some hair left =)

Thomas-Moore-Creative commented 3 years ago

NB - it seems active development has moved here https://github.com/pangeo-data/xESMF