You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes meteodatalab is used in situations where most of the workload is I/O, so it would make sense to use multiple threads. I find that this is not possible at the moment. When launching embarassingly parallel tasks over multiple threads, only the first submitted thread succeeds and the others fail. That's because of the way the eccodes definition paths are set in the first thread. Related to #49
This gives the following traceback (from one of the threads):
ds = grib_decoder.load(lafds, {"param": "T", "levelist": [1, 2, 3]})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-process/lib/python3.12/site-packages/meteodatalab/grib_decoder.py", line 271, in load
buffer_map = _load_buffer_map(source, request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-process/lib/python3.12/site-packages/meteodatalab/grib_decoder.py", line 198, in _load_buffer_map
for field in fs:
^^
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-process/lib/python3.12/site-packages/meteodatalab/data_source.py", line 87, in _
with grib_def_ctx(grib_def):
^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-process/lib/python3.12/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-process/lib/python3.12/site-packages/meteodatalab/data_source.py", line 34, in cosmo_grib_defs
raise RuntimeError(f"{path} does not exist")
RuntimeError: /scratch/mch/fzanetta/miniforge3/envs/model-archive-process/share/eccodes-cosmo-resources/definitions:/scratch/mch/fzanetta/miniforge3/envs/model-archive-process/share/eccodes/definitions does not exist
Sometimes meteodatalab is used in situations where most of the workload is I/O, so it would make sense to use multiple threads. I find that this is not possible at the moment. When launching embarassingly parallel tasks over multiple threads, only the first submitted thread succeeds and the others fail. That's because of the way the eccodes definition paths are set in the first thread. Related to #49
Minimal reproducible example
This gives the following traceback (from one of the threads):
Current workaround
I am replacing this line
meteodata-lab/src/meteodatalab/data_source.py
Line 33 in 3b5163a
with
del path
.The text was updated successfully, but these errors were encountered: