xyz2grd crashes python with large grids
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu bằng cách chạy ví dụ tối thiểu Python và NumPy được cung cấp cho pygmt.xyz2grd với mảng lớn 11520 × 23040 trong một môi trường được hỗ trợ. Theo dõi lệnh gọi xyz2grd và tương tác của nó với GMT để xác định nguồn gốc của invalid free. Hoàn tất khi ví dụ không còn làm Python bị crash và vẫn tạo ra grid như mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description of the problem
I am trying to create a grd file using pygmt's xyz2grd with a numpy array. The numpy array is large (64 pixels per degree corresponding to 11520 x 23040). Running the xyz2grd command kills the python kernel and gives the following result
python3.12(11590,0x1e10f1c40) malloc: *** error for object 0x3ff142fe20000000: pointer being freed was not allocated
python3.12(11590,0x1e10f1c40) malloc: *** set a breakpoint in malloc_error_break to debug
[1] 11590 abort ipython
I have the same problem on macOS and on Fedora linux (though on fedora, I don't think a error is reported, it just crashes).
Minimal Complete Verifiable Example
import numpy as np
import pygmt
nlat = 180 * 64
nlon = 360 * 64
array = np.empty((nlat, nlon))
spacing = 1/64
grd = pygmt.xyz2grd(array, spacing=spacing, region=[0, 360, -90, 90], registration='p')
Full error message
python3.12(11590,0x1e10f1c40) malloc: *** error for object 0x3ff142fe20000000: pointer being freed was not allocated
python3.12(11590,0x1e10f1c40) malloc: *** set a breakpoint in malloc_error_break to debug
[1] 11590 abort ipython
System information
PyGMT information:
version: v0.11.0
System information:
python: 3.12.1 | packaged by conda-forge | (main, Dec 23 2023, 08:01:35) [Clang 16.0.6 ]
executable: /Users/lunokhod/miniconda3/envs/py312/bin/python
machine: macOS-14.3-arm64-arm-64bit
Dependency information:
numpy: 1.26.3
pandas: 2.1.4
xarray: 2023.12.0
netCDF4: 1.6.5
packaging: 23.2
contextily: None
geopandas: None
ipython: None
rioxarray: None
ghostscript: 10.02.1
GMT library information:
binary version: 6.5.0
cores: 10
grid layout: rows
image layout:
library path: /Users/lunokhod/miniconda3/envs/py312/lib/libgmt.dylib
padding: 2
plugin dir: /Users/lunokhod/miniconda3/envs/py312/lib/gmt/plugins
share dir: /Users/lunokhod/miniconda3/envs/py312/share/gmt
version: 6.5.0
- Ngôn ngữ chính
- Python
- Star
- 882
- Fork
- 261
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 29
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của GenericMappingTools/pygmt
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
GenericMappingTools/pygmt#5014 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
discussions documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
GenericMappingTools/pygmt#4992 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Improve reporting the GMT version via "pygmt.show_versions()"Có thể đã có người làm @yvonnefroehlich đã nhận 113 ngày trước. Đang mởmaintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
GenericMappingTools/pygmt#4812 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
GenericMappingTools/pygmt#4765 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add an AGENTS.md fileCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởdiscussions
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
GenericMappingTools/pygmt#4677 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của GenericMappingTools/pygmt
Issue tương tự
-
Ubuntu for Debian DevelopersĐang mởDMB documentation good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ubuntu/ubuntu-project-docs#921 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
⏳ Pending feedback 🐛 Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
jumpserver/jumpserver#18282 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
ClickHouse/loom#2014 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accepted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
future-agi/future-agi#5274 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 2 ngày