Skip to content

Commit

Permalink
common/test: silence debug print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
cwsmith committed Jun 19, 2017
1 parent 9aecc88 commit 12a0c1d
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions phSolver/common/test/phIOwriteFields.cc
Expand Up @@ -38,41 +38,23 @@ int main(int argc, char* argv[]) {
rstream rs = makeRStream();
phio_fp file[3];
const char* modes[3]={"syncio","posixio","streamio"};
fprintf(stderr,"nfiles %d\n", nfiles);
fprintf(stderr,"ppf %d\n", ppf);
syncio_setup_write(nfiles, nfields, ppf, &(file[0]));
posixio_setup(&(file[1]), 'w');
streamio_setup_r(&(file[2]), rs, 'w');
fprintf(stderr, "%s\n" ,"Outside loop 1.0");
for(int i=0; i<3; i++) {
fprintf(stderr, "%s\n" ,"Within the i loop");
if(!rank) fprintf(stderr, "%s\n", modes[i]);
fprintf(stderr, "%s\n" ,"Before phastaio");
phastaio_initStats();
fprintf(stderr, "Opening files with %s\n", filename[i]);
phio_openfile(filename[i], file[i]);
char str [50];
int n;
for (int j = 0; j < 2 ; j++) {
fprintf(stderr,"%s\n", "Inside loop");
for (int j = 0; j < 2 ; j++) {
n = sprintf(str, " Number of times %d ", j);
assert(n);
fprintf(stderr,"str \'%s\'\n", str);
fprintf(stderr,"Printing the int zero %d\n", zero);
fprintf(stderr,"Printing the int one %d\n", one);
fprintf(stderr,"blockentries %d\n",blockEntries);
fprintf(stderr,"Printing the const char type %s\n", type);
fprintf(stderr,"Printing the const char iotype %s\n", iotype);
fprintf(stderr,"Calling writeheader\n");
phio_writeheader(file[i], str, &blockEntries, &one, &blockEntries, type, iotype);
fprintf(stderr,"Done calling writeheader\n");
fprintf(stderr,"Calling writedatablock\n");
phio_writedatablock(file[i], str, blockArray, &blockEntries, type, iotype);
fprintf(stderr,"Done Calling writedatablock\n");
}
phio_closefile(file[i]);
phastaio_printStats();
fprintf(stderr,"Done %s\n", modes[i]);
}
syncio_setup_read(nfiles, &(file[0]));
posixio_setup(&(file[1]), 'r');
Expand All @@ -81,15 +63,9 @@ int main(int argc, char* argv[]) {
if(!rank) fprintf(stderr, "%s\n", modes[i]);
phastaio_initStats();
phio_openfile(filename[i], file[i]);
//Str was added
// const char* str = "Number of times "+ nfiles ;
// for (int j = 0; j < nfiles ; j++) {
phio_readheader(file[i], phrase, &numFish, &one, type, iotype);
// phio_readheader(file[i], str, &numFish, &one, type, iotype);
//Changing argument from file[i] to file[j]
assert(!numFish);
phio_readdatablock(file[i], phrase, &fishWeight, &numFish, type, iotype);
// phio_readdatablock(file[i], str, &fishWeight, &numFish, type, iotype);
assert(fishWeight == 1.23);
phio_closefile(file[i]);
phastaio_printStats();
Expand Down

0 comments on commit 12a0c1d

Please sign in to comment.