Skip to content

Commit

Permalink
Fix segfault issue with newest shapely and esmpy (#715)
Browse files Browse the repository at this point in the history
* Import shapely before esmpy

This avoids a multiprocessing issue with shapely >=2.0.0 and
esmpy >=8.4.2

* Add constraints on esmpy and shapely
  • Loading branch information
xylar authored Aug 15, 2023
1 parent ff79c2f commit da73131
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions conda-env/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ dependencies:
- cdms2 3.1.5
- cdutil 8.2.1
- dask
- esmpy >=8.4.0
- genutil 8.2.1
- lxml
- mache >=0.15.0
- matplotlib-base
- netcdf4
- numpy >=1.23.0
- shapely >=2.0.0,<3.0.0
- xarray >=2023.02.0
# Testing
# ==================
Expand Down
2 changes: 2 additions & 0 deletions conda-env/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ dependencies:
- cdms2 3.1.5
- cdutil 8.2.1
- dask
- esmpy >=8.4.0
- genutil 8.2.1
- lxml
- mache >=0.15.0
- matplotlib-base
- netcdf4
- numpy >=1.23.0
- shapely >=2.0.0,<3.0.0
- xarray >=2023.02.0
# Testing
# ==================
Expand Down
4 changes: 4 additions & 0 deletions e3sm_diags/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import os
import sys

# import shapely before esmpy to prevent a segfault related to multiprocessing
import shapely # isort: skip
import esmpy # isort: skip

__version__ = "v2.9.0rc2"
INSTALL_PATH = os.path.join(sys.prefix, "share/e3sm_diags/")

Expand Down

0 comments on commit da73131

Please sign in to comment.