summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-11-21 15:09:47 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-11-21 15:09:47 (GMT)
commit2edb830946409536432d28520284e4b5eec2d32e (patch)
treea13ab2258b4e7ccfe4135b3b7fc2ea04f536c732 /src
parentcdffac61e52cbee121205da162c6fb75954c2734 (diff)
downloadhdf5-2edb830946409536432d28520284e4b5eec2d32e.zip
hdf5-2edb830946409536432d28520284e4b5eec2d32e.tar.gz
hdf5-2edb830946409536432d28520284e4b5eec2d32e.tar.bz2
[svn-r4633] Purpose:
Bug fix. Description: Builds for parallel testing exposed some places that I forgot to get rid of using IDs in internal APIs. Solution: Switch sections of code to use proper data structures instead of IDs. Platforms tested: Parallel compiles from daily tests.
Diffstat (limited to 'src')
-rw-r--r--src/H5Dseq.c24
-rw-r--r--src/H5Farray.c39
-rw-r--r--src/H5Fseq.c24
3 files changed, 53 insertions, 34 deletions
diff --git a/src/H5Dseq.c b/src/H5Dseq.c
index bace23d..49b9203 100644
--- a/src/H5Dseq.c
+++ b/src/H5Dseq.c
@@ -164,6 +164,7 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
int i,j; /*counters */
#ifdef H5_HAVE_PARALLEL
H5FD_mpio_xfer_t xfer_mode=H5FD_MPIO_INDEPENDENT;
+ H5P_genplist_t *plist=NULL; /* Property list */
#endif
FUNC_ENTER(H5F_seq_readv, FAIL);
@@ -182,14 +183,18 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
H5FD_mpio_dxpl_t *dx;
hid_t driver_id; /* VFL driver ID */
+ /* Get the plist structure */
+ if(NULL == (plist = H5I_object(dxpl_id)))
+ HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, NULL, "can't find object for ID");
+
/* Get the driver ID */
- if(H5P_get(dxpl_id, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
+ if(H5P_get(plist, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
HRETURN_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver ID");
/* Check if we are using the MPIO driver */
if(H5FD_MPIO==driver_id) {
/* Get the driver information */
- if(H5P_get(dxpl_id, H5D_XFER_VFL_INFO_NAME, &dx)<0)
+ if(H5P_get(plist, H5D_XFER_VFL_INFO_NAME, &dx)<0)
HRETURN_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver info");
/* Check if we are not using independent I/O */
@@ -199,10 +204,8 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Collective MPIO access is unsupported for non-contiguous datasets */
- if (H5D_CONTIGUOUS!=layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode) {
- HRETURN_ERROR (H5E_DATASET, H5E_READERROR, FAIL,
- "collective access on non-contiguous datasets not supported yet");
- }
+ if (H5D_CONTIGUOUS!=layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode)
+ HRETURN_ERROR (H5E_DATASET, H5E_READERROR, FAIL, "collective access on non-contiguous datasets not supported yet");
#endif
switch (layout->type) {
@@ -548,6 +551,7 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
int i,j; /*counters */
#ifdef H5_HAVE_PARALLEL
H5FD_mpio_xfer_t xfer_mode=H5FD_MPIO_INDEPENDENT;
+ H5P_genplist_t *plist=NULL; /* Property list */
#endif
FUNC_ENTER(H5F_seq_writev, FAIL);
@@ -566,14 +570,18 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
H5FD_mpio_dxpl_t *dx;
hid_t driver_id; /* VFL driver ID */
+ /* Get the plist structure */
+ if(NULL == (plist = H5I_object(dxpl_id)))
+ HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, NULL, "can't find object for ID");
+
/* Get the driver ID */
- if(H5P_get(dxpl_id, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
+ if(H5P_get(plist, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
HRETURN_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver ID");
/* Check if we are using the MPIO driver */
if(H5FD_MPIO==driver_id) {
/* Get the driver information */
- if(H5P_get(dxpl_id, H5D_XFER_VFL_INFO_NAME, &dx)<0)
+ if(H5P_get(plist, H5D_XFER_VFL_INFO_NAME, &dx)<0)
HRETURN_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver info");
/* Check if we are not using independent I/O */
diff --git a/src/H5Farray.c b/src/H5Farray.c
index 58c6239..5874b67 100644
--- a/src/H5Farray.c
+++ b/src/H5Farray.c
@@ -150,6 +150,7 @@ H5F_arr_read(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
hbool_t carray; /*carry for subtraction */
#ifdef H5_HAVE_PARALLEL
H5FD_mpio_xfer_t xfer_mode=H5FD_MPIO_INDEPENDENT;
+ H5P_genplist_t *plist=NULL; /* Property list */
#endif
#ifdef COALESCE_READS
unsigned gather_reads; /* # of MPIO reads to gather */
@@ -178,14 +179,18 @@ H5F_arr_read(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
H5FD_mpio_dxpl_t *dx;
hid_t driver_id; /* VFL driver ID */
+ /* Get the plist structure */
+ if(NULL == (plist = H5I_object(dxpl_id)))
+ HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, NULL, "can't find object for ID");
+
/* Get the driver ID */
- if(H5P_get(dxpl_id, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
+ if(H5P_get(plist, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
HRETURN_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver ID");
/* Check if we are using the MPIO driver */
if(H5FD_MPIO==driver_id) {
/* Get the driver information */
- if(H5P_get(dxpl_id, H5D_XFER_VFL_INFO_NAME, &dx)<0)
+ if(H5P_get(plist, H5D_XFER_VFL_INFO_NAME, &dx)<0)
HRETURN_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver info");
/* Check if we are not using independent I/O */
@@ -195,11 +200,8 @@ H5F_arr_read(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Collective MPIO access is unsupported for non-contiguous datasets */
- if (H5D_CONTIGUOUS!=layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode) {
- HRETURN_ERROR (H5E_DATASET, H5E_READERROR, FAIL,
- "collective access on non-contiguous datasets not "
- "supported yet");
- }
+ if (H5D_CONTIGUOUS!=layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode)
+ HRETURN_ERROR (H5E_DATASET, H5E_READERROR, FAIL, "collective access on non-contiguous datasets not supported yet");
#endif
#ifdef QAK
{
@@ -306,10 +308,9 @@ H5F_arr_read(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
#endif /* QAK */
#ifdef COALESCE_READS
for (z=0, gather_reads = nelmts - 1; z<nelmts; z++, gather_reads--) {
-
- /* Track the number of reads to gather */
- if(H5P_set(dxpl_id, H5D_XFER_GATHER_READS_NAME, &gather_reads)<0)
- HRETURN_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve gather reads");
+ /* Track the number of reads to gather */
+ if(H5P_set(plist, H5D_XFER_GATHER_READS_NAME, &gather_reads)<0)
+ HRETURN_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve gather reads");
#else
for (z=0; z<nelmts; z++) {
@@ -440,6 +441,7 @@ H5F_arr_write(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
hbool_t carray; /*carry for subtraction */
#ifdef H5_HAVE_PARALLEL
H5FD_mpio_xfer_t xfer_mode=H5FD_MPIO_INDEPENDENT;
+ H5P_genplist_t *plist=NULL; /* Property list */
#endif
FUNC_ENTER(H5F_arr_write, FAIL);
@@ -465,14 +467,18 @@ H5F_arr_write(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
H5FD_mpio_dxpl_t *dx;
hid_t driver_id; /* VFL driver ID */
+ /* Get the plist structure */
+ if(NULL == (plist = H5I_object(dxpl_id)))
+ HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, NULL, "can't find object for ID");
+
/* Get the driver ID */
- if(H5P_get(dxpl_id, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
+ if(H5P_get(plist, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
HRETURN_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver ID");
/* Check if we are using the MPIO driver */
if(H5FD_MPIO==driver_id) {
/* Get the driver information */
- if(H5P_get(dxpl_id, H5D_XFER_VFL_INFO_NAME, &dx)<0)
+ if(H5P_get(plist, H5D_XFER_VFL_INFO_NAME, &dx)<0)
HRETURN_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver info");
/* Check if we are not using independent I/O */
@@ -481,11 +487,8 @@ H5F_arr_write(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
} /* end if */
}
- if (H5D_CONTIGUOUS!=layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode) {
- HRETURN_ERROR (H5E_DATASET, H5E_WRITEERROR, FAIL,
- "collective access on non-contiguous datasets not "
- "supported yet");
- }
+ if (H5D_CONTIGUOUS!=layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode)
+ HRETURN_ERROR (H5E_DATASET, H5E_WRITEERROR, FAIL, "collective access on non-contiguous datasets not supported yet");
#endif
#ifdef QAK
diff --git a/src/H5Fseq.c b/src/H5Fseq.c
index bace23d..49b9203 100644
--- a/src/H5Fseq.c
+++ b/src/H5Fseq.c
@@ -164,6 +164,7 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
int i,j; /*counters */
#ifdef H5_HAVE_PARALLEL
H5FD_mpio_xfer_t xfer_mode=H5FD_MPIO_INDEPENDENT;
+ H5P_genplist_t *plist=NULL; /* Property list */
#endif
FUNC_ENTER(H5F_seq_readv, FAIL);
@@ -182,14 +183,18 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
H5FD_mpio_dxpl_t *dx;
hid_t driver_id; /* VFL driver ID */
+ /* Get the plist structure */
+ if(NULL == (plist = H5I_object(dxpl_id)))
+ HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, NULL, "can't find object for ID");
+
/* Get the driver ID */
- if(H5P_get(dxpl_id, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
+ if(H5P_get(plist, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
HRETURN_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver ID");
/* Check if we are using the MPIO driver */
if(H5FD_MPIO==driver_id) {
/* Get the driver information */
- if(H5P_get(dxpl_id, H5D_XFER_VFL_INFO_NAME, &dx)<0)
+ if(H5P_get(plist, H5D_XFER_VFL_INFO_NAME, &dx)<0)
HRETURN_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver info");
/* Check if we are not using independent I/O */
@@ -199,10 +204,8 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Collective MPIO access is unsupported for non-contiguous datasets */
- if (H5D_CONTIGUOUS!=layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode) {
- HRETURN_ERROR (H5E_DATASET, H5E_READERROR, FAIL,
- "collective access on non-contiguous datasets not supported yet");
- }
+ if (H5D_CONTIGUOUS!=layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode)
+ HRETURN_ERROR (H5E_DATASET, H5E_READERROR, FAIL, "collective access on non-contiguous datasets not supported yet");
#endif
switch (layout->type) {
@@ -548,6 +551,7 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
int i,j; /*counters */
#ifdef H5_HAVE_PARALLEL
H5FD_mpio_xfer_t xfer_mode=H5FD_MPIO_INDEPENDENT;
+ H5P_genplist_t *plist=NULL; /* Property list */
#endif
FUNC_ENTER(H5F_seq_writev, FAIL);
@@ -566,14 +570,18 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
H5FD_mpio_dxpl_t *dx;
hid_t driver_id; /* VFL driver ID */
+ /* Get the plist structure */
+ if(NULL == (plist = H5I_object(dxpl_id)))
+ HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, NULL, "can't find object for ID");
+
/* Get the driver ID */
- if(H5P_get(dxpl_id, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
+ if(H5P_get(plist, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
HRETURN_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver ID");
/* Check if we are using the MPIO driver */
if(H5FD_MPIO==driver_id) {
/* Get the driver information */
- if(H5P_get(dxpl_id, H5D_XFER_VFL_INFO_NAME, &dx)<0)
+ if(H5P_get(plist, H5D_XFER_VFL_INFO_NAME, &dx)<0)
HRETURN_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver info");
/* Check if we are not using independent I/O */