Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxee crash in windows WSL linux system #61

Closed
fanqi203 opened this issue Dec 8, 2022 · 3 comments
Closed

wxee crash in windows WSL linux system #61

fanqi203 opened this issue Dec 8, 2022 · 3 comments

Comments

@fanqi203
Copy link

fanqi203 commented Dec 8, 2022

I have a code file to use wxee to convert ee image to xarray array data, and it ran successfully on Windows.
But when I ran the same piece of code on Windows Subsystem for Linux (WSL) Ubuntu, it crashes.

Example:

import ee
ee.Initialize()
import wxee
wxee.Initialize()
myregion=ee.Geometry.LineString([[-84, 30], [-70, 45], [-70, 45], [-84, 30]])
cfsr=[]
dem=ee.ImageCollection('NOAA/CFSV2/FOR6H').filter(ee.Filter.date('1996-02-14', '1996-02-19')).select(['u component_of_wind_height_above_ground'])

etc=dem.wx.to_xarray(region=myregion,scale=2000)

print(etc)

The error was

Requesting data: 0%| | 0/20 [00:00<?, ?it/s]malloc(): unsorted double linked list corrupted
Aborted

again, it ran successfully on Windows, but not on WSL.

@aazuspan
Copy link
Owner

aazuspan commented Dec 8, 2022

I don't have a WSL environment to test with, so I'm not able to reproduce the error. It works on my Ubuntu install.

Based on the error message, it's happening at the C level, which might make it tricky to track down and solve. I found one mention of threading as possible cause for this error in Python.

Can you try re-running with dem.wx.to_xarray(region=myregion,scale=2000, num_cores=1)? If communication between threads is the problem, that should solve it by running on a single thread.

@fanqi203
Copy link
Author

fanqi203 commented Dec 9, 2022

setting num_cores=1 solved the problem. Thank you.

@aazuspan
Copy link
Owner

aazuspan commented Dec 9, 2022

Glad that worked!

@aazuspan aazuspan closed this as completed Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants