JiaweiZhuang / xESMF

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

Kernel dies running tutorial example #35

Open lgloege opened 5 years ago

lgloege commented 5 years ago

I am running the tutorial at https://xesmf.readthedocs.io/en/latest/Curvilinear_grid.html and the kernel dies. I updated all packages and still have issues. Does anybody have any idea where the incompatibility is coming from? here is the environment I am running in:

name: pangeo
channels:
  - conda-forge
  - defaults
dependencies:
  - asn1crypto=0.24.0=py36_3
  - bleach=2.1.3=py_0
  - bokeh=0.13.0=py36_0
  - bottleneck=1.2.1=py36h7eb728f_1
  - cffi=1.11.5=py36h5e8e0c9_1
  - cftime=1.0.1=py36h7eb728f_0
  - chardet=3.0.4=py36_3
  - click=6.7=py_1
  - cloudpickle=0.5.2=py_0
  - cryptography=2.3.1=py36hdffb7b8_0
  - cryptography-vectors=2.3.1=py36_0
  - curl=7.59.0=0
  - cycler=0.10.0=py36_0
  - cytoolz=0.9.0.1=py36_0
  - dask=0.17.1=py_2
  - dask-core=0.17.1=py_0
  - dask-jobqueue=0.1.1=py_0
  - decorator=4.2.1=py36_0
  - distributed=1.21.3=py36_0
  - docrep=0.2.3=py36_0
  - entrypoints=0.2.3=py36_1
  - esmf=7.1.0r=1
  - esmpy=7.1.0r=py36_1
  - expat=2.2.5=0
  - fontconfig=2.13.1=h65d0f4c_0
  - freetype=2.9.1=h6debe1e_4
  - geos=3.6.2=hfc679d8_3
  - gettext=0.19.8.1=0
  - gmp=6.1.2=0
  - h5netcdf=0.6.2=py_0
  - h5py=2.8.0=py36h470a237_0
  - hdf4=4.2.13=0
  - hdf5=1.10.1=2
  - heapdict=1.0.0=py36_0
  - html5lib=1.0.1=py_0
  - icu=58.2=0
  - idna=2.7=py36_2
  - ipykernel=4.8.2=py36_0
  - ipython=6.2.1=py36_1
  - ipython_genutils=0.2.0=py36_0
  - jedi=0.11.1=py36_0
  - jinja2=2.10=py36_0
  - jpeg=9c=h470a237_1
  - jsonschema=2.6.0=py36_1
  - jupyter_client=5.2.3=py36_0
  - jupyter_core=4.4.0=py_0
  - jupyterlab=0.31.12=py36_1
  - jupyterlab_launcher=0.10.5=py36_0
  - kiwisolver=1.0.1=py36_1
  - krb5=1.14.2=0
  - libedit=3.1.20170329=0
  - libffi=3.2.1=3
  - libiconv=1.15=0
  - libnetcdf=4.5.0=3
  - libpng=1.6.34=0
  - libsodium=1.0.15=1
  - libssh2=1.8.0=2
  - libtiff=4.0.9=he6b73bb_1
  - libuuid=2.32.1=h470a237_2
  - libxcb=1.13=0
  - libxml2=2.9.8=0
  - libxslt=1.1.32=h88dbc4e_2
  - locket=0.2.0=py36_1
  - lxml=4.2.4=py36hc9114bc_0
  - markupsafe=1.0=py36_0
  - mistune=0.8.3=py_0
  - mpi=1.0=mpich
  - mpi4py=3.0.0=py36_0
  - mpich=3.2.1=0
  - msgpack-python=0.5.5=py36_0
  - nbconvert=5.3.1=py_1
  - nbformat=4.4.0=py36_0
  - nbserverproxy=0.8.3=py36_0
  - ncurses=5.9=10
  - netcdf-fortran=4.4.4=7
  - netcdf4=1.4.0=py36_0
  - notebook=5.4.1=py36_0
  - olefile=0.45.1=py_1
  - openblas=0.2.20=8
  - owslib=0.16.0=py_1
  - packaging=17.1=py_0
  - pandas=0.23.4=py36hf8a1672_0
  - pandoc=2.1.3=0
  - pandocfilters=1.4.1=py36_0
  - parso=0.1.1=py_0
  - partd=0.3.8=py36_0
  - pexpect=4.4.0=py36_0
  - pickleshare=0.7.4=py36_0
  - pillow=5.2.0=py36hc736899_1
  - pip=9.0.2=py36_0
  - proj4=4.9.3=h470a237_8
  - prompt_toolkit=1.0.15=py36_0
  - psutil=5.4.3=py36_0
  - ptyprocess=0.5.2=py36_0
  - pycparser=2.18=py_1
  - pyepsg=0.3.2=py_1
  - pygments=2.2.0=py36_0
  - pyopenssl=18.0.0=py36_0
  - pyparsing=2.2.0=py36_0
  - pyproj=1.9.5.1=py36h508ed2a_3
  - pyshp=1.2.12=py_0
  - pysocks=1.6.8=py36_2
  - python-dateutil=2.7.0=py_0
  - pytz=2018.3=py_0
  - pyyaml=3.12=py36_1
  - pyzmq=17.0.0=py36_3
  - readline=7.0=0
  - requests=2.19.1=py36_1
  - send2trash=1.5.0=py_0
  - setuptools=39.0.1=py36_0
  - shapely=1.6.4=py36h164cb2d_1
  - simplegeneric=0.8.1=py36_0
  - six=1.11.0=py36_1
  - sortedcontainers=1.5.9=py36_0
  - tblib=1.3.2=py36_0
  - terminado=0.8.1=py36_0
  - testpath=0.3.1=py36_0
  - tk=8.6.8=ha92aebf_0
  - toolz=0.9.0=py_0
  - tornado=5.0.1=py36_1
  - traitlets=4.3.2=py36_0
  - urllib3=1.23=py36_1
  - wcwidth=0.1.7=py36_0
  - webencodings=0.5=py36_0
  - wheel=0.30.0=py36_2
  - xarray=0.10.8=py36_0
  - xorg-libxau=1.0.8=3
  - xorg-libxdmcp=1.1.2=3
  - xz=5.2.4=h470a237_1
  - yaml=0.1.7=0
  - zeromq=4.2.3=2
  - zict=0.1.3=py_0
  - zlib=1.2.11=0
  - blas=1.0=mkl
  - ca-certificates=2018.03.07=0
  - cartopy=0.16.0=py36hf32a85a_0
  - certifi=2018.8.24=py36_1
  - dbus=1.13.2=h714fa37_1
  - glib=2.56.1=h000015b_0
  - gst-plugins-base=1.14.0=hbbd80ab_1
  - gstreamer=1.14.0=hb453b48_1
  - intel-openmp=2018.0.0=hc7b2577_8
  - libgcc=7.2.0=h69d50b8_2
  - libgcc-ng=7.2.0=hdf63c60_3
  - libgfortran=3.0.0=1
  - libgfortran-ng=7.2.0=hdf63c60_3
  - libopenblas=0.2.20=h9ac9557_7
  - libstdcxx-ng=7.2.0=hdf63c60_3
  - matplotlib=2.2.3=py36hb69df0a_0
  - mkl=2019.0=117
  - mkl_fft=1.0.4=py36h4414c95_1
  - mkl_random=1.0.1=py36h4414c95_1
  - numpy=1.15.0=py36h1b885b7_0
  - numpy-base=1.15.0=py36h3dfced4_0
  - openssl=1.0.2p=h14c3975_0
  - pcre=8.42=h439df22_0
  - pyqt=5.9.2=py36h22d08a2_0
  - python=3.6.3=h1284df2_4
  - qt=5.9.6=h52aff34_0
  - scikit-learn=0.19.1=py36h7aa7ec6_0
  - scipy=1.1.0=py36hc49cb51_0
  - sip=4.19.8=py36hf484d3e_0
  - sqlite=3.24.0=h84994c4_0
