summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>2002-12-04 15:44:01 (GMT)
committerRobb Matzke <matzke@llnl.gov>2002-12-04 15:44:01 (GMT)
commitdc7de8f7156f44d9b37bc1d3494ec2579198917f (patch)
tree6ba9e725d09f2d7c96e74b835cf24e56905307a9 /src
parent946c559de1db168ee8bc939574fa07fa923d1caa (diff)
downloadhdf5-dc7de8f7156f44d9b37bc1d3494ec2579198917f.zip
hdf5-dc7de8f7156f44d9b37bc1d3494ec2579198917f.tar.gz
hdf5-dc7de8f7156f44d9b37bc1d3494ec2579198917f.tar.bz2
[svn-r6176] ./hdf5-devel/src/H5.c
Purpose: New Feature; Optimization; Clean-up (Merged from 1.4 branch) Description: There is no symbolic constant to pass to functions that take an optional object ID for when the caller wants to indicate no object ID. In the past the caller always passed a negative integer. GPFS performs poorly. The h5ls tool decides whether to list the file name in the output based on a compile-time choice, which isn't always optimal at run time. Solution: Added a symbolic constant H5I_INVALID_HID. Added code to tell the mmfsd of GPFS to forego byte range token prefetching. h5ls decides whether to print the file name at runtime based on the number of objects being listed. Platforms tested: SuSE Linux (arborea), gcc and mpich-1.2.4 SunOS (baldric), gcc 2002-12-03 23:23:45 Robb Matzke <matzke@arborea.spizella.com> * H5_trace: Added printing for H5S_sel_type, code "St". 2002-12-03 22:45:11 Robb Matzke <matzke@arborea.spizella.com> *: Removed a little white space. Other changes are probably due to additional API tracing statements inserted automatically.
Diffstat (limited to 'src')
-rw-r--r--src/H5.c53
1 files changed, 46 insertions, 7 deletions
diff --git a/src/H5.c b/src/H5.c
index 2c28c50..1bfc9da 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -244,12 +244,13 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+herr_t
H5dont_atexit(void)
{
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT(H5dont_atexit);
+ H5TRACE0("e","");
if (dont_atexit_g)
HGOTO_DONE(FAIL);
@@ -326,13 +327,15 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+herr_t
H5set_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)
{
herr_t ret_value = SUCCEED;
FUNC_ENTER_API(H5set_free_list_limits, FAIL);
+ H5TRACE6("e","IsIsIsIsIsIs",reg_global_lim,reg_list_lim,arr_global_lim,
+ arr_list_lim,blk_global_lim,blk_list_lim);
/* Call the free list function to actually set the limits */
H5FL_set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim, blk_global_lim, blk_list_lim);
@@ -457,12 +460,13 @@ H5_debug_mask(const char *s)
*
*-------------------------------------------------------------------------
*/
-herr_t
+herr_t
H5get_libversion(unsigned *majnum, unsigned *minnum, unsigned *relnum)
{
herr_t ret_value = SUCCEED;
FUNC_ENTER_API(H5get_libversion, FAIL);
+ H5TRACE3("e","*Iu*Iu*Iu",majnum,minnum,relnum);
/* Set the version information */
if (majnum) *majnum = H5_VERS_MAJOR;
@@ -497,7 +501,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5check_version (unsigned majnum, unsigned minnum, unsigned relnum)
+H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
{
char lib_str[256];
char substr[] = H5_VERS_SUBRELEASE;
@@ -506,6 +510,7 @@ H5check_version (unsigned majnum, unsigned minnum, unsigned relnum)
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT(H5check_version);
+ H5TRACE3("e","IuIuIu",majnum,minnum,relnum);
/* Don't check again, if we already have */
if (checked)
@@ -606,6 +611,7 @@ H5open(void)
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_API(H5open, FAIL);
+ H5TRACE0("e","");
/* all work is done by FUNC_ENTER() */
done:
FUNC_LEAVE(ret_value);
@@ -627,7 +633,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5close (void)
+H5close(void)
{
/*
* Don't call FUNC_ENTER() since we don't want to initialize the whole
@@ -635,6 +641,7 @@ H5close (void)
* function for an uninitialized library.
*/
FUNC_ENTER_API_NOINIT(H5close);
+ H5TRACE0("e","");
H5_term_library();
@@ -746,7 +753,7 @@ HDvsnprintf(char *buf, size_t size, const char *fmt, va_list ap)
*-------------------------------------------------------------------------
*/
int
-HDfprintf (FILE *stream, const char *fmt, ...)
+HDfprintf(FILE *stream, const char *fmt, ...)
{
int n=0, nout = 0;
int fwidth, prec;
@@ -1075,7 +1082,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
*-------------------------------------------------------------------------
*/
int64_t
-HDstrtoll (const char *s, const char **rest, int base)
+HDstrtoll(const char *s, const char **rest, int base)
{
int64_t sign=1, acc=0;
hbool_t overflow = FALSE;
@@ -2315,6 +2322,38 @@ H5_trace (double *returning, const char *func, const char *type, ...)
}
break;
+ case 't':
+ if (ptr) {
+ if (vp) {
+ fprintf(out, "0x%lx", (unsigned long)vp);
+ } else {
+ fprintf(out, "NULL");
+ }
+ } else {
+ H5S_sel_type st = va_arg(ap, H5S_sel_type);
+ switch (st) {
+ case H5S_SEL_ERROR:
+ fprintf(out, "H5S_SEL_ERROR");
+ break;
+ case H5S_SEL_NONE:
+ fprintf(out, "H5S_SEL_NONE");
+ break;
+ case H5S_SEL_POINTS:
+ fprintf(out, "H5S_SEL_POINTS");
+ break;
+ case H5S_SEL_HYPERSLABS:
+ fprintf(out, "H5S_SEL_HYPERSLABS");
+ break;
+ case H5S_SEL_ALL:
+ fprintf(out, "H5S_SEL_ALL");
+ break;
+ default:
+ fprintf(out, "%ld", (long)st);
+ break;
+ }
+ }
+ break;
+
default:
fprintf(out, "BADTYPE(S%c)", type[1]);
goto error;