[svn-r16375] merge 16373

replaced some printf statements with parallel_print


tested: linux serial (parallel tested in trunk)
This commit is contained in:
Pedro Vicente Nunes
2009-01-29 14:09:30 -05:00
parent 6d2a73d49f
commit 87ebee5951
4 changed files with 34 additions and 35 deletions

View File

@@ -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)
@@ -426,17 +426,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 */
@@ -1138,7 +1138,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;

View File

@@ -5398,7 +5398,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
}

View File

@@ -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)

View File

@@ -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 */