-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
When using UDA+cache and IMAS-Python without lazy loading, I get the following error:
status, data = ll_interface.read_data(
^^^^^^^^^^^^^^^^^^^^^^^
File "_al_lowlevel.pyx", line 998, in imas_core._al_lowlevel.al_read_data
File "_al_lowlevel.pyx", line 849, in imas_core._al_lowlevel.al_read_data_scalar
imas_core.exception.ALException: Error while reading data: al_plugin_read_data: boost::bad_get: failed value get using boost::get
When I disable UDA cache and enable IMAS-Python lazy loading, reading works.
Here is a minimal python code that triggers the error:
##################
import imas
URI_UDA = "imas://uda.iter.org/uda?path=/work/imas/shared/imasdb/ITER/3/121013/50&backend=hdf5&verbose=1" # &cache_mode=none"
in_dbentry = imas.DBEntry(URI_UDA, "r")
in_cp = in_dbentry.get("core_profiles", autoconvert=False) #, lazy=True)
print("Read time array:", in_cp.time)
##################
On SDCC load the IMAS-Python module, run this script, and you get:
imas_core.exception.ALException: Error while reading data: al_plugin_read_data: boost::bad_get: failed value get using boost::get
If you change the lines that have the comment at the end:
URI_UDA = "imas://uda.iter.org/uda?path=/work/imas/shared/imasdb/ITER/3/121013/50&backend=hdf5&verbose=1&cache_mode=none"
and
in_cp = in_dbentry.get("core_profiles", autoconvert=False, lazy=True)
thus disabling UDA cache and enabling lazy loading in IMAS-PYTHON, this works as expected:
Read time array: <IDSNumericArray (IDS:core_profiles, time, FLT_1D)>
numpy.ndarray([200.])
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels