diff options
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/h5diff.c | 19 | ||||
-rw-r--r-- | tools/lib/h5diff.h | 2 | ||||
-rw-r--r-- | tools/lib/h5diff_util.c | 31 | ||||
-rw-r--r-- | tools/lib/ph5diff.h | 2 |
4 files changed, 26 insertions, 28 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index e0174b0..3edd6e8 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -453,14 +453,14 @@ hsize_t diff_match(hid_t file1_id, */ /*Set up args to pass to worker task. */ - if(strlen(table->objs[i].name) > 255) { + if(HDstrlen(table->objs[i].name) > 255) { printf("The parallel diff only supports object names up to 255 characters\n"); MPI_Abort(MPI_COMM_WORLD, 0); } /* end if */ HDstrcpy(args.name, table->objs[i].name); args.options = *options; - args.type= table->objs[i].type; + args.type = table->objs[i].type; h5diffdebug2("busyTasks=%d\n", busyTasks); /* if there are any outstanding print requests, let's handle one. */ @@ -516,7 +516,7 @@ hsize_t diff_match(hid_t file1_id, for(n = 1; (n < g_nTasks) && !workerFound; n++) { if(workerTasks[n-1]) { /* send file id's and names to first free worker */ - MPI_Send(&args, sizeof(struct diff_args), MPI_BYTE, n, MPI_TAG_ARGS, MPI_COMM_WORLD); + MPI_Send(&args, sizeof(args), MPI_BYTE, n, MPI_TAG_ARGS, MPI_COMM_WORLD); /* increment counter for total number of prints. */ busyTasks++; @@ -547,7 +547,7 @@ hsize_t diff_match(hid_t file1_id, nfound += nFoundbyWorker.nfound; options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp; /* send this task the work unit. */ - MPI_Send(&args, sizeof(struct diff_args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD); + MPI_Send(&args, sizeof(args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD); } /* end if */ } /* end while */ } /* end if */ @@ -560,7 +560,7 @@ hsize_t diff_match(hid_t file1_id, MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &Status); nfound += nFoundbyWorker.nfound; options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp; - MPI_Send(&args, sizeof(struct diff_args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD); + MPI_Send(&args, sizeof(args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD); } /* end if */ else if(Status.MPI_TAG == MPI_TAG_TOK_REQUEST) { int incomingMessage; @@ -577,7 +577,7 @@ hsize_t diff_match(hid_t file1_id, MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &Status); nfound += nFoundbyWorker.nfound; options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp; - MPI_Send(&args, sizeof(struct diff_args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD); + MPI_Send(&args, sizeof(args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD); } /* end else-if */ else { printf("ERROR: Invalid tag (%d) received \n", Status.MPI_TAG); @@ -744,10 +744,9 @@ hsize_t diff_compare (hid_t file1_id, if (info1->paths[i].type != info2->paths[j].type) { if (options->m_verbose) - parallel_print - ("Comparison not possible: <%s> is of type %s and <%s> is of type %s\n", - obj1_name, get_type (info1->paths[i].type), obj2_name, - get_type (info2->paths[j].type)); + parallel_print("Comparison not possible: <%s> is of type %s and <%s> is of type %s\n", + obj1_name, get_type(info1->paths[i].type), obj2_name, + get_type(info2->paths[j].type)); options->not_cmp=1; return 0; } diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index 60e96b2..373eeed 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -150,7 +150,7 @@ void print_found(hsize_t nfound); void parallel_print(const char* format, ... ); void print_type(hid_t type); const char* diff_basename(const char *name); -const char* get_type(int type); +const char* get_type(h5trav_type_t type); const char* get_class(H5T_class_t tclass); const char* get_sign(H5T_sign_t sign); void print_dimensions (int rank, hsize_t *dims); diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index bd8207f..9e9c556 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -261,23 +261,22 @@ diff_basename(const char *name) *------------------------------------------------------------------------- */ const char* -get_type(int type) +get_type(h5trav_type_t type) { - switch (type) - { - case H5G_DATASET: - return("H5G_DATASET"); - case H5G_GROUP: - return("H5G_GROUP"); - case H5G_TYPE: - return("H5G_TYPE"); - case H5G_LINK: - return("H5G_LINK"); - case H5G_UDLINK: - return("H5G_UDLINK"); - default: - return("user defined type"); - } + switch(type) { + case H5TRAV_TYPE_DATASET: + return("H5G_DATASET"); + case H5TRAV_TYPE_GROUP: + return("H5G_GROUP"); + case H5TRAV_TYPE_NAMED_DATATYPE: + return("H5G_TYPE"); + case H5TRAV_TYPE_LINK: + return("H5G_LINK"); + case H5TRAV_TYPE_UDLINK: + return("H5G_UDLINK"); + default: + return("unknown type"); + } } /*------------------------------------------------------------------------- diff --git a/tools/lib/ph5diff.h b/tools/lib/ph5diff.h index d904095..3ad158f 100644 --- a/tools/lib/ph5diff.h +++ b/tools/lib/ph5diff.h @@ -41,7 +41,7 @@ extern FILE * overflow_file; struct diff_args { char name[256]; - H5G_obj_t type; + h5trav_type_t type; diff_opt_t options; }; |