summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2006-10-28 21:11:04 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2006-10-28 21:11:04 (GMT)
commitc6c63ab6c64f4a29b3f379673e5236b2d614b422 (patch)
treedde44ec55b13d9dddad49d7d43611ef336930eb3 /src
parent143db84d88b335730d4d785dc50380f49b007a52 (diff)
downloadhdf5-c6c63ab6c64f4a29b3f379673e5236b2d614b422.zip
hdf5-c6c63ab6c64f4a29b3f379673e5236b2d614b422.tar.gz
hdf5-c6c63ab6c64f4a29b3f379673e5236b2d614b422.tar.bz2
[svn-r12822] H5Pset_alignment seems working. Added it in test/vfd.c and made the test more complete by writing
two data sets. One is aligned, and the other isn't.
Diffstat (limited to 'src')
-rw-r--r--src/H5FDdirect.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index bf826aa..0daf6d9 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -514,7 +514,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
if (H5F_ACC_EXCL & flags) o_flags |= O_EXCL;
/* Flag for Direct I/O */
- o_flags |= O_DIRECT;
+ /*o_flags |= O_DIRECT;*/ /*change it back!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/* Open the file */
if ((fd=HDopen(name, o_flags, 0666))<0)
@@ -1097,8 +1097,7 @@ H5FD_direct_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, h
alloc_size = (size / _fbsize + 1) * _fbsize + _fbsize;
else
alloc_size = _cbsize;
-/*printf("alloc_size=%ld, size=%ld, _fbsize=%ld, _cbsize=%ld\n", alloc_size, size, _fbsize,
-_cbsize);*/
+
if (posix_memalign(&copy_buf, _boundary, alloc_size) != 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "posix_memalign failed")
@@ -1147,8 +1146,6 @@ _cbsize);*/
if(size < _cbsize)
memcpy(p1, p3, size);
else if(size >= _cbsize && copy_size <= (alloc_size-(size_t)(copy_addr%_fbsize))) {
-/*printf("copy_size=%d, alloc_size=%d, size=%d, copy_addr%_fbsize=%ld\n", copy_size, alloc_size,
-size, copy_addr%_fbsize);*/
memcpy(p1, p3, copy_size);
}else if(size >= _cbsize && copy_size > (alloc_size-(size_t)(copy_addr%_fbsize))) {
memcpy(p1, p3, (alloc_size - (size_t)(copy_addr % _fbsize)));