prefix: /glade/u/home/gloege/miniconda3/envs/pangeo

pip packages

Package              Version
-------------------- -----------
asn1crypto           0.24.0
bleach               2.1.3
bokeh                0.13.0
Bottleneck           1.2.1
Cartopy              0.16.0
certifi              2018.8.24
cffi                 1.11.5
cftime               1.0.1
chardet              3.0.4
click                6.7
cloudpickle          0.5.2
cryptography         2.3.1
cryptography-vectors 2.3.1
cycler               0.10.0
Cython               0.28.3
cytoolz              0.9.0.1
dask                 0.17.1
dask-jobqueue        0.1.1
decorator            4.2.1
distributed          1.21.3
docrep               0.2.3
entrypoints          0.2.3
ESMPy                7.1.0.dev0
h5netcdf             0.6.2
h5py                 2.8.0
heapdict             1.0.0
html5lib             1.0.1
idna                 2.7
ipykernel            4.8.2
ipython              6.2.1
ipython-genutils     0.2.0
jedi                 0.11.1
Jinja2               2.10
jsonschema           2.6.0
jupyter-client       5.2.3
jupyter-core         4.4.0
jupyterlab           0.31.12
jupyterlab-launcher  0.10.5
kiwisolver           1.0.1
locket               0.2.0
lxml                 4.2.4
MarkupSafe           1.0
matplotlib           2.2.3
mistune              0.8.3
mkl-fft              1.0.4
mkl-random           1.0.1
mpi4py               3.0.0
msgpack-python       0.5.5
nbconvert            5.3.1
nbformat             4.4.0
nbserverproxy        0.8.3
netCDF4              1.4.0
notebook             5.4.1
numpy                1.15.0
olefile              0.45.1
OWSLib               0.16.0
packaging            17.1
pandas               0.23.4
pandocfilters        1.4.1
parso                0.1.1
partd                0.3.8
pexpect              4.4.0
pickleshare          0.7.4
Pillow               5.2.0
pip                  18.0
prompt-toolkit       1.0.15
psutil               5.4.3
ptyprocess           0.5.2
pycparser            2.18
pyepsg               0.3.2
Pygments             2.2.0
pyOpenSSL            18.0.0
pyparsing            2.2.0
pyproj               1.9.5.1
pyshp                1.2.12
PySocks              1.6.8
python-dateutil      2.7.0
pytz                 2018.3
PyYAML               3.12
pyzmq                17.0.0
requests             2.19.1
scikit-learn         0.19.1
scipy                1.1.0
Send2Trash           1.5.0
setuptools           39.0.1
Shapely              1.6.4.post1
simplegeneric        0.8.1
six                  1.11.0
sortedcontainers     1.5.9
tblib                1.3.2
terminado            0.8.1
testpath             0.3.1
toolz                0.9.0
tornado              5.0.1
traitlets            4.3.2
urllib3              1.23
wcwidth              0.1.7
webencodings         0.5
wheel                0.30.0
xarray               0.10.8
xesmf                0.1.1
zict                 0.1.3
JiaweiZhuang commented 5 years ago

