summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-06-17 11:48:34 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-06-17 11:48:34 (GMT)
commitfb27787c2abb889a2184bb39eead626a144117d0 (patch)
tree7ad16361ac8b2382f0ccf72ce47aae020fed688c /testpar
parent984ecb72c2fa62d233383b24047e04061754ae34 (diff)
parent6e9e9e0dd200979642de8d2a2bce2f66f9728237 (diff)
downloadhdf5-fb27787c2abb889a2184bb39eead626a144117d0.zip
hdf5-fb27787c2abb889a2184bb39eead626a144117d0.tar.gz
hdf5-fb27787c2abb889a2184bb39eead626a144117d0.tar.bz2
[svn-r27222] Merge of r27035-27221 from the trunk.
Tested on 64-bit linux VM: Serial: C++ and Fortran 2003 Parallel: Fortran
Diffstat (limited to 'testpar')
-rw-r--r--testpar/CMakeLists.txt1
-rw-r--r--testpar/Makefile.am5
-rw-r--r--testpar/t_cache.c789
-rw-r--r--testpar/t_init_term.c76
4 files changed, 357 insertions, 514 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 70e0246..b02c8e2 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -48,6 +48,7 @@ set (H5P_TESTS
t_pflush2
t_pshutdown
t_prestart
+ t_init_term
t_shapesame
)
diff --git a/testpar/Makefile.am b/testpar/Makefile.am
index 1eae439..4fe0ba8 100644
--- a/testpar/Makefile.am
+++ b/testpar/Makefile.am
@@ -25,7 +25,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test
# Test programs. These are our main targets.
#
-TEST_PROG_PARA=t_mpi testphdf5 t_cache t_pflush1 t_pflush2 t_pshutdown t_prestart t_shapesame
+TEST_PROG_PARA=t_mpi testphdf5 t_cache t_pflush1 t_pflush2 t_pshutdown t_prestart t_init_term t_shapesame
check_PROGRAMS = $(TEST_PROG_PARA)
@@ -40,7 +40,8 @@ LDADD = $(LIBH5TEST) $(LIBHDF5)
# MPItest.h5 is from t_mpi
# Para*.h5 are from testphdf
# shutdown.h5 is from t_pshutdown
+# after_mpi_fin.h5 is from t_init_term
# go is used for debugging. See testphdf5.c.
-CHECK_CLEANFILES+=MPItest.h5 Para*.h5 CacheTestDummy.h5 shutdown.h5 go
+CHECK_CLEANFILES+=MPItest.h5 Para*.h5 CacheTestDummy.h5 shutdown.h5 after_mpi_fin.h5 go
include $(top_srcdir)/config/conclude.am
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index f526a8b..b6c7870 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -20,31 +20,23 @@
#include "h5test.h"
#include "testpar.h"
-#include "H5Iprivate.h"
-#include "H5ACprivate.h"
-
-#define H5C_PACKAGE /*suppress error about including H5Cpkg */
-
-#include "H5Cpkg.h"
#define H5AC_PACKAGE /*suppress error about including H5ACpkg */
+#define H5C_PACKAGE /*suppress error about including H5Cpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#include "H5ACpkg.h"
+#include "H5Cpkg.h"
+#include "H5Fpkg.h"
+#include "H5Iprivate.h"
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-#include "H5Fpkg.h"
+#define BASE_ADDR (haddr_t)512
int nerrors = 0;
int failures = 0;
hbool_t verbose = TRUE; /* used to control error messages */
-#if 0
-/* So far we haven't needed this, but that may change.
- * Keep it around for now
- */
-hid_t noblock_dxpl_id=(-1);
-#endif
#define NFILENAME 2
#define PARATESTFILE filenames[0]
@@ -169,7 +161,7 @@ struct datum
hbool_t global_pinned;
hbool_t local_pinned;
hbool_t cleared;
- hbool_t flushed;
+ hbool_t flushed;
int reads;
int writes;
int index;
@@ -382,12 +374,12 @@ static hbool_t serve_rw_count_reset_request(struct mssg_t * mssg_ptr);
/* call back functions & related data structures */
static herr_t clear_datum(H5F_t * f, void * thing, hbool_t dest);
-static herr_t destroy_datum(H5F_t UNUSED * f, void * thing);
-static herr_t flush_datum(H5F_t *f, hid_t UNUSED dxpl_id, hbool_t dest, haddr_t addr,
+static herr_t destroy_datum(H5F_t H5_ATTR_UNUSED * f, void * thing);
+static herr_t flush_datum(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t dest, haddr_t addr,
void *thing);
-static void * load_datum(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr,
- void UNUSED *udata);
-static herr_t size_datum(H5F_t UNUSED * f, void * thing, size_t * size_ptr);
+static void * load_datum(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
+ void H5_ATTR_UNUSED *udata);
+static herr_t size_datum(H5F_t H5_ATTR_UNUSED * f, void * thing, size_t * size_ptr);
#define DATUM_ENTRY_TYPE H5AC_TEST_ID
@@ -466,20 +458,20 @@ static hbool_t trace_file_check(int metadata_write_strategy);
#ifdef NOT_USED
/*****************************************************************************
*
- * Function: print_stats()
+ * Function: print_stats()
*
- * Purpose: Print the rudementary stats maintained by t_cache.
+ * Purpose: Print the rudementary stats maintained by t_cache.
*
- * This is a debugging function, which will not normally
- * be run as part of t_cache.
+ * This is a debugging function, which will not normally
+ * be run as part of t_cache.
*
- * Return: void
+ * Return: void
*
- * Programmer: JRM -- 4/17/06
+ * Programmer: JRM -- 4/17/06
*
* Modifications:
*
- * None.
+ * None.
*
*****************************************************************************/
@@ -487,16 +479,16 @@ static void
print_stats(void)
{
HDfprintf(stdout,
- "%d: datum clears / pinned clears / destroys = %ld / %ld / %ld\n",
+ "%d: datum clears / pinned clears / destroys = %ld / %ld / %ld\n",
world_mpi_rank, datum_clears, datum_pinned_clears,
- datum_destroys );
+ datum_destroys );
HDfprintf(stdout,
- "%d: datum flushes / pinned flushes / loads = %ld / %ld / %ld\n",
+ "%d: datum flushes / pinned flushes / loads = %ld / %ld / %ld\n",
world_mpi_rank, datum_flushes, datum_pinned_flushes,
- datum_loads );
+ datum_loads );
HDfprintf(stdout,
- "%d: pins: global / global dirty / local = %ld / %ld / %ld\n",
- world_mpi_rank, global_pins, global_dirty_pins, local_pins);
+ "%d: pins: global / global dirty / local = %ld / %ld / %ld\n",
+ world_mpi_rank, global_pins, global_dirty_pins, local_pins);
HDfflush(stdout);
return;
@@ -504,6 +496,7 @@ print_stats(void)
} /* print_stats() */
#endif /* NOT_USED */
+
/*****************************************************************************
*
* Function: reset_stats()
@@ -564,7 +557,6 @@ reset_stats(void)
static hbool_t
set_up_file_communicator(void)
{
- const char * fcn_name = "set_up_file_communicator()";
hbool_t success = TRUE;
int mpi_result;
int num_excluded_ranks;
@@ -583,7 +575,7 @@ set_up_file_communicator(void)
if ( verbose ) {
fprintf(stdout,
"%d:%s: MPI_Comm_group() failed with error %d.\n",
- world_mpi_rank, fcn_name, mpi_result);
+ world_mpi_rank, FUNC, mpi_result);
}
}
}
@@ -602,7 +594,7 @@ set_up_file_communicator(void)
if ( verbose ) {
fprintf(stdout,
"%d:%s: MPI_Group_excl() failed with error %d.\n",
- world_mpi_rank, fcn_name, mpi_result);
+ world_mpi_rank, FUNC, mpi_result);
}
}
}
@@ -619,7 +611,7 @@ set_up_file_communicator(void)
if ( verbose ) {
fprintf(stdout,
"%d:%s: MPI_Comm_create() failed with error %d.\n",
- world_mpi_rank, fcn_name, mpi_result);
+ world_mpi_rank, FUNC, mpi_result);
}
} else {
@@ -633,7 +625,7 @@ set_up_file_communicator(void)
if ( verbose ) {
fprintf(stdout,
"%d:%s: file_mpi_comm == MPI_COMM_NULL.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
} else {
@@ -647,7 +639,7 @@ set_up_file_communicator(void)
if ( verbose ) {
fprintf(stdout,
"%d:%s: file_mpi_comm != MPI_COMM_NULL.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -665,7 +657,7 @@ set_up_file_communicator(void)
if ( verbose ) {
fprintf(stdout,
"%d:%s: MPI_Comm_size() failed with error %d.\n",
- world_mpi_rank, fcn_name, mpi_result);
+ world_mpi_rank, FUNC, mpi_result);
}
}
}
@@ -681,7 +673,7 @@ set_up_file_communicator(void)
if ( verbose ) {
fprintf(stdout,
"%d:%s: MPI_Comm_rank() failed with error %d.\n",
- world_mpi_rank, fcn_name, mpi_result);
+ world_mpi_rank, FUNC, mpi_result);
}
}
}
@@ -712,7 +704,6 @@ set_up_file_communicator(void)
static int
addr_to_datum_index(haddr_t base_addr)
{
- /* const char * fcn_name = "addr_to_datum_index()"; */
int top = NUM_DATA_ENTRIES - 1;
int bottom = 0;
int middle = (NUM_DATA_ENTRIES - 1) / 2;
@@ -760,7 +751,6 @@ addr_to_datum_index(haddr_t base_addr)
static void
init_data(void)
{
- /* const char * fcn_name = "init_data()"; */
/* The set of address offsets is chosen so as to avoid allowing the
* base addresses to fall in a pattern of that will annoy the hash
* table, and to give a good range of entry sizes.
@@ -775,7 +765,7 @@ init_data(void)
1974, 3194, 5168, 8362, 13539};
int i;
int j = 0;
- haddr_t addr = 512;
+ haddr_t addr = BASE_ADDR;
/* this must hold so moves don't change entry size. */
HDassert( (NUM_DATA_ENTRIES / 2) % 20 == 0 );
@@ -793,7 +783,7 @@ init_data(void)
data[i].global_pinned = FALSE;
data[i].local_pinned = FALSE;
data[i].cleared = FALSE;
- data[i].flushed = FALSE;
+ data[i].flushed = FALSE;
data[i].reads = 0;
data[i].writes = 0;
data[i].index = i;
@@ -838,7 +828,6 @@ init_data(void)
static int
do_express_test(void)
{
- const char * fcn_name = "do_express_test()";
int express_test;
int max_express_test;
int result;
@@ -858,7 +847,7 @@ do_express_test(void)
max_express_test = -1;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n",
- world_mpi_rank, fcn_name );
+ world_mpi_rank, FUNC );
}
}
@@ -883,16 +872,10 @@ do_express_test(void)
*
* Programmer: JRM -- 5/10/06
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static void
do_sync(void)
{
- const char * fcn_name = "do_sync()";
struct mssg_t mssg;
@@ -914,7 +897,7 @@ do_sync(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -926,7 +909,7 @@ do_sync(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else if ( ( mssg.req != SYNC_ACK_CODE ) ||
( mssg.src != world_server_mpi_rank ) ||
@@ -936,7 +919,7 @@ do_sync(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad data in sync ack.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -960,16 +943,10 @@ do_sync(void)
*
* Programmer: JRM -- 1/3/06
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static int
get_max_nerrors(void)
{
- const char * fcn_name = "get_max_nerrors()";
int max_nerrors;
int result;
@@ -986,7 +963,7 @@ get_max_nerrors(void)
max_nerrors = -1;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n",
- world_mpi_rank, fcn_name );
+ world_mpi_rank, FUNC );
}
}
@@ -1025,7 +1002,6 @@ static hbool_t
recv_mssg(struct mssg_t *mssg_ptr,
int mssg_tag_offset)
{
- const char * fcn_name = "recv_mssg()";
hbool_t success = TRUE;
int mssg_tag = CACHE_TEST_TAG;
int result;
@@ -1039,7 +1015,7 @@ recv_mssg(struct mssg_t *mssg_ptr,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: bad param(s) on entry.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
@@ -1057,7 +1033,7 @@ recv_mssg(struct mssg_t *mssg_ptr,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: MPI_Recv() failed.\n",
- world_mpi_rank, fcn_name );
+ world_mpi_rank, FUNC );
}
} else if ( mssg_ptr->magic != MSSG_MAGIC ) {
@@ -1065,7 +1041,7 @@ recv_mssg(struct mssg_t *mssg_ptr,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: invalid magic.\n", world_mpi_rank,
- fcn_name);
+ FUNC);
}
} else if ( mssg_ptr->src != status.MPI_SOURCE ) {
@@ -1074,7 +1050,7 @@ recv_mssg(struct mssg_t *mssg_ptr,
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: mssg_ptr->src != status.MPI_SOURCE.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -1105,12 +1081,10 @@ recv_mssg(struct mssg_t *mssg_ptr,
* Added the add_req_to_tag parameter and supporting code.
*
*****************************************************************************/
-
static hbool_t
send_mssg(struct mssg_t *mssg_ptr,
hbool_t add_req_to_tag)
{
- const char * fcn_name = "send_mssg()";
hbool_t success = TRUE;
int mssg_tag = CACHE_TEST_TAG;
int result;
@@ -1129,7 +1103,7 @@ send_mssg(struct mssg_t *mssg_ptr,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Invalid mssg on entry.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -1151,7 +1125,7 @@ send_mssg(struct mssg_t *mssg_ptr,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: MPI_Send() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -1178,7 +1152,6 @@ send_mssg(struct mssg_t *mssg_ptr,
static hbool_t
setup_derived_types(void)
{
- const char * fcn_name = "setup_derived_types()";
hbool_t success = TRUE;
int i;
int result;
@@ -1204,7 +1177,7 @@ setup_derived_types(void)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: MPI_Address() call failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
@@ -1226,7 +1199,7 @@ setup_derived_types(void)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: MPI_Type_struct() call failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -1241,7 +1214,7 @@ setup_derived_types(void)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: MPI_Type_commit() call failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -1250,7 +1223,7 @@ setup_derived_types(void)
} /* setup_derived_types */
-
+
/*****************************************************************************
*
* Function: takedown_derived_types()
@@ -1264,16 +1237,10 @@ setup_derived_types(void)
*
* Programmer: JRM -- 12/22/05
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static hbool_t
takedown_derived_types(void)
{
- const char * fcn_name = "takedown_derived_types()";
hbool_t success = TRUE;
int result;
@@ -1285,7 +1252,7 @@ takedown_derived_types(void)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: MPI_Type_free() call failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -1311,16 +1278,10 @@ takedown_derived_types(void)
*
* Programmer: JRM -- 5/5/10
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static hbool_t
reset_server_counters(void)
{
- const char * fcn_name = "reset_server_counters()";
hbool_t success = TRUE;
int i;
long actual_total_reads = 0;
@@ -1347,7 +1308,7 @@ reset_server_counters(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%ld).\n",
- world_mpi_rank, fcn_name,
+ world_mpi_rank, FUNC,
actual_total_reads, total_reads);
}
}
@@ -1358,7 +1319,7 @@ reset_server_counters(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%ld).\n",
- world_mpi_rank, fcn_name,
+ world_mpi_rank, FUNC,
actual_total_writes, total_writes);
}
}
@@ -1394,11 +1355,9 @@ reset_server_counters(void)
* Updated for sync message.
*
*****************************************************************************/
-
static hbool_t
server_main(void)
{
- const char * fcn_name = "server_main()";
hbool_t done = FALSE;
hbool_t success = TRUE;
int done_count = 0;
@@ -1410,7 +1369,7 @@ server_main(void)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: This isn't the server process?!?!?\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -1430,7 +1389,7 @@ server_main(void)
case WRITE_REQ_ACK_CODE:
success = FALSE;
if(verbose)
- HDfprintf(stdout, "%s: Received write ack?!?.\n", fcn_name);
+ HDfprintf(stdout, "%s: Received write ack?!?.\n", FUNC);
break;
case READ_REQ_CODE:
@@ -1440,7 +1399,7 @@ server_main(void)
case READ_REQ_REPLY_CODE:
success = FALSE;
if(verbose)
- HDfprintf(stdout, "%s: Received read req reply?!?.\n", fcn_name);
+ HDfprintf(stdout, "%s: Received read req reply?!?.\n", FUNC);
break;
case SYNC_REQ_CODE:
@@ -1450,7 +1409,7 @@ server_main(void)
case SYNC_ACK_CODE:
success = FALSE;
if(verbose)
- HDfprintf(stdout, "%s: Received sync ack?!?.\n", fcn_name);
+ HDfprintf(stdout, "%s: Received sync ack?!?.\n", FUNC);
break;
case REQ_TTL_WRITES_CODE:
@@ -1460,7 +1419,7 @@ server_main(void)
case REQ_TTL_WRITES_RPLY_CODE:
success = FALSE;
if(verbose)
- HDfprintf(stdout, "%s: Received total writes reply?!?.\n", fcn_name);
+ HDfprintf(stdout, "%s: Received total writes reply?!?.\n", FUNC);
break;
case REQ_TTL_READS_CODE:
@@ -1470,7 +1429,7 @@ server_main(void)
case REQ_TTL_READS_RPLY_CODE:
success = FALSE;
if(verbose)
- HDfprintf(stdout, "%s: Received total reads reply?!?.\n", fcn_name);
+ HDfprintf(stdout, "%s: Received total reads reply?!?.\n", FUNC);
break;
case REQ_ENTRY_WRITES_CODE:
@@ -1480,7 +1439,7 @@ server_main(void)
case REQ_ENTRY_WRITES_RPLY_CODE:
success = FALSE;
if(verbose)
- HDfprintf(stdout, "%s: Received entry writes reply?!?.\n", fcn_name);
+ HDfprintf(stdout, "%s: Received entry writes reply?!?.\n", FUNC);
break;
case REQ_ENTRY_READS_CODE:
@@ -1490,7 +1449,7 @@ server_main(void)
case REQ_ENTRY_READS_RPLY_CODE:
success = FALSE;
if(verbose)
- HDfprintf(stdout, "%s: Received entry reads reply?!?.\n", fcn_name);
+ HDfprintf(stdout, "%s: Received entry reads reply?!?.\n", FUNC);
break;
case REQ_RW_COUNT_RESET_CODE:
@@ -1500,7 +1459,7 @@ server_main(void)
case REQ_RW_COUNT_RESET_RPLY_CODE:
success = FALSE;
if(verbose)
- HDfprintf(stdout, "%s: Received RW count reset reply?!?.\n", fcn_name);
+ HDfprintf(stdout, "%s: Received RW count reset reply?!?.\n", FUNC);
break;
case DONE_REQ_CODE:
@@ -1513,7 +1472,7 @@ server_main(void)
nerrors++;
success = FALSE;
if(verbose)
- HDfprintf(stdout, "%d:%s: Unknown request code.\n", world_mpi_rank, fcn_name);
+ HDfprintf(stdout, "%d:%s: Unknown request code.\n", world_mpi_rank, FUNC);
break;
}
}
@@ -1545,7 +1504,6 @@ server_main(void)
static hbool_t
serve_read_request(struct mssg_t * mssg_ptr)
{
- const char * fcn_name = "serve_read_request()";
hbool_t report_mssg = FALSE;
hbool_t success = TRUE;
int target_index;
@@ -1560,7 +1518,7 @@ serve_read_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -1575,7 +1533,7 @@ serve_read_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n",
- world_mpi_rank, fcn_name, target_addr);
+ world_mpi_rank, FUNC, target_addr);
}
} else if ( data[target_index].len != mssg_ptr->len ) {
@@ -1584,7 +1542,7 @@ serve_read_request(struct mssg_t * mssg_ptr)
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: data[i].len = %Zu != mssg->len = %d.\n",
- world_mpi_rank, fcn_name,
+ world_mpi_rank, FUNC,
data[target_index].len, mssg_ptr->len);
}
} else if ( ! (data[target_index].valid) ) {
@@ -1593,11 +1551,11 @@ serve_read_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout,
- "%d:%s: proc %d read invalid entry. idx/base_addr = %d/0x%llx.\n",
- world_mpi_rank, fcn_name,
- mssg_ptr->src,
+ "%d:%s: proc %d read invalid entry. idx/base_addr = %d/%a.\n",
+ world_mpi_rank, FUNC,
+ mssg_ptr->src,
target_index,
- (long long)(data[target_index].base_addr));
+ data[target_index].base_addr);
}
} else {
@@ -1648,7 +1606,7 @@ serve_read_request(struct mssg_t * mssg_ptr)
} /* serve_read_request() */
-
+
/*****************************************************************************
*
* Function: serve_sync_request()
@@ -1669,16 +1627,10 @@ serve_read_request(struct mssg_t * mssg_ptr)
*
* Programmer: JRM -- 5/10/06
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static hbool_t
serve_sync_request(struct mssg_t * mssg_ptr)
{
- const char * fcn_name = "serve_sync_request()";
hbool_t report_mssg = FALSE;
hbool_t success = TRUE;
struct mssg_t reply;
@@ -1691,7 +1643,7 @@ serve_sync_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -1753,7 +1705,6 @@ serve_sync_request(struct mssg_t * mssg_ptr)
static hbool_t
serve_write_request(struct mssg_t * mssg_ptr)
{
- const char * fcn_name = "serve_write_request()";
hbool_t report_mssg = FALSE;
hbool_t success = TRUE;
int target_index;
@@ -1771,7 +1722,7 @@ serve_write_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -1786,7 +1737,7 @@ serve_write_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n",
- world_mpi_rank, fcn_name, target_addr);
+ world_mpi_rank, FUNC, target_addr);
}
} else if ( data[target_index].len != mssg_ptr->len ) {
@@ -1795,7 +1746,7 @@ serve_write_request(struct mssg_t * mssg_ptr)
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: data[i].len = %Zu != mssg->len = %d.\n",
- world_mpi_rank, fcn_name,
+ world_mpi_rank, FUNC,
data[target_index].len, mssg_ptr->len);
}
}
@@ -1812,7 +1763,7 @@ serve_write_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: new ver = %d <= old ver = %d.\n",
- world_mpi_rank, fcn_name,
+ world_mpi_rank, FUNC,
new_ver_num, data[target_index].ver);
}
}
@@ -1896,7 +1847,6 @@ serve_write_request(struct mssg_t * mssg_ptr)
static hbool_t
serve_total_writes_request(struct mssg_t * mssg_ptr)
{
- const char * fcn_name = "serve_total_writes_request()";
hbool_t report_mssg = FALSE;
hbool_t success = TRUE;
struct mssg_t reply;
@@ -1909,7 +1859,7 @@ serve_total_writes_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -1976,7 +1926,6 @@ serve_total_writes_request(struct mssg_t * mssg_ptr)
static hbool_t
serve_total_reads_request(struct mssg_t * mssg_ptr)
{
- const char * fcn_name = "serve_total_reads_request()";
hbool_t report_mssg = FALSE;
hbool_t success = TRUE;
struct mssg_t reply;
@@ -1989,7 +1938,7 @@ serve_total_reads_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -2056,7 +2005,6 @@ serve_total_reads_request(struct mssg_t * mssg_ptr)
static hbool_t
serve_entry_writes_request(struct mssg_t * mssg_ptr)
{
- const char * fcn_name = "serve_entry_writes_request()";
hbool_t report_mssg = FALSE;
hbool_t success = TRUE;
int target_index;
@@ -2071,7 +2019,7 @@ serve_entry_writes_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -2086,7 +2034,7 @@ serve_entry_writes_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n",
- world_mpi_rank, fcn_name, target_addr);
+ world_mpi_rank, FUNC, target_addr);
}
} else {
@@ -2154,7 +2102,6 @@ serve_entry_writes_request(struct mssg_t * mssg_ptr)
static hbool_t
serve_entry_reads_request(struct mssg_t * mssg_ptr)
{
- const char * fcn_name = "serve_entry_reads_request()";
hbool_t report_mssg = FALSE;
hbool_t success = TRUE;
int target_index;
@@ -2169,7 +2116,7 @@ serve_entry_reads_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -2184,7 +2131,7 @@ serve_entry_reads_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n",
- world_mpi_rank, fcn_name, target_addr);
+ world_mpi_rank, FUNC, target_addr);
}
} else {
@@ -2251,7 +2198,6 @@ serve_entry_reads_request(struct mssg_t * mssg_ptr)
static hbool_t
serve_rw_count_reset_request(struct mssg_t * mssg_ptr)
{
- const char * fcn_name = "serve_rw_count_reset_request()";
hbool_t report_mssg = FALSE;
hbool_t success = TRUE;
struct mssg_t reply;
@@ -2264,7 +2210,7 @@ serve_rw_count_reset_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -2397,7 +2343,7 @@ clear_datum(H5F_t * f,
*-------------------------------------------------------------------------
*/
static herr_t
-destroy_datum(H5F_t UNUSED * f,
+destroy_datum(H5F_t H5_ATTR_UNUSED * f,
void * thing)
{
int idx;
@@ -2446,12 +2392,11 @@ destroy_datum(H5F_t UNUSED * f,
*/
static herr_t
flush_datum(H5F_t *f,
- hid_t UNUSED dxpl_id,
+ hid_t H5_ATTR_UNUSED dxpl_id,
hbool_t dest,
- haddr_t UNUSED addr,
+ haddr_t H5_ATTR_UNUSED addr,
void *thing)
{
- const char * fcn_name = "flush_datum()";
hbool_t was_dirty = FALSE;
herr_t ret_value = SUCCEED;
int idx;
@@ -2498,7 +2443,7 @@ flush_datum(H5F_t *f,
ret_value = FAIL;
HDfprintf(stdout,
"%d:%s: Flushed dirty entry from non-zero file process.",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
if ( ret_value == SUCCEED ) {
@@ -2524,7 +2469,7 @@ flush_datum(H5F_t *f,
ret_value = FAIL;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
else
@@ -2546,7 +2491,7 @@ flush_datum(H5F_t *f,
ret_value = FAIL;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else if ( ( mssg.req != WRITE_REQ_ACK_CODE ) ||
( mssg.src != world_server_mpi_rank ) ||
@@ -2560,7 +2505,7 @@ flush_datum(H5F_t *f,
ret_value = FAIL;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad data in write req ack.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -2604,12 +2549,11 @@ flush_datum(H5F_t *f,
*/
static void *
-load_datum(H5F_t UNUSED *f,
- hid_t UNUSED dxpl_id,
+load_datum(H5F_t H5_ATTR_UNUSED *f,
+ hid_t H5_ATTR_UNUSED dxpl_id,
haddr_t addr,
- void UNUSED *udata)
+ void H5_ATTR_UNUSED *udata)
{
- const char * fcn_name = "load_datum()";
hbool_t success = TRUE;
int idx;
struct datum * entry_ptr = NULL;
@@ -2644,7 +2588,7 @@ load_datum(H5F_t UNUSED *f,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -2656,7 +2600,7 @@ load_datum(H5F_t UNUSED *f,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -2675,61 +2619,69 @@ load_datum(H5F_t UNUSED *f,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
#if 0 /* This has been useful debugging code -- keep it for now. */
- if ( mssg.req != READ_REQ_REPLY_CODE ) {
+ if ( mssg.req != READ_REQ_REPLY_CODE ) {
- HDfprintf(stdout, "%d:%s: mssg.req != READ_REQ_REPLY_CODE.\n",
- world_mpi_rank, fcn_name);
- HDfprintf(stdout, "%d:%s: mssg.req = %d.\n",
- world_mpi_rank, fcn_name, (int)(mssg.req));
- }
+ HDfprintf(stdout,
+ "%d:%s: mssg.req != READ_REQ_REPLY_CODE.\n",
+ world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: mssg.req = %d.\n",
+ world_mpi_rank, FUNC, (int)(mssg.req));
+ }
- if ( mssg.src != world_server_mpi_rank ) {
+ if ( mssg.src != world_server_mpi_rank ) {
- HDfprintf(stdout, "%d:%s: mssg.src != world_server_mpi_rank.\n",
- world_mpi_rank, fcn_name);
- }
+ HDfprintf(stdout,
+ "%d:%s: mssg.src != world_server_mpi_rank.\n",
+ world_mpi_rank, FUNC);
+ }
- if ( mssg.dest != world_mpi_rank ) {
+ if ( mssg.dest != world_mpi_rank ) {
- HDfprintf(stdout, "%d:%s: mssg.dest != world_mpi_rank.\n",
- world_mpi_rank, fcn_name);
- }
-
- if ( mssg.base_addr != entry_ptr->base_addr ) {
+ HDfprintf(stdout,
+ "%d:%s: mssg.dest != world_mpi_rank.\n",
+ world_mpi_rank, FUNC);
+ }
- HDfprintf(stdout,
- "%d:%s: mssg.base_addr != entry_ptr->base_addr.\n",
- world_mpi_rank, fcn_name);
- HDfprintf(stdout, "%d:%s: mssg.base_addr = %a.\n",
- world_mpi_rank, fcn_name, mssg.base_addr);
- HDfprintf(stdout, "%d:%s: entry_ptr->base_addr = %a.\n",
- world_mpi_rank, fcn_name, entry_ptr->base_addr);
- }
+ if ( mssg.base_addr != entry_ptr->base_addr ) {
+
+ HDfprintf(stdout,
+ "%d:%s: mssg.base_addr != entry_ptr->base_addr.\n",
+ world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: mssg.base_addr = %a.\n",
+ world_mpi_rank, FUNC, mssg.base_addr);
+ HDfprintf(stdout,
+ "%d:%s: entry_ptr->base_addr = %a.\n",
+ world_mpi_rank, FUNC,
+ entry_ptr->base_addr);
+ }
- if ( mssg.len != entry_ptr->len ) {
+ if ( mssg.len != entry_ptr->len ) {
- HDfprintf(stdout, "%d:%s: mssg.len != entry_ptr->len.\n",
- world_mpi_rank, fcn_name);
- HDfprintf(stdout, "%d:%s: mssg.len = %a.\n",
- world_mpi_rank, fcn_name, mssg.len);
- }
+ HDfprintf(stdout,
+ "%d:%s: mssg.len != entry_ptr->len.\n",
+ world_mpi_rank, FUNC);
+ HDfprintf(stdout, "%d:%s: mssg.len = %a.\n",
+ world_mpi_rank, FUNC, mssg.len);
+ }
- if ( mssg.ver < entry_ptr->ver ) {
+ if ( mssg.ver < entry_ptr->ver ) {
- HDfprintf(stdout, "%d:%s: mssg.ver < entry_ptr->ver.\n",
- world_mpi_rank, fcn_name);
- }
+ HDfprintf(stdout,
+ "%d:%s: mssg.ver < entry_ptr->ver.\n",
+ world_mpi_rank, FUNC);
+ }
- if ( mssg.magic != MSSG_MAGIC ) {
+ if ( mssg.magic != MSSG_MAGIC ) {
- HDfprintf(stdout, "%d:%s: mssg.magic != MSSG_MAGIC.\n",
- world_mpi_rank, fcn_name);
- }
+ HDfprintf(stdout, "%d:%s: mssg.magic != MSSG_MAGIC.\n",
+ world_mpi_rank, FUNC);
+ }
#endif /* JRM */
- } else {
+
+ } else {
entry_ptr->ver = mssg.ver;
entry_ptr->header.is_dirty = FALSE;
@@ -2774,7 +2726,7 @@ load_datum(H5F_t UNUSED *f,
*/
static herr_t
-size_datum(H5F_t UNUSED * f,
+size_datum(H5F_t H5_ATTR_UNUSED * f,
void * thing,
size_t * size_ptr)
{
@@ -2803,7 +2755,7 @@ size_datum(H5F_t UNUSED * f,
} /* size_datum() */
-
+
/*****************************************************************************/
/************************** test utility functions ***************************/
/*****************************************************************************/
@@ -2821,17 +2773,11 @@ size_datum(H5F_t UNUSED * f,
* Programmer: John Mainzer
* 07/11/06
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static void
expunge_entry(H5F_t * file_ptr,
int32_t idx)
{
- const char * fcn_name = "expunge_entry()";
hbool_t in_cache;
herr_t result;
struct datum * entry_ptr;
@@ -2856,7 +2802,7 @@ expunge_entry(H5F_t * file_ptr,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Error in H5AC_expunge_entry().\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -2871,14 +2817,14 @@ expunge_entry(H5F_t * file_ptr,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Error in H5C_get_entry_status().\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else if ( in_cache ) {
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Expunged entry still in cache?!?\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -2887,7 +2833,7 @@ expunge_entry(H5F_t * file_ptr,
} /* expunge_entry() */
-
+
/*****************************************************************************
* Function: insert_entry()
*
@@ -2909,14 +2855,12 @@ expunge_entry(H5F_t * file_ptr,
* any pins must be global pins.
*
*****************************************************************************/
-
static void
insert_entry(H5C_t * cache_ptr,
H5F_t * file_ptr,
int32_t idx,
unsigned int flags)
{
- const char * fcn_name = "insert_entry()";
hbool_t insert_pinned;
herr_t result;
struct datum * entry_ptr;
@@ -2948,7 +2892,7 @@ insert_entry(H5C_t * cache_ptr,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Error in H5AC_insert_entry().\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -2971,7 +2915,7 @@ insert_entry(H5C_t * cache_ptr,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n",
- world_mpi_rank, fcn_name, idx,
+ world_mpi_rank, FUNC, idx,
(int)(data[idx].header.is_dirty));
}
}
@@ -2998,7 +2942,7 @@ insert_entry(H5C_t * cache_ptr,
} /* insert_entry() */
-
+
/*****************************************************************************
* Function: local_pin_and_unpin_random_entries()
*
@@ -3012,10 +2956,7 @@ insert_entry(H5C_t * cache_ptr,
* Programmer: John Mainzer
* 4/12/06
*
- * Modifications:
- *
*****************************************************************************/
-
static void
local_pin_and_unpin_random_entries(H5F_t * file_ptr,
int min_idx,
@@ -3023,7 +2964,6 @@ local_pin_and_unpin_random_entries(H5F_t * file_ptr,
int min_count,
int max_count)
{
- /* const char * fcn_name = "local_pin_and_unpin_random_entries()"; */
if ( nerrors == 0 ) {
@@ -3092,7 +3032,6 @@ local_pin_random_entry(H5F_t * file_ptr,
int min_idx,
int max_idx)
{
- /* const char * fcn_name = "local_pin_random_entry()"; */
int idx;
if ( nerrors == 0 ) {
@@ -3118,7 +3057,7 @@ local_pin_random_entry(H5F_t * file_ptr,
} /* local_pin_random_entry() */
-
+
/*****************************************************************************
* Function: local_unpin_all_entries()
*
@@ -3131,15 +3070,11 @@ local_pin_random_entry(H5F_t * file_ptr,
* Programmer: John Mainzer
* 4/12/06
*
- * Modifications:
- *
*****************************************************************************/
-
static void
local_unpin_all_entries(H5F_t * file_ptr,
hbool_t via_unprotect)
{
- /* const char * fcn_name = "local_unpin_all_entries()"; */
if ( nerrors == 0 ) {
@@ -3160,7 +3095,7 @@ local_unpin_all_entries(H5F_t * file_ptr,
} /* local_unpin_all_entries() */
-
+
/*****************************************************************************
* Function: local_unpin_next_pinned_entry()
*
@@ -3176,16 +3111,12 @@ local_unpin_all_entries(H5F_t * file_ptr,
* Programmer: John Mainzer
* 4/12/06
*
- * Modifications:
- *
*****************************************************************************/
-
static int
local_unpin_next_pinned_entry(H5F_t * file_ptr,
int start_idx,
hbool_t via_unprotect)
{
- /* const char * fcn_name = "local_unpin_next_pinned_entry()"; */
int i = 0;
int idx = -1;
@@ -3222,7 +3153,7 @@ local_unpin_next_pinned_entry(H5F_t * file_ptr,
} /* local_unpin_next_pinned_entry() */
-
+
/*****************************************************************************
* Function: lock_and_unlock_random_entries()
*
@@ -3237,10 +3168,7 @@ local_unpin_next_pinned_entry(H5F_t * file_ptr,
* Programmer: John Mainzer
* 1/12/06
*
- * Modifications:
- *
*****************************************************************************/
-
static void
lock_and_unlock_random_entries(H5F_t * file_ptr,
int min_idx,
@@ -3248,7 +3176,6 @@ lock_and_unlock_random_entries(H5F_t * file_ptr,
int min_count,
int max_count)
{
- /* const char * fcn_name = "lock_and_unlock_random_entries()"; */
int count;
int i;
@@ -3273,7 +3200,7 @@ lock_and_unlock_random_entries(H5F_t * file_ptr,
} /* lock_and_unlock_random_entries() */
-
+
/*****************************************************************************
* Function: lock_and_unlock_random_entry()
*
@@ -3287,16 +3214,12 @@ lock_and_unlock_random_entries(H5F_t * file_ptr,
* Programmer: John Mainzer
* 1/4/06
*
- * Modifications:
- *
*****************************************************************************/
-
static void
lock_and_unlock_random_entry(H5F_t * file_ptr,
int min_idx,
int max_idx)
{
- /* const char * fcn_name = "lock_and_unlock_random_entry()"; */
int idx;
if ( nerrors == 0 ) {
@@ -3320,7 +3243,7 @@ lock_and_unlock_random_entry(H5F_t * file_ptr,
} /* lock_and_unlock_random_entry() */
-
+
/*****************************************************************************
* Function: lock_entry()
*
@@ -3340,12 +3263,10 @@ lock_and_unlock_random_entry(H5F_t * file_ptr,
* datum.
*
*****************************************************************************/
-
static void
lock_entry(H5F_t * file_ptr,
int32_t idx)
{
- const char * fcn_name = "lock_entry()";
struct datum * entry_ptr;
H5C_cache_entry_t * cache_entry_ptr;
@@ -3371,7 +3292,7 @@ lock_entry(H5F_t * file_ptr,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: error in H5AC_protect().\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
@@ -3400,11 +3321,9 @@ lock_entry(H5F_t * file_ptr,
* 4/14/06
*
*****************************************************************************/
-
static void
mark_entry_dirty(int32_t idx)
{
- const char * fcn_name = "mark_entry_dirty()";
herr_t result;
struct datum * entry_ptr;
@@ -3429,7 +3348,7 @@ mark_entry_dirty(int32_t idx)
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: error in H5AC_mark_entry_dirty().\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
else if ( ! ( entry_ptr->locked ) )
@@ -3442,7 +3361,7 @@ mark_entry_dirty(int32_t idx)
} /* mark_entry_dirty() */
-
+
/*****************************************************************************
* Function: pin_entry()
*
@@ -3455,17 +3374,13 @@ mark_entry_dirty(int32_t idx)
* Programmer: John Mainzer
* 4/11/06
*
- * Modifications:
- *
*****************************************************************************/
-
static void
pin_entry(H5F_t * file_ptr,
int32_t idx,
hbool_t global,
hbool_t dirty)
{
- /* const char * fcn_name = "pin_entry()"; */
unsigned int flags = H5AC__PIN_ENTRY_FLAG;
struct datum * entry_ptr;
@@ -3512,8 +3427,8 @@ pin_entry(H5F_t * file_ptr,
} /* pin_entry() */
-
#ifdef H5_METADATA_TRACE_FILE
+
/*****************************************************************************
* Function: pin_protected_entry()
*
@@ -3527,17 +3442,11 @@ pin_entry(H5F_t * file_ptr,
* Programmer: John Mainzer
* 01/04/06
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static void
pin_protected_entry(int32_t idx,
hbool_t global)
{
- const char * fcn_name = "pin_protected_entry()";
herr_t result;
struct datum * entry_ptr;
@@ -3563,7 +3472,7 @@ pin_protected_entry(int32_t idx,
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: Error in H5AC_pin_protected entry().\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -3611,7 +3520,6 @@ move_entry(H5F_t * file_ptr,
int32_t old_idx,
int32_t new_idx)
{
- const char * fcn_name = "move_entry()";
herr_t result;
int tmp;
size_t tmp_len;
@@ -3674,7 +3582,7 @@ move_entry(H5F_t * file_ptr,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: H5AC_move_entry() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
@@ -3701,7 +3609,7 @@ move_entry(H5F_t * file_ptr,
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: data[%d].header.is_dirty = %d.\n",
- world_mpi_rank, fcn_name, new_idx,
+ world_mpi_rank, FUNC, new_idx,
(int)(data[new_idx].header.is_dirty));
}
}
@@ -3732,7 +3640,6 @@ move_entry(H5F_t * file_ptr,
static hbool_t
reset_server_counts(void)
{
- const char * fcn_name = "reset_server_counts()";
hbool_t success = TRUE; /* will set to FALSE if appropriate. */
struct mssg_t mssg;
@@ -3755,7 +3662,7 @@ reset_server_counts(void)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -3768,7 +3675,7 @@ reset_server_counts(void)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else if ( ( mssg.req != REQ_RW_COUNT_RESET_RPLY_CODE ) ||
( mssg.src != world_server_mpi_rank ) ||
@@ -3784,7 +3691,7 @@ reset_server_counts(void)
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: Bad data in req r/w counter reset reply.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -3793,7 +3700,7 @@ reset_server_counts(void)
} /* reset_server_counts() */
-
+
/*****************************************************************************
* Function: resize_entry()
*
@@ -3808,17 +3715,11 @@ reset_server_counts(void)
* Programmer: John Mainzer
* 7/11/06
*
- * Modifications:
- *
- * None
- *
*****************************************************************************/
-
static void
resize_entry(int32_t idx,
size_t new_size)
{
- const char * fcn_name = "resize_entry()";
herr_t result;
struct datum * entry_ptr;
@@ -3845,7 +3746,7 @@ resize_entry(int32_t idx,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: H5AC_resize_entry() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
@@ -3893,7 +3794,6 @@ setup_cache_for_test(hid_t * fid_ptr,
H5C_t ** cache_ptr_ptr,
int metadata_write_strategy)
{
- const char * fcn_name = "setup_cache_for_test()";
hbool_t success = FALSE; /* will set to TRUE if appropriate. */
hbool_t enable_rpt_fcn = FALSE;
hid_t fid = -1;
@@ -3912,13 +3812,13 @@ setup_cache_for_test(hid_t * fid_ptr,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: H5Fcreate() failed.\n",
- world_mpi_rank, fcn_name);
+ 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, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
file_ptr = (H5F_t *)H5I_object_verify(fid, H5I_FILE);
@@ -3928,7 +3828,7 @@ setup_cache_for_test(hid_t * fid_ptr,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Can't get file_ptr.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
cache_ptr = file_ptr->shared->cache;
@@ -3938,13 +3838,13 @@ setup_cache_for_test(hid_t * fid_ptr,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Can't get cache_ptr.\n",
- world_mpi_rank, fcn_name);
+ 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, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
cache_ptr->ignore_tags = TRUE;
@@ -3964,7 +3864,7 @@ setup_cache_for_test(hid_t * fid_ptr,
HDfprintf(stdout,
"%d:%s: H5AC_get_cache_auto_resize_config(1) failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
} else {
@@ -3976,12 +3876,12 @@ setup_cache_for_test(hid_t * fid_ptr,
HDfprintf(stdout,
"%d:%s: H5AC_set_cache_auto_resize_config() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
} else if ( enable_rpt_fcn ) {
HDfprintf(stdout, "%d:%s: rpt_fcn enabled.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -3998,7 +3898,7 @@ setup_cache_for_test(hid_t * fid_ptr,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr == NULL.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else if ( ((H5AC_aux_t *)(cache_ptr->aux_ptr))->magic !=
H5AC__H5AC_AUX_T_MAGIC ) {
@@ -4007,7 +3907,7 @@ setup_cache_for_test(hid_t * fid_ptr,
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: cache_ptr->aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else if( ((H5AC_aux_t *)(cache_ptr->aux_ptr))->metadata_write_strategy
!= metadata_write_strategy ) {
@@ -4016,7 +3916,7 @@ setup_cache_for_test(hid_t * fid_ptr,
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: bad cache_ptr->aux_ptr->metadata_write_strategy\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -4034,7 +3934,7 @@ setup_cache_for_test(hid_t * fid_ptr,
HDfprintf(stdout,
"%d:%s: H5AC_get_cache_auto_resize_config(2) failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
} else if ( test_config.metadata_write_strategy !=
metadata_write_strategy ) {
@@ -4045,7 +3945,7 @@ setup_cache_for_test(hid_t * fid_ptr,
HDfprintf(stdout,
"%d:%s: unexpected metadata_write_strategy.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -4061,7 +3961,7 @@ setup_cache_for_test(hid_t * fid_ptr,
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: H5C_set_write_done_callback failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -4070,14 +3970,13 @@ setup_cache_for_test(hid_t * fid_ptr,
if ( success ) {
- if ( H5AC_set_sync_point_done_callback(cache_ptr, verify_writes) !=
- SUCCEED ) {
+ if ( H5AC_set_sync_point_done_callback(cache_ptr, verify_writes) != SUCCEED ) {
nerrors++;
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: H5AC_set_sync_point_done_callback failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -4118,7 +4017,6 @@ static void
verify_writes(int num_writes,
haddr_t * written_entries_tbl)
{
- const char * fcn_name = "verify_writes()";
const hbool_t report = FALSE;
hbool_t proceed = TRUE;
int i = 0;
@@ -4139,7 +4037,7 @@ verify_writes(int num_writes,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: barrier 1 failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -4166,7 +4064,7 @@ verify_writes(int num_writes,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: barrier 2 failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -4182,12 +4080,12 @@ verify_writes(int num_writes,
if ( proceed ) {
HDfprintf(stdout, "%d:%s: verified %d writes.\n",
- world_mpi_rank, fcn_name, num_writes);
+ world_mpi_rank, FUNC, num_writes);
} else {
HDfprintf(stdout, "%d:%s: FAILED to verify %d writes.\n",
- world_mpi_rank, fcn_name, num_writes);
+ world_mpi_rank, FUNC, num_writes);
}
}
@@ -4206,7 +4104,7 @@ verify_writes(int num_writes,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: barrier 3 failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -4215,7 +4113,7 @@ verify_writes(int num_writes,
} /* verify_writes() */
-
+
/*****************************************************************************
*
* Function: setup_rand()
@@ -4235,11 +4133,9 @@ verify_writes(int num_writes,
* Modified function to facilitate setting predefined seeds.
*
*****************************************************************************/
-
static void
setup_rand(void)
{
- const char * fcn_name = "setup_rand()";
hbool_t use_predefined_seeds = FALSE;
int num_predefined_seeds = 3;
unsigned predefined_seeds[3] = {33402, 33505, 33422};
@@ -4254,7 +4150,7 @@ setup_rand(void)
seed = predefined_seeds[world_mpi_rank];
HDfprintf(stdout, "%d:%s: predefined_seed = %d.\n",
- world_mpi_rank, fcn_name, seed);
+ world_mpi_rank, FUNC, seed);
fflush(stdout);
HDsrand(seed);
@@ -4265,13 +4161,13 @@ setup_rand(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: gettimeofday() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
seed = (unsigned)tv.tv_usec;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: seed = %d.\n",
- world_mpi_rank, fcn_name, seed);
+ world_mpi_rank, FUNC, seed);
fflush(stdout);
}
HDsrand(seed);
@@ -4282,7 +4178,7 @@ setup_rand(void)
} /* setup_rand() */
-
+
/*****************************************************************************
*
* Function: take_down_cache()
@@ -4298,16 +4194,10 @@ setup_rand(void)
*
* Programmer: JRM -- 1/4/06
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static hbool_t
take_down_cache(hid_t fid)
{
- const char * fcn_name = "take_down_cache()";
hbool_t success = FALSE; /* will set to TRUE if appropriate. */
/* close the file and delete it */
@@ -4316,7 +4206,7 @@ take_down_cache(hid_t fid)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: H5Fclose() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else if ( world_mpi_rank == world_server_mpi_rank ) {
@@ -4326,7 +4216,7 @@ take_down_cache(hid_t fid)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: HDremove() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
@@ -4366,7 +4256,6 @@ static hbool_t
verify_entry_reads(haddr_t addr,
int expected_entry_reads)
{
- const char * fcn_name = "verify_entry_reads()";
hbool_t success = TRUE;
int reported_entry_reads;
struct mssg_t mssg;
@@ -4390,7 +4279,7 @@ verify_entry_reads(haddr_t addr,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -4403,7 +4292,7 @@ verify_entry_reads(haddr_t addr,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -4422,7 +4311,7 @@ verify_entry_reads(haddr_t addr,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad data in req entry reads reply.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
@@ -4439,7 +4328,7 @@ verify_entry_reads(haddr_t addr,
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: rep/exp entry 0x%llx reads mismatch (%ld/%ld).\n",
- world_mpi_rank, fcn_name, (long long)addr,
+ world_mpi_rank, FUNC, (long long)addr,
reported_entry_reads, expected_entry_reads);
}
}
@@ -4474,7 +4363,6 @@ static hbool_t
verify_entry_writes(haddr_t addr,
int expected_entry_writes)
{
- const char * fcn_name = "verify_entry_writes()";
hbool_t success = TRUE;
int reported_entry_writes;
struct mssg_t mssg;
@@ -4498,7 +4386,7 @@ verify_entry_writes(haddr_t addr,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -4511,7 +4399,7 @@ verify_entry_writes(haddr_t addr,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -4530,7 +4418,7 @@ verify_entry_writes(haddr_t addr,
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad data in req entry writes reply.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
@@ -4547,7 +4435,7 @@ verify_entry_writes(haddr_t addr,
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: rep/exp entry 0x%llx writes mismatch (%ld/%ld).\n",
- world_mpi_rank, fcn_name, (long long)addr,
+ world_mpi_rank, FUNC, (long long)addr,
reported_entry_writes, expected_entry_writes);
}
}
@@ -4580,7 +4468,6 @@ verify_entry_writes(haddr_t addr,
static hbool_t
verify_total_reads(int expected_total_reads)
{
- const char * fcn_name = "verify_total_reads()";
hbool_t success = TRUE; /* will set to FALSE if appropriate. */
long reported_total_reads;
struct mssg_t mssg;
@@ -4604,7 +4491,7 @@ verify_total_reads(int expected_total_reads)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -4617,7 +4504,7 @@ verify_total_reads(int expected_total_reads)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else if ( ( mssg.req != REQ_TTL_READS_RPLY_CODE ) ||
( mssg.src != world_server_mpi_rank ) ||
@@ -4631,7 +4518,7 @@ verify_total_reads(int expected_total_reads)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad data in req total reads reply.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
@@ -4648,7 +4535,7 @@ verify_total_reads(int expected_total_reads)
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: reported/expected total reads mismatch (%ld/%ld).\n",
- world_mpi_rank, fcn_name,
+ world_mpi_rank, FUNC,
reported_total_reads, expected_total_reads);
}
@@ -4682,7 +4569,6 @@ verify_total_reads(int expected_total_reads)
static hbool_t
verify_total_writes(int expected_total_writes)
{
- const char * fcn_name = "verify_total_writes()";
hbool_t success = TRUE; /* will set to FALSE if appropriate. */
long reported_total_writes;
struct mssg_t mssg;
@@ -4706,7 +4592,7 @@ verify_total_writes(int expected_total_writes)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -4719,7 +4605,7 @@ verify_total_writes(int expected_total_writes)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else if ( ( mssg.req != REQ_TTL_WRITES_RPLY_CODE ) ||
( mssg.src != world_server_mpi_rank ) ||
@@ -4733,7 +4619,7 @@ verify_total_writes(int expected_total_writes)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad data in req total reads reply.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
@@ -4750,7 +4636,7 @@ verify_total_writes(int expected_total_writes)
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: reported/expected total writes mismatch (%ld/%ld).\n",
- world_mpi_rank, fcn_name,
+ world_mpi_rank, FUNC,
reported_total_writes, expected_total_writes);
}
}
@@ -4760,7 +4646,7 @@ verify_total_writes(int expected_total_writes)
} /* verify_total_writes() */
-
+
/*****************************************************************************
* Function: unlock_entry()
*
@@ -4779,13 +4665,11 @@ verify_total_writes(int expected_total_writes)
* Updated for the new local_len field in datum.
*
*****************************************************************************/
-
-void
+static void
unlock_entry(H5F_t * file_ptr,
int32_t idx,
unsigned int flags)
{
- const char * fcn_name = "unlock_entry()";
herr_t dirtied;
herr_t result;
struct datum * entry_ptr;
@@ -4820,7 +4704,7 @@ unlock_entry(H5F_t * file_ptr,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: error in H5C_unprotect().\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
} else {
@@ -4847,7 +4731,7 @@ unlock_entry(H5F_t * file_ptr,
} /* unlock_entry() */
-
+
/*****************************************************************************
* Function: unpin_entry()
*
@@ -4866,7 +4750,6 @@ unlock_entry(H5F_t * file_ptr,
* Added assertion that entry is pinned on entry.
*
*****************************************************************************/
-
static void
unpin_entry(H5F_t * file_ptr,
int32_t idx,
@@ -4874,7 +4757,6 @@ unpin_entry(H5F_t * file_ptr,
hbool_t dirty,
hbool_t via_unprotect)
{
- const char * fcn_name = "unpin_entry()";
herr_t result;
unsigned int flags = H5AC__UNPIN_ENTRY_FLAG;
struct datum * entry_ptr;
@@ -4919,7 +4801,7 @@ unpin_entry(H5F_t * file_ptr,
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: error in H5AC_unpin_entry().\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -4963,7 +4845,6 @@ unpin_entry(H5F_t * file_ptr,
static hbool_t
server_smoke_check(void)
{
- const char * fcn_name = "server_smoke_check()";
hbool_t success = TRUE;
int max_nerrors;
struct mssg_t mssg;
@@ -4985,7 +4866,7 @@ server_smoke_check(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: server_main() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -5007,7 +4888,7 @@ server_smoke_check(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed on write.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -5023,7 +4904,7 @@ server_smoke_check(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -5043,7 +4924,7 @@ server_smoke_check(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad data in write req ack.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -5059,7 +4940,7 @@ server_smoke_check(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: barrier 1 failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -5092,7 +4973,7 @@ server_smoke_check(void)
if ( verbose ) {
HDfprintf(stdout, "%d:%s: barrier 2 failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -5116,7 +4997,7 @@ server_smoke_check(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed on write.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -5131,7 +5012,7 @@ server_smoke_check(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -5151,7 +5032,7 @@ server_smoke_check(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -5163,7 +5044,7 @@ server_smoke_check(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: barrier 3 failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -5195,7 +5076,7 @@ server_smoke_check(void)
if ( verbose ) {
HDfprintf(stdout, "%d:%s: barrier 4 failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -5212,7 +5093,7 @@ server_smoke_check(void)
if ( verbose ) {
HDfprintf(stdout, "%d:%s: barrier 5 failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -5244,7 +5125,7 @@ server_smoke_check(void)
if ( verbose ) {
HDfprintf(stdout, "%d:%s: barrier 6 failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -5268,7 +5149,7 @@ server_smoke_check(void)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -5312,7 +5193,6 @@ server_smoke_check(void)
static hbool_t
smoke_check_1(int metadata_write_strategy)
{
- const char * fcn_name = "smoke_check_1()";
hbool_t success = TRUE;
int i;
int max_nerrors;
@@ -5354,7 +5234,7 @@ smoke_check_1(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: server_main() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -5368,7 +5248,7 @@ smoke_check_1(int metadata_write_strategy)
cache_ptr = NULL;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -5406,7 +5286,7 @@ smoke_check_1(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -5441,7 +5321,7 @@ smoke_check_1(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -5488,7 +5368,6 @@ smoke_check_1(int metadata_write_strategy)
static hbool_t
smoke_check_2(int metadata_write_strategy)
{
- const char * fcn_name = "smoke_check_2()";
hbool_t success = TRUE;
int i;
int max_nerrors;
@@ -5530,7 +5409,7 @@ smoke_check_2(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: server_main() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -5544,7 +5423,7 @@ smoke_check_2(int metadata_write_strategy)
cache_ptr = NULL;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -5629,7 +5508,7 @@ smoke_check_2(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -5664,7 +5543,7 @@ smoke_check_2(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -5714,9 +5593,7 @@ smoke_check_2(int metadata_write_strategy)
static hbool_t
smoke_check_3(int metadata_write_strategy)
{
- const char * fcn_name = "smoke_check_3()";
hbool_t success = TRUE;
- int cp = 0;
int i;
int max_nerrors;
int min_count;
@@ -5749,36 +5626,24 @@ smoke_check_3(int metadata_write_strategy)
break;
}
- /* 0 */
- if ( verbose ) { HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); }
-
nerrors = 0;
init_data();
reset_stats();
if ( world_mpi_rank == world_server_mpi_rank ) {
- /* 1 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
if ( ! server_main() ) {
/* some error occured in the server -- report failure */
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: server_main() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
-
- /* 2 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
}
else /* run the clients */
{
- /* 1 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
if ( ! setup_cache_for_test(&fid, &file_ptr, &cache_ptr,
metadata_write_strategy) ) {
@@ -5787,13 +5652,10 @@ smoke_check_3(int metadata_write_strategy)
cache_ptr = NULL;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
- /* 2 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
min_count = 100 / ((file_mpi_rank + 1) * (file_mpi_rank + 1));
max_count = min_count + 50;
@@ -5808,9 +5670,6 @@ smoke_check_3(int metadata_write_strategy)
}
}
- /* 3 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
min_count = 100 / ((file_mpi_rank + 2) * (file_mpi_rank + 2));
max_count = min_count + 50;
@@ -5850,9 +5709,6 @@ smoke_check_3(int metadata_write_strategy)
}
- /* 4 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
/* flush the file to be sure that we have no problems flushing
* pinned entries
@@ -5861,13 +5717,10 @@ smoke_check_3(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
- /* 5 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
min_idx = 0;
max_idx = ((virt_num_data_entries / 10) /
@@ -5902,9 +5755,6 @@ smoke_check_3(int metadata_write_strategy)
}
}
- /* 6 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
min_idx = 0;
max_idx = ((virt_num_data_entries / 10) /
((file_mpi_rank + 3) * (file_mpi_rank + 3))) - 1;
@@ -5921,9 +5771,6 @@ smoke_check_3(int metadata_write_strategy)
min_idx, max_idx, 0, 100);
}
- /* 7 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
/* we can't move pinned entries, so release any local pins now. */
local_unpin_all_entries(file_ptr, FALSE);
@@ -5941,9 +5788,6 @@ smoke_check_3(int metadata_write_strategy)
min_count, max_count);
}
- /* 8 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
/* ...and then move them back. */
for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- )
{
@@ -5955,9 +5799,6 @@ smoke_check_3(int metadata_write_strategy)
min_count, max_count);
}
- /* 9 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
/* finally, do some dirty lock/unlocks while we give the cache
* a chance t reduce its size.
*/
@@ -5980,9 +5821,6 @@ smoke_check_3(int metadata_write_strategy)
}
}
- /* 10 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
/* release any local pins before we take down the cache. */
local_unpin_all_entries(file_ptr, FALSE);
@@ -5993,14 +5831,11 @@ smoke_check_3(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
- /* 11 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
/* verify that all instances of datum are back where the started
* and are clean.
*/
@@ -6032,13 +5867,10 @@ smoke_check_3(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
-
- /* 12 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
}
max_nerrors = get_max_nerrors();
@@ -6085,7 +5917,6 @@ smoke_check_3(int metadata_write_strategy)
static hbool_t
smoke_check_4(int metadata_write_strategy)
{
- const char * fcn_name = "smoke_check_4()";
hbool_t success = TRUE;
int i;
int max_nerrors;
@@ -6131,7 +5962,7 @@ smoke_check_4(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: server_main() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -6145,7 +5976,7 @@ smoke_check_4(int metadata_write_strategy)
cache_ptr = NULL;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -6221,7 +6052,7 @@ smoke_check_4(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -6317,7 +6148,7 @@ smoke_check_4(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -6353,7 +6184,7 @@ smoke_check_4(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -6398,9 +6229,7 @@ smoke_check_4(int metadata_write_strategy)
static hbool_t
smoke_check_5(int metadata_write_strategy)
{
- const char * fcn_name = "smoke_check_5()";
hbool_t success = TRUE;
- int cp = 0;
int i;
int max_nerrors;
hid_t fid = -1;
@@ -6430,43 +6259,25 @@ smoke_check_5(int metadata_write_strategy)
}
- /* 0 */
- if ( verbose ) { HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); }
-
nerrors = 0;
init_data();
reset_stats();
if ( world_mpi_rank == world_server_mpi_rank ) {
- /* 1 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
if ( ! server_main() ) {
/* some error occured in the server -- report failure */
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: server_main() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
-
- /* 2 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
}
else /* run the clients */
{
- /* 1 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
if ( ! setup_cache_for_test(&fid, &file_ptr, &cache_ptr,
metadata_write_strategy) ) {
@@ -6475,39 +6286,24 @@ smoke_check_5(int metadata_write_strategy)
cache_ptr = NULL;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
- /* 2 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
for ( i = 0; i < (virt_num_data_entries / 2); i++ )
{
insert_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
}
- /* 3 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
/* flush the file so we can lock known clean entries. */
if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) {
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
- /* 4 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
for ( i = 0; i < (virt_num_data_entries / 4); i++ )
{
lock_entry(file_ptr, i);
@@ -6531,11 +6327,6 @@ smoke_check_5(int metadata_write_strategy)
}
}
- /* 5 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
for ( i = (virt_num_data_entries / 2) - 1;
i >= (virt_num_data_entries / 4);
i-- )
@@ -6560,11 +6351,6 @@ smoke_check_5(int metadata_write_strategy)
unpin_entry(file_ptr, i, TRUE, FALSE, FALSE);
}
- /* 6 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
if ( fid >= 0 ) {
if ( ! take_down_cache(fid) ) {
@@ -6572,16 +6358,11 @@ smoke_check_5(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
- /* 7 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
/* verify that all instance of datum are back where the started
* and are clean.
*/
@@ -6592,11 +6373,6 @@ smoke_check_5(int metadata_write_strategy)
HDassert( ! (data[i].dirty) );
}
- /* 8 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
/* compose the done message */
mssg.req = DONE_REQ_CODE;
mssg.src = world_mpi_rank;
@@ -6617,15 +6393,10 @@ smoke_check_5(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
-
- /* 9 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
}
max_nerrors = get_max_nerrors();
@@ -6696,7 +6467,6 @@ trace_file_check(int metadata_write_strategy)
#ifdef H5_METADATA_TRACE_FILE
- const char * fcn_name = "trace_file_check()";
const char *((* expected_output)[]) = NULL;
const char * expected_output_0[] =
{
@@ -6819,7 +6589,7 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: server_main() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -6834,7 +6604,7 @@ trace_file_check(int metadata_write_strategy)
cache_ptr = NULL;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -6848,7 +6618,7 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
HDfprintf(stdout,
"%d:%s: H5AC_get_cache_auto_resize_config() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
} else {
@@ -6861,7 +6631,7 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
HDfprintf(stdout,
"%d:%s: H5AC_set_cache_auto_resize_config() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -6897,7 +6667,7 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -6911,7 +6681,7 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
HDfprintf(stdout,
"%d:%s: H5AC_get_cache_auto_resize_config() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
} else {
@@ -6925,7 +6695,7 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
HDfprintf(stdout,
"%d:%s: H5AC_set_cache_auto_resize_config() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -6937,7 +6707,7 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -6972,7 +6742,7 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -6987,7 +6757,7 @@ trace_file_check(int metadata_write_strategy)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: HDfopen failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
@@ -7024,12 +6794,12 @@ trace_file_check(int metadata_write_strategy)
if ( verbose ) {
HDfprintf(stdout,
"%d:%s: Unexpected data in trace file line %d.\n",
- world_mpi_rank, fcn_name, i);
+ world_mpi_rank, FUNC, i);
HDfprintf(stdout, "%d:%s: expected = \"%s\" %d\n",
- world_mpi_rank, fcn_name, (*expected_output)[i],
+ world_mpi_rank, FUNC, (*expected_output)[i],
expected_line_len);
HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n",
- world_mpi_rank, fcn_name, buffer,
+ world_mpi_rank, FUNC, buffer,
actual_line_len);
}
} else {
@@ -7079,7 +6849,7 @@ trace_file_check(int metadata_write_strategy)
} /* trace_file_check() */
-
+
/*****************************************************************************
*
* Function: main()
@@ -7092,16 +6862,10 @@ trace_file_check(int metadata_write_strategy)
*
* Programmer: JRM -- 12/23/05
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
int
main(int argc, char **argv)
{
- const char * fcn_name = "main()";
int express_test;
unsigned u;
int mpi_size;
@@ -7123,7 +6887,8 @@ main(int argc, char **argv)
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0){
- printf("Failed to turn off atexit processing. Continue.\n");
+ printf("%d:Failed to turn off atexit processing. Continue.\n",
+ mpi_rank);
};
H5open();
@@ -7179,7 +6944,7 @@ main(int argc, char **argv)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: H5Pcreate() failed 1.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -7188,7 +6953,7 @@ main(int argc, char **argv)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 1.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -7201,7 +6966,7 @@ main(int argc, char **argv)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: h5_fixname() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
break;
}
@@ -7212,7 +6977,7 @@ main(int argc, char **argv)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: H5Pclose() failed.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -7224,7 +6989,7 @@ main(int argc, char **argv)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: H5Pcreate() failed 2.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
@@ -7233,7 +6998,7 @@ main(int argc, char **argv)
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 2.\n",
- world_mpi_rank, fcn_name);
+ world_mpi_rank, FUNC);
}
}
}
diff --git a/testpar/t_init_term.c b/testpar/t_init_term.c
new file mode 100644
index 0000000..824f773
--- /dev/null
+++ b/testpar/t_init_term.c
@@ -0,0 +1,76 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Mohamad Chaarawi
+ * June 2015
+ *
+ * Purpose: This test checks for the correct initialization and
+ * termination of the HDF5 library with MPI init and finalize.
+ */
+
+#include "testphdf5.h"
+
+int nerrors = 0; /* errors count */
+
+const char *FILENAME[] = {
+ "after_mpi_fin",
+ NULL
+};
+
+int
+main (int argc, char **argv)
+{
+ int mpi_size, mpi_rank;
+ MPI_Comm comm = MPI_COMM_WORLD;
+
+ /* Initialize and finalize MPI */
+ MPI_Init(&argc, &argv);
+ MPI_Comm_size(comm, &mpi_size);
+ MPI_Comm_rank(comm, &mpi_rank);
+
+ if(MAINPROCESS)
+ TESTING("Usage of Serial HDF5 after MPI_Finalize() is called");
+
+ MPI_Finalize();
+
+ nerrors += GetTestNumErrs();
+
+ /* test if we can initialize the library with MPI being finalized
+ and create a file serially */
+ H5open();
+
+ if(mpi_rank == 0) {
+ char filename[1024];
+ hid_t file_id;
+
+ h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof filename);
+ file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ VRFY((file_id >= 0), "H5Fcreate succeeded");
+ H5Fclose(file_id);
+ file_id = -1;
+ }
+
+ H5close();
+
+ if(MAINPROCESS) {
+ if(0 == nerrors)
+ PASSED()
+ else
+ H5_FAILED()
+ }
+
+ return (nerrors!=0);
+}