summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2000-10-10 20:55:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2000-10-10 20:55:54 (GMT)
commit64b8f7fd738aec5c4683cdd457fbbf334c0b7bba (patch)
tree6d3e6b39b1550241071c338ee01d1124a22e96b1 /src
parent46434499668593bb2421a58365700e53c128cb10 (diff)
downloadhdf5-64b8f7fd738aec5c4683cdd457fbbf334c0b7bba.zip
hdf5-64b8f7fd738aec5c4683cdd457fbbf334c0b7bba.tar.gz
hdf5-64b8f7fd738aec5c4683cdd457fbbf334c0b7bba.tar.bz2
[svn-r2657]
Purpose: Parallel Bug Fixes Description: Was out of sync with header file re-arrangements I checked in last night. Solution: Fixed to use new header files, etc. Platforms tested: O2K (modi4)
Diffstat (limited to 'src')
-rw-r--r--src/H5Dseq.c4
-rw-r--r--src/H5FDmpio.c2
-rw-r--r--src/H5Farray.c10
-rw-r--r--src/H5Fseq.c4
-rw-r--r--src/H5R.c1
-rw-r--r--src/H5Shyper.c293
-rw-r--r--src/H5Smpio.c3
-rw-r--r--src/H5Spkg.h27
-rw-r--r--src/H5Sprivate.h27
-rw-r--r--src/H5Sselect.c2
-rw-r--r--src/H5T.c1
-rw-r--r--src/H5Tconv.c12
12 files changed, 64 insertions, 322 deletions
diff --git a/src/H5Dseq.c b/src/H5Dseq.c
index 9aa3a48..db1a8c2 100644
--- a/src/H5Dseq.c
+++ b/src/H5Dseq.c
@@ -83,7 +83,7 @@ H5F_seq_read(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
#ifdef H5_HAVE_PARALLEL
{
/* Get the transfer mode */
- H5F_xfer_t *dxpl;
+ H5D_xfer_t *dxpl;
H5FD_mpio_dxpl_t *dx;
if (H5P_DEFAULT!=dxpl_id && (dxpl=H5I_object(dxpl_id)) &&
@@ -312,7 +312,7 @@ H5F_seq_write(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
#ifdef H5_HAVE_PARALLEL
{
/* Get the transfer mode */
- H5F_xfer_t *dxpl;
+ H5D_xfer_t *dxpl;
H5FD_mpio_dxpl_t *dx;
if (H5P_DEFAULT!=dxpl_id && (dxpl=H5I_object(dxpl_id)) &&
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index fe9fd08..f48d881 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -698,7 +698,7 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t']) {
fprintf(stdout, "Entering H5FD_mpio_open(name=\"%s\", flags=0x%x, "
- "fapl_id=%lu, maxaddr=%lu)\n", name, flags, fapl_id, maxaddr);
+ "fapl_id=%d, maxaddr=%lu)\n", name, flags, (int)fapl_id, (unsigned long)maxaddr);
}
#endif
diff --git a/src/H5Farray.c b/src/H5Farray.c
index 798be54..aeb4c03 100644
--- a/src/H5Farray.c
+++ b/src/H5Farray.c
@@ -149,7 +149,7 @@ H5F_arr_read(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
H5FD_mpio_xfer_t xfer_mode=H5FD_MPIO_INDEPENDENT;
#endif
#ifdef COALESCE_READS
- H5F_xfer_t *xfer_parms; /*transfer property list*/
+ H5D_xfer_t *xfer_parms; /*transfer property list*/
#endif
FUNC_ENTER(H5F_arr_read, FAIL);
@@ -169,7 +169,7 @@ H5F_arr_read(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
#ifdef H5_HAVE_PARALLEL
{
/* Get the transfer mode */
- H5F_xfer_t *dxpl;
+ H5D_xfer_t *dxpl;
H5FD_mpio_dxpl_t *dx;
if (H5P_DEFAULT!=dxpl_id && (dxpl=H5I_object(dxpl_id)) &&
H5FD_MPIO==dxpl->driver_id && (dx=dxpl->driver_info) &&
@@ -281,7 +281,7 @@ H5F_arr_read(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
#ifdef COALESCE_READS
/* Get the dataset transfer property list */
if (H5P_DEFAULT == dxpl_id) {
- xfer_parms = &H5F_xfer_dflt;
+ xfer_parms = &H5D_xfer_dflt;
} else if (H5P_DATA_XFER != H5P_get_class (dxpl_id) ||
NULL == (xfer_parms = H5I_object (dxpl_id))) {
HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms");
@@ -385,7 +385,7 @@ printf("%s: feature_flags=%lx\n",FUNC,(unsigned long)f->shared->lf->feature_flag
*
* Robb Matzke, 1998-09-28
* Added `xfer' argument, removed `xfer_mode' argument since it
- * is a member of H5F_xfer_t.
+ * is a member of H5D_xfer_t.
*
* Robb Matzke, 1999-08-02
* Data transfer properties are passed by ID since that's how
@@ -434,7 +434,7 @@ H5F_arr_write(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
#ifdef H5_HAVE_PARALLEL
{
/* Get the transfer mode */
- H5F_xfer_t *dxpl;
+ H5D_xfer_t *dxpl;
H5FD_mpio_dxpl_t *dx;
if (H5P_DEFAULT!=dxpl_id && (dxpl=H5I_object(dxpl_id)) &&
H5FD_MPIO==dxpl->driver_id && (dx=dxpl->driver_info) &&
diff --git a/src/H5Fseq.c b/src/H5Fseq.c
index 9aa3a48..db1a8c2 100644
--- a/src/H5Fseq.c
+++ b/src/H5Fseq.c
@@ -83,7 +83,7 @@ H5F_seq_read(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
#ifdef H5_HAVE_PARALLEL
{
/* Get the transfer mode */
- H5F_xfer_t *dxpl;
+ H5D_xfer_t *dxpl;
H5FD_mpio_dxpl_t *dx;
if (H5P_DEFAULT!=dxpl_id && (dxpl=H5I_object(dxpl_id)) &&
@@ -312,7 +312,7 @@ H5F_seq_write(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
#ifdef H5_HAVE_PARALLEL
{
/* Get the transfer mode */
- H5F_xfer_t *dxpl;
+ H5D_xfer_t *dxpl;
H5FD_mpio_dxpl_t *dx;
if (H5P_DEFAULT!=dxpl_id && (dxpl=H5I_object(dxpl_id)) &&
diff --git a/src/H5R.c b/src/H5R.c
index ab7921a..b9240bd 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -454,7 +454,6 @@ H5R_dereference(H5F_t *file, H5R_type_t ref_type, void *_ref)
default:
HGOTO_ERROR(H5E_REFERENCE, H5E_BADTYPE, FAIL,
"can't identify type of object referenced");
- break;
} /* end switch */
done:
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 336536b..47badf8 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -95,7 +95,7 @@ static herr_t H5S_hyper_fscat (H5F_t *f, const struct H5O_layout_t *layout,
H5S_sel_iter_t *file_iter, size_t nelmts,
hid_t dxpl_id, const void *buf);
static size_t H5S_hyper_mread (intn dim, H5S_hyper_io_info_t *io_info);
-static herr_t H5S_hyper_mread_opt (const void *_buf, size_t elmt_size,
+static size_t H5S_hyper_mread_opt (const void *_buf, size_t elmt_size,
const H5S_t *mem_space, H5S_sel_iter_t *mem_iter,
size_t nelmts, void *_tconv_buf/*out*/);
static size_t H5S_hyper_mgath (const void *_buf, size_t elmt_size,
@@ -103,7 +103,7 @@ static size_t H5S_hyper_mgath (const void *_buf, size_t elmt_size,
H5S_sel_iter_t *mem_iter, size_t nelmts,
void *_tconv_buf/*out*/);
static size_t H5S_hyper_mwrite (intn dim, H5S_hyper_io_info_t *io_info);
-static herr_t H5S_hyper_mwrite_opt (const void *_tconv_buf, size_t elmt_size,
+static size_t H5S_hyper_mwrite_opt (const void *_tconv_buf, size_t elmt_size,
const H5S_t *mem_space, H5S_sel_iter_t *mem_iter,
size_t nelmts, void *_buf/*out*/);
static herr_t H5S_hyper_mscat (const void *_tconv_buf, size_t elmt_size,
@@ -946,11 +946,11 @@ H5S_hyper_fread_opt (H5F_t *f, const struct H5O_layout_t *layout,
intn fast_dim; /* Rank of the fastest changing dimension for the dataspace */
intn temp_dim; /* Temporary rank holder */
hsize_t acc; /* Accumulator */
- size_t buf_off; /* Buffer offset for copying memory */
+ hssize_t buf_off; /* Buffer offset for copying memory */
intn i; /* Counters */
intn ndims; /* Number of dimensions of dataset */
- uintn actual_read; /* The actual number of elements to read in */
- uintn actual_bytes; /* The actual number of bytes to copy */
+ size_t actual_read; /* The actual number of elements to read in */
+ size_t actual_bytes; /* The actual number of bytes to copy */
size_t num_read=0; /* Number of elements read */
FUNC_ENTER (H5S_hyper_fread_opt, 0);
@@ -981,7 +981,7 @@ for(i=0; i<file_space->extent.u.simple.rank; i++)
/* Check if we stopped in the middle of a sequence of elements */
if((file_iter->hyp.pos[fast_dim]-file_space->select.sel_info.hslab.diminfo[fast_dim].start)%file_space->select.sel_info.hslab.diminfo[fast_dim].stride!=0) {
- uintn leftover; /* The number of elements left over from the last sequence */
+ size_t leftover; /* The number of elements left over from the last sequence */
#ifdef QAK
printf("%s: Check 1.0\n",FUNC);
@@ -1466,11 +1466,11 @@ H5S_hyper_fwrite_opt (H5F_t *f, const struct H5O_layout_t *layout,
intn fast_dim; /* Rank of the fastest changing dimension for the dataspace */
intn temp_dim; /* Temporary rank holder */
hsize_t acc; /* Accumulator */
- size_t buf_off; /* Buffer offset for copying memory */
+ hssize_t buf_off; /* Buffer offset for copying memory */
intn i; /* Counters */
intn ndims; /* Number of dimensions of dataset */
- uintn actual_write; /* The actual number of elements to read in */
- uintn actual_bytes; /* The actual number of bytes to copy */
+ size_t actual_write; /* The actual number of elements to read in */
+ size_t actual_bytes; /* The actual number of bytes to copy */
size_t num_write=0; /* Number of elements read */
FUNC_ENTER (H5S_hyper_fwrite_opt, 0);
@@ -1501,7 +1501,7 @@ for(i=0; i<file_space->extent.u.simple.rank; i++)
/* Check if we stopped in the middle of a sequence of elements */
if((file_iter->hyp.pos[fast_dim]-file_space->select.sel_info.hslab.diminfo[fast_dim].start)%file_space->select.sel_info.hslab.diminfo[fast_dim].stride!=0) {
- uintn leftover; /* The number of elements left over from the last sequence */
+ size_t leftover; /* The number of elements left over from the last sequence */
#ifdef QAK
printf("%s: Check 1.0\n",FUNC);
@@ -1944,7 +1944,7 @@ H5S_hyper_mread (intn dim, H5S_hyper_io_info_t *io_info)
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static size_t
H5S_hyper_mread_opt (const void *_buf, size_t elmt_size,
const H5S_t *mem_space, H5S_sel_iter_t *mem_iter,
size_t nelmts, void *_tconv_buf/*out*/)
@@ -1962,8 +1962,8 @@ H5S_hyper_mread_opt (const void *_buf, size_t elmt_size,
size_t buf_off; /* Buffer offset for copying memory */
intn i; /* Counters */
intn ndims; /* Number of dimensions of dataset */
- uintn actual_read; /* The actual number of elements to read in */
- uintn actual_bytes; /* The actual number of bytes to copy */
+ size_t actual_read; /* The actual number of elements to read in */
+ size_t actual_bytes; /* The actual number of bytes to copy */
size_t num_read=0; /* Number of elements read */
FUNC_ENTER (H5S_hyper_mread_opt, 0);
@@ -2002,7 +2002,7 @@ for(i=0; i<ndims; i++)
/* Check if we stopped in the middle of a sequence of elements */
if((mem_iter->hyp.pos[fast_dim]-mem_space->select.sel_info.hslab.diminfo[fast_dim].start)%mem_space->select.sel_info.hslab.diminfo[fast_dim].stride!=0) {
- uintn leftover; /* The number of elements left over from the last sequence */
+ size_t leftover; /* The number of elements left over from the last sequence */
#ifdef QAK
printf("%s: Check 1.0\n",FUNC);
@@ -2419,259 +2419,6 @@ H5S_hyper_mwrite (intn dim, H5S_hyper_io_info_t *io_info)
FUNC_LEAVE (num_read);
} /* H5S_hyper_mwrite() */
-#ifdef WORKS_QAK
-
-/*-------------------------------------------------------------------------
- * Function: H5S_hyper_mwrite_opt
- *
- * Purpose: Performs an optimized scatter to a memory buffer, based on a
- * regular hyperslab (i.e. one which was generated from just one call to
- * H5Sselect_hyperslab).
- *
- * Return: Success: Number of elements copied.
- * Failure: 0
- *
- * Programmer: Quincey Koziol
- * Tuesday, September 12, 2000
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5S_hyper_mwrite_opt (const void *_tconv_buf, size_t elmt_size,
- const H5S_t *mem_space, H5S_sel_iter_t *mem_iter,
- size_t nelmts, void *_buf/*out*/)
-{
- hsize_t mem_size[H5O_LAYOUT_NDIMS]; /* Size of the source buffer */
- hsize_t hsize[H5O_LAYOUT_NDIMS]; /* Hyperslab size */
- hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero */
- hssize_t offset[H5O_LAYOUT_NDIMS]; /* Offset on disk */
- hsize_t tmp_count[H5O_LAYOUT_NDIMS]; /* Temporary block count */
- hsize_t tmp_block[H5O_LAYOUT_NDIMS]; /* Temporary block offset */
- const uint8_t *src=(const uint8_t *)_tconv_buf; /* Alias for pointer arithmetic */
- uint8_t *dst=(uint8_t *)_buf; /* Alias for pointer arithmetic */
- intn fast_dim; /* Rank of the fastest changing dimension for the dataspace */
- intn temp_dim; /* Temporary rank holder */
- intn i; /* Counters */
- intn ndims; /* Number of dimensions of dataset */
- uintn actual_write; /* The actual number of elements to read in */
- size_t num_write=0; /* Number of elements read */
-
- FUNC_ENTER (H5S_hyper_fwrite_opt, 0);
-
-#ifdef QAK
-printf("%s: Called!\n",FUNC);
-#endif /* QAK */
- /* Check if this is the first element read in from the hyperslab */
- if(mem_iter->hyp.pos[0]==(-1)) {
- for(i=0; i<mem_space->extent.u.simple.rank; i++)
- mem_iter->hyp.pos[i]=mem_space->select.sel_info.hslab.diminfo[i].start;
- } /* end if */
-
-#ifdef QAK
-for(i=0; i<mem_space->extent.u.simple.rank; i++)
- printf("%s: mem_file->hyp.pos[%d]=%d\n",FUNC,(int)i,(int)mem_iter->hyp.pos[i]);
-#endif /* QAK */
-
- /* Set the rank of the fastest changing dimension */
- fast_dim=mem_space->extent.u.simple.rank-1;
-
- /* Set up the hyperslab and 'zero' arrays */
- ndims=mem_space->extent.u.simple.rank;
- /* initialize hyperslab size and offset in memory buffer */
- for(i=0; i<(ndims+1); i++) {
- hsize[i]=1; /* hyperslab size is 1, except for last element */
- zero[i]=0; /* memory offset is 0 */
- } /* end for */
- hsize[ndims] = elmt_size;
-
- /* Set up the size of the memory space */
- HDmemcpy(mem_size, mem_space->extent.u.simple.size,mem_space->extent.u.simple.rank*sizeof(hsize_t));
- mem_size[mem_space->extent.u.simple.rank]=elmt_size;
-
- /* Check if we stopped in the middle of a sequence of elements */
- if((mem_iter->hyp.pos[fast_dim]-mem_space->select.sel_info.hslab.diminfo[fast_dim].start)%mem_space->select.sel_info.hslab.diminfo[fast_dim].stride!=0) {
- uintn leftover; /* The number of elements left over from the last sequence */
-
-#ifdef QAK
-printf("%s: Check 1.0\n",FUNC);
-#endif /* QAK */
- /* Calculate the number of elements left in the sequence */
- leftover=mem_space->select.sel_info.hslab.diminfo[fast_dim].block-((mem_iter->hyp.pos[fast_dim]-mem_space->select.sel_info.hslab.diminfo[fast_dim].start)%mem_space->select.sel_info.hslab.diminfo[fast_dim].stride);
-
- /* Make certain that we don't write too many */
- actual_write=MIN(leftover,nelmts);
-
- /* Set the hyperslab size in the fastest changing dimension to write in */
- hsize[fast_dim]=actual_write;
-
- /* Copy the location of the point to get */
- HDmemcpy(offset, mem_iter->hyp.pos,ndims*sizeof(hssize_t));
- offset[ndims] = 0;
-
- /* Add in the selection offset */
- for(i=0; i<ndims; i++)
- offset[i] += mem_space->select.offset[i];
-
- /* Scatter out the rest of the sequence, if possible */
- if (H5V_hyper_copy (ndims+1, hsize,
- mem_size, offset, dst,
- hsize, zero, src)<0) {
- HRETURN_ERROR (H5E_DATASPACE, H5E_READERROR, 0, "unable to gather data from memory");
- }
-
- /* Increment the offset of the buffer */
- src+=elmt_size*actual_write;
-
- /* Increment the count write */
- num_write+=actual_write;
-
- /* Decrement the number of elements left in selection */
- mem_iter->hyp.elmt_left-=actual_write;
-
- /* Advance the point iterator */
- /* If we had enough buffer space to write out the rest of the sequence
- * in the fastest changing dimension, move the iterator offset to
- * the beginning of the next block to write. Otherwise, just advance
- * the iterator in the fastest changing dimension.
- */
- if(actual_write==leftover) {
- /* Move iterator offset to beginning of next sequence in the fastest changing dimension */
- H5S_hyper_iter_next(mem_space,mem_iter);
- } /* end if */
- else {
- mem_iter->hyp.pos[fast_dim]+=actual_write; /* whole sequence not written out, just advance fastest dimension offset */
- } /* end if */
- } /* end if */
-
- /* Now that we've cleared the "remainder" of the previous fastest dimension
- * sequence, we must be at the beginning of a sequence, so use the fancy
- * algorithm to compute the offsets and run through as many as possible,
- * until the buffer fills up.
- */
- if(num_write<nelmts) { /* Just in case the "remainder" above filled the buffer */
-#ifdef QAK
-printf("%s: Check 2.0\n",FUNC);
-#endif /* QAK */
- /* Compute the arrays to perform I/O on */
- /* Copy the location of the point to get */
- HDmemcpy(offset, mem_iter->hyp.pos,ndims*sizeof(hssize_t));
- offset[ndims] = 0;
-
- /* Add in the selection offset */
- for(i=0; i<ndims; i++)
- offset[i] += mem_space->select.offset[i];
-
- /* Compute the current "counts" for this location */
- for(i=0; i<ndims; i++) {
- tmp_count[i] = (mem_iter->hyp.pos[i]-mem_space->select.sel_info.hslab.diminfo[i].start)%mem_space->select.sel_info.hslab.diminfo[i].stride;
- tmp_block[i] = (mem_iter->hyp.pos[i]-mem_space->select.sel_info.hslab.diminfo[i].start)/mem_space->select.sel_info.hslab.diminfo[i].stride;
- } /* end for */
-
- /* Set the number of elements to write each time */
- actual_write=mem_space->select.sel_info.hslab.diminfo[fast_dim].block;
- hsize[fast_dim]=actual_write;
-#ifdef QAK
-printf("%s: actual_write=%d\n",FUNC,(int)actual_write);
-for(i=0; i<file_space->extent.u.simple.rank; i++)
- printf("%s: diminfo: start[%d]=%d, stride[%d]=%d, block[%d]=%d, count[%d]=%d\n",FUNC,
- (int)i,(int)mem_space->select.sel_info.hslab.diminfo[i].start,
- (int)i,(int)mem_space->select.sel_info.hslab.diminfo[i].stride,
- (int)i,(int)mem_space->select.sel_info.hslab.diminfo[i].block,
- (int)i,(int)mem_space->select.sel_info.hslab.diminfo[i].count);
-#endif /* QAK */
-
- /* Read in data until an entire sequence can't be written out any longer */
- while(num_write<nelmts) {
- /* Check if we are running out of room in the buffer */
- if((actual_write+num_write)>nelmts) {
- actual_write=nelmts-num_write;
- hsize[fast_dim]=actual_write;
- } /* end if */
-
-#ifdef QAK
-printf("%s: num_write=%d\n",FUNC,(int)num_write);
-for(i=0; i<mem_space->extent.u.simple.rank; i++)
- printf("%s: tmp_count[%d]=%d, offset[%d]=%d\n",FUNC,(int)i,(int)tmp_count[i],(int)i,(int)offset[i]);
-#endif /* QAK */
-
- /* Scatter out the rest of the sequence, if possible */
- if (H5V_hyper_copy (ndims+1, hsize,
- mem_size, offset, dst,
- hsize, zero, src)<0) {
- HRETURN_ERROR (H5E_DATASPACE, H5E_READERROR, 0, "unable to gather data from memory");
- }
-
- /* Increment the offset of the buffer */
- src+=elmt_size*actual_write;
-
- /* Increment the count write */
- num_write+=actual_write;
-
- /* Decrement the number of elements left in selection */
- mem_iter->hyp.elmt_left-=actual_write;
-
- /* Increment the offset and count */
- temp_dim=fast_dim;
- while(temp_dim>=0) {
- if(temp_dim==fast_dim) {
- /* Move to the next block in the current dimension */
- /* Check for partial block write! */
- if(actual_write<mem_space->select.sel_info.hslab.diminfo[fast_dim].block) {
- offset[temp_dim]+=actual_write;
- break;
- } /* end if */
- else {
- offset[temp_dim]+=mem_space->select.sel_info.hslab.diminfo[temp_dim].stride; /* reset the offset in the fastest dimension */
- tmp_count[temp_dim]++;
- } /* end else */
-
- /* If this block is still in the range of blocks to output for the dimension, break out of loop */
- if(tmp_count[temp_dim]<mem_space->select.sel_info.hslab.diminfo[temp_dim].count)
- break;
- else {
- tmp_count[temp_dim]=0; /* reset back to the beginning of the line */
- offset[temp_dim]=mem_space->select.sel_info.hslab.diminfo[temp_dim].start+mem_space->select.offset[temp_dim];
- } /* end else */
- } /* end if */
- else {
- /* Move to the next row in the curent dimension */
- offset[temp_dim]++;
- tmp_block[temp_dim]++;
-
- /* If this block is still in the range of blocks to output for the dimension, break out of loop */
- if(tmp_block[temp_dim]<mem_space->select.sel_info.hslab.diminfo[temp_dim].block)
- break;
- else {
- /* Move to the next block in the current dimension */
- offset[temp_dim]+=(mem_space->select.sel_info.hslab.diminfo[temp_dim].stride-mem_space->select.sel_info.hslab.diminfo[temp_dim].block);
- tmp_block[temp_dim]=0;
- tmp_count[temp_dim]++;
-
- /* If this block is still in the range of blocks to output for the dimension, break out of loop */
- if(tmp_count[temp_dim]<mem_space->select.sel_info.hslab.diminfo[temp_dim].count)
- break;
- else {
- tmp_count[temp_dim]=0; /* reset back to the beginning of the line */
- tmp_block[temp_dim]=0;
- offset[temp_dim]=mem_space->select.sel_info.hslab.diminfo[temp_dim].start+mem_space->select.offset[temp_dim];
- }
- } /* end else */
- } /* end else */
-
- /* Decrement dimension count */
- temp_dim--;
- } /* end while */
- } /* end while */
-
- /* Update the iterator with the location we stopped */
- HDmemcpy(mem_iter->hyp.pos, offset, ndims*sizeof(hssize_t));
- } /* end if */
-
- FUNC_LEAVE (num_write);
-} /* end H5S_hyper_mwrite_opt() */
-#else /* WORKS_QAK */
/*-------------------------------------------------------------------------
* Function: H5S_hyper_mwrite_opt
@@ -2690,7 +2437,7 @@ for(i=0; i<mem_space->extent.u.simple.rank; i++)
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static size_t
H5S_hyper_mwrite_opt (const void *_tconv_buf, size_t elmt_size,
const H5S_t *mem_space, H5S_sel_iter_t *mem_iter,
size_t nelmts, void *_buf/*out*/)
@@ -2708,8 +2455,8 @@ H5S_hyper_mwrite_opt (const void *_tconv_buf, size_t elmt_size,
size_t buf_off; /* Buffer offset for copying memory */
intn i; /* Counters */
intn ndims; /* Number of dimensions of dataset */
- uintn actual_write; /* The actual number of elements to read in */
- uintn actual_bytes; /* The actual number of bytes to copy */
+ size_t actual_write; /* The actual number of elements to read in */
+ size_t actual_bytes; /* The actual number of bytes to copy */
size_t num_write=0; /* Number of elements read */
FUNC_ENTER (H5S_hyper_fwrite_opt, 0);
@@ -2947,7 +2694,6 @@ printf("%s: buf_off=%u, actual_bytes=%u\n",FUNC,(unsigned)buf_off,(int)actual_by
FUNC_LEAVE (num_write);
} /* end H5S_hyper_mwrite_opt() */
-#endif /* WORKS_QAK */
/*-------------------------------------------------------------------------
@@ -4298,7 +4044,7 @@ H5S_hyper_select_serialize (const H5S_t *space, uint8_t *buf)
H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */
hsize_t tmp_count[H5O_LAYOUT_NDIMS]; /* Temporary hyperslab counts */
hssize_t offset[H5O_LAYOUT_NDIMS]; /* Offset of element in dataspace */
- size_t temp_off; /* Offset in a given dimension */
+ hssize_t temp_off; /* Offset in a given dimension */
H5S_hyper_node_t *curr; /* Hyperslab information nodes */
uint8_t *lenp; /* pointer to length location for later storage */
uint32_t len=0; /* number of bytes used */
@@ -4988,7 +4734,6 @@ for(i=0; i<space->extent.u.simple.rank; i++)
case H5S_SEL_ALL:
/* break out now, 'or'ing with an all selection leaves the all selection */
HGOTO_DONE(SUCCEED);
- break;
case H5S_SEL_HYPERSLABS:
/* Is this the first 'or' operation? */
@@ -5273,7 +5018,7 @@ H5S_hyper_select_iterate_mem_opt(H5S_sel_iter_t UNUSED *iter, void *buf, hid_t t
hssize_t offset[H5O_LAYOUT_NDIMS]; /* Offset of element in dataspace */
hsize_t slab[H5O_LAYOUT_NDIMS]; /* Size of objects in buffer */
size_t elem_size; /* Size of data element in buffer */
- size_t temp_off; /* Offset in a given dimension */
+ hssize_t temp_off; /* Offset in a given dimension */
uint8_t *loc; /* Current element location */
intn i; /* Counter */
intn fast_dim; /* Rank of the fastest changing dimension for the dataspace */
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index afc6640..150f918 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -10,11 +10,12 @@
* I didn't make them portable.
*/
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5S_PACKAGE /*suppress error about including H5Spkg */
#include <H5private.h>
#include <H5Eprivate.h>
-#include <H5FDprivate.h>
+#include <H5Fpkg.h> /* Ugly, but necessary for the MPIO I/O accesses */
#include <H5Spkg.h>
#include <H5FDmpio.h> /*the MPIO file driver */
diff --git a/src/H5Spkg.h b/src/H5Spkg.h
index a517378..9fadfb5 100644
--- a/src/H5Spkg.h
+++ b/src/H5Spkg.h
@@ -204,31 +204,4 @@ __DLL__ herr_t H5S_none_select_deserialize(H5S_t *space, const uint8_t *buf);
__DLL__ herr_t H5S_none_select_iterate(void *buf, hid_t type_id, H5S_t *space,
H5D_operator_t op, void *operator_data);
-#ifdef H5_HAVE_PARALLEL
-/* MPI-IO function to read directly from app buffer to file rky980813 */
-__DLL__ herr_t H5S_mpio_spaces_read(H5F_t *f,
- const struct H5O_layout_t *layout,
- const struct H5O_pline_t *pline,
- const struct H5O_efl_t *efl,
- size_t elmt_size, const H5S_t *file_space,
- const H5S_t *mem_space, hid_t dxpl_id,
- void *buf/*out*/,
- hbool_t *must_convert /*out*/ );
-
-/* MPI-IO function to write directly from app buffer to file rky980813 */
-__DLL__ herr_t H5S_mpio_spaces_write(H5F_t *f,
- const struct H5O_layout_t *layout,
- const struct H5O_pline_t *pline,
- const struct H5O_efl_t *efl,
- size_t elmt_size, const H5S_t *file_space,
- const H5S_t *mem_space, hid_t dxpl_id,
- const void *buf,
- hbool_t *must_convert /*out*/ );
-#ifndef _H5S_IN_H5S_C
-/* Global var whose value comes from environment variable */
-__DLLVAR__ hbool_t H5_mpi_opt_types_g;
-#endif /* _H5S_IN_H5S_C */
-
-#endif /* H5_HAVE_PARALLEL */
-
#endif
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index 4ae3510..3290a2b 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -236,4 +236,31 @@ __DLL__ herr_t H5S_select_iterate(void *buf, hid_t type_id, H5S_t *space,
__DLL__ herr_t H5S_sel_iter_release(const H5S_t *space,
H5S_sel_iter_t *sel_iter);
+#ifdef H5_HAVE_PARALLEL
+/* MPI-IO function to read directly from app buffer to file rky980813 */
+__DLL__ herr_t H5S_mpio_spaces_read(H5F_t *f,
+ const struct H5O_layout_t *layout,
+ const struct H5O_pline_t *pline,
+ const struct H5O_efl_t *efl,
+ size_t elmt_size, const H5S_t *file_space,
+ const H5S_t *mem_space, hid_t dxpl_id,
+ void *buf/*out*/,
+ hbool_t *must_convert /*out*/ );
+
+/* MPI-IO function to write directly from app buffer to file rky980813 */
+__DLL__ herr_t H5S_mpio_spaces_write(H5F_t *f,
+ const struct H5O_layout_t *layout,
+ const struct H5O_pline_t *pline,
+ const struct H5O_efl_t *efl,
+ size_t elmt_size, const H5S_t *file_space,
+ const H5S_t *mem_space, hid_t dxpl_id,
+ const void *buf,
+ hbool_t *must_convert /*out*/ );
+#ifndef _H5S_IN_H5S_C
+/* Global var whose value comes from environment variable */
+__DLLVAR__ hbool_t H5_mpi_opt_types_g;
+#endif /* _H5S_IN_H5S_C */
+
+#endif /* H5_HAVE_PARALLEL */
+
#endif /* _H5Sprivate_H */
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 641acaa..c2b2fd2 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -763,7 +763,7 @@ H5S_get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numbloc
H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */
hsize_t tmp_count[H5O_LAYOUT_NDIMS]; /* Temporary hyperslab counts */
hssize_t offset[H5O_LAYOUT_NDIMS]; /* Offset of element in dataspace */
- size_t temp_off; /* Offset in a given dimension */
+ hssize_t temp_off; /* Offset in a given dimension */
H5S_hyper_node_t *node; /* Hyperslab node */
intn rank; /* Dataspace rank */
intn i; /* Counter */
diff --git a/src/H5T.c b/src/H5T.c
index 1139fd1..94cca1e 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -4631,7 +4631,6 @@ H5T_create(H5T_class_t type, size_t size)
case H5T_VLEN: /* Variable length datatype */
HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, NULL,
"base type required - use H5Tvlen_create()");
- break;
default:
HRETURN_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, NULL,
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index ffbcd86..66fa3e2 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -975,7 +975,7 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
size_t offset; /*byte offset wrt struct */
- size_t src_delta, dst_delta; /*source & destination stride */
+ size_t src_delta; /*source stride */
uintn elmtno;
intn i; /*counters */
H5T_conv_struct_t *priv = (H5T_conv_struct_t *)(cdata->priv);
@@ -1047,16 +1047,14 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
*/
if (buf_stride) {
src_delta = buf_stride;
- dst_delta = buf_stride;
- if (!bkg_stride) bkg_stride = dst->size;
+ if (!bkg_stride)
+ bkg_stride = dst->size;
} else if (dst->size <= src->size) {
src_delta = src->size;
- dst_delta = dst->size;
- bkg_stride = dst->size;
+ bkg_stride = dst->size;
} else {
src_delta = -(src->size);
- dst_delta = -(dst->size);
- bkg_stride = -(dst->size);
+ bkg_stride = -(dst->size);
xbuf += (nelmts-1) * src->size;
xbkg += (nelmts-1) * dst->size;
}