summaryrefslogtreecommitdiffstats
path: root/tools/src/h5diff
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src/h5diff')
-rw-r--r--tools/src/h5diff/h5diff_common.c28
-rw-r--r--tools/src/h5diff/ph5diff_main.c26
2 files changed, 27 insertions, 27 deletions
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index 0c1521e..362e3f2 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -62,9 +62,9 @@ static void check_options(diff_opt_t* opts)
* These options are mutually exclusive.
*/
if ((opts->d + opts->p + opts->use_system_epsilon) > 1) {
- printf("%s error: -d, -p and --use-system-epsilon options are mutually-exclusive;\n", PROGRAMNAME);
- printf("use no more than one.\n");
- printf("Try '-h' or '--help' option for more information or see the %s entry in the 'HDF5 Reference Manual'.\n", PROGRAMNAME);
+ HDprintf("%s error: -d, -p and --use-system-epsilon options are mutually-exclusive;\n", PROGRAMNAME);
+ HDprintf("use no more than one.\n");
+ HDprintf("Try '-h' or '--help' option for more information or see the %s entry in the 'HDF5 Reference Manual'.\n", PROGRAMNAME);
h5diff_exit(EXIT_FAILURE);
}
}
@@ -186,7 +186,7 @@ void parse_command_line(int argc,
/* create linked list of excluding objects */
if( (exclude_node = (struct exclude_path_list*) HDmalloc(sizeof(struct exclude_path_list))) == NULL) {
- printf("Error: lack of memory!\n");
+ HDprintf("Error: lack of memory!\n");
h5diff_exit(EXIT_FAILURE);
}
@@ -212,7 +212,7 @@ void parse_command_line(int argc,
opts->d=1;
if (check_d_input(opt_arg) == - 1) {
- printf("<-d %s> is not a valid option\n", opt_arg);
+ HDprintf("<-d %s> is not a valid option\n", opt_arg);
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -226,7 +226,7 @@ void parse_command_line(int argc,
case 'p':
opts->p=1;
if (check_p_input(opt_arg) == -1) {
- printf("<-p %s> is not a valid option\n", opt_arg);
+ HDprintf("<-p %s> is not a valid option\n", opt_arg);
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -240,7 +240,7 @@ void parse_command_line(int argc,
case 'n':
opts->n=1;
if ( check_n_input(opt_arg) == -1) {
- printf("<-n %s> is not a valid option\n", opt_arg);
+ HDprintf("<-n %s> is not a valid option\n", opt_arg);
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -309,20 +309,20 @@ void parse_command_line(int argc,
return;
if (opts->cmn_objs == 0) {
- printf("No common objects found. Files are not comparable.\n");
+ HDprintf("No common objects found. Files are not comparable.\n");
if (!opts->m_verbose)
- printf("Use -v for a list of objects.\n");
+ HDprintf("Use -v for a list of objects.\n");
}
if (opts->not_cmp == 1) {
if (opts->m_list_not_cmp == 0) {
- printf("--------------------------------\n");
- printf("Some objects are not comparable\n");
- printf("--------------------------------\n");
+ HDprintf("--------------------------------\n");
+ HDprintf("Some objects are not comparable\n");
+ HDprintf("--------------------------------\n");
if (opts->m_verbose)
- printf("Use -c for a list of objects without details of differences.\n");
+ HDprintf("Use -c for a list of objects without details of differences.\n");
else
- printf("Use -c for a list of objects.\n");
+ HDprintf("Use -c for a list of objects.\n");
}
}
}
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index 83240cb..380ab3b 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -68,7 +68,7 @@ int main(int argc, const char *argv[])
if(g_nTasks == 1)
{
- printf("Only 1 task available...doing serial diff\n");
+ HDprintf("Only 1 task available...doing serial diff\n");
g_Parallel = 0;
@@ -148,12 +148,12 @@ ph5diff_worker(int nID)
/* Open the files */
if ((file1_id = H5Fopen (filenames[0], H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
{
- printf ("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[0]);
+ HDprintf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[0]);
MPI_Abort(MPI_COMM_WORLD, 0);
}
if ((file2_id = H5Fopen (filenames[1], H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
{
- printf ("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[1]);
+ HDprintf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[1]);
MPI_Abort(MPI_COMM_WORLD, 0);
}
/* enable error reporting */
@@ -170,7 +170,7 @@ ph5diff_worker(int nID)
/* Make certain we've received the filenames and opened the files already */
if(file1_id < 0 || file2_id < 0)
{
- printf("ph5diff_worker: ERROR: work received before/without filenames\n");
+ HDprintf("ph5diff_worker: ERROR: work received before/without filenames\n");
break;
}
@@ -199,7 +199,7 @@ ph5diff_worker(int nID)
char out_data[PRINT_DATA_MAX_SIZE];
int tmp;
- memset(out_data, 0, PRINT_DATA_MAX_SIZE);
+ HDmemset(out_data, 0, PRINT_DATA_MAX_SIZE);
i=0;
rewind(overflow_file);
@@ -210,7 +210,7 @@ ph5diff_worker(int nID)
{
MPI_Send(out_data, PRINT_DATA_MAX_SIZE, MPI_BYTE, 0, MPI_TAG_PRINT_DATA, MPI_COMM_WORLD);
i=0;
- memset(out_data, 0, PRINT_DATA_MAX_SIZE);
+ HDmemset(out_data, 0, PRINT_DATA_MAX_SIZE);
}
}
@@ -221,8 +221,8 @@ ph5diff_worker(int nID)
overflow_file = NULL;
}
- fflush(stdout);
- memset(outBuff, 0, OUTBUFF_SIZE);
+ HDfflush(stdout);
+ HDmemset(outBuff, 0, OUTBUFF_SIZE);
outBuffOffset = 0;
MPI_Send(&diffs, sizeof(diffs), MPI_BYTE, 0, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD);
@@ -238,7 +238,7 @@ ph5diff_worker(int nID)
}
else
{
- printf("ph5diff_worker: ERROR: invalid tag (%d) received\n", Status.MPI_TAG);
+ HDprintf("ph5diff_worker: ERROR: invalid tag (%d) received\n", Status.MPI_TAG);
break;
}
@@ -266,14 +266,14 @@ void print_manager_output(void)
/* If there was something we buffered, let's print it now */
if( (outBuffOffset>0) && g_Parallel)
{
- printf("%s", outBuff);
+ HDprintf("%s", outBuff);
if(overflow_file)
{
int tmp;
rewind(overflow_file);
- while((tmp = getc(overflow_file)) >= 0)
- putchar(tmp);
+ while((tmp = HDgetc(overflow_file)) >= 0)
+ HDputchar(tmp);
fclose(overflow_file);
overflow_file = NULL;
}
@@ -321,6 +321,6 @@ void h5diff_exit(int status)
/* Always exit(0), since MPI implementations do weird stuff when they
* receive a non-zero exit value. - QAK
*/
- exit(0);
+ HDexit(0);
}