Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make H5FL package threadsafe #5195

Open
wants to merge 704 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
704 commits
Select commit Hold shift + click to select a range
9fbc4dc
Merge remote-tracking branch 'origin/develop' into threading_updates
qkoziol Jun 13, 2024
e9a784c
Add emulated semaphore and regression tests for semaphores
qkoziol Jun 14, 2024
1a5bbd5
Add rest of files
qkoziol Jun 14, 2024
16ab253
Switch thread pools to use semaphore and remove MACH case for semapho…
qkoziol Jun 17, 2024
41ab4b8
Committing clang-format changes
github-actions[bot] Jun 17, 2024
8d21941
Merge remote-tracking branch 'origin/develop' into threading_updates
qkoziol Jun 17, 2024
da9b6f0
Merge remote-tracking branch 'origin/threading_updates' into non_rec_…
qkoziol Jun 17, 2024
afbdeba
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Jun 17, 2024
762f7d7
Fix C++ build
qkoziol Jun 17, 2024
0a9e269
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Jun 17, 2024
d5642c0
Move rest of hot routines inline
qkoziol Jun 17, 2024
23ab433
Correct warnings
qkoziol Jun 17, 2024
c408b25
Committing clang-format changes
github-actions[bot] Jun 17, 2024
1b2861a
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Jun 17, 2024
1dc3983
Committing clang-format changes
github-actions[bot] Jun 17, 2024
9755a27
Merge remote-tracking branch 'origin/develop' into threading_updates
qkoziol Jun 18, 2024
c98f90a
Merge remote-tracking branch 'origin/threading_updates' into non_rec_…
qkoziol Jun 18, 2024
fc8f94b
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Jun 18, 2024
9190f91
Merge remote-tracking branch 'origin/develop' into threading_updates
qkoziol Jun 25, 2024
3b4016a
Merge remote-tracking branch 'origin/threading_updates' into non_rec_…
qkoziol Jun 25, 2024
7474b4d
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Jun 25, 2024
58cbc5c
Add BEFORE/AFTER user callback wrappers to missed VFD callbacks
qkoziol Jun 26, 2024
76ee4ea
Committing clang-format changes
github-actions[bot] Jun 26, 2024
6eef1a2
Merge remote-tracking branch 'origin/develop' into threading_updates
qkoziol Jun 27, 2024
d2ee4cd
Merge remote-tracking branch 'origin/threading_updates' into non_rec_…
qkoziol Jun 27, 2024
015c029
Committing clang-format changes
github-actions[bot] Jun 27, 2024
909015c
Committing clang-format changes
github-actions[bot] Jun 27, 2024
9e58936
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Jun 27, 2024
218f662
Merge remote-tracking branch 'origin/develop' into threading_updates
qkoziol Jul 2, 2024
981ec35
Merge remote-tracking branch 'origin/threading_updates' into non_rec_…
qkoziol Jul 2, 2024
06bc0a8
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Jul 2, 2024
dbe90c8
Small optimizations to thread pools
qkoziol Jul 2, 2024
7746097
Committing clang-format changes
github-actions[bot] Jul 2, 2024
8ced6e4
Rename routines for acquiring & releasing API mutex
qkoziol Jul 5, 2024
9725b38
Merge remote-tracking branch 'origin/develop' into threading_updates
qkoziol Jul 5, 2024
d4fe1dd
Merge remote-tracking branch 'origin/threading_updates' into non_rec_…
qkoziol Jul 5, 2024
cf94f43
Optimize setting & getting thread-specific keys
qkoziol Jul 5, 2024
35bd789
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Jul 5, 2024
712d4e0
Committing clang-format changes
github-actions[bot] Jul 5, 2024
b16c9cb
Committing clang-format changes
github-actions[bot] Jul 6, 2024
0aae351
Committing clang-format changes
github-actions[bot] Jul 6, 2024
d15663e
Make H5FL package threadsafe and add efficient mutex for the 'DLFTT' …
qkoziol Jul 6, 2024
dd1cc71
Committing clang-format changes
github-actions[bot] Jul 6, 2024
b2ed8f9
Merge remote-tracking branch 'origin/develop' into threading_updates
qkoziol Jul 12, 2024
476d0f0
Merge remote-tracking branch 'origin/threading_updates' into non_rec_…
qkoziol Jul 12, 2024
aaa7868
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Jul 12, 2024
aa44b1f
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Jul 12, 2024
30501f0
Committing clang-format changes
github-actions[bot] Jul 12, 2024
55b2806
Revert a few changes, to make a cleaner diff
qkoziol Jul 12, 2024
7dda0f5
Remove non-concurrency changes
qkoziol Jul 12, 2024
c0ccec2
Committing clang-format changes
github-actions[bot] Jul 12, 2024
1e584c1
Protect the memory limits and fix factory issues
qkoziol Jul 13, 2024
54aa69a
Committing clang-format changes
github-actions[bot] Jul 13, 2024
c6babd1
Cleanup code a bit
qkoziol Jul 13, 2024
d2fe48f
Check if factories are initialized
qkoziol Jul 15, 2024
696124a
Committing clang-format changes
github-actions[bot] Jul 15, 2024
2cacd25
Merge remote-tracking branch 'origin/develop' into threading_updates
qkoziol Jul 15, 2024
b43305e
Merge remote-tracking branch 'origin/threading_updates' into non_rec_…
qkoziol Jul 15, 2024
95d6a8c
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Jul 15, 2024
a3eef49
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Jul 15, 2024
a7da18c
Fix typo in configure check
qkoziol Jul 15, 2024
11f1a0d
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Jul 15, 2024
d488bd0
Move global variable initialization code out of H5TS header
qkoziol Jul 16, 2024
26f5308
Committing clang-format changes
github-actions[bot] Jul 16, 2024
67551c6
Fix check for threads in subfiling check
qkoziol Jul 16, 2024
847f473
Merge remote-tracking branch 'origin/develop' into threading_updates
qkoziol Jul 16, 2024
14cce82
Merge remote-tracking branch 'origin/threading_updates' into non_rec_…
qkoziol Jul 16, 2024
714437f
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Jul 16, 2024
a9234e4
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Jul 16, 2024
421378a
Redistribute code back to threading_updates branch
qkoziol Jul 17, 2024
8cf564c
Redistribute code between this branch and the non_rec_rwlock branch
qkoziol Jul 17, 2024
0a40eb8
Merge remote-tracking branch 'origin/develop' into threading_updates
qkoziol Jul 17, 2024
7778b78
Committing clang-format changes
github-actions[bot] Jul 17, 2024
8c47af8
Remove voidp atomics
qkoziol Jul 17, 2024
92d8ca7
Fix typo
qkoziol Jul 17, 2024
a3e7bfa
Redistribute code between this branch and the non_rec_rwlock branch
qkoziol Jul 17, 2024
e3dd94f
Fixed usage issue with FindZLIB.cmake module (#4655)
byrnHDF Jul 16, 2024
7d0e3a3
Eliminate more H5E_BEGIN/END_TRY macros and H5E_clear_stack() calls (…
qkoziol Jul 17, 2024
0d55938
Make VOL CI run against current branch (#4654)
mattjala Jul 17, 2024
92eb3d3
Committing clang-format changes
github-actions[bot] Jul 17, 2024
7b3b3bd
Remove voidp atomics
qkoziol Jul 17, 2024
9d62227
Fix typo
qkoziol Jul 17, 2024
958eaa3
Redistribute code between this branch and the non_rec_rwlock branch
qkoziol Jul 17, 2024
6636db2
Remove voidp atomics
qkoziol Jul 17, 2024
4573806
Fix typo
qkoziol Jul 17, 2024
d5f5735
Restore atomic voidp inline routines
qkoziol Jul 18, 2024
afae630
Merge remote-tracking branch 'origin/threading_updates' into non_rec_…
qkoziol Jul 18, 2024
b3b1584
Committing clang-format changes
github-actions[bot] Jul 18, 2024
ce70682
Restore atomic voidp routines
qkoziol Jul 18, 2024
a509273
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Jul 18, 2024
4f8305e
Merge remote-tracking branch 'origin/develop' into threading_updates
qkoziol Jul 24, 2024
58c75f3
Yield thread's timeslice when spin-waiting for barrier completion
qkoziol Jul 24, 2024
b2e6e4d
Committing clang-format changes
github-actions[bot] Jul 24, 2024
e5f8cbd
Merge remote-tracking branch 'origin/threading_updates' into non_rec_…
qkoziol Jul 24, 2024
1c681af
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Jul 24, 2024
e0a5184
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Jul 24, 2024
d95abf4
Merge remote-tracking branch 'origin/develop' into non_rec_rwlock
qkoziol Aug 2, 2024
44ec13c
Merge remote-tracking branch 'origin/develop' into non_rec_rwlock
qkoziol Aug 3, 2024
f13fde9
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Aug 3, 2024
b1720a7
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Aug 3, 2024
a1445c4
Merge remote-tracking branch 'origin/develop' into non_rec_rwlock
qkoziol Aug 17, 2024
d3a8f6a
Merge remote-tracking branch 'origin/non_rec_rwlock' into locking_pro…
qkoziol Aug 17, 2024
7f6b4d6
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Aug 17, 2024
8c0d675
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Sep 20, 2024
68a5541
Fixups after merging from TOT
qkoziol Sep 20, 2024
b2c72a0
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Sep 20, 2024
fcfd7cd
Remove missed NVIDIA copyright lines
qkoziol Sep 20, 2024
91c9b3c
More cleanups from merge, updated RELEASE.txt, code tidying
qkoziol Sep 21, 2024
edbf13c
Committing clang-format changes
github-actions[bot] Sep 21, 2024
cc77afe
Debug CI failure on github
qkoziol Sep 22, 2024
fcc71dd
Cleanups while preparing to submit PR
qkoziol Sep 22, 2024
d8f1b74
Committing clang-format changes
github-actions[bot] Sep 22, 2024
287c78f
Fix missing routine on MacOS ttsafe test (#4863)
mattjala Sep 23, 2024
defb041
Fixes a segfault in h5dump (#4862)
bmribler Sep 23, 2024
1152d93
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Oct 1, 2024
bb08384
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Oct 2, 2024
877ce80
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Oct 3, 2024
e41514e
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Oct 3, 2024
e0b67a2
Committing clang-format changes
github-actions[bot] Oct 3, 2024
d991219
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Oct 6, 2024
aa50796
Committing clang-format changes
github-actions[bot] Oct 6, 2024
64a28b3
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Oct 9, 2024
2f379d2
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Oct 16, 2024
4c9b00c
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Oct 18, 2024
b116bd7
Correct misc. issues from changes on develop
qkoziol Oct 21, 2024
153c56a
Committing clang-format changes
github-actions[bot] Oct 21, 2024
ee57b11
Add rwlock emulation on MacOS
qkoziol Oct 22, 2024
c25aac4
Remove FALSE from some API tests (#4977)
jhendersonHDF Oct 18, 2024
0d32364
Set the C standard to 11 (#4975)
derobins Oct 18, 2024
82a0ea9
Remove the high-level GIF tools (#4976)
derobins Oct 18, 2024
f07868d
Renamed COPYING to LICENSE (#4978)
derobins Oct 19, 2024
f3cae8f
Always check for __attribute__() in CMake (#4980)
derobins Oct 20, 2024
2eb9ccd
Remove some Solaris Studio work-arounds (#4979)
derobins Oct 20, 2024
0c1eb7d
Check in generated files in src (#4981)
derobins Oct 20, 2024
8d0a602
Move h5_test_init() calls after MPI_Init (#4988)
jhendersonHDF Oct 21, 2024
1031b19
Remove bin/cmakehdf5
Oct 22, 2024
729a6f5
Replace COPYING with LICENSE in workflows (#4989)
byrnHDF Oct 22, 2024
f7915dc
Prefix remaining CMake options except for CMake BUILD* variables (#4990)
byrnHDF Oct 22, 2024
0fd9afc
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Oct 23, 2024
2c1cb90
Committing clang-format changes
github-actions[bot] Oct 23, 2024
9e41db9
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Oct 24, 2024
688cde5
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Oct 24, 2024
69d3d28
Committing clang-format changes
github-actions[bot] Oct 24, 2024
94b1b77
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Oct 24, 2024
4426f03
Remove API routine calls from within the library
qkoziol Oct 26, 2024
8e7ccf7
Committing clang-format changes
github-actions[bot] Oct 26, 2024
cfdde80
Revert change
qkoziol Oct 26, 2024
5832f7d
Switch 'return NULL' to HGOTO_DONE(NULL) in H5allocate_memory
qkoziol Oct 26, 2024
a94f074
Minor cleanups
qkoziol Oct 26, 2024
2af59a1
Protect more user callbacks
qkoziol Oct 26, 2024
a2e0f5b
Committing clang-format changes
github-actions[bot] Oct 26, 2024
affe3a2
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Oct 26, 2024
b14ce95
Merge branch 'develop' into locking_protocol
derobins Oct 29, 2024
2473d07
Update FUNC_ENTER
qkoziol Oct 30, 2024
5226226
Merge branch 'develop' into locking_protocol
qkoziol Oct 30, 2024
84ae455
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Oct 31, 2024
87d91c1
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Oct 31, 2024
473cebc
Correct some atomics issues
qkoziol Oct 31, 2024
d9cfc84
Committing clang-format changes
github-actions[bot] Oct 31, 2024
4060515
Switch #ifdef to correct macro
qkoziol Nov 18, 2024
f9900b4
Correct free-list test
qkoziol Nov 18, 2024
03ebc01
Committing clang-format changes
github-actions[bot] Nov 18, 2024
6bc58bc
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Nov 18, 2024
ae27cd1
Add user-callback wrappers to complex conversions
qkoziol Nov 18, 2024
e616ecc
Committing clang-format changes
github-actions[bot] Nov 18, 2024
32cfa19
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Nov 19, 2024
9ba65be
Enable checking for threads.h
qkoziol Nov 19, 2024
ff8471e
Committing clang-format changes
github-actions[bot] Nov 19, 2024
30ab7bd
Correct API LOCK/UNLOCK macros for non-threadsafe builds
qkoziol Nov 19, 2024
1b8ad8d
Enable checking for threads.h
qkoziol Nov 19, 2024
191205f
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Nov 19, 2024
fa313f0
Committing clang-format changes
github-actions[bot] Nov 19, 2024
a8e8fd2
Committing clang-format changes
github-actions[bot] Nov 19, 2024
5be85c8
Refactor location of threading package
qkoziol Nov 19, 2024
1fd01b4
Fix thread library
qkoziol Nov 19, 2024
c805c2f
Update threading config
qkoziol Nov 19, 2024
dcabd89
Work on thread config
qkoziol Nov 19, 2024
51d1f5a
Update thread library
qkoziol Nov 19, 2024
883cbbe
Revert changes for detecting C11 threads
qkoziol Nov 20, 2024
8e52cfa
Fix typo
qkoziol Nov 21, 2024
b07f941
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Nov 21, 2024
71d3378
Add wrappers for atomics in non-concurrent builds
qkoziol Nov 21, 2024
b1f9d9d
Committing clang-format changes
github-actions[bot] Nov 21, 2024
da26810
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Nov 22, 2024
f3cc44c
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Nov 22, 2024
a4b5e66
Test compile info
qkoziol Nov 22, 2024
ff1dde9
Focus testing on problem build
qkoziol Nov 22, 2024
5c6b895
Add more debugging
qkoziol Nov 22, 2024
1e188f4
Tune to Windows
qkoziol Nov 22, 2024
b656619
Committing clang-format changes
github-actions[bot] Nov 22, 2024
963c6c3
Fix MSVC pragma
qkoziol Nov 22, 2024
3303567
Fix the failures on non-concurrent builds
qkoziol Nov 23, 2024
daca1fe
Committing clang-format changes
github-actions[bot] Nov 23, 2024
588af1b
Switch more atomics to macros
qkoziol Nov 23, 2024
d42953e
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Nov 26, 2024
0faf451
Remove prototype for unused routine.
qkoziol Nov 26, 2024
a1fa3ab
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Nov 26, 2024
b228138
Committing clang-format changes
github-actions[bot] Nov 26, 2024
06323a1
Committing clang-format changes
github-actions[bot] Nov 27, 2024
10529cf
Add comments
qkoziol Nov 27, 2024
c1656dd
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Nov 27, 2024
2c2993d
Try to prevent errors if an unknown multithreading mode is encountered
qkoziol Dec 3, 2024
b209735
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Dec 3, 2024
594c12d
Add missed protection around user callback
qkoziol Dec 4, 2024
d708126
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Dec 4, 2024
5cbfa4d
Fix typo
qkoziol Dec 4, 2024
6d287e1
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Dec 4, 2024
898a7a9
Fix warning
qkoziol Dec 4, 2024
0f7e26c
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Dec 4, 2024
e37d23a
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Dec 15, 2024
e7e1553
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Dec 15, 2024
7d28ecd
Merge remote-tracking branch 'origin/develop' into locking_protocol
qkoziol Dec 17, 2024
56d2f52
Follow changes on develop
qkoziol Dec 17, 2024
a583a12
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Dec 17, 2024
18fe722
Embrace more uses of H5_BEFORE_USER_CB*
qkoziol Dec 17, 2024
58a2310
Committing clang-format changes
github-actions[bot] Dec 17, 2024
45150ef
Try updating clang format options to know about H5_PAUSE/RESUME_ERRORS
qkoziol Dec 18, 2024
4363094
Fix(?) clang format syntax
qkoziol Dec 18, 2024
f77bc18
Committing clang-format changes
github-actions[bot] Dec 18, 2024
c932bda
Disable clang formatting for these blocks again
qkoziol Dec 18, 2024
1ee9892
Committing clang-format changes
github-actions[bot] Dec 18, 2024
4951361
Fix blocks again!
qkoziol Dec 18, 2024
92b2bc5
Committing clang-format changes
github-actions[bot] Dec 18, 2024
153226e
Try again
qkoziol Dec 18, 2024
4050130
Committing clang-format changes
github-actions[bot] Dec 18, 2024
401bed4
Merge remote-tracking branch 'origin/locking_protocol' into ts_h5fl_reg
qkoziol Dec 18, 2024
4ba7ca2
Merge remote-tracking branch 'origin/develop' into ts_h5fl_reg
qkoziol Dec 20, 2024
901d6b3
Add random tester for "regular" free list operations
qkoziol Dec 24, 2024
17c688d
Committing clang-format changes
github-actions[bot] Dec 24, 2024
3ac939e
Merge remote-tracking branch 'origin/develop' into ts_h5fl_reg
qkoziol Dec 24, 2024
4b024d6
Only run multithreaded H5FL tests when concurrency enabled
qkoziol Dec 24, 2024
0e81fbf
Committing clang-format changes
github-actions[bot] Dec 24, 2024
443612b
Add tests for threadsafe 'factory' free list operations
qkoziol Dec 24, 2024
e672f5c
Committing clang-format changes
github-actions[bot] Dec 24, 2024
00270b7
Add testing for 'block' operations
qkoziol Dec 29, 2024
2db28c5
Committing clang-format changes
github-actions[bot] Dec 29, 2024
d96adf8
Remove assert() that's incorrect in concurrent mode
qkoziol Dec 30, 2024
99aafb5
Add 'array' testing
qkoziol Dec 30, 2024
8ccdcab
Committing clang-format changes
github-actions[bot] Dec 30, 2024
3676f3c
Merge remote-tracking branch 'origin/develop' into ts_h5fl_reg
qkoziol Dec 30, 2024
6ceb9df
Merge remote-tracking branch 'origin/develop' into ts_h5fl_reg
qkoziol Jan 2, 2025
6b3c69a
Merge remote-tracking branch 'origin/develop' into ts_h5fl_reg
qkoziol Jan 7, 2025
31e1c07
Merge remote-tracking branch 'origin/develop' into ts_h5fl_reg
qkoziol Jan 13, 2025
9b2acbb
Update to track changes on develop branch
qkoziol Jan 13, 2025
21323c1
Merge remote-tracking branch 'origin/develop' into ts_h5fl_reg
qkoziol Jan 20, 2025
358dc55
Merge remote-tracking branch 'origin/develop' into ts_h5fl_reg
qkoziol Jan 24, 2025
4522320
Merge remote-tracking branch 'origin/develop' into ts_h5fl_reg
qkoziol Feb 2, 2025
6247631
Remove accidental inclusion of NVIDIA copyright
qkoziol Feb 6, 2025
28f4f91
Merge remote-tracking branch 'origin/develop' into ts_h5fl_reg
qkoziol Feb 6, 2025
851aa9f
Remove unintentionally included text file
qkoziol Feb 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,7 @@ set (H5TS_SOURCES
${HDF5_SRC_DIR}/H5TSbarrier.c
${HDF5_SRC_DIR}/H5TSc11.c
${HDF5_SRC_DIR}/H5TScond.c
${HDF5_SRC_DIR}/H5TSdlftt_mutex.c
${HDF5_SRC_DIR}/H5TSint.c
${HDF5_SRC_DIR}/H5TSkey.c
${HDF5_SRC_DIR}/H5TSmutex.c
Expand Down
4 changes: 4 additions & 0 deletions src/H5.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ H5_init_library(void)
* default FAPL.
*
*/
#ifdef H5_HAVE_CONCURRENCY
if (H5FL_init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize free list interface");
#endif
if (H5E_init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize error interface");
if (H5FD_init() < 0)
Expand Down
1,457 changes: 1,103 additions & 354 deletions src/H5FL.c

Large diffs are not rendered by default.

38 changes: 28 additions & 10 deletions src/H5FLprivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/* Public headers needed by this file */

/* Private headers needed by this file */
#include "H5TSprivate.h" /* Threadsafety */

/* Macros for turning off free lists in the library */
/*#define H5_NO_FREE_LISTS*/
Expand All @@ -46,7 +47,11 @@ typedef struct H5FL_reg_node_t {

/* Data structure for free list of blocks */
typedef struct H5FL_reg_head_t {
bool init; /* Whether the free list has been initialized */
H5_global_t dlcp_info; /* Information for init */
/* (MUST be first field in structure) */
#ifdef H5_HAVE_CONCURRENCY
H5TS_dlftt_mutex_t mutex; /* Guard access to this free list */
#endif /* H5_HAVE_CONCURRENCY */
unsigned allocated; /* Number of blocks allocated */
unsigned onlist; /* Number of blocks on free list */
const char *name; /* Name of the type */
Expand All @@ -60,7 +65,7 @@ typedef struct H5FL_reg_head_t {
#define H5FL_REG_NAME(t) H5_##t##_reg_free_list
#ifndef H5_NO_REG_FREE_LISTS
/* Common macros for H5FL_DEFINE & H5FL_DEFINE_STATIC */
#define H5FL_DEFINE_COMMON(t) H5FL_reg_head_t H5FL_REG_NAME(t) = {0, 0, 0, #t, sizeof(t), NULL}
#define H5FL_DEFINE_COMMON(t) H5FL_reg_head_t H5FL_REG_NAME(t) = {.name = #t, .size = sizeof(t)}

/* Declare a free list to manage objects of type 't' */
#define H5FL_DEFINE(t) H5_DLL H5FL_DEFINE_COMMON(t)
Expand Down Expand Up @@ -117,12 +122,16 @@ typedef struct H5FL_blk_node_t {

/* Data structure for priority queue of native block free lists */
typedef struct H5FL_blk_head_t {
bool init; /* Whether the free list has been initialized */
H5_global_t dlcp_info; /* Information for init */
/* (MUST be first field in structure) */
#ifdef H5_HAVE_CONCURRENCY
H5TS_dlftt_mutex_t mutex; /* Guard access to this free list */
#endif /* H5_HAVE_CONCURRENCY */
unsigned allocated; /* Total number of blocks allocated */
unsigned onlist; /* Total number of blocks on free list */
size_t list_mem; /* Total amount of memory in blocks on free list */
const char *name; /* Name of the type */
H5FL_blk_node_t *head; /* Pointer to first free list in queue */
H5FL_blk_node_t *pq; /* Pointer to first free list in queue */
} H5FL_blk_head_t;

/*
Expand All @@ -131,7 +140,7 @@ typedef struct H5FL_blk_head_t {
#define H5FL_BLK_NAME(t) H5_##t##_blk_free_list
#ifndef H5_NO_BLK_FREE_LISTS
/* Common macro for H5FL_BLK_DEFINE & H5FL_BLK_DEFINE_STATIC */
#define H5FL_BLK_DEFINE_COMMON(t) H5FL_blk_head_t H5FL_BLK_NAME(t) = {0, 0, 0, 0, #t "_blk", NULL}
#define H5FL_BLK_DEFINE_COMMON(t) H5FL_blk_head_t H5FL_BLK_NAME(t) = {.name = #t "_blk"}

/* Declare a free list to manage objects of type 't' */
#define H5FL_BLK_DEFINE(t) H5_DLL H5FL_BLK_DEFINE_COMMON(t)
Expand Down Expand Up @@ -190,7 +199,11 @@ typedef struct H5FL_arr_node_t {

/* Data structure for free list of array blocks */
typedef struct H5FL_arr_head_t {
bool init; /* Whether the free list has been initialized */
H5_global_t dlcp_info; /* Information for init */
/* (MUST be first field in structure) */
#ifdef H5_HAVE_CONCURRENCY
H5TS_dlftt_mutex_t mutex; /* Guard access to this free list */
#endif /* H5_HAVE_CONCURRENCY */
unsigned allocated; /* Total number of blocks allocated */
size_t list_mem; /* Amount of memory in block on free list */
const char *name; /* Name of the type */
Expand All @@ -207,7 +220,8 @@ typedef struct H5FL_arr_head_t {
#ifndef H5_NO_ARR_FREE_LISTS
/* Common macro for H5FL_ARR_DEFINE & H5FL_ARR_DEFINE_STATIC (and H5FL_BARR variants) */
#define H5FL_ARR_DEFINE_COMMON(b, t, m) \
H5FL_arr_head_t H5FL_ARR_NAME(t) = {0, 0, 0, #t "_arr", m + 1, b, sizeof(t), NULL}
H5FL_arr_head_t H5FL_ARR_NAME(t) = { \
.name = #t "_arr", .maxelem = m + 1, .base_size = b, .elem_size = sizeof(t)}

/* Declare a free list to manage arrays of type 't' */
#define H5FL_ARR_DEFINE(t, m) H5_DLL H5FL_ARR_DEFINE_COMMON(0, t, m)
Expand Down Expand Up @@ -266,8 +280,7 @@ typedef struct H5FL_seq_head_t {
#define H5FL_SEQ_NAME(t) H5_##t##_seq_free_list
#ifndef H5_NO_SEQ_FREE_LISTS
/* Common macro for H5FL_SEQ_DEFINE & H5FL_SEQ_DEFINE_STATIC */
#define H5FL_SEQ_DEFINE_COMMON(t) \
H5FL_seq_head_t H5FL_SEQ_NAME(t) = {{0, 0, 0, 0, #t "_seq", NULL}, sizeof(t)}
#define H5FL_SEQ_DEFINE_COMMON(t) H5FL_seq_head_t H5FL_SEQ_NAME(t) = {{.name = #t "_seq"}, .size = sizeof(t)}

/* Declare a free list to manage sequences of type 't' */
#define H5FL_SEQ_DEFINE(t) H5_DLL H5FL_SEQ_DEFINE_COMMON(t)
Expand Down Expand Up @@ -309,7 +322,9 @@ typedef struct H5FL_fac_node_t H5FL_fac_node_t;

/* Data structure for free list block factory */
typedef struct H5FL_fac_head_t {
bool init; /* Whether the free list has been initialized */
#ifdef H5_HAVE_CONCURRENCY
H5TS_dlftt_mutex_t mutex; /* Guard access to this factory */
#endif /* H5_HAVE_CONCURRENCY */
unsigned allocated; /* Number of blocks allocated */
unsigned onlist; /* Number of blocks on free list */
size_t size; /* Size of the blocks in the list */
Expand Down Expand Up @@ -375,6 +390,9 @@ H5_DLL void *H5FL_fac_free(H5FL_fac_head_t *head, void *obj);
H5_DLL herr_t H5FL_fac_term(H5FL_fac_head_t *head);

/* General free list routines */
#ifdef H5_HAVE_CONCURRENCY
H5_DLL herr_t H5FL_init(void);
#endif /* H5_HAVE_CONCURRENCY */
H5_DLL herr_t H5FL_garbage_coll(void);
H5_DLL herr_t H5FL_set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_lim,
int arr_list_lim, int blk_global_lim, int blk_list_lim,
Expand Down
51 changes: 51 additions & 0 deletions src/H5TSatomic.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,57 @@ H5TS_atomic_destroy_uint(H5TS_atomic_uint_t *obj)
FUNC_LEAVE_NOAPI_VOID_NAMECHECK_ONLY
} /* end H5TS_atomic_destroy_uint() */

/*--------------------------------------------------------------------------
* Function: H5TS_atomic_init_size_t
*
* Purpose: Initializes an atomic 'size_t' variable object with a value.
*
* Note: Per the C11 standard, this function is not atomic and
* concurrent execution from multiple threads is a data race.
*
* Return: None
*
*--------------------------------------------------------------------------
*/
void
H5TS_atomic_init_size_t(H5TS_atomic_size_t *obj, size_t desired)
{
FUNC_ENTER_NOAPI_NAMECHECK_ONLY

/* Initialize mutex that protects the "atomic" value */
(void)
H5TS_mutex_init(&obj->mutex, H5TS_MUTEX_TYPE_PLAIN);

/* Set the value */
obj->value = desired;

FUNC_LEAVE_NOAPI_VOID_NAMECHECK_ONLY
} /* end H5TS_atomic_init_size_t() */

/*--------------------------------------------------------------------------
* Function: H5TS_atomic_destroy_size_t
*
* Purpose: Destroys / releases resources for an atomic 'size_t' variable
*
* Note: No equivalent in the C11 atomics, but needed here, to destroy
* the mutex used to protect the atomic value.
*
* Return: None
*
*--------------------------------------------------------------------------
*/
void
H5TS_atomic_destroy_size_t(H5TS_atomic_size_t *obj)
{
FUNC_ENTER_NOAPI_NAMECHECK_ONLY

/* Destroy mutex that protects the "atomic" value */
(void)
H5TS_mutex_destroy(&obj->mutex);

FUNC_LEAVE_NOAPI_VOID_NAMECHECK_ONLY
} /* end H5TS_atomic_destroy_size_t() */

/*--------------------------------------------------------------------------
* Function: H5TS_atomic_init_voidp
*
Expand Down
112 changes: 112 additions & 0 deletions src/H5TSatomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,118 @@ H5TS_atomic_fetch_sub_uint(H5TS_atomic_uint_t *obj, unsigned arg)
return ret_value;
} /* end H5TS_atomic_fetch_sub_uint() */

/*--------------------------------------------------------------------------
* Function: H5TS_atomic_load_size_t
*
* Purpose: Retrieves the value of atomic 'size_t' variable object.
*
* Return: Value of the atomic 'size_t'
*
*--------------------------------------------------------------------------
*/
static inline size_t
H5TS_atomic_load_size_t(H5TS_atomic_size_t *obj)
{
size_t ret_value;

/* Lock mutex that protects the "atomic" value */
H5TS_mutex_lock(&obj->mutex);

/* Get the value */
ret_value = obj->value;

/* Release the object's mutex */
H5TS_mutex_unlock(&obj->mutex);

return ret_value;
} /* end H5TS_atomic_load_size_t() */

/*--------------------------------------------------------------------------
* Function: H5TS_atomic_store_size_t
*
* Purpose: Atomically replaces the value of the atomic 'size_t' variable
*
* Return: None
*
*--------------------------------------------------------------------------
*/
static inline void
H5TS_atomic_store_size_t(H5TS_atomic_size_t *obj, size_t desired)
{
/* Lock mutex that protects the "atomic" value */
H5TS_mutex_lock(&obj->mutex);

/* Set the value */
obj->value = desired;

/* Release the object's mutex */
H5TS_mutex_unlock(&obj->mutex);

return;
} /* end H5TS_atomic_store_size_t() */

/*--------------------------------------------------------------------------
* Function: H5TS_atomic_fetch_add_size_t
*
* Purpose: Atomically replaces the value of an atomic 'size_t' variable with the
* result of addition of the 'arg' to the old value of the
* atomic variable.
*
* Return: Returns the value of the atomic variable held previously
*
*--------------------------------------------------------------------------
*/
static inline size_t
H5TS_atomic_fetch_add_size_t(H5TS_atomic_size_t *obj, size_t arg)
{
size_t ret_value;

/* Lock mutex that protects the "atomic" value */
H5TS_mutex_lock(&obj->mutex);

/* Get the current value */
ret_value = obj->value;

/* Increment the value */
obj->value += arg;

/* Release the object's mutex */
H5TS_mutex_unlock(&obj->mutex);

return ret_value;
} /* end H5TS_atomic_fetch_add_size_t() */

/*--------------------------------------------------------------------------
* Function: H5TS_atomic_fetch_sub_size_t
*
* Purpose: Atomically replaces the value of an atomic 'size_t' variable with the
* result of subtracting the 'arg' from the old value of the
* atomic variable.
*
* Return: Returns the value of the atomic variable held previously
*
*--------------------------------------------------------------------------
*/
static inline size_t
H5TS_atomic_fetch_sub_size_t(H5TS_atomic_size_t *obj, size_t arg)
{
size_t ret_value;

/* Lock mutex that protects the "atomic" value */
H5TS_mutex_lock(&obj->mutex);

/* Get the current value */
ret_value = obj->value;

/* Decrement the value */
obj->value -= arg;

/* Release the object's mutex */
H5TS_mutex_unlock(&obj->mutex);

return ret_value;
} /* end H5TS_atomic_fetch_sub_size_t() */

/*--------------------------------------------------------------------------
* Function: H5TS_atomic_exchange_voidp
*
Expand Down
Loading
Loading