Open ofuhrer opened 4 years ago
This code is for writing. For reading there is fs_get_savepoint_metainfo
.
Well, the error message actually occurrs on the fs_create_savepoint('sfc_sice-in', ppser_savepoint)
which tries to open a savepoint WITHOUT metadata. The fs_add_savepoint_metainfo()
is never reached. So my question remains the same, how can I access a specific savepoint with a given meta-data (e.g. ID=1
)?
I think, I understand your problem now, and you're might be right that there is an issue.
Have you tried to open the savepoint as 'sfc_sice-in {ID=1}'
or something like that?
That's my point. There's no API in Fortran for doing exactly that, afaik! Sorry for not phrasing my issue well enough...
But how does fs_create_savepoint
knows whether it is called in write or read context?
I think the serializer object is either in read
or write
mode. But not sure...
But the serializer object is not passed to the subroutine.
Are you sure that the error is thrown by fs_create_savepoint
? It's long time ago that I worked on Serialbox, but that behavior appears a bit strange to me. I think, the error should appear when you try to access some field with this savepoint.
Well the Fortran API exposed via m_serialize.f90
retains state internally by retaining the current serializer and savepoint objects.
Not afaik. The created objects are held by the client application and passed as parameters to the API routines.
Sorry, I meant arguments not parameters. Stupid Fortran... ;-)
It seems that the Fortran interface is mostly meant for writing and not reading. To my understanding, it is not possible to read data from a savepoint with meta-data...
...will exit with an error saying that
Serialbox: ERROR: savepoint 'sfc_sice-in {}' does not exist
. While the above is ok for writing (specifying meta-data after creating a savepoint is ok), for reading this does not work.