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

Update to xarray 2023.1.0 #303

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Update to xarray 2023.1.0 #303

wants to merge 27 commits into from

Conversation

bendudson
Copy link
Contributor

@bendudson bendudson commented Oct 29, 2024

Builds on @johnomotani 's #276

I think this also replaces @mikekryjak 's #289 : Any variables, including wtime variables, that are defined on multiple processors are just taken from processor 0.

Changing options passed to xarray.open_mfdataset significantly speeds up opening datasets.

Example 6x faster (3 seconds vs 18):

import xbout
%time bd = xbout.open_boutdataset('./BOUT.dmp.*.nc', inputfilepath='./BOUT.inp')
%memit bd = xbout.open_boutdataset('./BOUT.dmp.*.nc', inputfilepath='./BOUT.inp')

Previously:

CPU times: user 18.7 s, sys: 1.63 s, total: 20.3 s
Wall time: 17.8 s
peak memory: 355.83 MiB, increment: 66.59 MiB

Now:

CPU times: user 2.86 s, sys: 234 ms, total: 3.09 s
Wall time: 3.08 s
peak memory: 322.73 MiB, increment: 51.43 MiB

Upgrades to the most recent version of xarray that still supports python 3.8. note 3.8 is end of life as of Oct 7, 2024.

johnomotani and others added 8 commits January 20, 2023 11:36
xarray behaviour changed, see pydata/xarray#6999
and links from there.
Updates to xarray, meant that 'index' values were not updated when
'coordinate' values were updated. Fix by explicitly updating indexes.
This is the last release that supports python 3.9
Accessing e.g. `ds.dims['x']` produces:

```
FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.
```

This commit changes `dims` to `sizes`.
Xarray's open_mfdataset is very slow for BOUT++ datasets. Other datasets
also have issues (see e.g. pydata/xarray#1385)
though the cause may not be the same.

Using an implementation that opens the datasets and concatenates
significantly speeds up this process.
Using the same concatenation options as in custom implementation.
Has essentially the same performance, much faster than original.
Unused import (numpy.unique)
Duplicated keyword
black formatting
@pep8speaks
Copy link

pep8speaks commented Oct 29, 2024

Hello @bendudson! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2024-11-07 09:45:27 UTC

Mainly lines too long.
_BOUT_PER_PROC_VARIABLES are no longer used in xbout,
since duplicated variables are just taken from the first processor.
@bendudson bendudson changed the title Update to xarray 2024-7-0 Update to xarray 2024.7.0 Oct 29, 2024
bendudson and others added 7 commits October 29, 2024 16:19
Timing info is now taken from the first processor,
rather than dropped.
By eye there are three subplots as required, but there are also some
spurious axes. Unclear to me how to fix, so skipping for now.
xarray 2024.07.0 requires python >= 3.9
@bendudson
Copy link
Contributor Author

Tests pass locally, all failing on github actions. Investigating...

bendudson and others added 3 commits October 29, 2024 21:29
Reduce minimum xarray to 2023.1.0

Python 3.8 is EoL, but only just: Oct 7, 2024.
`_trim` no longer removes `wtime` timing info.
@bendudson bendudson changed the title Update to xarray 2024.7.0 Update to xarray 2023.1.0 Oct 30, 2024
bendudson and others added 5 commits October 29, 2024 21:41
Previously were scalar `xarray.DataArray`, which caused `linspace` to
fail due to missing dimensions
Currently, 3.13 is hanging when running these tests
@ZedThree
Copy link
Member

Last commit didn't rerun tests for some reason. 3.12 is failing with a segfault (!!):

xbout/tests/test_animate.py::TestAnimate::test_animate_list_controls_arg[controls1] PASSED [  6%]
Fatal Python error: Segmentation fault

Thread 0x00007f04c6d03640 (most recent call first):
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/backends/locks.py", line 64 in __enter__
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/backends/locks.py", line 231 in __enter__
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/backends/netCDF4_.py", line 115 in _getitem
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 1018 in explicit_indexing_adapter
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/backends/netCDF4_.py", line 104 in __getitem__
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 657 in get_duck_array
  File Fatal Python error: "Aborted/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py

", line 794 in get_duck_array
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 583 in get_duck_array
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 578 in __array__
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/array/core.py", line 120 in getter
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/core.py", line 133 in _execute_task
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/local.py", line 226 in execute_task
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/local.py", line 240 in batch_execute_tasks
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/concurrent/futures/thread.py", line 58 in run
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/concurrent/futures/thread.py", line 92 in _worker
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/threading.py", line 1012 in run
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/threading.py", line 1075 in _bootstrap_inner
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/threading.py", line 1032 in _bootstrap

Thread 0x00007f04c7d04640 (most recent call first):
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/concurrent/futures/thread.py", line 89 in _worker
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/threading.py", line 1012 in run
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/threading.py", line 1075 in _bootstrap_inner
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/threading.py", line 1032 in _bootstrap

Thread 0x00007f04c8d05640 (most recent call first):
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/backends/netCDF4_.py", line 117 in _getitem
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 1018 in explicit_indexing_adapter
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/backends/netCDF4_.py", line 104 in __getitem__
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 657 in get_duck_array
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 794 in get_duck_array
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 583 in get_duck_array
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 578 in __array__
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/array/core.py", line 120 in getter
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/core.py", line 133 in _execute_task
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/local.py", line 226 in execute_task
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/local.py", line 240 in batch_execute_tasks
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/concurrent/futures/thread.py", line 58 in run
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/concurrent/futures/thread.py", line 92 in _worker
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/threading.py", line 1012 in run
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/threading.py", line 1075 in _bootstrap_inner
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/threading.py", line 1032 in _bootstrap

Thread 0x00007f04c9d06640 (most recent call first):
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/concurrent/futures/thread.py", line 89 in _worker
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/threading.py", line 1012 in run
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/threading.py", line 1075 in _bootstrap_inner
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/threading.py", line 1032 in _bootstrap

Current thread 0x00007f04f4509b80 (most recent call first):
  Garbage-collecting
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/backends/file_manager.py", line 234 in close
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/backends/file_manager.py", line 250 in __del__
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/threading.py", line 299 in __enter__
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/threading.py", line 496 in acquire
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/concurrent/futures/thread.py", line 185 in _adjust_thread_count
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/concurrent/futures/thread.py", line 179 in submit
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/local.py"
Extension modules: , line numpy._core._multiarray_umath496 in fire_tasks
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/local.py", line 501 in get_async
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/threaded.py", line 91 in get
,   File numpy.linalg._umath_linalg"/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/base.py", line 660 in compute
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/base.py", line 3[72](https://github.com/boutproject/xBOUT/actions/runs/11591085041/job/32270069559#step:6:73) in compute, 
cftime._cftime  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/array/core.py", line 1697 in __array__
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/variable.py, "netCDF4._netCDF4, line 352 in _as_array_or_item
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/variable.py", line 554 in values
,   File numpy.random._common"/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/dataarray.py", line 811 in values
  File "/home/runner/work/xBOUT/xBOUT/xbout/plotting/animate.py", numpy.random.bit_generator, line 618 in animate_line
  File "/home/runner/work/xBOUT/xBOUT/xbout/boutdataset.py", numpy.random._bounded_integers, line 1230 in animate_list
  File "/home/runner/work/xBOUT/xBOUT/xbout/tests/test_animate.py", numpy.random._mt19937, line 4[73](https://github.com/boutproject/xBOUT/actions/runs/11591085041/job/32270069559#step:6:74) in test_animate_list_controls_arg
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/python.py", numpy.random.mtrand, line 159 in pytest_pyfunc_call
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_callers.py", , line numpy.random._philox103 in _multicall
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_manager.py", line 120,  in numpy.random._pcg64_hookexec
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_hooks.py", line 513 in __call__, 
numpy.random._sfc64  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/python.py", line 1627 in runtest
  File , "numpy.random._generator/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/runner.py", line 1[74](https://github.com/boutproject/xBOUT/actions/runs/11591085041/job/32270069559#step:6:75) in pytest_runtest_call
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_callers.py", pandas._libs.tslibs.ccalendar, line 103 in _multicall
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec
,   File pandas._libs.tslibs.np_datetime"/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/runner.py", , line pandas._libs.tslibs.dtypes242 in <lambda>
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/runner.py", line 341 in , from_callpandas._libs.tslibs.base
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/runner.py", line 241 in call_and_report
,   File pandas._libs.tslibs.nattype"/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/runner.py", line 132 in runtestprotocol
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/runner.py", line 113 in pytest_runtest_protocol
  File ", /opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_callers.pypandas._libs.tslibs.timezones", line 103 in _multicall
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_manager.py", line , 120pandas._libs.tslibs.fields in _hookexec
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_hooks.py", line 513 in , __call__pandas._libs.tslibs.timedeltas
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/main.py", line 362 in pytest_runtestloop
  File , "pandas._libs.tslibs.tzconversion/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_manager.py, "pandas._libs.tslibs.timestamps, line 120 in _hookexec
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_hooks.py", line , 513pandas._libs.properties in __call__
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/main.py", line 337 in _main, 
pandas._libs.tslibs.offsets  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/main.py", line 283 in wrap_session
  File , "pandas._libs.tslibs.strptime/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/main.py", line 330 in pytest_cmdline_main
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_callers.py, "pandas._libs.tslibs.parsing, line 103 in _multicall
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File , "pandas._libs.tslibs.conversion/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/config/__init__.py, "pandas._libs.tslibs.period, line 1[75](https://github.com/boutproject/xBOUT/actions/runs/11591085041/job/32270069559#step:6:76) in main
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/config/__init__.py", line 201 in console_main, 
pandas._libs.tslibs.vectorized  File "/opt/hostedtoolcache/Python/3.12.7/x64/bin/pytest", line 8 in <module>

@bendudson
Copy link
Contributor Author

Thanks @ZedThree ! The segfault is strange. Something in NetCDF? Possibly related to file locking? I was also geting segfaults (on python 3.9) when passing parallel=True to xarray.open_mfdataset.

@ZedThree
Copy link
Member

I've not checked which test it is exactly, but 3.13 hangs on test_save (see #304)

@bendudson
Copy link
Contributor Author

Tests seem to run about a factor of 2 slower than previously (e.g. https://github.com/boutproject/xBOUT/actions/runs/6983119192/usage about 30 mins). I think it's still worth merging so we can gradually address the performance issues.

@dschwoerer
Copy link
Contributor

Here is a log from valgrind and python 3.13:
builder-live.log.gz

In this case it did not crash and did run for 2 hours ...

The first error is from netCDF:

==571==    at 0x498BB2B: PyLong_FromUnsignedLong (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x1E2E3E04: ??? (in /usr/lib64/python3.13/site-packages/netCDF4/_netCDF4.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A058A0: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A2FBC7: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4AB3F0C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)

Also in matplotlib and numpy there are errors, but most are from netCDF. It might well be that netCDF does not initialise memory and numpy and matplotlib later use that memory.

==571== 632 errors in context 1 of 19:
==571== Use of uninitialised value of size 8
==571==    at 0x1E2E3E31: ??? (in /usr/lib64/python3.13/site-packages/netCDF4/_netCDF4.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A058A0: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A2FBC7: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4AB3F0C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 808 errors in context 2 of 19:
==571== Conditional jump or move depends on uninitialised value(s)
==571==    at 0x890D6C4: ??? (in /usr/lib64/python3.13/site-packages/numpy/core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x8963B32: ??? (in /usr/lib64/python3.13/site-packages/numpy/core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x49AF86E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x88F44CD: ??? (in /usr/lib64/python3.13/site-packages/numpy/core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x49D8374: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49AEC7C: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A2ED9E: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B0A13: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 920 errors in context 3 of 19:
==571== Conditional jump or move depends on uninitialised value(s)
==571==    at 0x890D6BB: ??? (in /usr/lib64/python3.13/site-packages/numpy/core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x8963B32: ??? (in /usr/lib64/python3.13/site-packages/numpy/core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x49AF86E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x88F44CD: ??? (in /usr/lib64/python3.13/site-packages/numpy/core/_multiarray_umath.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x49D8374: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49AEC7C: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A2ED9E: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B0A13: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 3101 errors in context 4 of 19:
==571== Use of uninitialised value of size 8
==571==    at 0x506FC39: ??? (in /usr/lib64/libm.so.6)
==571==    by 0x2BAB32B4: ??? (in /usr/lib64/python3.13/site-packages/matplotlib/backends/_backend_agg.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x49A20C3: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A0829C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A084B1: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49E221B: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4998585: _PyObject_MakeTpCall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B81FF: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 3101 errors in context 5 of 19:
==571== Conditional jump or move depends on uninitialised value(s)
==571==    at 0x506FD8C: ??? (in /usr/lib64/libm.so.6)
==571==    by 0x2BAB32B4: ??? (in /usr/lib64/python3.13/site-packages/matplotlib/backends/_backend_agg.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x49A20C3: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A0829C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A084B1: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49E221B: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4998585: _PyObject_MakeTpCall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B81FF: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 3101 errors in context 6 of 19:
==571== Conditional jump or move depends on uninitialised value(s)
==571==    at 0x506FD7D: ??? (in /usr/lib64/libm.so.6)
==571==    by 0x2BAB32B4: ??? (in /usr/lib64/python3.13/site-packages/matplotlib/backends/_backend_agg.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x49A20C3: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A0829C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A084B1: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49E221B: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4998585: _PyObject_MakeTpCall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B81FF: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 3101 errors in context 7 of 19:
==571== Conditional jump or move depends on uninitialised value(s)
==571==    at 0x506FD6E: ??? (in /usr/lib64/libm.so.6)
==571==    by 0x2BAB32B4: ??? (in /usr/lib64/python3.13/site-packages/matplotlib/backends/_backend_agg.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x49A20C3: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A0829C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A084B1: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49E221B: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4998585: _PyObject_MakeTpCall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B81FF: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 3101 errors in context 8 of 19:
==571== Conditional jump or move depends on uninitialised value(s)
==571==    at 0x506FBC9: ??? (in /usr/lib64/libm.so.6)
==571==    by 0x2BAB32B4: ??? (in /usr/lib64/python3.13/site-packages/matplotlib/backends/_backend_agg.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x49A20C3: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A0829C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A084B1: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49E221B: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4998585: _PyObject_MakeTpCall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B81FF: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 3101 errors in context 9 of 19:
==571== Conditional jump or move depends on uninitialised value(s)
==571==    at 0x506FBBA: ??? (in /usr/lib64/libm.so.6)
==571==    by 0x2BAB32B4: ??? (in /usr/lib64/python3.13/site-packages/matplotlib/backends/_backend_agg.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x49A20C3: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A0829C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A084B1: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49E221B: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4998585: _PyObject_MakeTpCall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B81FF: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 3101 errors in context 10 of 19:
==571== Conditional jump or move depends on uninitialised value(s)
==571==    at 0x504381C: log (in /usr/lib64/libm.so.6)
==571==    by 0x2BAB32B4: ??? (in /usr/lib64/python3.13/site-packages/matplotlib/backends/_backend_agg.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x49A20C3: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A0829C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A084B1: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49E221B: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4998585: _PyObject_MakeTpCall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B81FF: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 10709 errors in context 11 of 19:
==571== Conditional jump or move depends on uninitialised value(s)
==571==    at 0x49EA691: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49830B8: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x1E2E3F96: ??? (in /usr/lib64/python3.13/site-packages/netCDF4/_netCDF4.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A058A0: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A2FBC7: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4AB3F0C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 10709 errors in context 12 of 19:
==571== Conditional jump or move depends on uninitialised value(s)
==571==    at 0x498BB97: PyLong_FromUnsignedLong (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x1E2E3E04: ??? (in /usr/lib64/python3.13/site-packages/netCDF4/_netCDF4.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A058A0: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A2FBC7: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4AB3F0C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 10709 errors in context 13 of 19:
==571== Conditional jump or move depends on uninitialised value(s)
==571==    at 0x498BBEF: _PyLong_New (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x498BB76: PyLong_FromUnsignedLong (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x1E2E3E04: ??? (in /usr/lib64/python3.13/site-packages/netCDF4/_netCDF4.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A058A0: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A2FBC7: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4AB3F0C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 21337 errors in context 14 of 19:
==571== Conditional jump or move depends on uninitialised value(s)
==571==    at 0x49EA6B3: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49830B8: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x1E2E3F96: ??? (in /usr/lib64/python3.13/site-packages/netCDF4/_netCDF4.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A058A0: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A2FBC7: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4AB3F0C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 26060 errors in context 15 of 19:
==571== Use of uninitialised value of size 8
==571==    at 0x499136D: PyList_Append (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x1E2E3F32: ??? (in /usr/lib64/python3.13/site-packages/netCDF4/_netCDF4.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A058A0: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A2FBC7: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4AB3F0C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 26692 errors in context 16 of 19:
==571== Use of uninitialised value of size 8
==571==    at 0x498308F: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x1E2E3F96: ??? (in /usr/lib64/python3.13/site-packages/netCDF4/_netCDF4.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A058A0: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A2FBC7: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4AB3F0C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 26692 errors in context 17 of 19:
==571== Use of uninitialised value of size 8
==571==    at 0x1E2E3E4A: ??? (in /usr/lib64/python3.13/site-packages/netCDF4/_netCDF4.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A058A0: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A2FBC7: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4AB3F0C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 32046 errors in context 18 of 19:
==571== Conditional jump or move depends on uninitialised value(s)
==571==    at 0x498BB5F: PyLong_FromUnsignedLong (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x1E2E3E04: ??? (in /usr/lib64/python3.13/site-packages/netCDF4/_netCDF4.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A058A0: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A2FBC7: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4AB3F0C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== 
==571== 58738 errors in context 19 of 19:
==571== Conditional jump or move depends on uninitialised value(s)
==571==    at 0x498BB2B: PyLong_FromUnsignedLong (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x1E2E3E04: ??? (in /usr/lib64/python3.13/site-packages/netCDF4/_netCDF4.cpython-313-x86_64-linux-gnu.so)
==571==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A058A0: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A2FBC7: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4AB3F0C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==571==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==571== 
==571== ERROR SUMMARY: 247759 errors from 19 contexts (suppressed: 0 from 0)

@ZedThree
Copy link
Member

ZedThree commented Nov 6, 2024

Any chance you could build netcdf locally with debug flags?

@dschwoerer
Copy link
Contributor

Let me try again to install debug symbols ...

@dschwoerer
Copy link
Contributor

@dschwoerer
Copy link
Contributor

==578== Conditional jump or move depends on uninitialised value(s)
==578==    at 0x498BB2B: PyLong_FromUnsignedLong (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x2E2E3E04: UnknownInlinedFun (_netCDF4.c:132349)
==578==    by 0x2E2E3E04: UnknownInlinedFun (_netCDF4.c:62873)
==578==    by 0x2E2E3E04: __pyx_pw_7netCDF4_8_netCDF4_8Variable_37chunking.lto_priv.0 (_netCDF4.c:62684)
==578==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x4A058A0: ??? (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x4A2FBC7: ??? (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x4AB3F0C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==578== 
==578== Conditional jump or move depends on uninitialised value(s)
==578==    at 0x498BB5F: PyLong_FromUnsignedLong (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x2E2E3E04: UnknownInlinedFun (_netCDF4.c:132349)
==578==    by 0x2E2E3E04: UnknownInlinedFun (_netCDF4.c:62873)
==578==    by 0x2E2E3E04: __pyx_pw_7netCDF4_8_netCDF4_8Variable_37chunking.lto_priv.0 (_netCDF4.c:62684)
==578==    by 0x499BFD6: PyObject_Vectorcall (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x49B1E2E: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x4A058A0: ??? (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x4A2FBC7: ??? (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x4AB3F0C: ??? (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x4A8AC17: ??? (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x49B331F: _PyEval_EvalFrameDefault (in /usr/lib64/libpython3.13.so.1.0)
==578==    by 0x4A083E6: ??? (in /usr/lib64/libpython3.13.so.1.0)

I have debug symbols for netCDF working, if you want others I can also have them installed ...

@dschwoerer
Copy link
Contributor

@dschwoerer
Copy link
Contributor

Here is another test-run without LTO for python3-netCDF4 as well as with locking disabled for HDF5:
https://download.copr.fedorainfracloud.org/results/davidsch/testing/fedora-rawhide-x86_64/08225352-python-xbout/builder-live.log

That looks pretty much the same, thus I think it is worth it to escalate it to the netcdf team ...

@ZedThree
Copy link
Member

ZedThree commented Nov 7, 2024

I've removed the libnetcdf installed from apt, so it's definitely not that interfering. We're now seeing three different errors:

A complete failure that kills python entirely:

Fatal Python error: Segmentation fault

Thread 0x00007fa666849640 (most recent call first):
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 1031 in __init__
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 1022 in explicit_indexing_adapter
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/backends/netCDF4_.py", line 104 in __getitem__
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 665 in get_duck_array
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 794 in get_duck_array
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 583 in get_duck_array
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py", line 578 in __array__
  File "_thread", line 32678 in ???
  File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/local.py", line 330 in identity
  File /home/runner/work/_temp/8c463f61-b320-41e4-ac[55](https://github.com/boutproject/xBOUT/actions/runs/11720452108/job/32645798972?pr=303#step:6:56)-243967483e70.sh: line 1:  1888 Segmentation fault      (core dumped) pytest -vv --long --cov
xbout/tests/test_animate.py::TestAnimate::test_animate_list_save_as

An HDF5 error (via netCDF) that raises an exception:

xbout/boutdataset.py:1288: in animate_list
    animate_pcolormesh(
xbout/plotting/animate.py:451: in animate_pcolormesh
    image_data = data.values
/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/dataarray.py:811: in values
    return self.variable.values
/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/variable.py:554: in values
    return _as_array_or_item(self._data)
/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/variable.py:352: in _as_array_or_item
    data = np.asarray(data)
/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/array/core.py:1697: in __array__
    x = self.compute()
/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/base.py:372: in compute
    (result,) = compute(self, traverse=False, **kwargs)
/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/dask/base.py:660: in compute
    results = schedule(dsk, keys, **kwargs)
/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py:578: in __array__
    return np.asarray(self.get_duck_array(), dtype=dtype, copy=copy)
/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py:583: in get_duck_array
    return self.array.get_duck_array()
/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py:794: in get_duck_array
    return self.array.get_duck_array()
/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py:657: in get_duck_array
    array = self.array[self.key]
/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/backends/netCDF4_.py:104: in __getitem__
    return indexing.explicit_indexing_adapter(
/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/core/indexing.py:1018: in explicit_indexing_adapter
    result = raw_indexing_method(raw_key.tuple)
/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/backends/netCDF4_.py:117: in _getitem
    array = getitem(original_array, key)
src/netCDF4/_netCDF4.pyx:5079: in netCDF4._netCDF4.Variable.__getitem__
    ???
src/netCDF4/_netCDF4.pyx:6051: in netCDF4._netCDF4.Variable._get
    ???

and a bit later when reporting captured warnings:

xbout/tests/test_animate.py::TestAnimate::test_animate_list_save_as
  /opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored in: <function CachingFileManager.__del__ at 0x7f14a0699e40>
  
  Traceback (most recent call last):
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/backends/file_manager.py", line 250, in __del__
      self.close(needs_lock=False)
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/xarray/backends/file_manager.py", line 234, in close
      file.close()
    File "src/netCDF4/_netCDF4.pyx", line 2669, in netCDF4._netCDF4.Dataset.close
    File "src/netCDF4/_netCDF4.pyx", line 2636, in netCDF4._netCDF4.Dataset._close
    File "src/netCDF4/_netCDF4.pyx", line 2164, in netCDF4._netCDF4._ensure_nc_success
  RuntimeError: NetCDF: HDF error

And then maybe an memory issue in netCDF4.Variable.chunking:

==578== Conditional jump or move depends on uninitialised value(s)
==578==    at 0x498BB2B: PyLong_FromUnsignedLong (longobject.c:361)
==578==    by 0x2E284D24: __Pyx_PyInt_FromSize_t (_netCDF4.c:132349)
==578==    by 0x2E284D24: __pyx_pf_7netCDF4_8_netCDF4_8Variable_36chunking (_netCDF4.c:62873)
==578==    by 0x2E284D24: __pyx_pw_7netCDF4_8_netCDF4_8Variable_37chunking (_netCDF4.c:62684)
==578==    by 0x499BFD6: UnknownInlinedFun (pycore_call.h:168)
==578==    by 0x499BFD6: PyObject_Vectorcall (call.c:327)

I say maybe because the test doesn't actually seem to fail and there are lots of these uninitialised value errors generated.

Both the explicit errors are in netCDF4.Variable._get which does a fair amount of stuff.

Next step really is to reproduce it locally somehow. Maybe start with the files it's using and see if there's anything weird with them

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

Successfully merging this pull request may close these issues.

5 participants