summaryrefslogtreecommitdiffstats
path: root/src/H5SL.c
Commit message (Collapse)AuthorAgeFilesLines
* [svn-r30017] Description:Quincey Koziol2016-06-061-6/+10
| | | | | | | | | Bring warning cleanusp in r29990, 29993, 29997, 29999, 30004 from revise_chunks branch to trunk. Tested on: MacOSX/64 10.11.5 (amazon) w/serial, parallel & production. (h5committest forthcoming)
* [svn-r27768] Description:Quincey Koziol2015-09-141-72/+83
| | | | | | | | | | | | | | | | | | | | | | Complete revamp of package initialization/shutdown mechanism in the library. Each package now has a single init/term routine. This new way should avoid packages being re-initialized during library shutdown and is also be _much_ more proactive about giving feedback for resource leaks internal to the library. Introduces a new "module" header file for packages in the library (e.g src/H5Fmodule.h) which sets up some necessary package configuration macros for the FUNC_ENTER/LEAVE macros. (The VFL drivers have their own slightly modified version of this header, src/H5FDdrvr_module.h) Also cleaned up a bunch of resources leaks all across the library and tests, along with addressing many warnings, as I encountered them. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel Linux/64 3.10.x (kituo) w/serial & parallel Linux/64 2.6.x (ostrich) w/serial
* [svn-r27415] Fix potential error with H5I_clear_type which could occur when ↵Neil Fortner2015-07-201-161/+445
| | | | | | | | | | | a callback closed a different ID in the same type. Added a new skiplist routine, H5SL_try_free_safe, which iterates over items, freeing some of them, and which intercepts and defers attempts to remove from the list outside of the main iteration. Changed H5I_clear_type to use this function. Tested: jam, koala, ostrich (h5committest); ummon
* [svn-r24261] Description:Quincey Koziol2013-10-071-0/+2
| | | | | | | | | | | | | | | | | | | Correct H5I use of skip list to acquire the 'next' pointer in the skip list after the ID's 'free' callback has been called, since it occasionally deletes the 'next' node. Also a little bit of code cleanup in other modules. Tested on: FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.11 (emu) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (ostrich) w/C++ & FORTRAN, w/threadsafe, in debug mode
* [svn-r24255] Description:Quincey Koziol2013-10-041-2/+39
| | | | | | | | Switch H5I internal data structure from using hash table to skip lists. Tested on: Mac OSX 10.8.4 (amazon) w/C++ & FORTRAN FreeBSD, Linux, etc. forthcoming
* [svn-r23938] remove "switch missing default case" in src.Mohamad Chaarawi2013-07-261-0/+6
|
* [svn-r23713] Description:Quincey Koziol2013-05-211-21/+21
| | | | | | | | | | Clean up warnings, switch library code to use Standard C/POSIX wrapper macros, remove internal calls to API routines, update checkapi and checkposix scripts. Tested on: Mac OSX/64 10.8.3 (amazon) w/C++ & FORTRAN Big-Endian Linux/64 (ostrich)
* [svn-r22608] Description:Quincey Koziol2012-07-261-4/+4
| | | | | | | | | | | | | | | Switch propert list/class iteration from internal to external form of iteration, cleaning up and simplifying the code a bit. Bring other general improvements from plist_encode_decode branch back to trunk. Clean up many warnings. Tested on: Mac OSX/64 10.7.4 (amazon) w/gcc 4.7, debug and C++ & FORTRAN (too minor to require h5committest)
* [svn-r21919] Description:Quincey Koziol2012-02-091-47/+47
| | | | | | | | Refactor function name macros and simplify the FUNC_ENTER macros, to clear away the cruft and prepare for further cleanups. Tested on: Mac OSX/64 10.7.3 (amazon) w/debug, production & parallel
* [svn-r21603] Purpose: Add generic skip list implementationNeil Fortner2011-10-181-20/+68
| | | | | | | | | | | | | Description: Added new H5SL_TYPE_GENERIC skip list type, which uses void *'s as keys and a client-supplied callback for key comparison. This was added to support the upcoming "merge named datatype" feature for H5Ocopy, but may be used in other places as well. Also added testing. Also fixed a potential bug with the H5SL_TYPE_OBJ implementation, and added testing for that. Tested: jam, koala, heiwa (h5committest), durandal
* [svn-r20536] Description:Quincey Koziol2011-04-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up various warnings & code formatting issues. Bring changes from Coverity branch to trunk: r20085: Purpose: Fix coverity issue 793 Description: Modified H5S_hyper_project_simple_higher() to free the entire span list in new_space on failure. r20091: This is a fix for coverity bug #1683. Changed the two printfs to use %lu (unsigned long) for printing "dset_size". r20162: Purpose: Fix coverity issue 785 Description: Modified H5T_enum_nameof() to free "name" on failure if it was allocated. Also clarified some code in H5S_hyper_rebuild_helper(). r20189: Addressed coverity defect 783. H5SL_new_node() in H5SL.c was failing to free space allocated in its first alloc if the second alloc failed. Added a call to H5FL_FREE to address this issue. This is purely to keep coverity happy -- if this code is ever triggered, we have much larger problems. Note that this fix will trigger an unused return value complaint from coverity next week. r20190: Fixed Coverity issues 1561 1565 and 1678 (UNUSED_VALUES) by moving checks of return values to after the function call. r20191: Fixed coverity issues 643 644 and 1678 (CHECKED_RETURN). r20232: Addressed coverity issues 923-925. Replaced calls to sprintf with calls to HDsnprintf. r20233: Fix coverity issue 662. Don't try to sort 0 attributes in H5Aint.c. r20234: Fix coverity issue 664. Check for NULL before dereferencing in H5Gdeprec.c. r20271: Purpose: Fix coverity issue 784 Description: Modified H5_debug_mask() to keep a list of files opened for use as a debugging output stream, and modified H5_term_library to close these files on exit. r20272: addressed coverity issues 838 & 955. Issue was use of strcpy() -- existing code was safe, but modified to use strncpy() to keep coverity happy. r20273: Addresed coverity issues 1388 and 1389. Initialized sel_iter->type to NULL in H5S_select_iter_init. r20275: Purpose: Fix valgrind issue in mf.c Description: Fixed bug (incomplete if statement) in test_mf_fs_alloc_free() so the retrieved node gets freed. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
* [svn-r18595] Description:Quincey Koziol2010-04-201-14/+14
| | | | | | | | Clean up compiler warnings Tested on: Mac OS X/32 10.6.3 (amazon) w/debug (too minor to require h5committest)
* [svn-r17268] Description:Quincey Koziol2009-07-301-1/+1
| | | | | | | | | | | Bring r17266 from 1.8 branch to trunk: Clean up various compiler warnings from IRIX64 build Tested on: Mac OS X/32 (amazon) debug & production (yes, I know it's not an IRIX64 system :-) Too minor to require h5committest
* [svn-r16698] Purpose: Fix bug 503Neil Fortner2009-04-081-275/+584
| | | | | | | | | Description: Changed Skip list package to use a deterministic skip list. This allows the skip list package to avoid calling rand() and srand(), even on machines without rand_r(). There is no longer a p-value or maximum level for skip lists. Tested: jam, smirom, linew (h5committest)
* [svn-r15800] Description:Quincey Koziol2008-10-071-0/+181
| | | | | | | | | | | | | | | | | | | | | | | Bring file free space branch changes through r15795 into trunk, which includes a fair bit of code cleanup & rearrangement along with a couple of bug fixes also. Tested on: Mac OS X/32 10.5.5 (amazon) in debug mode Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
* [svn-r15609] Description:Quincey Koziol2008-09-101-45/+62
| | | | | | | | Omnibus compiler warning cleanup & some reformatting also. Tested on: Mac OS X/32 10.5.4 (amazon) Too minor to require h5committest
* [svn-r14353] Description:Quincey Koziol2007-12-201-105/+126
| | | | | | | | | | | | | | | | | | | | | | | | | - Add hash value for skip list string types, to reduce # of string comparisons. - Fixed bug with metadata/small data block aggregator adding size == 0 block into file free space list. - Refactored metadata/small data block aggregator code into single set of common routines. - Changed block aggregator code to be smarter about releasing space in the 'other' block when the 'other' block has aggregated enough data. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
* [svn-r14284] Description:Quincey Koziol2007-11-241-5/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add H5Lvisit_by_name() API routine to library. Eliminated all (five!) other group traversal routines and changed them all to use the new API routine. Cleaned up output of h5ls & h5stat: - Issue error when requesting recursive traversal of a file with the "group info" flag, but no group given - Print info about root group in all(?) appropriate situations - Don't print "verbose" information about root group until the root group is in the list of objects to display (mostly because h5ls & h5stat had a different twist on traversing the groups in a file that the other utilities) Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
* [svn-r13253] Updated all C and C++ style source code files with the THG ↵Albert Cheng2007-02-071-2/+3
| | | | | | | | | copyright notice. Tested platform: Kagiso only since it is only a comment block change. If it works in one machine, it should work in all, I hope. Still need to check the parallel build on copper.
* [svn-r12495] Description:Quincey Koziol2006-07-251-1/+1
| | | | | | | | | | Checkpoint further work on object deletion code for fractal heaps. I believe everything is finally working for this sub-task. More regression tests soon, but I don't foresee any problems. Machines: FreeBSD 4.11 (sleipnir) Linux 2.4 (chicago)
* [svn-r12102] Purpose:Quincey Koziol2006-03-161-11/+2
| | | | | | | | | | Code cleanup Description: Clean up formatting & comments, etc. Platforms tested: None, very minor
* [svn-r12078] Purpose:Quincey Koziol2006-03-111-40/+218
| | | | | | | | | | | | New features Description: Add "find node greater than or equal to key" and "remove first" operations to skip lists. Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
* [svn-r12019] Purpose:Leon Arber2006-03-071-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug fix/Feature Description: Modify the library to use rand_r, when available, instead of srand. If rand_r is not available, it will try to use srandom/random, and then finally fall back to srand/rand. Solution: A couple places in the library use the srand() function to seed the random number generator. This can cause problems on certain platforms and could theoretically cause problems for users who expect a certain sequence of random numbers following their own call to srand(). Most platforms have an implementation of rand_r, which is identical to rand, except that it allows for explicit storage of the seed value. The configure script will now check for the existence of rand_r to facilitate its use in the library. Two new functions are added, to replace the macros HDsrand/HDrand. These functions are HDrand and HDsrand. HDrand will call rand_r, if available, or random(), if available, and fall back to rand() if neither of those is available. HDsrand will store the seed value locally, if rand_r is available. Otherwise, it will call srandom if available, and fall back to srand otherwise. Platforms tested: heping, mir. Really need to test on Red Storm, since that platform motivated this fix, but the machine is currently not available. Misc. update:
* [svn-r11991] Purpose:Albert Cheng2006-03-011-0/+7
| | | | | | | | | | | | | | | | | Porting. Description: Red Storm's lustre used srand and rand to initialize their user mode of lustre. HDF5 also uses srand and that messes up Lustre. Solution: Use -DRED_STORM to block out the HDF5 code that calls srand. This is a temporary fix since Lustre has fixed its code from calling srand and rand but the fix is not deployed at Red_storm yet. Platforms tested: Tested at Red-Storm.
* [svn-r11712] Purpose:Quincey Koziol2005-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New feature Description: Check in baseline for compact group revisions, which radically revises the source code for managing groups and object headers. WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! This initiates the "unstable" phase of the 1.7.x branch, leading up to the 1.8.0 release. Please test this code, but do _NOT_ keep files created with it - the format will change again before the release and you will not be able to read your old files!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! Solution: There's too many changes to really describe them all, but some of them include: - Stop abusing the H5G_entry_t structure and split it into two separate structures for non-symbol table node use within the library: H5O_loc_t for object locations in a file and H5G_name_t to store the path to an opened object. H5G_entry_t is now only used for storing symbol table entries on disk. - Retire H5G_namei() in favor of a more general mechanism for traversing group paths and issuing callbacks on objects located. This gets us out of the business of hacking H5G_namei() for new features, generally. - Revised H5O* routines to take a H5O_loc_t instead of H5G_entry_t - Lots more... Platforms tested: h5committested and maybe another dozen configurations.... :-)
* [svn-r11245] Purpose:Quincey Koziol2005-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | Code cleanup Description: Trim trailing whitespace, which is making 'diff'ing the two branches difficult. Solution: Ran this script in each directory: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
* [svn-r10628] Purpose:Quincey Koziol2005-04-181-1/+1
| | | | | | | | | | | Code cleanup Description: Clean up various warnings reported by the Windows team. Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
* [svn-r10580] Purpose:Quincey Koziol2005-04-081-5/+8
| | | | | | | | | | | Code optimization Description: Add "base" size to array free list code, to accomodate skip list nodes. Platforms tested: FreeBSD 4.11 (sleipnir) Solaris 2.9 (shanti)
* [svn-r10182] Purpose:Quincey Koziol2005-03-111-0/+7
| | | | | | | | | | | Add comments Description: Add note to investigate "deterministic skip lists", in case I forget... Platforms tested: FreeBSD 4.11 (sleipnir) Solaris 2.9 (shanti)
* [svn-r9857] Purpose: MaintenanceElena Pourmal2005-01-221-3/+0
| | | | | | | | | | | | | | Description: Removed PABLO from the source Solution: Platforms tested: arabica with 64-bit, copper with parallel, heping with GNU C and C++ and PGI fortran (but I disabled hl, there is some weird problem only on heping: F9XMODFLAG is not propagated to the Makefile files Misc. update:
* [svn-r9764] Purpose:Quincey Koziol2005-01-061-110/+667
| | | | | | | | | | | | | | | | New feature Description: Add some additional features to the skip list code that was needed to fully support all the features that the threaded, balanced binary tree code has. Also, updated the property list code to take advantage of a few of the new features. Platforms tested: FreeBSD 4.10 (sleipnir) Too minor to require h5committest
* [svn-r9734] Purpose:Quincey Koziol2004-12-301-10/+23
| | | | | | | | | | | | Code cleanup Description: Convert chunk iteration code to use skip lists instead of threaded, balanced binary trees. Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel & szip Too minor to require h5committest
* [svn-r9730] Purpose:Quincey Koziol2004-12-301-7/+12
| | | | | | | | | | | | | Code cleanup (sorta) Description: Transition the generic property list code from using the threaded, balanced binary tree code (H5TB<foo>() routines) to use skip lists (H5SL<foo>() routines) for internal management of properties, etc. Platforms tested: FreeBSD 4.10 (sleipnir) Too minor to require h5committest
* [svn-r9727] Purpose:Quincey Koziol2004-12-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-) Description: Generally speaking, this is the "signed->unsigned" change to selections. However, in the process of merging code back, things got stickier and stickier until I ended up doing a big "sync the two branches up" operation. So... I brought back all the "infrastructure" fixes from the development branch to the release branch (which I think were actually making some improvement in performance) as well as fixed several bugs which had been fixed in one branch, but not the other. I've also tagged the repository before making this checkin with the label "before_signed_unsigned_changes". Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel & fphdf5 FreeBSD 4.10 (sleipnir) w/threadsafe FreeBSD 4.10 (sleipnir) w/backward compatibility Solaris 2.7 (arabica) w/"purify options" Solaris 2.8 (sol) w/FORTRAN & C++ AIX 5.x (copper) w/parallel & FORTRAN IRIX64 6.5 (modi4) w/FORTRAN Linux 2.4 (heping) w/FORTRAN & C++ Misc. update:
* [svn-r9615] Purpose:Quincey Koziol2004-12-041-0/+61
| | | | | | | | | | | New feature Description: Add callback iteration routine to skip lists. Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel Too minor to require h5committest
* [svn-r9601] Purpose:Quincey Koziol2004-11-301-16/+44
| | | | | | | | | | | New feature Description: Allow skip list keys to be strings (needed for property list support) Platforms tested: FreeBSD 4.10 (sleipnir) Too minor to require h5committest
* [svn-r9598] Purpose:Quincey Koziol2004-11-291-8/+57
| | | | | | | | | | | | | New internal feature Description: Add a "release" routine to the skip lists, which releases all the nodes in the skip list, but keeps the skip list active. Platforms tested: FreeBSD 4.10 (sleipnir) Linux 2.4 (verbena) Too minor to require h5committest
* [svn-r9596] Purpose:Quincey Koziol2004-11-291-4/+2
| | | | | | | | | | | | | Code optimization Description: Retarget metadata cache code from using TBBT routines to using new skiplist routines, for a reasonable speedup (when dealing with dirty metadata) Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel Solaris 2.7 (arabica) Too minor to require h5committest
* [svn-r9592] Purpose:Quincey Koziol2004-11-291-2/+3
| | | | | | | | | | | | | | | | | Bug fix Description: Re-work array of 'forward' pointers in a way that makes the PGI compiler more happy. Solution: Change from 'H5SL_node_t *forward[1]' to 'H5SL_node_t **forward' and change how array of forward pointers is dealt with. Platforms tested: Linux 2.4 (verbena) w/PGI FreeBSD 4.10 (sleipnir) Configuration not tested w/h5committest
* [svn-r9587] Purpose:Quincey Koziol2004-11-281-8/+13
| | | | | | | | | | | | | | | | | | | | Bug fix Description: Correct off-by-on error which could cause invalid # of levels to be used for a skip list node, in rare circumstances. Change from srandom()/random() to more portable srand()/rand() routines for random # generation. Pre-compute the probability factor for computing the level of new nodes, for a minor speedup. Platforms tested: FreeBSD 4.10 (sleipnir) IRIX64 6.5 (modi4) Solaris 2.8 (sol) AIX 5.1(?) (copper)
* [svn-r9580] Purpose:Quincey Koziol2004-11-271-0/+715
Add new internal data structure Description: Add an implementation of skip lists to the library (see comment in src/H5SL.c for references to the papers describing them) as a potential replacement for our current threaded, balanced binary tree container. Skip lists are much simpler to implement and should be faster to use. Also, added new error codes to release branch, so bump the minor version number to indicate that the library is no longer perfectly compatible with the 1.6.3 release. Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel Solaris 2.7 (arabica) Too minor to require further testing (the skip lists aren't actually used by any library code yet)