Copyrighrt (c) 2014-2020 UPVI, LLC
Welcome, Guest
Username: Password: Remember me
LVHDF5 Toolkit Forum
  • Page:
  • 1

TOPIC:

Parallel access to HDF5 references crashes LV2016 3 years 10 months ago #58

  • RST
  • RST's Avatar Topic Author
  • Visitor
  • Visitor
Yes, you understood me correctly. The first VI crashes the LabVIEW IDE, the second works fine.
I agree that thread safety and parallel access should not be implemented on the side of your library. Prior to my test I just did not know what to expect from HDF5 itself. Now that I know, it's Ok for me to care for serialized access in my application myself. For this use Live HDF5 works great and I'm happy to have it. Thanks for your work!
A hint in the help would still be useful. In my eyes it’s not too farfetched to have several parallel processes that try to write data into different data sets in the same HDF5 file. And of course it would be nice if this LabVIEW crash would not occur. But since this is out of your hands, I think I can live with it.

Please Log in or Create an account to join the conversation.

Parallel access to HDF5 references crashes LV2016 3 years 10 months ago #57

  • jdsommer
  • jdsommer's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 23
  • Thank you received: 1
Hello RST

Just so I understand you, your second version works, but the first version crashes, correct?

In any case, parallel access is definitely a problem with the underlying hdf5 DLL, as I haven't provided a threadsafe version I provide the default build of the library. I will agree with you that it shouldn't crash, but it's somewhat out of my hands as the culprit is actually the HDF5 DLL. I could, of course, provide the protection that you implemented in your second VI, but I decided that the performance hit when its not necessary to have such protection might not be acceptable to some users. Since the overwhelming majority of users do not use parallel access, I'm okay with this.

None-the-less, thank you for pointing out the problem as it will be helpful for other users who may encounter this. I should probably add some more about this use case into the documentation somewhere.

Jason

Please Log in or Create an account to join the conversation.

Parallel access to HDF5 references crashes LV2016 3 years 10 months ago #54

  • RST
  • RST's Avatar Topic Author
  • Visitor
  • Visitor
In an example I tried to check if Live HDF5 serializes parallel writes to datasets itself or if the application has to care for serialization. Attached you find the VI. Obviously this use of the library is not allowed. LabVIEW2016 crashes whenever I try to start this VI.
In the second version of the example I avoided simultaneous write access by data dependency and semaphores. This version works as expected. Skimming the LiveHDF5 help I did not find any hints on this misuse - maybe I just overlooked it!? However I think it should not crash LabVIEW but throw an error.
Attachments:

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.146 seconds