It dies at which step? Does the rectilinear example work? Can you import ESMPy by import ESMF?

lgloege commented 5 years ago

Yes, no issues with import ESMF the kernel dies here:

regridder = xe.Regridder(ds, ds_out, 'bilinear')
regridder
JiaweiZhuang commented 5 years ago

I guess it is a system-specific ESMPy installation issue. Can you run the code on your own laptop, or on other machines?

Alternatively you can run the test suite to see which part dies:

pip install pytest
git clone https://github.com/JiaweiZhuang/xESMF.git
cd xesmf
pytest -v xesmf

You should see something like this if all tests succeed:

xesmf/tests/test_backend.py::test_flag PASSED                            [  4%]
xesmf/tests/test_backend.py::test_warn_f_on_array PASSED                 [  9%]
xesmf/tests/test_backend.py::test_warn_f_on_grid PASSED                  [ 14%]
xesmf/tests/test_backend.py::test_warn_lat_range PASSED                  [ 19%]
xesmf/tests/test_backend.py::test_esmf_grid_with_corner PASSED           [ 23%]
xesmf/tests/test_backend.py::test_esmf_build_bilinear PASSED             [ 28%]
xesmf/tests/test_backend.py::test_regrid PASSED                          [ 33%]
xesmf/tests/test_backend.py::test_regrid_periodic_wrong PASSED           [ 38%]
xesmf/tests/test_backend.py::test_regrid_periodic_correct PASSED         [ 42%]
xesmf/tests/test_frontend.py::test_as_2d_mesh PASSED                     [ 47%]
xesmf/tests/test_frontend.py::test_build_regridder PASSED                [ 52%]
xesmf/tests/test_frontend.py::test_existing_weights PASSED               [ 57%]
xesmf/tests/test_frontend.py::test_conservative_without_bounds PASSED    [ 61%]
xesmf/tests/test_frontend.py::test_build_regridder_from_dict PASSED      [ 66%]
xesmf/tests/test_frontend.py::test_regrid PASSED                         [ 71%]
xesmf/tests/test_frontend.py::test_regrid_periodic_wrong PASSED          [ 76%]
xesmf/tests/test_frontend.py::test_regrid_periodic_correct PASSED        [ 80%]
xesmf/tests/test_frontend.py::test_regrid_with_1d_grid PASSED            [ 85%]
xesmf/tests/test_util.py::test_grid_global PASSED                        [ 90%]
xesmf/tests/test_util.py::test_grid_global_bad_resolution PASSED         [ 95%]
xesmf/tests/test_util.py::test_cell_area PASSED                          [100%]
jbusecke commented 5 years ago

I am having the same issue. I followed the instructions above and the test just 'dropped out' after the second...not sure how to diagnose this problem further.

platform darwin -- Python 3.6.7, pytest-4.0.1, py-1.7.0, pluggy-0.8.0 -- /Users/juliusbusecke/miniconda/envs/standard/bin/python
cachedir: .pytest_cache
rootdir: /Users/juliusbusecke/xESMF, inifile:
plugins: remotedata-0.3.1, openfiles-0.3.1, doctestplus-0.1.3, cov-2.6.0, arraydiff-0.2
collected 20 items

xesmf/tests/test_backend.py::test_flag PASSED                                                                                                                     [  5%]
xesmf/tests/test_backend.py::test_warn_f_on_array PASSED                                                                                                          [ 10%]
xesmf/tests/test_backend.py::test_warn_f_on_grid %

I tried this on my laptop, will check on one of our clusters.

lgloege commented 5 years ago

@jbusecke I was not able to resolve the problem on NCAR's cheyenne or Columbia's habanero cluster. However, I was able to get it working a local server. @raphaeldussin believes it's an ESMPy issue. Check to make sure you and import esmpy. @raphaeldussin , do you have any comments on this?

jbusecke commented 5 years ago

I just got it to run on princetons tiger. I was able to import esmpy on my local machine before.

raphaeldussin commented 5 years ago

the last time we pulled esmpy from conda on @lgloege machine, it failed to run import ESMF properly. I was under the impression that the conda recipe was broken. I am trying to reinstall now in a clean conda environment but it's not working at the moment. A workaround is to install ESMF/ESMPY from scratch. I've done it several time and my scripts are on gist.github

raphaeldussin commented 5 years ago

@lgloege update, this works:


conda create -n test_esmpy python=3.7
source activate test_esmpy
conda install esmpy 
conda install xesmf
git clone https://github.com/JiaweiZhuang/xESMF.git xESMF
cd xESMF/
py.test -v xesmf
yosoyjay commented 5 years ago

@jbusecke I had the same problem you described and narrowed it down to MPI not initializing correctly. It turns out I needed to add my computer's name to /etc/hosts/, perhaps the mismatch between that file and what hostname was returning was the issue.

Adding the last line below worked for me:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
127.0.0.1      <computer's name>
iacopoff commented 4 years ago

Has someone resolved this for good?

This is what i get after running pytest as @raphaeldussin did. It seems an ESMF regrid related issue.

`xesmf/tests/test_backend.py::test_warn_f_on_array PASSED [ 4%] xesmf/tests/test_backend.py::test_warn_f_on_grid PASSED [ 8%] xesmf/tests/test_backend.py::test_warn_lat_range PASSED [ 12%] xesmf/tests/test_backend.py::test_esmf_grid_with_corner PASSED [ 16%] xesmf/tests/test_backend.py::test_esmf_build_bilinear PASSED [ 20%] xesmf/tests/test_backend.py::test_regrid Fatal Python error: Segmentation fault

Current thread 0x00007f26cea4e740 (most recent call first): File "/projects/home/iff/.local/lib/anaconda3/envs/test_esmpy/lib/python3.7/site-packages/ESMF/interface/cbindings.py", line 2145 in ESMP_FieldRegridStoreFile`

JiaweiZhuang commented 4 years ago

@iacopoff What's the exact command you use to install the packages? What OS you are on? Could you reproduce the error by a Dockerfile?

iacopoff commented 4 years ago

@JiaweiZhuang, I will use Docker as soon as I learn how to use it!

I have used those

conda create -n test_esmpy python=3.7
source activate test_esmpy
conda install esmpy 
conda install xesmf
git clone https://github.com/JiaweiZhuang/xESMF.git xESMF
cd xESMF/
py.test -v xesmf

and my OS and some other info:

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 12 On-line CPU(s) list: 0-11 Thread(s) per core: 2 Core(s) per socket: 6 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 44 Model name: Intel(R) Xeon(R) CPU E5645 @ 2.40GHz Stepping: 2 CPU MHz: 2393.983 BogoMIPS: 4787.96 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 12288K NUMA node0 CPU(s): 0-11

JiaweiZhuang commented 4 years ago

@lgloege Use the conda-forge channel conda install -c conda-forge xesmf

iacopoff commented 4 years ago

Hi, this works in a fresh environment:

conda install -c conda-forge esmpy conda install -c conda-forge xesmf

It works also on on an environment where you have xarray and dask already installed but make sure to have a version that matches the requirements of esmpy and xesmf.

jessluo commented 4 years ago

Hi - has this been resolved?

I also get my kernel dying at the xe.Regridder() step. I have started a fresh environment using the esmpy and xesmf installations with the conda-forge channel, and the output of the pytest -v xesmf command is:


=================================================================== test session starts ===================================================================
platform darwin -- Python 3.7.6, pytest-5.4.2, py-1.8.1, pluggy-0.13.1 -- /Users/jessicaluo/miniconda3/envs/test_esmpy/bin/python
cachedir: .pytest_cache
rootdir: /Users/jessicaluo/Desktop/xESMF
collected 42 items                                                                                                                                        

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

Current thread 0x00007fff97846380 (most recent call first):
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/ESMF/interface/cbindings.py", line 2174 in ESMP_FieldRegridStoreFile
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/ESMF/util/decorators.py", line 52 in new_func
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/ESMF/api/regrid.py", line 151 in __init__
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/ESMF/util/decorators.py", line 64 in new_func
  File "/Users/jessicaluo/Desktop/xESMF/xesmf/backend.py", line 280 in esmf_regrid_build
  File "/Users/jessicaluo/Desktop/xESMF/xesmf/tests/test_backend.py", line 139 in test_regrid
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/_pytest/python.py", line 182 in pytest_pyfunc_call
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/_pytest/python.py", line 1477 in runtest
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/_pytest/runner.py", line 135 in pytest_runtest_call
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/_pytest/runner.py", line 217 in <lambda>
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/_pytest/runner.py", line 244 in from_call
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/_pytest/runner.py", line 217 in call_runtest_hook
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/_pytest/runner.py", line 186 in call_and_report
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/_pytest/runner.py", line 100 in runtestprotocol
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/_pytest/runner.py", line 85 in pytest_runtest_protocol
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/_pytest/main.py", line 272 in pytest_runtestloop
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/_pytest/main.py", line 247 in _main
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/_pytest/main.py", line 191 in wrap_session
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/_pytest/main.py", line 240 in pytest_cmdline_main
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/lib/python3.7/site-packages/_pytest/config/__init__.py", line 125 in main
  File "/Users/jessicaluo/miniconda3/envs/test_esmpy/bin/pytest", line 11 in <module>
Illegal instruction: 4
raphaeldussin commented 4 years ago

@jessluo can you post what are the version of esmf, esmpy, xesmf you're using?

Not sure if it's related but I had issues recently that I solved using the mpich build of esmf. Maybe try to install those specific builds:

  - esmf=8.0.0=mpi_mpich_hd6ca8f3_103
  - esmpy=8.0.0=mpi_mpich_py36ha9b28fa_101
KellyNthn commented 4 years ago

I am having the same issue as @jessluo; using:

esmf=8.0.0=mpi_mpich_h31c0ad6_107 esmpy=8.0.0=mpi_mpich_py36ha9b28fa_101 xesmf=0.3.0=py_0

Packages are built in a clean environment using conda-forge

raphaeldussin commented 4 years ago

@KellyNthn are you on mac or linux?

KellyNthn commented 4 years ago

I am on MAC; OS X 10.13

raphaeldussin commented 4 years ago

I've been experiencing some issues on my mac as well. Not sure what's the problem right now. My Linux seems to be working ok, just installed a brand new env and all tests worked

daliagachc commented 3 years ago

Im having the same issues with a mac. so far i have tried v= 8.1.0 mpi and openmpi without success

vrx- commented 10 months ago

Hi, I see this in an old issue, but is not closed, so will give it a try. My kernel dies specifically when I use periodic=True. I have tried to run regridder = xe.Regridder(ds1, ds2, method='bilinear', filename=weights, periodic=True) with both ds1 and ds2 as dask arrays, and with ds1 and ds2 as loaded arrays (i.e. ds1.isel(time=0).load()). The kernel crashes in both cases. With dask arrays I was expecting it to be a lazy operation, so I'm not sure why "something" is happening, and why is there a huge difference when using periodic (i understand that some interpolation happens in the periodic case, but it is a lot):

%%time
test = xe.Regridder(ds1, ds2, method='bilinear', filename='testw.nc')
CPU times: user 31.4 s, sys: 239 ms, total: 31.7 s
Wall time: 31.9 s

vs

%%time
test = xe.Regridder(ds1, ds2, method='bilinear', filename='testw.nc', periodic=True)
CPU times: user 5min 19s, sys: 15.9 s, total: 5min 35s
Wall time: 5min 35s

I can "fix" this by using more memory (i.e. requesting the whole node), but is there something I am missing to make this a dask computation?

EDIT: Whoops! I realized this issue is about a tutorial example, and I'm not doing exactly that, but this is the only issue I found about kernel crashing on regridder. I can make it its own thing if needed.