summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-06-30 15:17:35 (GMT)
committerGitHub <noreply@github.com>2021-06-30 15:17:35 (GMT)
commitf0e0c7ed2a2df6d6dbe3728002c7fc9c518fea5f (patch)
tree5777763ab021d0a8d861c57fcf6f667dff980990
parent858a2b28662ba18596e668bf9719285acd645df7 (diff)
downloadhdf5-f0e0c7ed2a2df6d6dbe3728002c7fc9c518fea5f.zip
hdf5-f0e0c7ed2a2df6d6dbe3728002c7fc9c518fea5f.tar.gz
hdf5-f0e0c7ed2a2df6d6dbe3728002c7fc9c518fea5f.tar.bz2
Fixes parallel issues from recent C99 changes (#809)
* Fixes parallel issues from recent C99 changes * Adds MPE FUNC --> __func__ changes missed in earlier PRs * Even more missed FUNC --> __func__ macros
-rw-r--r--doxygen/examples/ThreadSafeLibrary.html8
-rw-r--r--src/H5Cmpio.c10
-rw-r--r--src/H5FAdblkpage.c8
-rw-r--r--src/H5FAstat.c2
-rw-r--r--src/H5FDhdfs.c36
-rw-r--r--src/H5FDmirror.c40
-rw-r--r--src/H5FDmpio.c56
-rw-r--r--src/H5FDspace.c14
-rw-r--r--src/H5FL.c12
-rw-r--r--src/H5FLprivate.h2
-rw-r--r--src/H5FS.c62
-rw-r--r--src/H5FSsection.c56
-rw-r--r--src/H5MF.c93
-rw-r--r--src/H5MFaggr.c15
-rw-r--r--src/H5MFdbg.c10
-rw-r--r--src/H5MFsection.c18
-rw-r--r--src/H5Shyper.c18
-rw-r--r--src/H5Smpio.c16
-rw-r--r--src/H5private.h20
-rw-r--r--test/hdfs.c2
-rw-r--r--test/ros3.c2
-rw-r--r--test/s3comms.c2
-rw-r--r--testpar/t_bigio.c4
-rw-r--r--testpar/t_cache.c425
-rw-r--r--testpar/t_filters_parallel.c4
-rw-r--r--testpar/t_mpi.c4
-rw-r--r--tools/libtest/h5tools_test_utils.c2
-rw-r--r--tools/test/perform/direct_write_perf.c3
-rw-r--r--tools/test/perform/perf.c16
29 files changed, 486 insertions, 474 deletions
diff --git a/doxygen/examples/ThreadSafeLibrary.html b/doxygen/examples/ThreadSafeLibrary.html
index 8daf386..2ea42b4 100644
--- a/doxygen/examples/ThreadSafeLibrary.html
+++ b/doxygen/examples/ThreadSafeLibrary.html
@@ -709,7 +709,7 @@ created) or if the wrong values were read back.
<blockquote>
<pre>
#define H5_API_UNSET_CANCEL \
- if (H5_IS_API(FUNC)) { \
+ if (H5_IS_API(__func__)) { \
H5_cancel_count_inc(); \
}
</pre>
@@ -721,7 +721,7 @@ created) or if the wrong values were read back.
<blockquote>
<pre>
#define H5_API_LOCK_BEGIN \
- if (H5_IS_API(FUNC)) { \
+ if (H5_IS_API(__func__)) { \
H5_mutex_lock(&amp;H5_g.init_lock);
</pre>
</blockquote>
@@ -755,7 +755,7 @@ created) or if the wrong values were read back.
<blockquote>
<pre>
#define H5_API_UNLOCK_BEGIN \
- if (H5_IS_API(FUNC)) { \
+ if (H5_IS_API(__func__)) { \
H5_mutex_unlock(&amp;H5_g.init_lock);
</pre>
</blockquote>
@@ -774,7 +774,7 @@ created) or if the wrong values were read back.
<blockquote>
<pre>
#define H5_API_SET_CANCEL \
- if (H5_IS_API(FUNC)) { \
+ if (H5_IS_API(__func__)) { \
H5_cancel_count_dec(); \
}
</pre>
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index d6da9b7..35d8dd0 100644
--- a/src/H5Cmpio.c
+++ b/src/H5Cmpio.c
@@ -195,7 +195,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
HDmemset(entries_to_clear, 0, sizeof(entries_to_clear));
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- HDfprintf(stdout, "%s:%d: setting up candidate assignment table.\n", FUNC, mpi_rank);
+ HDfprintf(stdout, "%s:%d: setting up candidate assignment table.\n", __func__, mpi_rank);
HDmemset(tbl_buf, 0, sizeof(tbl_buf));
@@ -272,10 +272,10 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
HDfprintf(stdout, "%s", tbl_buf);
- HDfprintf(stdout, "%s:%d: flush entries [%u, %u].\n", FUNC, mpi_rank, first_entry_to_flush,
+ HDfprintf(stdout, "%s:%d: flush entries [%u, %u].\n", __func__, mpi_rank, first_entry_to_flush,
last_entry_to_flush);
- HDfprintf(stdout, "%s:%d: marking entries.\n", FUNC, mpi_rank);
+ HDfprintf(stdout, "%s:%d: marking entries.\n", __func__, mpi_rank);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
for (u = 0; u < num_candidates; u++) {
@@ -353,8 +353,8 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
#endif /* H5C_DO_SANITY_CHECKS */
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %u/%u/%u.\n", FUNC, mpi_rank, num_candidates,
- total_entries_to_clear, total_entries_to_flush);
+ HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %u/%u/%u.\n", __func__, mpi_rank,
+ num_candidates, total_entries_to_clear, total_entries_to_flush);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
/* We have now marked all the entries on the candidate list for
diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c
index 1dca0fb..713bd67 100644
--- a/src/H5FAdblkpage.c
+++ b/src/H5FAdblkpage.c
@@ -147,7 +147,7 @@ H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts)
FUNC_ENTER_PACKAGE
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: Called, addr = %a\n", FUNC, addr);
+ HDfprintf(stderr, "%s: Called, addr = %a\n", __func__, addr);
#endif /* H5FA_DEBUG */
/* Sanity check */
@@ -162,7 +162,7 @@ H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts)
dblk_page->addr = addr;
dblk_page->size = H5FA_DBLK_PAGE_SIZE(hdr, nelmts);
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: dblk_page->size = %Zu\n", FUNC, dblk_page->size);
+ HDfprintf(stderr, "%s: dblk_page->size = %Zu\n", __func__, dblk_page->size);
#endif /* H5FA_DEBUG */
/* Clear any elements in data block page to fill value */
@@ -223,7 +223,7 @@ H5FA__dblk_page_protect(H5FA_hdr_t *hdr, haddr_t dblk_page_addr, size_t dblk_pag
FUNC_ENTER_PACKAGE
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: Called\n", FUNC);
+ HDfprintf(stderr, "%s: Called\n", __func__);
#endif /* H5FA_DEBUG */
/* Sanity check */
@@ -293,7 +293,7 @@ H5FA__dblk_page_unprotect(H5FA_dblk_page_t *dblk_page, unsigned cache_flags)
FUNC_ENTER_PACKAGE
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: Called\n", FUNC);
+ HDfprintf(stderr, "%s: Called\n", __func__);
#endif /* H5FA_DEBUG */
/* Sanity check */
diff --git a/src/H5FAstat.c b/src/H5FAstat.c
index 98f7195..f7d1b90 100644
--- a/src/H5FAstat.c
+++ b/src/H5FAstat.c
@@ -84,7 +84,7 @@ H5FA_get_stats(const H5FA_t *fa, H5FA_stat_t *stats)
FUNC_ENTER_NOAPI_NOERR
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: Called\n", FUNC);
+ HDfprintf(stderr, "%s: Called\n", __func__);
#endif /* H5FA_DEBUG */
/* Check arguments */
diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c
index 4712a8e..9491e82 100644
--- a/src/H5FDhdfs.c
+++ b/src/H5FDhdfs.c
@@ -365,7 +365,7 @@ H5FD_hdfs_init(void)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif
if (H5I_VFL != H5I_get_type(H5FD_HDFS_g))
@@ -406,7 +406,7 @@ H5FD__hdfs_term(void)
FUNC_ENTER_STATIC_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif
/* Reset VFL ID */
@@ -440,7 +440,7 @@ H5FD__hdfs_handle_open(const char *path, const char *namenode_name, const int32_
FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif
if (path == NULL || path[0] == '\0')
@@ -525,7 +525,7 @@ H5FD__hdfs_handle_close(hdfs_t *handle)
FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif
if (handle == NULL)
@@ -616,7 +616,7 @@ H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa)
HDassert(fa != NULL);
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
@@ -657,7 +657,7 @@ H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_dst /*out*/)
H5TRACE2("e", "ix", fapl_id, fa_dst);
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif
if (fa_dst == NULL)
@@ -814,7 +814,7 @@ hdfs__reset_stats(H5FD_hdfs_t *file)
FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif
if (file == NULL)
@@ -872,7 +872,7 @@ H5FD__hdfs_open(const char *path, unsigned flags, hid_t fapl_id, haddr_t maxaddr
FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif /* HDFS_DEBUG */
/* Sanity check on file offsets */
@@ -1210,7 +1210,7 @@ H5FD__hdfs_close(H5FD_t *_file)
FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif
/* Sanity checks */
@@ -1266,7 +1266,7 @@ H5FD__hdfs_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_ENTER_STATIC_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif /* HDFS_DEBUG */
HDassert(f1->hdfs_handle != NULL);
@@ -1339,7 +1339,7 @@ H5FD__hdfs_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
FUNC_ENTER_STATIC_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif
if (flags) {
@@ -1377,7 +1377,7 @@ H5FD__hdfs_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_STATIC_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif
FUNC_LEAVE_NOAPI(file->eoa)
@@ -1408,7 +1408,7 @@ H5FD__hdfs_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
FUNC_ENTER_STATIC_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif
file->eoa = addr;
@@ -1442,7 +1442,7 @@ H5FD__hdfs_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_STATIC_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif
HDassert(file->hdfs_handle != NULL);
@@ -1477,7 +1477,7 @@ H5FD__hdfs_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand
FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif /* HDFS_DEBUG */
if (!file_handle)
@@ -1527,7 +1527,7 @@ H5FD__hdfs_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif /* HDFS_DEBUG */
HDassert(file != NULL);
@@ -1599,7 +1599,7 @@ H5FD__hdfs_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, h
FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file")
@@ -1637,7 +1637,7 @@ H5FD__hdfs_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id,
FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", FUNC);
+ HDfprintf(stdout, "called %s.\n", __func__);
#endif
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file")
diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c
index 5711777..8cbeff6 100644
--- a/src/H5FDmirror.c
+++ b/src/H5FDmirror.c
@@ -219,7 +219,7 @@ H5FD__init_package(void)
FUNC_ENTER_STATIC
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
if (H5FD_mirror_init() < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize mirror VFD");
@@ -245,7 +245,7 @@ H5FD_mirror_init(void)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
if (H5I_VFL != H5I_get_type(H5FD_MIRROR_g))
H5FD_MIRROR_g = H5FD_register(&H5FD_mirror_g, sizeof(H5FD_class_t), FALSE);
@@ -272,7 +272,7 @@ H5FD__mirror_term(void)
/* Reset VFL ID */
H5FD_MIRROR_g = 0;
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD__mirror_term() */
@@ -1128,7 +1128,7 @@ H5FD__mirror_verify_reply(H5FD_mirror_t *file)
FUNC_ENTER_STATIC
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
HDassert(file && file->sock_fd);
@@ -1183,7 +1183,7 @@ H5FD__mirror_fapl_get(H5FD_t *_file)
FUNC_ENTER_STATIC
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
fa = (H5FD_mirror_fapl_t *)H5MM_calloc(sizeof(H5FD_mirror_fapl_t));
if (NULL == fa)
@@ -1219,7 +1219,7 @@ H5FD__mirror_fapl_copy(const void *_old_fa)
FUNC_ENTER_STATIC
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
new_fa = (H5FD_mirror_fapl_t *)H5MM_malloc(sizeof(H5FD_mirror_fapl_t));
if (new_fa == NULL)
@@ -1251,7 +1251,7 @@ H5FD__mirror_fapl_free(void *_fa)
FUNC_ENTER_STATIC_NOERR
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
/* sanity check */
HDassert(fa != NULL);
@@ -1282,7 +1282,7 @@ H5Pget_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa_dst /*out*/)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", fapl_id, fa_dst);
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
if (NULL == fa_dst)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_dst is NULL");
@@ -1323,7 +1323,7 @@ H5Pset_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*#", fapl_id, fa);
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
if (NULL == plist)
@@ -1369,7 +1369,7 @@ H5FD__mirror_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
FUNC_ENTER_STATIC
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
/* --------------- */
/* Check arguments */
@@ -1494,7 +1494,7 @@ H5FD__mirror_close(H5FD_t *_file)
FUNC_ENTER_STATIC
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
/* Sanity check */
HDassert(file);
@@ -1566,7 +1566,7 @@ H5FD__mirror_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
{
FUNC_ENTER_STATIC_NOERR;
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
/* Notice: the Mirror VFD Writer currently uses only the Sec2 driver as
* the underying driver -- as such, the Mirror VFD implementation copies
@@ -1603,7 +1603,7 @@ H5FD__mirror_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_STATIC_NOERR
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
HDassert(file);
@@ -1630,7 +1630,7 @@ H5FD__mirror_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
FUNC_ENTER_STATIC
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
HDassert(file);
@@ -1685,7 +1685,7 @@ H5FD__mirror_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_STATIC_NOERR
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
HDassert(file);
@@ -1706,7 +1706,7 @@ H5FD__mirror_read(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type,
{
FUNC_ENTER_STATIC_NOERR
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5FD__mirror_read() */
@@ -1739,7 +1739,7 @@ H5FD__mirror_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
FUNC_ENTER_STATIC
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
HDassert(file);
HDassert(buf);
@@ -1802,7 +1802,7 @@ H5FD__mirror_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_AT
FUNC_ENTER_STATIC
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
file->xmit.xmit_count = (file->xmit_i)++;
file->xmit.op = H5FD_MIRROR_OP_TRUNCATE;
@@ -1850,7 +1850,7 @@ H5FD__mirror_lock(H5FD_t *_file, hbool_t rw)
FUNC_ENTER_STATIC
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
file->xmit.xmit_count = (file->xmit_i)++;
file->xmit.op = H5FD_MIRROR_OP_LOCK;
@@ -1897,7 +1897,7 @@ H5FD__mirror_unlock(H5FD_t *_file)
FUNC_ENTER_STATIC
- LOG_OP_CALL(FUNC);
+ LOG_OP_CALL(__func__);
file->xmit.xmit_count = (file->xmit_i)++;
file->xmit.op = H5FD_MIRROR_OP_UNLOCK;
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 7567376..dd40399 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -701,7 +701,7 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* set atomicity value */
@@ -711,7 +711,7 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -744,7 +744,7 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Get atomicity value */
@@ -759,7 +759,7 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -825,7 +825,7 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR
(H5FD_mpio_debug_rank_s < 0 || H5FD_mpio_debug_rank_s == mpi_rank));
if (H5FD_mpio_debug_t_flag)
HDfprintf(stderr, "%s: (%d) Entering - name = \"%s\", flags = 0x%x, fapl_id = %d, maxaddr = %lu\n",
- FUNC, mpi_rank, name, flags, (int)fapl_id, (unsigned long)maxaddr);
+ __func__, mpi_rank, name, flags, (int)fapl_id, (unsigned long)maxaddr);
#endif
/* Convert HDF5 flags to MPI-IO flags */
@@ -905,7 +905,7 @@ done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", FUNC, mpi_rank);
+ HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -938,7 +938,7 @@ H5FD__mpio_close(H5FD_t *_file)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
@@ -957,7 +957,7 @@ H5FD__mpio_close(H5FD_t *_file)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", FUNC, mpi_rank);
+ HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -1177,7 +1177,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
@@ -1239,7 +1239,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) using MPIO collective mode\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) using MPIO collective mode\n", __func__, file->mpi_rank);
#endif
/* Get the collective_opt property to check whether the application wants to do IO individually. */
if (H5CX_get_mpio_coll_opt(&coll_opt_mode) < 0)
@@ -1248,13 +1248,13 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI collective IO\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) doing MPI collective IO\n", __func__, file->mpi_rank);
#endif
/* Check whether we should read from rank 0 and broadcast to other ranks */
if (H5CX_get_mpio_rank0_bcast()) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) doing read-rank0-and-MPI_Bcast\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) doing read-rank0-and-MPI_Bcast\n", __func__, file->mpi_rank);
#endif
/* Indicate path we've taken */
rank0_bcast = TRUE;
@@ -1276,7 +1276,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
else {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
#endif
/* Perform independent read operation */
@@ -1295,7 +1295,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
else {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
#endif
/* Perform independent read operation */
@@ -1345,8 +1345,8 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) mpi_off = %ld bytes_read = %lld\n", FUNC, file->mpi_rank, (long)mpi_off,
- bytes_read);
+ HDfprintf(stderr, "%s: (%d) mpi_off = %ld bytes_read = %lld\n", __func__, file->mpi_rank,
+ (long)mpi_off, bytes_read);
#endif
/*
@@ -1358,7 +1358,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -1417,7 +1417,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
@@ -1489,7 +1489,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) using MPIO collective mode\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) using MPIO collective mode\n", __func__, file->mpi_rank);
#endif
/* Get the collective_opt property to check whether the application wants to do IO individually. */
@@ -1499,7 +1499,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI collective IO\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) doing MPI collective IO\n", __func__, file->mpi_rank);
#endif
/* Perform collective write operation */
if (MPI_SUCCESS !=
@@ -1513,7 +1513,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
#endif
/* Perform independent write operation */
if (MPI_SUCCESS !=
@@ -1529,7 +1529,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
else {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
#endif
/* Perform independent write operation */
@@ -1562,7 +1562,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) mpi_off = %ld bytes_written = %lld\n", FUNC, file->mpi_rank,
+ HDfprintf(stderr, "%s: (%d) mpi_off = %ld bytes_written = %lld\n", __func__, file->mpi_rank,
(long)mpi_off, bytes_written);
#endif
@@ -1583,7 +1583,7 @@ done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving: ret_value = %d\n", FUNC, file->mpi_rank, ret_value);
+ HDfprintf(stderr, "%s: (%d) Leaving: ret_value = %d\n", __func__, file->mpi_rank, ret_value);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -1615,7 +1615,7 @@ H5FD__mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
@@ -1630,7 +1630,7 @@ H5FD__mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -1672,7 +1672,7 @@ H5FD__mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
@@ -1741,7 +1741,7 @@ H5FD__mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", FUNC, file->mpi_rank);
+ HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5FDspace.c b/src/H5FDspace.c
index 339c413..de52dc3 100644
--- a/src/H5FDspace.c
+++ b/src/H5FDspace.c
@@ -148,7 +148,7 @@ H5FD__alloc_real(H5FD_t *file, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr
FUNC_ENTER_PACKAGE
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size);
+ HDfprintf(stderr, "%s: type = %u, size = %Hu\n", __func__, (unsigned)type, size);
#endif /* H5FD_ALLOC_DEBUG */
/* check args */
@@ -211,7 +211,7 @@ H5FD__alloc_real(H5FD_t *file, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr
done:
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: ret_value = %a\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: ret_value = %a\n", __func__, ret_value);
#endif /* H5FD_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__alloc_real() */
@@ -287,7 +287,7 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size)
HDassert(size > 0);
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)type, addr, size);
+ HDfprintf(stderr, "%s: type = %u, addr = %a, size = %Hu\n", __func__, (unsigned)type, addr, size);
#endif /* H5FD_ALLOC_DEBUG */
/* Sanity checking */
@@ -304,7 +304,7 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size)
/* Check for file driver 'free' callback and call it if available */
if (file->cls->free) {
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Letting VFD free space\n", FUNC);
+ HDfprintf(stderr, "%s: Letting VFD free space\n", __func__);
#endif /* H5FD_ALLOC_DEBUG */
if ((file->cls->free)(file, type, H5CX_get_dxpl(), addr, size) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "driver free request failed")
@@ -317,11 +317,11 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size)
eoa = file->cls->get_eoa(file, type);
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: eoa = %a\n", FUNC, eoa);
+ HDfprintf(stderr, "%s: eoa = %a\n", __func__, eoa);
#endif /* H5FD_ALLOC_DEBUG */
if (eoa == (addr + size)) {
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Reducing file size to = %a\n", FUNC, addr);
+ HDfprintf(stderr, "%s: Reducing file size to = %a\n", __func__, addr);
#endif /* H5FD_ALLOC_DEBUG */
if (file->cls->set_eoa(file, type, addr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "set end of space allocation request failed")
@@ -330,7 +330,7 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size)
else {
/* leak memory */
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)type,
+ HDfprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %a, size = %Hu\n", __func__, (unsigned)type,
addr, size);
#endif /* H5FD_ALLOC_DEBUG */
} /* end else */
diff --git a/src/H5FL.c b/src/H5FL.c
index 0aca4b7..cb58868 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -207,7 +207,7 @@ H5FL_term_package(void)
/* Dump information about all the outstanding allocations */
while (trk != NULL) {
/* Print information about the outstanding block */
- HDfprintf(stderr, "%s: Outstanding allocation:\n", FUNC);
+ HDfprintf(stderr, "%s: Outstanding allocation:\n", __func__);
HDfprintf(stderr, "\tPtr: %p, File: %s, Function: %s, Line: %d\n",
(((unsigned char *)trk) + sizeof(H5FL_track_t)), trk->file, trk->func, trk->line);
H5CS_print_stack(trk->stack, stderr);
@@ -631,7 +631,7 @@ H5FL__reg_term(void)
tmp = H5FL_reg_gc_head.first->next;
#ifdef H5FL_DEBUG
- HDprintf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_reg_gc_head.first->list->name,
+ HDprintf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_reg_gc_head.first->list->name,
(int)H5FL_reg_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
/* Check if the list has allocations outstanding */
@@ -1321,7 +1321,7 @@ H5FL__blk_term(void)
tmp = H5FL_blk_gc_head.first->next;
#ifdef H5FL_DEBUG
- HDprintf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_blk_gc_head.first->pq->name,
+ HDprintf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_blk_gc_head.first->pq->name,
(int)H5FL_blk_gc_head.first->pq->allocated);
#endif /* H5FL_DEBUG */
@@ -1781,7 +1781,7 @@ H5FL__arr_term(void)
/* Check if the list has allocations outstanding */
#ifdef H5FL_DEBUG
- HDprintf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_arr_gc_head.first->list->name,
+ HDprintf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_arr_gc_head.first->list->name,
(int)H5FL_arr_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
if (H5FL_arr_gc_head.first->list->allocated > 0) {
@@ -2372,8 +2372,8 @@ H5FL__fac_term_all(void)
tmp = H5FL_fac_gc_head.first->next;
#ifdef H5FL_DEBUG
- HDprintf("%s: head->size = %d, head->allocated = %d\n", FUNC, (int)H5FL_fac_gc_head.first->list->size,
- (int)H5FL_fac_gc_head.first->list->allocated);
+ HDprintf("%s: head->size = %d, head->allocated = %d\n", __func__,
+ (int)H5FL_fac_gc_head.first->list->size, (int)H5FL_fac_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
/* The list cannot have any allocations outstanding */
diff --git a/src/H5FLprivate.h b/src/H5FLprivate.h
index 42581ac..381f977 100644
--- a/src/H5FLprivate.h
+++ b/src/H5FLprivate.h
@@ -51,7 +51,7 @@
/* #define H5FL_TRACK */
#ifdef H5FL_TRACK
/* Macro for inclusion in the free list allocation calls */
-#define H5FL_TRACK_INFO , __FILE__, FUNC, __LINE__
+#define H5FL_TRACK_INFO , __FILE__, __func__, __LINE__
/* Macro for inclusion in internal free list allocation calls */
#define H5FL_TRACK_INFO_INT , call_file, call_func, call_line
diff --git a/src/H5FS.c b/src/H5FS.c
index c85790c..cb18ab3 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -100,7 +100,7 @@ H5FS_create(H5F_t *f, haddr_t *fs_addr, const H5FS_create_t *fs_create, uint16_t
FUNC_ENTER_NOAPI(NULL)
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", FUNC, nclasses);
+ HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", __func__, nclasses);
#endif /* H5FS_DEBUG */
/* Check arguments. */
@@ -146,7 +146,7 @@ H5FS_create(H5F_t *f, haddr_t *fs_addr, const H5FS_create_t *fs_create, uint16_t
/* Set the return value */
ret_value = fspace;
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: fspace = %p, fspace->addr = %a\n", FUNC, fspace, fspace->addr);
+ HDfprintf(stderr, "%s: fspace = %p, fspace->addr = %a\n", __func__, fspace, fspace->addr);
#endif /* H5FS_DEBUG */
done:
@@ -155,7 +155,7 @@ done:
HDONE_ERROR(H5E_FSPACE, H5E_CANTFREE, NULL, "unable to destroy free space header")
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
#endif /* H5FS_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_create() */
@@ -183,7 +183,7 @@ H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses, const H5FS_section_class
FUNC_ENTER_NOAPI(NULL)
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %a, nclasses = %Zu\n", FUNC, fs_addr,
+ HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %a, nclasses = %Zu\n", __func__, fs_addr,
nclasses);
#endif /* H5FS_DEBUG */
@@ -204,11 +204,11 @@ H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses, const H5FS_section_class
(fspace = (H5FS_t *)H5AC_protect(f, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, NULL, "unable to load free space header")
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: fspace->sect_addr = %a\n", FUNC, fspace->sect_addr);
- HDfprintf(stderr, "%s: fspace->sect_size = %Hu\n", FUNC, fspace->sect_size);
- HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu\n", FUNC, fspace->alloc_sect_size);
- HDfprintf(stderr, "%s: fspace->sinfo = %p\n", FUNC, fspace->sinfo);
- HDfprintf(stderr, "%s: fspace->rc = %u\n", FUNC, fspace->rc);
+ HDfprintf(stderr, "%s: fspace->sect_addr = %a\n", __func__, fspace->sect_addr);
+ HDfprintf(stderr, "%s: fspace->sect_size = %Hu\n", __func__, fspace->sect_size);
+ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu\n", __func__, fspace->alloc_sect_size);
+ HDfprintf(stderr, "%s: fspace->sinfo = %p\n", __func__, fspace->sinfo);
+ HDfprintf(stderr, "%s: fspace->rc = %u\n", __func__, fspace->rc);
#endif /* H5FS_DEBUG */
/* Increment the reference count on the free space manager header */
@@ -251,7 +251,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %a\n", FUNC, fs_addr);
+ HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %a\n", __func__, fs_addr);
#endif /* H5FS_DEBUG */
/* Check arguments. */
@@ -278,7 +278,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
"unable to check metadata cache status for free space section info")
- HDfprintf(stderr, "%s: fspace_status = %0x: ", FUNC, fspace_status);
+ HDfprintf(stderr, "%s: fspace_status = %0x: ", __func__, fspace_status);
if (fspace_status) {
hbool_t printed = FALSE;
@@ -321,7 +321,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
/* Delete serialized section storage, if there are any */
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: fspace->sect_addr = %a\n", FUNC, fspace->sect_addr);
+ HDfprintf(stderr, "%s: fspace->sect_addr = %a\n", __func__, fspace->sect_addr);
#endif /* H5FS_DEBUG */
if (fspace->serial_sect_count > 0) {
unsigned sinfo_status = 0; /* Free space section info's status in the metadata cache */
@@ -342,7 +342,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
HDassert(!(sinfo_status & H5AC_ES__IS_PROTECTED));
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Expunging free space section info from cache\n", FUNC);
+ HDfprintf(stderr, "%s: Expunging free space section info from cache\n", __func__);
#endif /* H5FS_DEBUG */
/* Evict the free space section info from the metadata cache */
/* (Free file space) */
@@ -361,12 +361,12 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
} /* end block */
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Done expunging free space section info from cache\n", FUNC);
+ HDfprintf(stderr, "%s: Done expunging free space section info from cache\n", __func__);
#endif /* H5FS_DEBUG */
} /* end if */
else {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Deleting free space section info from file\n", FUNC);
+ HDfprintf(stderr, "%s: Deleting free space section info from file\n", __func__);
#endif /* H5FS_DEBUG */
/* Release the space in the file */
if (!H5F_IS_TMP_ADDR(f, fspace->sect_addr))
@@ -407,7 +407,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
HDassert(f);
HDassert(fspace);
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Entering, fspace = %p, fspace->addr = %a, fspace->sinfo = %p\n", FUNC, fspace,
+ HDfprintf(stderr, "%s: Entering, fspace = %p, fspace->addr = %a, fspace->sinfo = %p\n", __func__, fspace,
fspace->addr, fspace->sinfo);
#endif /* H5FS_DEBUG */
@@ -418,15 +418,15 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
HDfprintf(stderr,
"%s: fspace->tot_sect_count = %Hu, fspace->serial_sect_count = %Hu, fspace->sect_addr = "
"%a, fspace->rc = %u\n",
- FUNC, fspace->tot_sect_count, fspace->serial_sect_count, fspace->sect_addr, fspace->rc);
- HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC,
+ __func__, fspace->tot_sect_count, fspace->serial_sect_count, fspace->sect_addr, fspace->rc);
+ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", __func__,
fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_DEBUG */
/* If there are sections to serialize, update them */
/* (if the free space manager is persistent) */
if (fspace->serial_sect_count > 0 && H5F_addr_defined(fspace->addr)) {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Real sections to store in file\n", FUNC);
+ HDfprintf(stderr, "%s: Real sections to store in file\n", __func__);
#endif /* H5FS_DEBUG */
if (fspace->sinfo->dirty) {
/* Check if the section info is "floating" */
@@ -465,7 +465,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
} /* end if */
else {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: NOT storing section info in file\n", FUNC);
+ HDfprintf(stderr, "%s: NOT storing section info in file\n", __func__);
#endif /* H5FS_DEBUG */
/* Check if space for the section info is allocated */
if (H5F_addr_defined(fspace->sect_addr)) {
@@ -474,7 +474,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
HDassert(H5F_addr_defined(fspace->addr));
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info allocated though\n", FUNC);
+ HDfprintf(stderr, "%s: Section info allocated though\n", __func__);
#endif /* H5FS_DEBUG */
/* Check if the section info is for the free space in the file */
/* (NOTE: This is the "bootstrapping" special case for the
@@ -486,12 +486,13 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
htri_t status; /* "can absorb" status for section into */
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info is for file free space\n", FUNC);
+ HDfprintf(stderr, "%s: Section info is for file free space\n", __func__);
#endif /* H5FS_DEBUG */
/* Try to shrink the file or absorb the section info into a block aggregator */
if (H5F_IS_TMP_ADDR(f, fspace->sect_addr)) {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info in temp. address space went 'go away'\n", FUNC);
+ HDfprintf(stderr, "%s: Section info in temp. address space went 'go away'\n",
+ __func__);
#endif /* H5FS_DEBUG */
/* Reset section info in header */
fspace->sect_addr = HADDR_UNDEF;
@@ -512,12 +513,13 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
* header to record it
*/
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info can't 'go away', header will own it\n", FUNC);
+ HDfprintf(stderr, "%s: Section info can't 'go away', header will own it\n",
+ __func__);
#endif /* H5FS_DEBUG */
} /* end if */
else {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info went 'go away'\n", FUNC);
+ HDfprintf(stderr, "%s: Section info went 'go away'\n", __func__);
#endif /* H5FS_DEBUG */
/* Reset section info in header */
fspace->sect_addr = HADDR_UNDEF;
@@ -536,7 +538,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
fspace->alloc_sect_size; /* Previous size of section info in file */
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info is NOT for file free space\n", FUNC);
+ HDfprintf(stderr, "%s: Section info is NOT for file free space\n", __func__);
#endif /* H5FS_DEBUG */
/* Reset section info in header */
fspace->sect_addr = HADDR_UNDEF;
@@ -576,7 +578,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
done:
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", FUNC, ret_value, fspace->rc);
+ HDfprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", __func__, ret_value, fspace->rc);
#endif /* H5FS_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_close() */
@@ -709,7 +711,8 @@ H5FS__incr(H5FS_t *fspace)
FUNC_ENTER_PACKAGE
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", FUNC, fspace->addr, fspace->rc);
+ HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", __func__, fspace->addr,
+ fspace->rc);
#endif /* H5FS_DEBUG */
/*
@@ -748,7 +751,8 @@ H5FS__decr(H5FS_t *fspace)
FUNC_ENTER_PACKAGE
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", FUNC, fspace->addr, fspace->rc);
+ HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", __func__, fspace->addr,
+ fspace->rc);
#endif /* H5FS_DEBUG */
/*
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index 6ba1bc3..c764932 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -123,7 +123,7 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace)
HDassert(f);
HDassert(fspace);
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: fspace->addr = %a\n", FUNC, fspace->addr);
+ HDfprintf(stderr, "%s: fspace->addr = %a\n", __func__, fspace->addr);
#endif /* H5FS_SINFO_DEBUG */
/* Allocate the free space header */
@@ -136,10 +136,10 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace)
sinfo->sect_off_size = (fspace->max_sect_addr + 7) / 8;
sinfo->sect_len_size = H5VM_limit_enc_size((uint64_t)fspace->max_sect_size);
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: fspace->max_sect_size = %Hu\n", FUNC, fspace->max_sect_size);
- HDfprintf(stderr, "%s: fspace->max_sect_addr = %u\n", FUNC, fspace->max_sect_addr);
- HDfprintf(stderr, "%s: sinfo->nbins = %u\n", FUNC, sinfo->nbins);
- HDfprintf(stderr, "%s: sinfo->sect_off_size = %u, sinfo->sect_len_size = %u\n", FUNC,
+ HDfprintf(stderr, "%s: fspace->max_sect_size = %Hu\n", __func__, fspace->max_sect_size);
+ HDfprintf(stderr, "%s: fspace->max_sect_addr = %u\n", __func__, fspace->max_sect_addr);
+ HDfprintf(stderr, "%s: sinfo->nbins = %u\n", __func__, sinfo->nbins);
+ HDfprintf(stderr, "%s: sinfo->sect_off_size = %u, sinfo->sect_len_size = %u\n", __func__,
sinfo->sect_off_size, sinfo->sect_len_size);
#endif /* H5FS_SINFO_DEBUG */
@@ -200,9 +200,9 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
FUNC_ENTER_STATIC
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Called, fspace->addr = %a, fspace->sinfo = %p, fspace->sect_addr = %a\n", FUNC,
+ HDfprintf(stderr, "%s: Called, fspace->addr = %a, fspace->sinfo = %p, fspace->sect_addr = %a\n", __func__,
fspace->addr, fspace->sinfo, fspace->sect_addr);
- HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC,
+ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", __func__,
fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */
@@ -251,7 +251,7 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
HDassert(H5F_addr_defined(fspace->addr));
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %a\n", FUNC,
+ HDfprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %a\n", __func__,
fspace->sect_addr);
#endif /* H5FS_SINFO_DEBUG */
/* Protect the free space sections */
@@ -267,7 +267,7 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
} /* end if */
else {
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Creating new section info\n", FUNC);
+ HDfprintf(stderr, "%s: Creating new section info\n", __func__);
#endif /* H5FS_SINFO_DEBUG */
/* Sanity check */
HDassert(fspace->tot_sect_count == 0);
@@ -289,9 +289,9 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
done:
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Leaving, fspace->addr = %a, fspace->sinfo = %p, fspace->sect_addr = %a\n", FUNC,
- fspace->addr, fspace->sinfo, fspace->sect_addr);
- HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC,
+ HDfprintf(stderr, "%s: Leaving, fspace->addr = %a, fspace->sinfo = %p, fspace->sect_addr = %a\n",
+ __func__, fspace->addr, fspace->sinfo, fspace->sect_addr);
+ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", __func__,
fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
@@ -331,13 +331,13 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
FUNC_ENTER_STATIC
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Called, modified = %t, fspace->addr = %a, fspace->sect_addr = %a\n", FUNC,
+ HDfprintf(stderr, "%s: Called, modified = %t, fspace->addr = %a, fspace->sect_addr = %a\n", __func__,
modified, fspace->addr, fspace->sect_addr);
HDfprintf(
stderr,
"%s: fspace->sinfo_lock_count = %u, fspace->sinfo_modified = %t, fspace->sinfo_protected = %t\n",
- FUNC, fspace->sinfo_lock_count, fspace->sinfo_modified, fspace->sinfo_protected);
- HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC,
+ __func__, fspace->sinfo_lock_count, fspace->sinfo_modified, fspace->sinfo_protected);
+ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", __func__,
fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */
@@ -413,7 +413,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
/* (Possibly dirty) */
/* (Possibly taking ownership from the cache) */
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Unprotecting section info, cache_flags = %u\n", FUNC, cache_flags);
+ HDfprintf(stderr, "%s: Unprotecting section info, cache_flags = %u\n", __func__, cache_flags);
#endif /* H5FS_SINFO_DEBUG */
if (H5AC_unprotect(f, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, cache_flags) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info")
@@ -424,14 +424,14 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
/* Check if header is taking ownership of section info */
if ((cache_flags & H5AC__TAKE_OWNERSHIP_FLAG)) {
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Taking ownership of section info\n", FUNC);
+ HDfprintf(stderr, "%s: Taking ownership of section info\n", __func__);
#endif /* H5FS_SINFO_DEBUG */
/* Set flag to release section info space in file */
release_sinfo_space = TRUE;
} /* end if */
else {
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Relinquishing section info ownership\n", FUNC);
+ HDfprintf(stderr, "%s: Relinquishing section info ownership\n", __func__);
#endif /* H5FS_SINFO_DEBUG */
/* Free space header relinquished ownership of section info */
fspace->sinfo = NULL;
@@ -491,7 +491,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr,
"%s: Freeing section info on disk, old_sect_addr = %a, old_alloc_sect_size = %Hu\n",
- FUNC, old_sect_addr, old_alloc_sect_size);
+ __func__, old_sect_addr, old_alloc_sect_size);
#endif /* H5FS_SINFO_DEBUG */
/* Release space for section info in file */
if (!H5F_IS_TMP_ADDR(f, old_sect_addr))
@@ -502,7 +502,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
done:
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
#endif /* H5FS_SINFO_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS__sinfo_unlock() */
@@ -1343,7 +1343,7 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: *sect = {%a, %Hu, %u, %s}\n", FUNC, sect->addr, sect->size, sect->type,
+ HDfprintf(stderr, "%s: *sect = {%a, %Hu, %u, %s}\n", __func__, sect->addr, sect->size, sect->type,
(sect->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED"));
#endif /* H5FS_SINFO_DEBUG */
@@ -1367,7 +1367,7 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag
/* Check for merging returned space with existing section node */
if (flags & H5FS_ADD_RETURNED_SPACE) {
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Returning space\n", FUNC);
+ HDfprintf(stderr, "%s: Returning space\n", __func__);
#endif /* H5FS_SINFO_DEBUG */
/* Attempt to merge returned section with existing sections */
@@ -1384,7 +1384,7 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space section into skip list")
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: fspace->tot_space = %Hu\n", FUNC, fspace->tot_space);
+ HDfprintf(stderr, "%s: fspace->tot_space = %Hu\n", __func__, fspace->tot_space);
#endif /* H5FS_SINFO_DEBUG */
/* Mark free space sections as changed */
/* (if adding sections while deserializing sections, don't set the flag) */
@@ -1401,7 +1401,7 @@ done:
H5FS__assert(fspace);
#endif /* H5FS_DEBUG_ASSERT */
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
#endif /* H5FS_SINFO_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_add() */
@@ -1429,7 +1429,7 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: addr = %a, size = %Hu, extra_requested = %hu\n", FUNC, addr, size,
+ HDfprintf(stderr, "%s: addr = %a, size = %Hu, extra_requested = %hu\n", __func__, addr, size,
extra_requested);
#endif /* H5FS_SINFO_DEBUG */
@@ -1442,9 +1442,9 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize
/* Check for any sections on free space list */
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", FUNC, fspace->tot_sect_count);
- HDfprintf(stderr, "%s: fspace->serial_sect_count = %Hu\n", FUNC, fspace->serial_sect_count);
- HDfprintf(stderr, "%s: fspace->ghost_sect_count = %Hu\n", FUNC, fspace->ghost_sect_count);
+ HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", __func__, fspace->tot_sect_count);
+ HDfprintf(stderr, "%s: fspace->serial_sect_count = %Hu\n", __func__, fspace->serial_sect_count);
+ HDfprintf(stderr, "%s: fspace->ghost_sect_count = %Hu\n", __func__, fspace->ghost_sect_count);
#endif /* H5FS_SINFO_DEBUG */
if (fspace->tot_sect_count > 0) {
H5FS_section_info_t *sect; /* Temporary free space section */
diff --git a/src/H5MF.c b/src/H5MF.c
index d1809ca..66bf823 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -542,7 +542,7 @@ H5MF__delete_fstype(H5F_t *f, H5F_mem_page_t type)
H5AC_set_ring(fsm_ring, &orig_ring);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Before deleting free space manager\n", FUNC);
+ HDfprintf(stderr, "%s: Before deleting free space manager\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Delete free space manager for this type */
@@ -597,7 +597,7 @@ H5MF__close_fstype(H5F_t *f, H5F_mem_page_t type)
HDassert(f->shared->fs_state[type] != H5F_FS_STATE_CLOSED);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Before closing free space manager\n", FUNC);
+ HDfprintf(stderr, "%s: Before closing free space manager\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Close an existing free space structure for the file */
@@ -653,7 +653,7 @@ H5MF__add_sect(H5F_t *f, H5FD_mem_t alloc_type, H5FS_t *fspace, H5MF_free_sectio
H5AC_set_ring(fsm_ring, &orig_ring);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: adding node, node->sect_info.addr = %a, node->sect_info.size = %Hu\n", FUNC,
+ HDfprintf(stderr, "%s: adding node, node->sect_info.addr = %a, node->sect_info.size = %Hu\n", __func__,
node->sect_info.addr, node->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Add the section */
@@ -706,7 +706,7 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "error locating free space in file")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section found = %t\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: section found = %t\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Check for actually finding section */
@@ -721,7 +721,7 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h
/* Check for eliminating the section */
if (node->sect_info.size == size) {
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: freeing node\n", FUNC);
+ HDfprintf(stderr, "%s: freeing node\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Free section node */
@@ -734,7 +734,8 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h
node->sect_info.size -= size;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: re-adding node, node->sect_info.size = %Hu\n", FUNC, node->sect_info.size);
+ HDfprintf(stderr, "%s: re-adding node, node->sect_info.size = %Hu\n", __func__,
+ node->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Re-add the section to the free-space manager */
@@ -777,7 +778,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, HADDR_UNDEF)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_type, size);
+ HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", __func__, (unsigned)alloc_type, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check arguments */
@@ -789,7 +790,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &fs_type);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 1.0\n", FUNC);
+ HDfprintf(stderr, "%s: Check 1.0\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Set the ring type in the API context */
@@ -826,7 +827,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
/* If no space is found from the free-space manager, continue further action */
if (!H5F_addr_defined(ret_value)) {
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 2.0\n", FUNC);
+ HDfprintf(stderr, "%s: Check 2.0\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
if (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE) {
HDassert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
@@ -841,7 +842,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
} /* end if */
HDassert(H5F_addr_defined(ret_value));
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 3.0\n", FUNC);
+ HDfprintf(stderr, "%s: Check 3.0\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
done:
@@ -850,7 +851,7 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving: ret_value = %a, size = %Hu\n", FUNC, ret_value, size);
+ HDfprintf(stderr, "%s: Leaving: ret_value = %a, size = %Hu\n", __func__, ret_value, size);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF__sects_dump(f, stderr);
@@ -890,7 +891,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
FUNC_ENTER_STATIC
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_type, size);
+ HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", __func__, (unsigned)alloc_type, size);
#endif /* H5MF_ALLOC_DEBUG */
H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &ptype);
@@ -987,7 +988,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
done:
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving: ret_value = %a, size = %Hu\n", FUNC, ret_value, size);
+ HDfprintf(stderr, "%s: Leaving: ret_value = %a, size = %Hu\n", __func__, ret_value, size);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF__sects_dump(f, stderr);
@@ -1033,7 +1034,7 @@ H5MF_alloc_tmp(H5F_t *f, hsize_t size)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: size = %Hu\n", FUNC, size);
+ HDfprintf(stderr, "%s: size = %Hu\n", __func__, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
@@ -1085,8 +1086,8 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)alloc_type,
- addr, size);
+ HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", __func__,
+ (unsigned)alloc_type, addr, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check arguments */
@@ -1135,13 +1136,13 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
* space is at the end of the file
*/
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: fs_addr = %a\n", FUNC, f->shared->fs_addr[fs_type]);
+ HDfprintf(stderr, "%s: fs_addr = %a\n", __func__, f->shared->fs_addr[fs_type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */
if (!H5F_addr_defined(f->shared->fs_addr[fs_type])) {
htri_t status; /* "can absorb" status for section into */
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Trying to avoid starting up free space manager\n", FUNC);
+ HDfprintf(stderr, "%s: Trying to avoid starting up free space manager\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Try to shrink the file or absorb the block into a block aggregator */
if ((status = H5MF_try_shrink(f, alloc_type, addr, size)) < 0)
@@ -1151,7 +1152,8 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
HGOTO_DONE(SUCCEED)
else if (size < f->shared->fs_threshold) {
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: dropping addr = %a, size = %Hu, on the floor!\n", FUNC, addr, size);
+ HDfprintf(stderr, "%s: dropping addr = %a, size = %Hu, on the floor!\n", __func__, addr,
+ size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
HGOTO_DONE(SUCCEED)
} /* end else-if */
@@ -1168,7 +1170,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
*/
if (f->shared->fs_state[fs_type] == H5F_FS_STATE_DELETING || !H5F_HAVE_FREE_SPACE_MANAGER(f)) {
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: dropping addr = %a, size = %Hu, on the floor!\n", FUNC, addr, size);
+ HDfprintf(stderr, "%s: dropping addr = %a, size = %Hu, on the floor!\n", __func__, addr, size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
HGOTO_DONE(SUCCEED)
} /* end if */
@@ -1191,7 +1193,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
HDassert(f->shared->fs_man[fs_type]);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Before H5FS_sect_add()\n", FUNC);
+ HDfprintf(stderr, "%s: Before H5FS_sect_add()\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Add to the free space for the file */
@@ -1200,7 +1202,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
node = NULL;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: After H5FS_sect_add()\n", FUNC);
+ HDfprintf(stderr, "%s: After H5FS_sect_add()\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
else {
@@ -1233,7 +1235,7 @@ done:
HDONE_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node")
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF__sects_dump(f, stderr);
@@ -1277,8 +1279,8 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering: alloc_type = %u, addr = %a, size = %Hu, extra_requested = %Hu\n", FUNC,
- (unsigned)alloc_type, addr, size, extra_requested);
+ HDfprintf(stderr, "%s: Entering: alloc_type = %u, addr = %a, size = %Hu, extra_requested = %Hu\n",
+ __func__, (unsigned)alloc_type, addr, size, extra_requested);
#endif /* H5MF_ALLOC_DEBUG */
/* Sanity check */
@@ -1330,7 +1332,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
if ((ret_value = H5F__try_extend(f, map_type, end, extra_requested + frag_size)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending file")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: extended = %t\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: extended = %t\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* If extending at EOA succeeds: */
@@ -1368,7 +1370,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending aggregation block")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: H5MF__aggr_try_extend = %t\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: H5MF__aggr_try_extend = %t\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
@@ -1394,7 +1396,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL,
"error extending block in free space manager")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Try to H5FS_sect_try_extend = %t\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Try to H5FS_sect_try_extend = %t\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
@@ -1405,7 +1407,8 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
if (frag_size <= H5F_PGEND_META_THRES(f) && extra_requested <= frag_size)
ret_value = TRUE;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Try to extend into the page end threshold = %t\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Try to extend into the page end threshold = %t\n", __func__,
+ ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
} /* end if */
@@ -1417,7 +1420,7 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF__sects_dump(f, stderr);
@@ -1452,8 +1455,8 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)alloc_type,
- addr, size);
+ HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", __func__,
+ (unsigned)alloc_type, addr, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check arguments */
@@ -1509,7 +1512,7 @@ done:
HDONE_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node")
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5MF_try_shrink() */
@@ -1533,7 +1536,7 @@ H5MF_close(H5F_t *f)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", FUNC);
+ HDfprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
@@ -1551,7 +1554,7 @@ H5MF_close(H5F_t *f)
done:
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", FUNC);
+ HDfprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5MF_close() */
@@ -1577,7 +1580,7 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type)
FUNC_ENTER_STATIC
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", FUNC);
+ HDfprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
@@ -1589,7 +1592,7 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type)
HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %a\n", FUNC,
+ HDfprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %a\n", __func__,
(unsigned)type, f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */
@@ -1599,7 +1602,7 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close the free space manager")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %a\n", FUNC,
+ HDfprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %a\n", __func__,
(unsigned)type, f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */
@@ -1610,7 +1613,7 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type)
done:
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", FUNC);
+ HDfprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5MF__close_delete() */
@@ -1639,7 +1642,7 @@ H5MF_try_close(H5F_t *f)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", FUNC);
+ HDfprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
@@ -1718,7 +1721,7 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", FUNC);
+ HDfprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* H5MF_try_close() */
@@ -1746,7 +1749,7 @@ H5MF__close_aggrfs(H5F_t *f)
FUNC_ENTER_STATIC
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", FUNC);
+ HDfprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
@@ -1884,7 +1887,7 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", FUNC);
+ HDfprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF__close_aggrfs() */
@@ -1912,7 +1915,7 @@ H5MF__close_pagefs(H5F_t *f)
FUNC_ENTER_STATIC
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", FUNC);
+ HDfprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
@@ -2059,7 +2062,7 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", FUNC);
+ HDfprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF__close_pagefs() */
diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c
index 68cd263..77345c9 100644
--- a/src/H5MFaggr.c
+++ b/src/H5MFaggr.c
@@ -92,7 +92,7 @@ H5MF_aggr_vfd_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_type, size);
+ HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", __func__, (unsigned)alloc_type, size);
#endif /* H5MF_AGGR_DEBUG */
/* check arguments */
@@ -120,7 +120,7 @@ H5MF_aggr_vfd_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
done:
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: Leaving: ret_value = %a, size = %Hu\n", FUNC, ret_value, size);
+ HDfprintf(stderr, "%s: Leaving: ret_value = %a, size = %Hu\n", __func__, ret_value, size);
#endif /* H5MF_AGGR_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
@@ -150,7 +150,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
FUNC_ENTER_STATIC
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size);
+ HDfprintf(stderr, "%s: type = %u, size = %Hu\n", __func__, (unsigned)type, size);
#endif /* H5MF_AGGR_DEBUG */
/* check args */
@@ -199,7 +199,8 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
H5FD_mem_t alloc_type, other_alloc_type; /* Current aggregator & 'other' aggregator types */
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: aggr = {%a, %Hu, %Hu}\n", FUNC, aggr->addr, aggr->tot_size, aggr->size);
+ HDfprintf(stderr, "%s: aggr = {%a, %Hu, %Hu}\n", __func__, aggr->addr, aggr->tot_size,
+ aggr->size);
#endif /* H5MF_AGGR_DEBUG */
/* Turn off alignment if allocation < threshold */
@@ -267,7 +268,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
/* Allocate another block */
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: Allocating block\n", FUNC);
+ HDfprintf(stderr, "%s: Allocating block\n", __func__);
#endif /* H5MF_AGGR_DEBUG */
if (aggr_frag_size > (ext_size - size))
@@ -387,7 +388,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
done:
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: ret_value = %a\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: ret_value = %a\n", __func__, ret_value);
#endif /* H5MF_AGGR_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF__aggr_alloc() */
@@ -722,7 +723,7 @@ done:
tmp_addr = aggr->addr;
tmp_size = aggr->size;
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: tmp_addr = %a, tmp_size = %Hu\n", FUNC, tmp_addr, tmp_size);
+ HDfprintf(stderr, "%s: tmp_addr = %a, tmp_size = %Hu\n", __func__, tmp_addr, tmp_size);
#endif /* H5MF_AGGR_DEBUG */
/* Reset aggregator block information */
diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c
index 7b89fd8..6ccbe78 100644
--- a/src/H5MFdbg.c
+++ b/src/H5MFdbg.c
@@ -210,7 +210,7 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
FUNC_ENTER_PACKAGE_TAG(H5AC__FREESPACE_TAG)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Dumping file free space sections\n", FUNC);
+ HDfprintf(stderr, "%s: Dumping file free space sections\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/*
@@ -223,7 +223,7 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_DEFAULT)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %" PRIuHADDR "\n", FUNC, eoa);
+ HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %" PRIuHADDR "\n", __func__, eoa);
#endif /* H5MF_ALLOC_DEBUG */
if (H5F_PAGED_AGGR(f)) { /* File space paging */
@@ -267,7 +267,7 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr,
"%s: ma_addr = %" PRIuHADDR ", ma_size = %" PRIuHSIZE ", end of ma = %" PRIuHADDR "\n",
- FUNC, ma_addr, ma_size, (haddr_t)((ma_addr + ma_size) - 1));
+ __func__, ma_addr, ma_size, (haddr_t)((ma_addr + ma_size) - 1));
#endif /* H5MF_ALLOC_DEBUG */
/* Retrieve 'small data' aggregator info, if available */
@@ -275,7 +275,7 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr,
"%s: sda_addr = %" PRIuHADDR ", sda_size = %" PRIuHSIZE ", end of sda = %" PRIuHADDR "\n",
- FUNC, sda_addr, sda_size, (haddr_t)((sda_addr + sda_size) - 1));
+ __func__, sda_addr, sda_size, (haddr_t)((sda_addr + sda_size) - 1));
#endif /* H5MF_ALLOC_DEBUG */
/* Iterate over all the free space types that have managers and dump each free list's space */
@@ -318,7 +318,7 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
} /* end else */
done:
- HDfprintf(stderr, "%s: Done dumping file free space sections\n", FUNC);
+ HDfprintf(stderr, "%s: Done dumping file free space sections\n", __func__);
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5MF__sects_dump() */
#endif /* H5MF_ALLOC_DEBUG_DUMP */
diff --git a/src/H5MFsection.c b/src/H5MFsection.c
index bf5b888..69b2ca0 100644
--- a/src/H5MFsection.c
+++ b/src/H5MFsection.c
@@ -472,7 +472,7 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the shrinking type */
udata->shrink = H5MF_SHRINK_EOA;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section {%a, %Hu}, shrinks file, eoa = %a\n", FUNC, sect->sect_info.addr,
+ HDfprintf(stderr, "%s: section {%a, %Hu}, shrinks file, eoa = %a\n", __func__, sect->sect_info.addr,
sect->sect_info.size, eoa);
#endif /* H5MF_ALLOC_DEBUG_MORE */
@@ -496,7 +496,7 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the aggregator to operate on */
udata->aggr = &(udata->f->shared->meta_aggr);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section {%a, %Hu}, adjoins metadata aggregator\n", FUNC,
+ HDfprintf(stderr, "%s: section {%a, %Hu}, adjoins metadata aggregator\n", __func__,
sect->sect_info.addr, sect->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
@@ -517,7 +517,7 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the aggregator to operate on */
udata->aggr = &(udata->f->shared->sdata_aggr);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section {%a, %Hu}, adjoins small data aggregator\n", FUNC,
+ HDfprintf(stderr, "%s: section {%a, %Hu}, adjoins small data aggregator\n", __func__,
sect->sect_info.addr, sect->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
@@ -625,7 +625,7 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata)
FUNC_ENTER_STATIC
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Entering, section {%a, %Hu}\n", FUNC, (*sect)->sect_info.addr,
+ HDfprintf(stderr, "%s: Entering, section {%a, %Hu}\n", __func__, (*sect)->sect_info.addr,
(*sect)->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
@@ -646,14 +646,14 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata)
*flags &= (unsigned)~H5FS_ADD_RETURNED_SPACE;
*flags |= H5FS_PAGE_END_NO_ADD;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section is dropped\n", FUNC);
+ HDfprintf(stderr, "%s: section is dropped\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
/* Adjust the section if it is not at page end but its size + prem is at page end */
else if (prem <= H5F_PGEND_META_THRES(udata->f)) {
(*sect)->sect_info.size += prem;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section is adjusted {%a, %Hu}\n", FUNC, (*sect)->sect_info.addr,
+ HDfprintf(stderr, "%s: section is adjusted {%a, %Hu}\n", __func__, (*sect)->sect_info.addr,
(*sect)->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
@@ -702,7 +702,7 @@ H5MF__sect_small_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
ret_value = FALSE;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
FUNC_LEAVE_NOAPI(ret_value)
@@ -806,7 +806,7 @@ H5MF__sect_large_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
ret_value = H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", FUNC, ret_value);
+ HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
FUNC_LEAVE_NOAPI(ret_value)
@@ -894,7 +894,7 @@ H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the shrinking type */
udata->shrink = H5MF_SHRINK_EOA;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section {%a, %Hu}, shrinks file, eoa = %a\n", FUNC, sect->sect_info.addr,
+ HDfprintf(stderr, "%s: section {%a, %Hu}, shrinks file, eoa = %a\n", __func__, sect->sect_info.addr,
sect->sect_info.size, eoa);
#endif /* H5MF_ALLOC_DEBUG_MORE */
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index e12ff93..a5b9b6c 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -296,11 +296,11 @@ H5S__hyper_print_spans_helper(FILE *f, const H5S_hyper_span_t *span, unsigned de
FUNC_ENTER_STATIC_NOERR
while (span) {
- HDfprintf(f, "%s: %*sdepth=%u, span=%p, (%Hu, %Hu), next=%p\n", FUNC, depth * 2, "", depth, span,
+ HDfprintf(f, "%s: %*sdepth=%u, span=%p, (%Hu, %Hu), next=%p\n", __func__, depth * 2, "", depth, span,
span->low, span->high, span->next);
if (span->down) {
- HDfprintf(f, "%s: %*sspans=%p, count=%u, bounds[0]={%Hu, %Hu}, head=%p\n", FUNC, (depth + 1) * 2,
- "", span->down, span->down->count, span->down->low_bounds[0],
+ HDfprintf(f, "%s: %*sspans=%p, count=%u, bounds[0]={%Hu, %Hu}, head=%p\n", __func__,
+ (depth + 1) * 2, "", span->down, span->down->count, span->down->low_bounds[0],
span->down->high_bounds[0], span->down->head);
H5S__hyper_print_spans_helper(f, span->down->head, depth + 1);
} /* end if */
@@ -316,7 +316,7 @@ H5S__hyper_print_spans(FILE *f, const H5S_hyper_span_info_t *span_lst)
FUNC_ENTER_STATIC_NOERR
if (span_lst != NULL) {
- HDfprintf(f, "%s: spans=%p, count=%u, bounds[0]={%Hu, %Hu}, head=%p\n", FUNC, span_lst,
+ HDfprintf(f, "%s: spans=%p, count=%u, bounds[0]={%Hu, %Hu}, head=%p\n", __func__, span_lst,
span_lst->count, span_lst->low_bounds[0], span_lst->high_bounds[0], span_lst->head);
H5S__hyper_print_spans_helper(f, span_lst->head, 0);
} /* end if */
@@ -342,21 +342,21 @@ H5S__hyper_print_diminfo_helper(FILE *f, const char *field, unsigned ndims, cons
FUNC_ENTER_STATIC_NOERR
if (dinfo != NULL) {
- HDfprintf(f, "%s: %s: start=[", FUNC, field);
+ HDfprintf(f, "%s: %s: start=[", __func__, field);
for (u = 0; u < ndims; u++)
HDfprintf(f, "%Hd%s", dinfo[u].start, (u < (ndims - 1) ? ", " : "]\n"));
- HDfprintf(f, "%s: %s: stride=[", FUNC, field);
+ HDfprintf(f, "%s: %s: stride=[", __func__, field);
for (u = 0; u < ndims; u++)
HDfprintf(f, "%Hu%s", dinfo[u].stride, (u < (ndims - 1) ? ", " : "]\n"));
- HDfprintf(f, "%s: %s: count=[", FUNC, field);
+ HDfprintf(f, "%s: %s: count=[", __func__, field);
for (u = 0; u < ndims; u++)
HDfprintf(f, "%Hu%s", dinfo[u].count, (u < (ndims - 1) ? ", " : "]\n"));
- HDfprintf(f, "%s: %s: block=[", FUNC, field);
+ HDfprintf(f, "%s: %s: block=[", __func__, field);
for (u = 0; u < ndims; u++)
HDfprintf(f, "%Hu%s", dinfo[u].block, (u < (ndims - 1) ? ", " : "]\n"));
} /* end if */
else
- HDfprintf(f, "%s: %s==NULL\n", FUNC, field);
+ HDfprintf(f, "%s: %s==NULL\n", __func__, field);
FUNC_LEAVE_NOAPI(SUCCEED)
}
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index 7b85209..b626b77 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -685,7 +685,7 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new
rank = sel_iter.u.hyp.iter_rank;
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S), "%s: Flattened selection\n", FUNC);
+ HDfprintf(H5DEBUG(S), "%s: Flattened selection\n", __func__);
#endif
for (u = 0; u < rank; ++u) {
H5_CHECK_OVERFLOW(diminfo[u].start, hsize_t, hssize_t)
@@ -700,7 +700,7 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new
HDfprintf(H5DEBUG(S),
"%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE
" block=%" PRIuHSIZE " xtent=%" PRIuHSIZE,
- FUNC, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
+ __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
if (u == 0)
HDfprintf(H5DEBUG(S), " rank=%u\n", rank);
else
@@ -719,7 +719,7 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new
rank = space->extent.rank;
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S), "%s: Non-flattened selection\n", FUNC);
+ HDfprintf(H5DEBUG(S), "%s: Non-flattened selection\n", __func__);
#endif
for (u = 0; u < rank; ++u) {
H5_CHECK_OVERFLOW(diminfo[u].start, hsize_t, hssize_t)
@@ -734,7 +734,7 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new
HDfprintf(H5DEBUG(S),
"%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE
" block=%" PRIuHSIZE " xtent=%" PRIuHSIZE,
- FUNC, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
+ __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
if (u == 0)
HDfprintf(H5DEBUG(S), " rank=%u\n", rank);
else
@@ -783,7 +783,7 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new
*******************************************************/
#ifdef H5S_DEBUG
if (H5DEBUG(S)) {
- HDfprintf(H5DEBUG(S), "%s: Making contig type %zu MPI_BYTEs\n", FUNC, elmt_size);
+ HDfprintf(H5DEBUG(S), "%s: Making contig type %zu MPI_BYTEs\n", __func__, elmt_size);
for (i = ((int)rank) - 1; i >= 0; --i)
HDfprintf(H5DEBUG(S), "d[%d].xtent=%" PRIuHSIZE "\n", i, d[i].xtent);
}
@@ -817,12 +817,12 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new
"%s: Dimension i=%d \n"
"start=%" PRIdHSIZE " count=%" PRIuHSIZE " block=%" PRIuHSIZE " stride=%" PRIuHSIZE
", xtent=%" PRIuHSIZE " max_xtent=%" PRIuHSIZE "\n",
- FUNC, i, d[i].start, d[i].count, d[i].block, d[i].strid, d[i].xtent, max_xtent[i]);
+ __func__, i, d[i].start, d[i].count, d[i].block, d[i].strid, d[i].xtent, max_xtent[i]);
#endif
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S), "%s: i=%d Making vector-type \n", FUNC, i);
+ HDfprintf(H5DEBUG(S), "%s: i=%d Making vector-type \n", __func__, i);
#endif
/****************************************
* Build vector type of the selection.
@@ -957,7 +957,7 @@ done:
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S), "Leave %s, count=%d is_derived_type=%s\n", FUNC, *count,
+ HDfprintf(H5DEBUG(S), "Leave %s, count=%d is_derived_type=%s\n", __func__, *count,
(*is_derived_type) ? "TRUE" : "FALSE");
#endif
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5private.h b/src/H5private.h
index 71b913a..a5c6efd 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -150,8 +150,8 @@
#define eventa(func_name) h5_mpe_eventa
#define eventb(func_name) h5_mpe_eventb
#define MPE_LOG_VARS \
- static int eventa(FUNC) = -1; \
- static int eventb(FUNC) = -1; \
+ static int eventa(__func__) = -1; \
+ static int eventb(__func__) = -1; \
char p_event_start[128];
/* Hardwire the color to "red", since that's what all the routines are using
@@ -163,14 +163,14 @@
*/
#define BEGIN_MPE_LOG \
if (H5_MPEinit_g) { \
- sprintf(p_event_start, "start %s", FUNC); \
- if (eventa(FUNC) == -1 && eventb(FUNC) == -1) { \
+ sprintf(p_event_start, "start %s", __func__); \
+ if (eventa(__func__) == -1 && eventb(__func__) == -1) { \
const char *p_color = "red"; \
- eventa(FUNC) = MPE_Log_get_event_number(); \
- eventb(FUNC) = MPE_Log_get_event_number(); \
- MPE_Describe_state(eventa(FUNC), eventb(FUNC), FUNC, p_color); \
+ eventa(__func__) = MPE_Log_get_event_number(); \
+ eventb(__func__) = MPE_Log_get_event_number(); \
+ MPE_Describe_state(eventa(__func__), eventb(__func__), __func__, p_color); \
} \
- MPE_Log_event(eventa(FUNC), 0, p_event_start); \
+ MPE_Log_event(eventa(__func__), 0, p_event_start); \
}
/*------------------------------------------------------------------------
@@ -181,7 +181,7 @@
*/
#define FINISH_MPE_LOG \
if (H5_MPEinit_g) { \
- MPE_Log_event(eventb(FUNC), 0, FUNC); \
+ MPE_Log_event(eventb(__func__), 0, __func__); \
}
#else /* H5_HAVE_MPE */
@@ -1978,7 +1978,7 @@ extern hbool_t H5_libterm_g; /* Is the library being shutdown? */
/* Include required function stack header */
#include "H5CSprivate.h"
-#define H5_PUSH_FUNC H5CS_push(FUNC);
+#define H5_PUSH_FUNC H5CS_push(__func__);
#define H5_POP_FUNC H5CS_pop();
#else /* H5_HAVE_CODESTACK */
#define H5_PUSH_FUNC /* void */
diff --git a/test/hdfs.c b/test/hdfs.c
index dfaa585..74fc2bd 100644
--- a/test/hdfs.c
+++ b/test/hdfs.c
@@ -102,7 +102,7 @@
*/
#define JSFAILED_AT() \
{ \
- HDprintf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC); \
+ HDprintf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); \
}
/*----------------------------------------------------------------------------
diff --git a/test/ros3.c b/test/ros3.c
index 54518f4..b7b27ed 100644
--- a/test/ros3.c
+++ b/test/ros3.c
@@ -106,7 +106,7 @@
*/
#define JSFAILED_AT() \
{ \
- HDprintf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC); \
+ HDprintf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); \
}
/*----------------------------------------------------------------------------
diff --git a/test/s3comms.c b/test/s3comms.c
index 6202af3..cec7a27 100644
--- a/test/s3comms.c
+++ b/test/s3comms.c
@@ -96,7 +96,7 @@
*/
#define JSFAILED_AT() \
{ \
- HDprintf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC); \
+ HDprintf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); \
}
/*----------------------------------------------------------------------------
diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c
index ed99fc4..e5654f4 100644
--- a/testpar/t_bigio.c
+++ b/testpar/t_bigio.c
@@ -1861,7 +1861,7 @@ main(int argc, char **argv)
HDprintf("Failed to turn off atexit processing. Continue.\n");
/* set alarm. */
- ALARM_ON;
+ TestAlarmOn();
dataset_big_write();
MPI_Barrier(MPI_COMM_WORLD);
@@ -1878,7 +1878,7 @@ main(int argc, char **argv)
single_rank_independent_io();
/* turn off alarm */
- ALARM_OFF;
+ TestAlarmOff();
if (mpi_rank_g == 0)
HDremove(FILENAME[0]);
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 4cf1139..8696092 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -577,7 +577,7 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Comm_group() failed with error %d.\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: MPI_Comm_group() failed with error %d.\n", world_mpi_rank, __func__,
mpi_result);
}
}
@@ -594,7 +594,7 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Group_excl() failed with error %d.\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: MPI_Group_excl() failed with error %d.\n", world_mpi_rank, __func__,
mpi_result);
}
}
@@ -609,8 +609,8 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Comm_create() failed with error %d.\n", world_mpi_rank, FUNC,
- mpi_result);
+ HDfprintf(stdout, "%d:%s: MPI_Comm_create() failed with error %d.\n", world_mpi_rank,
+ __func__, mpi_result);
}
}
else {
@@ -622,7 +622,8 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: file_mpi_comm == MPI_COMM_NULL.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: file_mpi_comm == MPI_COMM_NULL.\n", world_mpi_rank,
+ __func__);
}
}
}
@@ -635,7 +636,8 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: file_mpi_comm != MPI_COMM_NULL.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: file_mpi_comm != MPI_COMM_NULL.\n", world_mpi_rank,
+ __func__);
}
}
}
@@ -651,7 +653,7 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Comm_size() failed with error %d.\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: MPI_Comm_size() failed with error %d.\n", world_mpi_rank, __func__,
mpi_result);
}
}
@@ -666,7 +668,7 @@ set_up_file_communicator(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Comm_rank() failed with error %d.\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: MPI_Comm_rank() failed with error %d.\n", world_mpi_rank, __func__,
mpi_result);
}
}
@@ -832,7 +834,7 @@ do_express_test(void)
nerrors++;
max_express_test = -1;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, __func__);
}
}
@@ -880,7 +882,7 @@ do_sync(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -891,7 +893,7 @@ do_sync(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
else if ((mssg.req != SYNC_ACK_CODE) || (mssg.src != world_server_mpi_rank) ||
@@ -899,7 +901,7 @@ do_sync(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in sync ack.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad data in sync ack.\n", world_mpi_rank, __func__);
}
}
}
@@ -936,7 +938,7 @@ get_max_nerrors(void)
nerrors++;
max_nerrors = -1;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, __func__);
}
}
@@ -983,7 +985,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: bad param(s) on entry.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: bad param(s) on entry.\n", world_mpi_rank, __func__);
}
}
else {
@@ -1000,7 +1002,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Recv() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: MPI_Recv() failed.\n", world_mpi_rank, __func__);
}
}
else if (mssg_ptr->magic != MSSG_MAGIC) {
@@ -1008,7 +1010,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: invalid magic.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: invalid magic.\n", world_mpi_rank, __func__);
}
}
else if (mssg_ptr->src != status.MPI_SOURCE) {
@@ -1016,7 +1018,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: mssg_ptr->src != status.MPI_SOURCE.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: mssg_ptr->src != status.MPI_SOURCE.\n", world_mpi_rank, __func__);
}
}
}
@@ -1061,7 +1063,7 @@ send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Invalid mssg on entry.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Invalid mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1081,7 +1083,7 @@ send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Send() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: MPI_Send() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -1130,7 +1132,7 @@ setup_derived_types(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Get_address() call failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: MPI_Get_address() call failed.\n", world_mpi_rank, __func__);
}
}
else {
@@ -1150,7 +1152,7 @@ setup_derived_types(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Type_create_struct() call failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: MPI_Type_create_struct() call failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -1164,7 +1166,7 @@ setup_derived_types(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Type_commit() call failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: MPI_Type_commit() call failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -1200,7 +1202,7 @@ takedown_derived_types(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: MPI_Type_free() call failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: MPI_Type_free() call failed.\n", world_mpi_rank, __func__);
}
}
@@ -1253,7 +1255,7 @@ reset_server_counters(void)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%d).\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%d).\n", world_mpi_rank, __func__,
actual_total_reads, total_reads);
}
}
@@ -1263,7 +1265,7 @@ reset_server_counters(void)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%d).\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%d).\n", world_mpi_rank, __func__,
actual_total_writes, total_writes);
}
}
@@ -1311,7 +1313,7 @@ server_main(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: This isn't the server process?!?!?\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: This isn't the server process?!?!?\n", world_mpi_rank, __func__);
}
}
@@ -1328,7 +1330,7 @@ server_main(void)
case WRITE_REQ_ACK_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received write ack?!?.\n", FUNC);
+ HDfprintf(stdout, "%s: Received write ack?!?.\n", __func__);
break;
case READ_REQ_CODE:
@@ -1338,7 +1340,7 @@ server_main(void)
case READ_REQ_REPLY_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received read req reply?!?.\n", FUNC);
+ HDfprintf(stdout, "%s: Received read req reply?!?.\n", __func__);
break;
case SYNC_REQ_CODE:
@@ -1348,7 +1350,7 @@ server_main(void)
case SYNC_ACK_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received sync ack?!?.\n", FUNC);
+ HDfprintf(stdout, "%s: Received sync ack?!?.\n", __func__);
break;
case REQ_TTL_WRITES_CODE:
@@ -1358,7 +1360,7 @@ server_main(void)
case REQ_TTL_WRITES_RPLY_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received total writes reply?!?.\n", FUNC);
+ HDfprintf(stdout, "%s: Received total writes reply?!?.\n", __func__);
break;
case REQ_TTL_READS_CODE:
@@ -1368,7 +1370,7 @@ server_main(void)
case REQ_TTL_READS_RPLY_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received total reads reply?!?.\n", FUNC);
+ HDfprintf(stdout, "%s: Received total reads reply?!?.\n", __func__);
break;
case REQ_ENTRY_WRITES_CODE:
@@ -1378,7 +1380,7 @@ server_main(void)
case REQ_ENTRY_WRITES_RPLY_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received entry writes reply?!?.\n", FUNC);
+ HDfprintf(stdout, "%s: Received entry writes reply?!?.\n", __func__);
break;
case REQ_ENTRY_READS_CODE:
@@ -1388,7 +1390,7 @@ server_main(void)
case REQ_ENTRY_READS_RPLY_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received entry reads reply?!?.\n", FUNC);
+ HDfprintf(stdout, "%s: Received entry reads reply?!?.\n", __func__);
break;
case REQ_RW_COUNT_RESET_CODE:
@@ -1398,7 +1400,7 @@ server_main(void)
case REQ_RW_COUNT_RESET_RPLY_CODE:
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%s: Received RW count reset reply?!?.\n", FUNC);
+ HDfprintf(stdout, "%s: Received RW count reset reply?!?.\n", __func__);
break;
case DONE_REQ_CODE:
@@ -1411,7 +1413,7 @@ server_main(void)
nerrors++;
success = FALSE;
if (verbose)
- HDfprintf(stdout, "%d:%s: Unknown request code.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Unknown request code.\n", world_mpi_rank, __func__);
break;
}
}
@@ -1453,7 +1455,7 @@ serve_read_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1467,7 +1469,7 @@ serve_read_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
target_addr);
}
}
@@ -1476,7 +1478,7 @@ serve_read_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__,
data[target_index].len, mssg_ptr->len);
}
}
@@ -1488,7 +1490,8 @@ serve_read_request(struct mssg_t *mssg_ptr)
HDfprintf(stdout,
"%d:%s: proc %d read invalid entry. "
"idx/base_addr = %d/%" PRIuHADDR ".\n",
- world_mpi_rank, FUNC, mssg_ptr->src, target_index, data[target_index].base_addr);
+ world_mpi_rank, __func__, mssg_ptr->src, target_index,
+ data[target_index].base_addr);
}
}
else {
@@ -1568,7 +1571,7 @@ serve_sync_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1642,7 +1645,7 @@ serve_write_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1656,7 +1659,7 @@ serve_write_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
target_addr);
}
}
@@ -1665,7 +1668,7 @@ serve_write_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__,
data[target_index].len, mssg_ptr->len);
}
}
@@ -1681,8 +1684,8 @@ serve_write_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: new ver = %d <= old ver = %d.\n", world_mpi_rank, FUNC, new_ver_num,
- data[target_index].ver);
+ HDfprintf(stdout, "%d:%s: new ver = %d <= old ver = %d.\n", world_mpi_rank, __func__,
+ new_ver_num, data[target_index].ver);
}
}
}
@@ -1767,7 +1770,7 @@ serve_total_writes_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1837,7 +1840,7 @@ serve_total_reads_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1909,7 +1912,7 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -1923,7 +1926,7 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
target_addr);
}
}
@@ -1998,7 +2001,7 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -2012,7 +2015,7 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__,
target_addr);
}
}
@@ -2084,7 +2087,7 @@ serve_rw_count_reset_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__);
}
}
@@ -2436,7 +2439,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
nerrors++;
ret_value = FAIL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
@@ -2447,7 +2450,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
nerrors++;
ret_value = FAIL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -2462,7 +2465,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
nerrors++;
ret_value = FAIL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__);
}
#if 0 /* This has been useful debugging code -- keep it for now. */
@@ -2470,35 +2473,35 @@ datum_notify(H5C_notify_action_t action, void *thing)
HDfprintf(stdout,
"%d:%s: mssg.req != READ_REQ_REPLY_CODE.\n",
- world_mpi_rank, FUNC);
+ world_mpi_rank, __func__);
HDfprintf(stdout, "%d:%s: mssg.req = %d.\n",
- world_mpi_rank, FUNC, (int)(mssg.req));
+ world_mpi_rank, __func__, (int)(mssg.req));
}
if ( mssg.src != world_server_mpi_rank ) {
HDfprintf(stdout,
"%d:%s: mssg.src != world_server_mpi_rank.\n",
- world_mpi_rank, FUNC);
+ world_mpi_rank, __func__);
}
if ( mssg.dest != world_mpi_rank ) {
HDfprintf(stdout,
"%d:%s: mssg.dest != world_mpi_rank.\n",
- world_mpi_rank, FUNC);
+ world_mpi_rank, __func__);
}
if ( mssg.base_addr != entry_ptr->base_addr ) {
HDfprintf(stdout,
"%d:%s: mssg.base_addr != entry_ptr->base_addr.\n",
- world_mpi_rank, FUNC);
+ world_mpi_rank, __func__);
HDfprintf(stdout, "%d:%s: mssg.base_addr = %" PRIuHADDR ".\n",
- world_mpi_rank, FUNC, mssg.base_addr);
+ world_mpi_rank, __func__, mssg.base_addr);
HDfprintf(stdout,
"%d:%s: entry_ptr->base_addr = %" PRIuHADDR ".\n",
- world_mpi_rank, FUNC,
+ world_mpi_rank, __func__,
entry_ptr->base_addr);
}
@@ -2506,22 +2509,22 @@ datum_notify(H5C_notify_action_t action, void *thing)
HDfprintf(stdout,
"%d:%s: mssg.len != entry_ptr->len.\n",
- world_mpi_rank, FUNC);
+ world_mpi_rank, __func__);
HDfprintf(stdout, "%d:%s: mssg.len = %" PRIuHADDR ".\n",
- world_mpi_rank, FUNC, mssg.len);
+ world_mpi_rank, __func__, mssg.len);
}
if ( mssg.ver < entry_ptr->ver ) {
HDfprintf(stdout,
"%d:%s: mssg.ver < entry_ptr->ver.\n",
- world_mpi_rank, FUNC);
+ world_mpi_rank, __func__);
}
if ( mssg.magic != MSSG_MAGIC ) {
HDfprintf(stdout, "%d:%s: mssg.magic != MSSG_MAGIC.\n",
- world_mpi_rank, FUNC);
+ world_mpi_rank, __func__);
}
#endif /* JRM */
}
@@ -2554,7 +2557,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
ret_value = FAIL;
HDfprintf(stdout, "%d:%s: Flushed dirty entry from non-zero file process.", world_mpi_rank,
- FUNC);
+ __func__);
}
if (ret_value == SUCCEED) {
@@ -2581,7 +2584,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
nerrors++;
ret_value = FAIL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
else {
@@ -2600,7 +2603,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
nerrors++;
ret_value = FAIL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
else if ((mssg.req != WRITE_REQ_ACK_CODE) || (mssg.src != world_server_mpi_rank) ||
@@ -2611,7 +2614,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
nerrors++;
ret_value = FAIL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__);
}
}
}
@@ -2717,7 +2720,7 @@ datum_notify(H5C_notify_action_t action, void *thing)
nerrors++;
ret_value = FAIL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Unknown notify action.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Unknown notify action.\n", world_mpi_rank, __func__);
}
break;
}
@@ -2824,7 +2827,7 @@ expunge_entry(H5F_t *file_ptr, int32_t idx)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Error in H5AC_expunge_entry().\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Error in H5AC_expunge_entry().\n", world_mpi_rank, __func__);
}
}
@@ -2838,14 +2841,14 @@ expunge_entry(H5F_t *file_ptr, int32_t idx)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Error in H5C_get_entry_status().\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Error in H5C_get_entry_status().\n", world_mpi_rank, __func__);
}
}
else if (in_cache) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Expunged entry still in cache?!?\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Expunged entry still in cache?!?\n", world_mpi_rank, __func__);
}
}
}
@@ -2906,7 +2909,7 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Error in H5AC_insert_entry().\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Error in H5AC_insert_entry().\n", world_mpi_rank, __func__);
}
}
@@ -2927,8 +2930,8 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, FUNC, idx,
- (int)(data[idx].header.is_dirty));
+ HDfprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, __func__,
+ idx, (int)(data[idx].header.is_dirty));
}
}
}
@@ -3268,7 +3271,7 @@ lock_entry(H5F_t *file_ptr, int32_t idx)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: error in H5AC_protect().\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: error in H5AC_protect().\n", world_mpi_rank, __func__);
}
}
else {
@@ -3321,7 +3324,7 @@ mark_entry_dirty(int32_t idx)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: error in H5AC_mark_entry_dirty().\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: error in H5AC_mark_entry_dirty().\n", world_mpi_rank, __func__);
}
}
else if (!(entry_ptr->locked)) {
@@ -3432,7 +3435,7 @@ pin_protected_entry(int32_t idx, hbool_t global)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Error in H5AC_pin_protected entry().\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Error in H5AC_pin_protected entry().\n", world_mpi_rank, __func__);
}
}
@@ -3536,7 +3539,7 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5AC_move_entry() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5AC_move_entry() failed.\n", world_mpi_rank, __func__);
}
}
else {
@@ -3560,7 +3563,7 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, __func__,
new_idx, (int)(data[new_idx].header.is_dirty));
}
}
@@ -3612,7 +3615,7 @@ reset_server_counts(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -3624,7 +3627,7 @@ reset_server_counts(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
else if ((mssg.req != REQ_RW_COUNT_RESET_RPLY_CODE) || (mssg.src != world_server_mpi_rank) ||
@@ -3634,7 +3637,8 @@ reset_server_counts(void)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in req r/w counter reset reply.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad data in req r/w counter reset reply.\n", world_mpi_rank,
+ __func__);
}
}
}
@@ -3685,7 +3689,7 @@ resize_entry(int32_t idx, size_t new_size)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5AC_resize_entry() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5AC_resize_entry() failed.\n", world_mpi_rank, __func__);
}
}
else {
@@ -3750,13 +3754,13 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (fid < 0) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fcreate() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Fcreate() failed.\n", world_mpi_rank, __func__);
}
}
else if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
}
}
else {
@@ -3766,7 +3770,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (file_ptr == NULL) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Can't get file_ptr.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Can't get file_ptr.\n", world_mpi_rank, __func__);
}
}
else {
@@ -3776,13 +3780,13 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (cache_ptr == NULL) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Can't get cache_ptr.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Can't get cache_ptr.\n", world_mpi_rank, __func__);
}
}
else if (cache_ptr->magic != H5C__H5C_T_MAGIC) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad cache_ptr magic.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad cache_ptr magic.\n", world_mpi_rank, __func__);
}
}
else {
@@ -3800,7 +3804,8 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) {
- HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(1) failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(1) failed.\n", world_mpi_rank,
+ __func__);
}
else {
@@ -3810,11 +3815,11 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (H5AC_set_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) {
HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank,
- FUNC);
+ __func__);
}
else if (enable_rpt_fcn) {
- HDfprintf(stdout, "%d:%s: rpt_fcn enabled.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: rpt_fcn enabled.\n", world_mpi_rank, __func__);
}
}
}
@@ -3830,7 +3835,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr == NULL.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr == NULL.\n", world_mpi_rank, __func__);
}
}
else if (((H5AC_aux_t *)(cache_ptr->aux_ptr))->magic != H5AC__H5AC_AUX_T_MAGIC) {
@@ -3838,7 +3843,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
nerrors++;
if (verbose) {
HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC.\n",
- world_mpi_rank, FUNC);
+ world_mpi_rank, __func__);
}
}
else if (((H5AC_aux_t *)(cache_ptr->aux_ptr))->metadata_write_strategy != metadata_write_strategy) {
@@ -3846,7 +3851,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
nerrors++;
if (verbose) {
HDfprintf(stdout, "%d:%s: bad cache_ptr->aux_ptr->metadata_write_strategy\n", world_mpi_rank,
- FUNC);
+ __func__);
}
}
}
@@ -3861,7 +3866,8 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (H5AC_get_cache_auto_resize_config(cache_ptr, &test_config) != SUCCEED) {
- HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(2) failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(2) failed.\n", world_mpi_rank,
+ __func__);
}
else if (test_config.metadata_write_strategy != metadata_write_strategy) {
@@ -3869,7 +3875,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (verbose) {
- HDfprintf(stdout, "%d:%s: unexpected metadata_write_strategy.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: unexpected metadata_write_strategy.\n", world_mpi_rank, __func__);
}
}
}
@@ -3889,7 +3895,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5MF_alloc() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5MF_alloc() failed.\n", world_mpi_rank, __func__);
}
}
else if (actual_base_addr > BASE_ADDR) {
@@ -3902,7 +3908,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: actual_base_addr > BASE_ADDR.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: actual_base_addr > BASE_ADDR.\n", world_mpi_rank, __func__);
}
}
}
@@ -3913,7 +3919,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: second H5Fflush() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: second H5Fflush() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -3926,7 +3932,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5C_set_write_done_callback failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5C_set_write_done_callback failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -3940,7 +3946,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
nerrors++;
if (verbose) {
HDfprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank,
- FUNC);
+ __func__);
}
}
}
@@ -3996,7 +4002,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
proceed = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4019,7 +4025,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
proceed = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4034,11 +4040,11 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
if (proceed) {
- HDfprintf(stdout, "%d:%s: verified %u writes.\n", world_mpi_rank, FUNC, num_writes);
+ HDfprintf(stdout, "%d:%s: verified %u writes.\n", world_mpi_rank, __func__, num_writes);
}
else {
- HDfprintf(stdout, "%d:%s: FAILED to verify %u writes.\n", world_mpi_rank, FUNC, num_writes);
+ HDfprintf(stdout, "%d:%s: FAILED to verify %u writes.\n", world_mpi_rank, __func__, num_writes);
}
}
@@ -4055,7 +4061,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
proceed = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4098,7 +4104,7 @@ setup_rand(void)
HDassert(world_mpi_rank < world_mpi_size);
seed = predefined_seeds[world_mpi_rank];
- HDfprintf(stdout, "%d:%s: predefined_seed = %d.\n", world_mpi_rank, FUNC, seed);
+ HDfprintf(stdout, "%d:%s: predefined_seed = %d.\n", world_mpi_rank, __func__, seed);
fflush(stdout);
HDsrand(seed);
}
@@ -4108,13 +4114,13 @@ setup_rand(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: gettimeofday() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: gettimeofday() failed.\n", world_mpi_rank, __func__);
}
}
else {
seed = (unsigned)tv.tv_usec;
if (verbose) {
- HDfprintf(stdout, "%d:%s: seed = %d.\n", world_mpi_rank, FUNC, seed);
+ HDfprintf(stdout, "%d:%s: seed = %d.\n", world_mpi_rank, __func__, seed);
fflush(stdout);
}
HDsrand(seed);
@@ -4154,7 +4160,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
}
}
@@ -4171,7 +4177,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr)
nerrors++;
if (verbose) {
HDfprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank,
- FUNC);
+ __func__);
}
}
}
@@ -4182,7 +4188,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fclose() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Fclose() failed.\n", world_mpi_rank, __func__);
}
}
@@ -4198,7 +4204,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: HDremove() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: HDremove() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4260,7 +4266,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4272,7 +4278,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4286,7 +4292,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in req entry reads reply.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad data in req entry reads reply.\n", world_mpi_rank, __func__);
}
}
else {
@@ -4303,7 +4309,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads)
success = FALSE;
if (verbose) {
HDfprintf(stdout, "%d:%s: rep/exp entry 0x%" PRIxHADDR " reads mismatch (%d/%d).\n",
- world_mpi_rank, FUNC, addr, reported_entry_reads, expected_entry_reads);
+ world_mpi_rank, __func__, addr, reported_entry_reads, expected_entry_reads);
}
}
}
@@ -4357,7 +4363,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4369,7 +4375,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4383,7 +4389,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in req entry writes reply.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad data in req entry writes reply.\n", world_mpi_rank, __func__);
}
}
else {
@@ -4400,7 +4406,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes)
success = FALSE;
if (verbose) {
HDfprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%d/%d).\n", world_mpi_rank,
- FUNC, (long long)addr, reported_entry_writes, expected_entry_writes);
+ __func__, (long long)addr, reported_entry_writes, expected_entry_writes);
}
}
}
@@ -4453,7 +4459,7 @@ verify_total_reads(int expected_total_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4465,7 +4471,7 @@ verify_total_reads(int expected_total_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
else if ((mssg.req != REQ_TTL_READS_RPLY_CODE) || (mssg.src != world_server_mpi_rank) ||
@@ -4475,7 +4481,7 @@ verify_total_reads(int expected_total_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__);
}
}
else {
@@ -4492,7 +4498,7 @@ verify_total_reads(int expected_total_reads)
success = FALSE;
if (verbose) {
HDfprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%d).\n", world_mpi_rank,
- FUNC, reported_total_reads, expected_total_reads);
+ __func__, reported_total_reads, expected_total_reads);
}
}
}
@@ -4545,7 +4551,7 @@ verify_total_writes(unsigned expected_total_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4557,7 +4563,7 @@ verify_total_writes(unsigned expected_total_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
else if ((mssg.req != REQ_TTL_WRITES_RPLY_CODE) || (mssg.src != world_server_mpi_rank) ||
@@ -4567,7 +4573,7 @@ verify_total_writes(unsigned expected_total_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__);
}
}
else {
@@ -4584,7 +4590,7 @@ verify_total_writes(unsigned expected_total_writes)
success = FALSE;
if (verbose) {
HDfprintf(stdout, "%d:%s: reported/expected total writes mismatch (%u/%u).\n", world_mpi_rank,
- FUNC, reported_total_writes, expected_total_writes);
+ __func__, reported_total_writes, expected_total_writes);
}
}
}
@@ -4646,7 +4652,7 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: error in H5AC_unprotect().\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: error in H5AC_unprotect().\n", world_mpi_rank, __func__);
}
}
else {
@@ -4730,7 +4736,7 @@ unpin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty, hbool_t
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: error in H5AC_unpin_entry().\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: error in H5AC_unpin_entry().\n", world_mpi_rank, __func__);
}
}
}
@@ -4791,7 +4797,7 @@ server_smoke_check(void)
/* some error occured in the server -- report failure */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4812,7 +4818,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, __func__);
}
}
@@ -4827,7 +4833,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4843,7 +4849,7 @@ server_smoke_check(void)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__);
}
}
}
@@ -4858,7 +4864,7 @@ server_smoke_check(void)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__);
}
}
@@ -4890,7 +4896,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__);
}
}
@@ -4913,7 +4919,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, __func__);
}
}
}
@@ -4927,7 +4933,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -4943,7 +4949,7 @@ server_smoke_check(void)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__);
}
}
}
@@ -4954,7 +4960,7 @@ server_smoke_check(void)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__);
}
}
@@ -4985,7 +4991,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 4 failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: barrier 4 failed.\n", world_mpi_rank, __func__);
}
}
@@ -5001,7 +5007,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 5 failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: barrier 5 failed.\n", world_mpi_rank, __func__);
}
}
@@ -5032,7 +5038,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: barrier 6 failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: barrier 6 failed.\n", world_mpi_rank, __func__);
}
}
@@ -5055,7 +5061,7 @@ server_smoke_check(void)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
}
}
@@ -5138,7 +5144,7 @@ smoke_check_1(int metadata_write_strategy)
/* some error occured in the server -- report failure */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5150,7 +5156,7 @@ smoke_check_1(int metadata_write_strategy)
fid = -1;
cache_ptr = NULL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
}
}
@@ -5183,7 +5189,7 @@ smoke_check_1(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5216,7 +5222,7 @@ smoke_check_1(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
}
}
@@ -5302,7 +5308,7 @@ smoke_check_2(int metadata_write_strategy)
/* some error occured in the server -- report failure */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5314,7 +5320,7 @@ smoke_check_2(int metadata_write_strategy)
fid = -1;
cache_ptr = NULL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
}
}
@@ -5381,7 +5387,7 @@ smoke_check_2(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5414,7 +5420,7 @@ smoke_check_2(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
}
}
@@ -5507,7 +5513,7 @@ smoke_check_3(int metadata_write_strategy)
/* some error occured in the server -- report failure */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5519,7 +5525,7 @@ smoke_check_3(int metadata_write_strategy)
fid = -1;
cache_ptr = NULL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
}
}
@@ -5573,7 +5579,7 @@ smoke_check_3(int metadata_write_strategy)
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
}
}
@@ -5666,7 +5672,7 @@ smoke_check_3(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5699,7 +5705,7 @@ smoke_check_3(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
}
}
@@ -5792,7 +5798,7 @@ smoke_check_4(int metadata_write_strategy)
/* some error occured in the server -- report failure */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5804,7 +5810,7 @@ smoke_check_4(int metadata_write_strategy)
fid = -1;
cache_ptr = NULL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
}
}
@@ -5870,7 +5876,7 @@ smoke_check_4(int metadata_write_strategy)
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
}
}
@@ -5950,7 +5956,7 @@ smoke_check_4(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -5983,7 +5989,7 @@ smoke_check_4(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
}
}
@@ -6067,7 +6073,7 @@ smoke_check_5(int metadata_write_strategy)
/* some error occured in the server -- report failure */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -6080,7 +6086,7 @@ smoke_check_5(int metadata_write_strategy)
fid = -1;
cache_ptr = NULL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
}
}
@@ -6092,7 +6098,7 @@ smoke_check_5(int metadata_write_strategy)
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
}
}
@@ -6142,7 +6148,7 @@ smoke_check_5(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -6175,7 +6181,7 @@ smoke_check_5(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
}
}
@@ -6352,7 +6358,7 @@ trace_file_check(int metadata_write_strategy)
/* some error occured in the server -- report failure */
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
else {
@@ -6364,7 +6370,7 @@ trace_file_check(int metadata_write_strategy)
fid = -1;
cache_ptr = NULL;
if (verbose)
- HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
}
if (nerrors == 0) {
@@ -6374,7 +6380,7 @@ trace_file_check(int metadata_write_strategy)
if (H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) {
nerrors++;
HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank,
- FUNC);
+ __func__);
}
else {
config.open_trace_file = TRUE;
@@ -6383,7 +6389,7 @@ trace_file_check(int metadata_write_strategy)
if (H5AC_set_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) {
nerrors++;
HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank,
- FUNC);
+ __func__);
}
}
} /* end if */
@@ -6418,7 +6424,7 @@ trace_file_check(int metadata_write_strategy)
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
}
if (nerrors == 0) {
@@ -6427,7 +6433,7 @@ trace_file_check(int metadata_write_strategy)
if (H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) {
nerrors++;
HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank,
- FUNC);
+ __func__);
}
else {
config.open_trace_file = FALSE;
@@ -6437,7 +6443,7 @@ trace_file_check(int metadata_write_strategy)
if (H5AC_set_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) {
nerrors++;
HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank,
- FUNC);
+ __func__);
}
}
} /* end if */
@@ -6447,7 +6453,7 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
}
} /* end if */
@@ -6477,7 +6483,7 @@ trace_file_check(int metadata_write_strategy)
if (!success) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
} /* end if */
@@ -6488,7 +6494,7 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: HDfopen failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: HDfopen failed.\n", world_mpi_rank, __func__);
}
} /* end if */
@@ -6517,17 +6523,17 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
if (verbose) {
HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank,
- FUNC, i);
+ __func__, i);
if (expected_line_len == 0) {
- HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__,
"<EMPTY>", expected_line_len);
- HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC, buffer,
- actual_line_len);
+ HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__,
+ buffer, actual_line_len);
}
if (actual_line_len == 0) {
- HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__,
(*expected_output)[i], expected_line_len);
- HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__,
"<EMPTY>", actual_line_len);
}
}
@@ -6542,10 +6548,10 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
if (verbose) {
HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank,
- FUNC, i);
- HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC,
+ __func__, i);
+ HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__,
(*expected_output)[i], expected_line_len);
- HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC, buffer,
+ HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, buffer,
actual_line_len);
}
}
@@ -6563,10 +6569,10 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
if (verbose) {
HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank,
- FUNC, i);
- HDfprintf(stdout, "%d:%s: expected = \"%s\"\n", world_mpi_rank, FUNC,
+ __func__, i);
+ HDfprintf(stdout, "%d:%s: expected = \"%s\"\n", world_mpi_rank, __func__,
(*expected_output)[i]);
- HDfprintf(stdout, "%d:%s: actual = \"%s\"\n", world_mpi_rank, FUNC, tok);
+ HDfprintf(stdout, "%d:%s: actual = \"%s\"\n", world_mpi_rank, __func__, tok);
}
}
} /* end else */
@@ -6657,7 +6663,7 @@ smoke_check_6(int metadata_write_strategy)
/* some error occured in the server -- report failure */
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -6671,7 +6677,7 @@ smoke_check_6(int metadata_write_strategy)
fid = -1;
cache_ptr = NULL;
if (verbose) {
- HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__);
}
}
@@ -6690,7 +6696,7 @@ smoke_check_6(int metadata_write_strategy)
nerrors++;
if (verbose) {
HDfprintf(stdout, "%d:%s: Entry inserted not marked as collective.\n", world_mpi_rank,
- FUNC);
+ __func__);
}
}
@@ -6711,7 +6717,7 @@ smoke_check_6(int metadata_write_strategy)
nerrors++;
if (verbose) {
HDfprintf(stdout, "%d:%s: Entry inserted indepedently marked as collective.\n",
- world_mpi_rank, FUNC);
+ world_mpi_rank, __func__);
}
}
@@ -6723,7 +6729,7 @@ smoke_check_6(int metadata_write_strategy)
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__);
}
}
@@ -6739,7 +6745,7 @@ smoke_check_6(int metadata_write_strategy)
nerrors++;
if (verbose) {
HDfprintf(stdout, "%d:%s: Entry protected not marked as collective.\n", world_mpi_rank,
- FUNC);
+ __func__);
}
}
@@ -6759,7 +6765,7 @@ smoke_check_6(int metadata_write_strategy)
nerrors++;
if (verbose) {
HDfprintf(stdout, "%d:%s: Entry inserted indepedently marked as collective.\n",
- world_mpi_rank, FUNC);
+ world_mpi_rank, __func__);
}
}
@@ -6777,7 +6783,7 @@ smoke_check_6(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__);
}
}
}
@@ -6810,7 +6816,7 @@ smoke_check_6(int metadata_write_strategy)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__);
}
}
}
@@ -6920,13 +6926,13 @@ main(int argc, char **argv)
if (FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS))) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: H5Pcreate() failed 1.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Pcreate() failed 1.\n", world_mpi_rank, __func__);
}
if (H5Pset_fapl_mpio(fapl, world_mpi_comm, MPI_INFO_NULL) < 0) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 1.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 1.\n", world_mpi_rank, __func__);
}
/* fix the file names */
@@ -6934,7 +6940,7 @@ main(int argc, char **argv)
if (h5_fixname(FILENAME[u], fapl, filenames[u], sizeof(filenames[u])) == NULL) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: h5_fixname() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: h5_fixname() failed.\n", world_mpi_rank, __func__);
break;
}
}
@@ -6943,7 +6949,7 @@ main(int argc, char **argv)
if (H5Pclose(fapl) < 0) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: H5Pclose() failed.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Pclose() failed.\n", world_mpi_rank, __func__);
}
/* now create the fapl again, excluding the server process. */
@@ -6953,13 +6959,13 @@ main(int argc, char **argv)
if (FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS))) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: H5Pcreate() failed 2.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Pcreate() failed 2.\n", world_mpi_rank, __func__);
}
if (H5Pset_fapl_mpio(fapl, file_mpi_comm, MPI_INFO_NULL) < 0) {
nerrors++;
if (verbose)
- HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 2.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 2.\n", world_mpi_rank, __func__);
}
}
@@ -7004,7 +7010,8 @@ main(int argc, char **argv)
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: H5Pset_all_coll_metadata_ops() failed 1.\n", world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: H5Pset_all_coll_metadata_ops() failed 1.\n", world_mpi_rank,
+ __func__);
}
}
}
diff --git a/testpar/t_filters_parallel.c b/testpar/t_filters_parallel.c
index 50cd306..694992a 100644
--- a/testpar/t_filters_parallel.c
+++ b/testpar/t_filters_parallel.c
@@ -6093,7 +6093,7 @@ main(int argc, char **argv)
if (VERBOSE_MED)
h5_show_hostname();
- ALARM_ON;
+ TestAlarmOn();
/* Create test file */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -6172,7 +6172,7 @@ exit:
if (MAINPROCESS)
HDprintf("*** %d TEST ERROR%s OCCURRED ***\n", nerrors, nerrors > 1 ? "S" : "");
- ALARM_OFF;
+ TestAlarmOff();
h5_clean_files(FILENAME, fapl);
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index a883f55..a8a756c 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -1086,7 +1086,7 @@ main(int argc, char **argv)
H5Pset_fapl_mpio(fapl, MPI_COMM_WORLD, MPI_INFO_NULL);
/* set alarm. */
- ALARM_ON;
+ TestAlarmOn();
/*=======================================
* MPIO 1 write Many read test
@@ -1195,7 +1195,7 @@ finish:
}
/* turn off alarm */
- ALARM_OFF;
+ TestAlarmOff();
h5_clean_files(FILENAME, fapl);
H5close();
diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c
index 7d88c37..54f6f51 100644
--- a/tools/libtest/h5tools_test_utils.c
+++ b/tools/libtest/h5tools_test_utils.c
@@ -100,7 +100,7 @@ H5_GCC_DIAG_OFF("format")
*/
#define JSFAILED_AT() \
{ \
- HDprintf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC); \
+ HDprintf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); \
}
/*----------------------------------------------------------------------------
diff --git a/tools/test/perform/direct_write_perf.c b/tools/test/perform/direct_write_perf.c
index 6537215..df29fc9 100644
--- a/tools/test/perform/direct_write_perf.c
+++ b/tools/test/perform/direct_write_perf.c
@@ -52,8 +52,7 @@ const char *FILENAME[] = {"direct_write", "unix.raw", NULL};
/*
* Print the current location on the standard output stream.
*/
-#define FUNC __func__
-#define AT() printf(" at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC);
+#define AT() printf(" at %s:%d in %s()...\n", __FILE__, __LINE__, __func__);
#define H5_FAILED() \
{ \
puts("*FAILED*"); \
diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c
index a06fb77..a19e5d5 100644
--- a/tools/test/perform/perf.c
+++ b/tools/test/perform/perf.c
@@ -136,12 +136,11 @@ main(int argc, char **argv)
if (mynod == 0)
printf("# Using hdf5-io calls.\n");
- /* kindof a weird hack- if the location of the pvfstab file was
- * specified on the command line, then spit out this location into
- * the appropriate environment variable: */
-
-#if H5_HAVE_SETENV
- /* no setenv or unsetenv */
+#ifdef H5_HAVE_UNISTD_H
+ /* Kind of a weird hack- if the location of the pvfstab file was
+ * specified on the command line, then spit out this location into
+ * the appropriate environment variable.
+ */
if (opt_pvfstab_set) {
if ((setenv("PVFSTAB_FILE", opt_pvfstab, 1)) < 0) {
perror("setenv");
@@ -372,9 +371,8 @@ main(int argc, char **argv)
die_jar_jar_die:
-#if H5_HAVE_SETENV
- /* no setenv or unsetenv */
- /* clear the environment variable if it was set earlier */
+#ifdef H5_HAVE_UNISTD
+ /* Clear the environment variable if it was set earlier */
if (opt_pvfstab_set) {
unsetenv("PVFSTAB_FILE");
}