summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5O.c11
-rw-r--r--src/H5VLnative.c6
-rw-r--r--src/H5VLpublic.h2
-rw-r--r--testpar/t_chunk_alloc.c21
-rw-r--r--testpar/t_prop.c38
-rw-r--r--testpar/testphdf5.c2
6 files changed, 47 insertions, 33 deletions
diff --git a/src/H5O.c b/src/H5O.c
index e5439b1..3fb600c 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -612,7 +612,8 @@ H5Odecr_refcount(hid_t object_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information")
/* change the ref count through the VOL */
- if(H5VL_object_misc(obj, loc_params, vol_plugin, H5VL_OBJECT_CHANGE_REF_COUNT, H5AC_dxpl_id, H5_EVENT_STACK_NULL, -1) < 0)
+ if(H5VL_object_misc(obj, loc_params, vol_plugin, H5VL_OBJECT_CHANGE_REF_COUNT,
+ H5AC_dxpl_id, H5_EVENT_STACK_NULL, -1) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "modifying object link count failed")
done:
@@ -639,7 +640,7 @@ H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id)
void *obj = NULL; /* object token of loc_id */
H5VL_t *vol_plugin; /* VOL plugin information */
H5VL_loc_params_t loc_params;
- hid_t ret_value = FAIL; /* Return value */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("t", "i*si", loc_id, name, lapl_id);
@@ -660,13 +661,14 @@ H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id)
/* get the file object */
if(NULL == (obj = (void *)H5VL_get_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* get the plugin pointer */
if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information")
/* change the ref count through the VOL */
- if(H5VL_object_get(obj, loc_params, vol_plugin, H5VL_OBJECT_EXISTS, H5AC_dxpl_id, H5_EVENT_STACK_NULL, &ret_value) < 0)
+ if(H5VL_object_get(obj, loc_params, vol_plugin, H5VL_OBJECT_EXISTS, H5AC_dxpl_id,
+ H5_EVENT_STACK_NULL, &ret_value) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine if '%s' exists", name)
done:
@@ -1255,6 +1257,7 @@ H5Oclose(hid_t object_id)
case H5I_ATTR:
case H5I_REFERENCE:
case H5I_VFL:
+ case H5I_VOL:
case H5I_GENPROP_CLS:
case H5I_GENPROP_LST:
case H5I_ERROR_CLASS:
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index c649650..14b6284 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -3198,7 +3198,7 @@ H5VL_native_object_copy(void *src_obj, H5VL_loc_params_t loc_params1, const char
{
H5G_loc_t src_loc; /* Source object group location */
H5G_loc_t dst_loc; /* Destination group location */
- hid_t ret_value = FAIL;
+ herr_t ret_value = FAIL;
FUNC_ENTER_NOAPI_NOINIT
@@ -3599,7 +3599,7 @@ done:
*/
static herr_t
H5VL_native_object_get(void *obj, H5VL_loc_params_t loc_params, H5VL_object_get_t get_type,
- hid_t UNUSED dxpl_id, void UNUSED **req, va_list arguments)
+ hid_t dxpl_id, void UNUSED **req, va_list arguments)
{
herr_t ret_value = SUCCEED; /* Return value */
H5G_loc_t loc; /* Location of group */
@@ -3618,7 +3618,7 @@ H5VL_native_object_get(void *obj, H5VL_loc_params_t loc_params, H5VL_object_get_
if(loc_params.type == H5VL_OBJECT_BY_NAME) {
/* Check if the object exists */
if((*ret = H5G_loc_exists(&loc, loc_params.loc_data.loc_by_name.name,
- loc_params.loc_data.loc_by_name.lapl_id, H5AC_dxpl_id)) < 0)
+ loc_params.loc_data.loc_by_name.lapl_id, dxpl_id)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine if '%s' exists",
loc_params.loc_data.loc_by_name.name)
}
diff --git a/src/H5VLpublic.h b/src/H5VLpublic.h
index b2d4dce..982e1fc 100644
--- a/src/H5VLpublic.h
+++ b/src/H5VLpublic.h
@@ -149,7 +149,7 @@ typedef enum H5VL_object_optional_t {
/* types for all object get API routines */
typedef enum H5VL_object_get_t {
- H5VL_OBJECT_EXISTS, /* H5Oexists_by_name) */
+ H5VL_OBJECT_EXISTS, /* H5Oexists_by_name */
H5VL_OBJECT_GET_INFO, /* object info */
H5VL_OBJECT_GET_COMMENT, /* object comment */
H5VL_REF_GET_REGION, /* dataspace of region */
diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c
index b2ddc23..bc233c7 100644
--- a/testpar/t_chunk_alloc.c
+++ b/testpar/t_chunk_alloc.c
@@ -37,7 +37,7 @@ get_filesize(const char *filename)
MPI_File fd;
MPI_Offset filesize;
- mpierr = MPI_File_open(MPI_COMM_SELF, (char*)filename, MPI_MODE_RDONLY,
+ mpierr = MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_RDONLY,
MPI_INFO_NULL, &fd);
VRFY((mpierr == MPI_SUCCESS), "");
@@ -275,8 +275,9 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti
/* only opens the *dataset */
case open_only:
-
break;
+ default:
+ HDassert(0);
}
/* Close up */
@@ -319,7 +320,8 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti
* interleaved pattern.
*/
static void
-verify_data(const char *filename, int chunk_factor, write_type write_pattern, int close, hid_t *file_id, hid_t *dataset)
+verify_data(const char *filename, int chunk_factor, write_type write_pattern, int vclose,
+ hid_t *file_id, hid_t *dataset)
{
/* HDF5 gubbins */
hid_t dataspace, memspace; /* HDF5 file identifier */
@@ -334,7 +336,7 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in
/* Variables used in reading data back */
char buffer[CHUNK_SIZE];
int value, i;
- int index;
+ int index_l;
long nchunks;
/* Initialize MPI */
MPI_Comm_size(MPI_COMM_WORLD,&mpi_size);
@@ -397,11 +399,14 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in
value = 100;
else
value = 0;
+ break;
+ default:
+ HDassert(0);
}
/* verify content of the chunk */
- for (index = 0; index < CHUNK_SIZE; index++)
- VRFY((buffer[index] == value), "data verification");
+ for (index_l = 0; index_l < CHUNK_SIZE; index_l++)
+ VRFY((buffer[index_l] == value), "data verification");
}
hrc = H5Sclose (dataspace);
@@ -415,7 +420,7 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in
VRFY((hrc >= 0), "");
/* Close up */
- if (close){
+ if (vclose){
hrc = H5Dclose(*dataset);
VRFY((hrc >= 0), "");
*dataset = -1;
@@ -464,7 +469,7 @@ test_chunk_alloc(void)
MPI_Comm_size(MPI_COMM_WORLD,&mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank);
- filename = GetTestParameters();
+ filename = (const char*)GetTestParameters();
if (VERBOSE_MED)
printf("Extend Chunked allocation test on file %s\n", filename);
diff --git a/testpar/t_prop.c b/testpar/t_prop.c
index c588ad2..2cc0f5e 100644
--- a/testpar/t_prop.c
+++ b/testpar/t_prop.c
@@ -27,50 +27,57 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc)
MPI_Request req[2];
MPI_Status status;
hid_t pl; /* Decoded property list */
- void *buf = NULL;
size_t buf_size = 0;
- int casted_size;
+ void *sbuf = NULL;
herr_t ret; /* Generic return value */
if(mpi_rank == 0) {
+ int send_size = 0;
+
/* first call to encode returns only the size of the buffer needed */
ret = H5Pencode(orig_pl, NULL, &buf_size);
VRFY((ret >= 0), "H5Pencode succeeded");
- buf = (uint8_t *)HDmalloc(buf_size);
+ sbuf = (uint8_t *)HDmalloc(buf_size);
- ret = H5Pencode(orig_pl, buf, &buf_size);
+ ret = H5Pencode(orig_pl, sbuf, &buf_size);
VRFY((ret >= 0), "H5Pencode succeeded");
/* this is a temp fix to send this size_t */
- casted_size = (int)buf_size;
+ send_size = (int)buf_size;
- MPI_Isend(&casted_size, 1, MPI_INT, recv_proc, 123, MPI_COMM_WORLD, &req[0]);
- MPI_Isend(buf, casted_size, MPI_BYTE, recv_proc, 124, MPI_COMM_WORLD, &req[1]);
+ MPI_Isend(&send_size, 1, MPI_INT, recv_proc, 123, MPI_COMM_WORLD, &req[0]);
+ MPI_Isend(sbuf, send_size, MPI_BYTE, recv_proc, 124, MPI_COMM_WORLD, &req[1]);
} /* end if */
+
if(mpi_rank == recv_proc) {
- MPI_Recv(&casted_size, 1, MPI_INT, 0, 123, MPI_COMM_WORLD, &status);
- buf_size = casted_size;
- buf = (uint8_t *)HDmalloc(buf_size);
- MPI_Recv(buf, casted_size, MPI_BYTE, 0, 124, MPI_COMM_WORLD, &status);
+ int recv_size;
+ void *rbuf;
+
+ MPI_Recv(&recv_size, 1, MPI_INT, 0, 123, MPI_COMM_WORLD, &status);
+ buf_size = recv_size;
+ rbuf = (uint8_t *)HDmalloc(buf_size);
+ MPI_Recv(rbuf, recv_size, MPI_BYTE, 0, 124, MPI_COMM_WORLD, &status);
- pl = H5Pdecode(buf);
+ pl = H5Pdecode(rbuf);
VRFY((pl >= 0), "H5Pdecode succeeded");
VRFY(H5Pequal(orig_pl, pl), "Property List Equal Succeeded");
ret = H5Pclose(pl);
VRFY((ret >= 0), "H5Pclose succeeded");
+
+ if(NULL != rbuf)
+ HDfree(rbuf);
} /* end if */
if(0 == mpi_rank)
MPI_Waitall(2, req, MPI_STATUSES_IGNORE);
- if(NULL != buf)
- HDfree(buf);
+ if(NULL != sbuf)
+ HDfree(sbuf);
MPI_Barrier(MPI_COMM_WORLD);
-
return(0);
}
@@ -135,7 +142,6 @@ test_plist_ed(void)
herr_t ret; /* Generic return value */
-
if(VERBOSE_MED)
printf("Encode/Decode DCPLs\n");
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index 057ac88..df6257f 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -368,7 +368,7 @@ int main(int argc, char **argv)
AddTest("selnone", none_selection_chunk, NULL,
"chunked dataset with none-selection", PARATESTFILE);
AddTest("calloc", test_chunk_alloc, NULL,
- "parallel extend Chunked allocation on serial file", PARATESTFILE);
+ "parallel extend Chunked allocation on serial file", PARATESTFILE);
AddTest("fltread", test_filter_read, NULL,
"parallel read of dataset written serially with filters", PARATESTFILE);