xyz2grd crashes python with large grids
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza ejecutando el ejemplo mínimo proporcionado de Python y NumPy para pygmt.xyz2grd con el gran array de 11520 × 23040 en un entorno compatible. Sigue la llamada a xyz2grd y su interacción con GMT para identificar el origen del free no válido. Se considera terminado cuando el ejemplo ya no bloquea Python y sigue produciendo el grid esperado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 882
- Forks
- 261
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 29
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de GenericMappingTools/pygmt
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
GenericMappingTools/pygmt#5014 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
discussions documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
GenericMappingTools/pygmt#4992 ·
Los mantenedores suelen responder en 1 día
-
Improve reporting the GMT version via "pygmt.show_versions()"Posiblemente ocupada @yvonnefroehlich la tomó hace 113 días. Abiertomaintenance
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
GenericMappingTools/pygmt#4812 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
GenericMappingTools/pygmt#4765 ·
Los mantenedores suelen responder en 1 día
-
Add an AGENTS.md filePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertodiscussions
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
GenericMappingTools/pygmt#4677 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de GenericMappingTools/pygmt
Issues similares
-
accepted
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
future-agi/future-agi#5274 ·
Los mantenedores suelen responder en 1 día
-
Feed validator crashes with "Memory error" when validating https://www.tidyverse.org/index.xmlAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
w3c/feedvalidator#204 ·
-
[BUG][Low–Medium] founder_numbers.py silently reads a SAFE discount or pool target given as a fraction (0.2) as 0.2%Posiblemente ocupada @sumitkhond111-del la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bmad-code-org/BMAD-METHOD#3358 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
open-mmlab/mmcv#3352 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
OpenGithubs/weekly#263 ·
Los mantenedores suelen responder en 1 día