summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2009-01-29 18:58:36 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2009-01-29 18:58:36 (GMT)
commit9a298fd1dda2ed9b12e68cc64ccce5c95216fd6a (patch)
tree881f4544d4eb49a06ebb56d4b68a31aefb79fde3 /tools/lib
parent6416329ef8bfc9e1b3f2a0876cd13b83963b13ef (diff)
downloadhdf5-9a298fd1dda2ed9b12e68cc64ccce5c95216fd6a.zip
hdf5-9a298fd1dda2ed9b12e68cc64ccce5c95216fd6a.tar.gz
hdf5-9a298fd1dda2ed9b12e68cc64ccce5c95216fd6a.tar.bz2
[svn-r16373] replaced some printf statements with parallel_print
tested: linux serial and parallel
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5diff.c20
-rw-r--r--tools/lib/h5diff_array.c1
-rw-r--r--tools/lib/h5diff_attr.c2
-rw-r--r--tools/lib/h5diff_dset.c46
4 files changed, 34 insertions, 35 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 38c5f54..432dd95 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -197,7 +197,7 @@ hsize_t h5diff(const char *fname1,
if(options->m_quiet && (options->m_verbose || options->m_report))
{
- printf("Error: -q (quiet mode) cannot be added to verbose or report modes\n");
+ parallel_print("Error: -q (quiet mode) cannot be added to verbose or report modes\n");
options->err_stat=1;
return 0;
} /* end if */
@@ -213,7 +213,7 @@ hsize_t h5diff(const char *fname1,
/* open the files */
if((file1_id = H5Fopen(fname1, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
{
- printf("h5diff: <%s>: unable to open file\n", fname1);
+ parallel_print("h5diff: <%s>: unable to open file\n", fname1);
options->err_stat = 1;
#ifdef H5_HAVE_PARALLEL
@@ -225,7 +225,7 @@ hsize_t h5diff(const char *fname1,
} /* end if */
if((file2_id = H5Fopen(fname2, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
{
- printf("h5diff: <%s>: unable to open file\n", fname2);
+ parallel_print("h5diff: <%s>: unable to open file\n", fname2);
options->err_stat = 1;
#ifdef H5_HAVE_PARALLEL
@@ -250,7 +250,7 @@ hsize_t h5diff(const char *fname1,
*-------------------------------------------------------------------------
*/
if(h5trav_getinfo(file1_id, info1) < 0 || h5trav_getinfo(file2_id, info2) < 0) {
- printf("Error: Could not get file contents\n");
+ parallel_print("Error: Could not get file contents\n");
options->err_stat = 1;
#ifdef H5_HAVE_PARALLEL
if(g_Parallel)
@@ -431,17 +431,17 @@ hsize_t diff_match(hid_t file1_id,
*/
if(options->m_verbose)
{
- printf("\n");
- printf("file1 file2\n");
- printf("---------------------------------------\n");
+ parallel_print("\n");
+ parallel_print("file1 file2\n");
+ parallel_print("---------------------------------------\n");
for(i = 0; i < table->nobjs; i++) {
char c1, c2;
c1 = (table->objs[i].flags[0]) ? 'x' : ' ';
c2 = (table->objs[i].flags[1]) ? 'x' : ' ';
- printf("%5c %6c %-15s\n", c1, c2, table->objs[i].name);
+ parallel_print("%5c %6c %-15s\n", c1, c2, table->objs[i].name);
} /* end for */
- printf ("\n");
+ parallel_print ("\n");
} /* end if */
@@ -1143,7 +1143,7 @@ hsize_t diff(hid_t file1_id,
default:
if(options->m_verbose)
- printf("Comparison not supported: <%s> and <%s> are of type %s\n",
+ parallel_print("Comparison not supported: <%s> and <%s> are of type %s\n",
path1, path2, get_type(type) );
options->not_cmp = 1;
break;
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 8d733b3..f9c6261 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -5397,7 +5397,6 @@ my_isnan(dtype_t type, void *val)
double x;
HDmemcpy(&x, val, sizeof(double));
retval = (x!=x);
- //printf("x=%g retval =%d\n", x,retval);
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
}
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 747b12c..c527310 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -185,7 +185,7 @@ hsize_t diff_attr(hid_t loc1_id,
buf1=(void *) HDmalloc((unsigned)(nelmts1*msize1));
buf2=(void *) HDmalloc((unsigned)(nelmts1*msize2));
if ( buf1==NULL || buf2==NULL){
- printf( "cannot read into memory\n" );
+ parallel_print( "cannot read into memory\n" );
goto error;
}
if (H5Aread(attr1_id,mtype1_id,buf1)<0)
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index 1a5778a..9710419 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -55,12 +55,12 @@ hsize_t diff_dataset( hid_t file1_id,
/* Open the datasets */
if((did1 = H5Dopen2(file1_id, obj1_name, H5P_DEFAULT)) < 0)
{
- printf("Cannot open dataset <%s>\n", obj1_name);
+ parallel_print("Cannot open dataset <%s>\n", obj1_name);
goto error;
}
if((did2 = H5Dopen2(file2_id, obj2_name, H5P_DEFAULT)) < 0)
{
- printf("Cannot open dataset <%s>\n", obj2_name);
+ parallel_print("Cannot open dataset <%s>\n", obj2_name);
goto error;
}
/* enable error reporting */
@@ -880,33 +880,33 @@ void print_sizes( const char *obj1,
m_size1 = H5Tget_size( m_tid1 );
m_size2 = H5Tget_size( m_tid2 );
- printf("\n");
- printf("------------------\n");
- printf("sizeof(char) %u\n", sizeof(char) );
- printf("sizeof(short) %u\n", sizeof(short) );
- printf("sizeof(int) %u\n", sizeof(int) );
- printf("sizeof(long) %u\n", sizeof(long) );
- printf("<%s> ------------------\n", obj1);
- printf("type on file ");
+ parallel_print("\n");
+ parallel_print("------------------\n");
+ parallel_print("sizeof(char) %u\n", sizeof(char) );
+ parallel_print("sizeof(short) %u\n", sizeof(short) );
+ parallel_print("sizeof(int) %u\n", sizeof(int) );
+ parallel_print("sizeof(long) %u\n", sizeof(long) );
+ parallel_print("<%s> ------------------\n", obj1);
+ parallel_print("type on file ");
print_type(f_tid1);
- printf("\n");
- printf("size on file %u\n", f_size1 );
+ parallel_print("\n");
+ parallel_print("size on file %u\n", f_size1 );
- printf("type on memory ");
+ parallel_print("type on memory ");
print_type(m_tid1);
- printf("\n");
- printf("size on memory %u\n", m_size1 );
+ parallel_print("\n");
+ parallel_print("size on memory %u\n", m_size1 );
- printf("<%s> ------------------\n", obj2);
- printf("type on file ");
+ parallel_print("<%s> ------------------\n", obj2);
+ parallel_print("type on file ");
print_type(f_tid2);
- printf("\n");
- printf("size on file %u\n", f_size2 );
+ parallel_print("\n");
+ parallel_print("size on file %u\n", f_size2 );
- printf("type on memory ");
+ parallel_print("type on memory ");
print_type(m_tid2);
- printf("\n");
- printf("size on memory %u\n", m_size2 );
- printf("\n");
+ parallel_print("\n");
+ parallel_print("size on memory %u\n", m_size2 );
+ parallel_print("\n");
}
#endif /* H5DIFF_DEBUG */