I see in the docs that as of 1.8.6 hdf threadsafe is available for windows
but only if you use link hdf shared. Is this true with 1.8.17 (or the
latest hdf version)?
Is thread safe available for hdf static in windows?
Thanks,
isaac
I see in the docs that as of 1.8.6 hdf threadsafe is available for windows
but only if you use link hdf shared. Is this true with 1.8.17 (or the
latest hdf version)?
Is thread safe available for hdf static in windows?
Thanks,
isaac
Hi Isaac,
as far as I know the problem with static libraries is not the threadsafety of HDF5 itself, the code is the same, but the initialization & cleanup code. With a shared library, there are such defined entry points when loading and unloading a shared library which does a clean initialization and cleanup, but with a static library there is no such option. If you'd want to use threadsafe HDF5 with the static library, you would need to explicitly call the initialization & cleanup, for instance from your main program or from another shared library at startup/cleanup. I'm not sure whether HDF5 1.8.17 explicitly supports such, it may be possible but not implemented that way.
Werner
On 03.10.2016 20:59, Isaac Gerg wrote:
I see in the docs that as of 1.8.6 hdf threadsafe is available for windows but only if you use link hdf shared. Is this true with 1.8.17 (or the latest hdf version)?
Is thread safe available for hdf static in windows?
Thanks,
isaac_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
--
___________________________________________________________________________
Dr. Werner Benger Visualization Research
Center for Computation & Technology at Louisiana State University (CCT/LSU)
2019 Digital Media Center, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809 Fax.: +1 225 578-5362
Hi all,
Werner is correct. You could build the thread-safe + static library with ALLOW_UNSUPPORTED (under the advanced options if you use ccmake) and implement the thread attach/detach code yourself. You can check out the code in DllMain() at the end of src/H5.c to see what we do, which is actually quite minimal. Basically, you just have to initialize and clean up thread-local storage when you attach and detach threads, respectively.
Cheers,
Dana Robinson
Software Engineer
The HDF Group
From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Werner Benger
Sent: Tuesday, October 4, 2016 2:50 AM
To: hdf-forum@lists.hdfgroup.org
Subject: Re: [Hdf-forum] thread safe work in windows for a hdf static?
Hi Isaac,
as far as I know the problem with static libraries is not the threadsafety of HDF5 itself, the code is the same, but the initialization & cleanup code. With a shared library, there are such defined entry points when loading and unloading a shared library which does a clean initialization and cleanup, but with a static library there is no such option. If you'd want to use threadsafe HDF5 with the static library, you would need to explicitly call the initialization & cleanup, for instance from your main program or from another shared library at startup/cleanup. I'm not sure whether HDF5 1.8.17 explicitly supports such, it may be possible but not implemented that way.
Werner
On 03.10.2016 20:59, Isaac Gerg wrote:
I see in the docs that as of 1.8.6 hdf threadsafe is available for windows but only if you use link hdf shared. Is this true with 1.8.17 (or the latest hdf version)?
Is thread safe available for hdf static in windows?
Thanks,
isaac
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
--
___________________________________________________________________________
Dr. Werner Benger Visualization Research
Center for Computation & Technology at Louisiana State University (CCT/LSU)
2019 Digital Media Center, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809 Fax.: +1 225 578-5362
Thank you all.
Just to be clear, is the native shared lib built with threadsafe?
On Tue, Oct 4, 2016 at 5:06 AM, Dana Robinson <derobins@hdfgroup.org> wrote:
Hi all,
Werner is correct. You could build the thread-safe + static library with
ALLOW_UNSUPPORTED (under the advanced options if you use ccmake) and
implement the thread attach/detach code yourself. You can check out the
code in DllMain() at the end of src/H5.c to see what we do, which is
actually quite minimal. Basically, you just have to initialize and clean up
thread-local storage when you attach and detach threads, respectively.Cheers,
Dana Robinson
Software Engineer
The HDF Group
*From:* Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] *On
Behalf Of *Werner Benger
*Sent:* Tuesday, October 4, 2016 2:50 AM
*To:* hdf-forum@lists.hdfgroup.org
*Subject:* Re: [Hdf-forum] thread safe work in windows for a hdf static?Hi Isaac,
as far as I know the problem with static libraries is not the
threadsafety of HDF5 itself, the code is the same, but the initialization &
cleanup code. With a shared library, there are such defined entry points
when loading and unloading a shared library which does a clean
initialization and cleanup, but with a static library there is no such
option. If you'd want to use threadsafe HDF5 with the static library, you
would need to explicitly call the initialization & cleanup, for instance
from your main program or from another shared library at startup/cleanup.
I'm not sure whether HDF5 1.8.17 explicitly supports such, it may be
possible but not implemented that way.Werner
On 03.10.2016 20:59, Isaac Gerg wrote:
I see in the docs that as of 1.8.6 hdf threadsafe is available for windows
but only if you use link hdf shared. Is this true with 1.8.17 (or the
latest hdf version)?Is thread safe available for hdf static in windows?
Thanks,
isaac
_______________________________________________
Hdf-forum is for HDF software users discussion.
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
--
___________________________________________________________________________
Dr. Werner Benger Visualization Research
Center for Computation & Technology at Louisiana State University (CCT/LSU)
2019 Digital Media Center, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809 Fax.: +1 225 578-5362
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Not by default. The locking scheme has overhead so it's not enabled unless you ask for it.
Dana
From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Isaac Gerg
Sent: Tuesday, October 4, 2016 9:42 AM
To: HDF Users Discussion List <hdf-forum@lists.hdfgroup.org>
Subject: Re: [Hdf-forum] thread safe work in windows for a hdf static?
Thank you all.
Just to be clear, is the native shared lib built with threadsafe?
On Tue, Oct 4, 2016 at 5:06 AM, Dana Robinson <derobins@hdfgroup.org<mailto:derobins@hdfgroup.org>> wrote:
Hi all,
Werner is correct. You could build the thread-safe + static library with ALLOW_UNSUPPORTED (under the advanced options if you use ccmake) and implement the thread attach/detach code yourself. You can check out the code in DllMain() at the end of src/H5.c to see what we do, which is actually quite minimal. Basically, you just have to initialize and clean up thread-local storage when you attach and detach threads, respectively.
Cheers,
Dana Robinson
Software Engineer
The HDF Group
From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org<mailto:hdf-forum-bounces@lists.hdfgroup.org>] On Behalf Of Werner Benger
Sent: Tuesday, October 4, 2016 2:50 AM
To: hdf-forum@lists.hdfgroup.org<mailto:hdf-forum@lists.hdfgroup.org>
Subject: Re: [Hdf-forum] thread safe work in windows for a hdf static?
Hi Isaac,
as far as I know the problem with static libraries is not the threadsafety of HDF5 itself, the code is the same, but the initialization & cleanup code. With a shared library, there are such defined entry points when loading and unloading a shared library which does a clean initialization and cleanup, but with a static library there is no such option. If you'd want to use threadsafe HDF5 with the static library, you would need to explicitly call the initialization & cleanup, for instance from your main program or from another shared library at startup/cleanup. I'm not sure whether HDF5 1.8.17 explicitly supports such, it may be possible but not implemented that way.
Werner
On 03.10.2016 20:59, Isaac Gerg wrote:
I see in the docs that as of 1.8.6 hdf threadsafe is available for windows but only if you use link hdf shared. Is this true with 1.8.17 (or the latest hdf version)?
Is thread safe available for hdf static in windows?
Thanks,
isaac
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
--
___________________________________________________________________________
Dr. Werner Benger Visualization Research
Center for Computation & Technology at Louisiana State University (CCT/LSU)
2019 Digital Media Center, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809<tel:%2B1%20225%20578%204809> Fax.: +1 225 578-5362<tel:%2B1%20225%20578-5362>
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5