summaryrefslogtreecommitdiffstats
path: root/src/H5HFiblock.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-07-01 21:01:14 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-07-01 21:01:14 (GMT)
commit8e14272cdb356c619fa286e0420dbc14a36c2eda (patch)
tree3fb5c909d3358895e65d8a500f5510f469cf5415 /src/H5HFiblock.c
parente70b32f7b5f1f93798b7746d30cca24a9276ddfd (diff)
downloadhdf5-8e14272cdb356c619fa286e0420dbc14a36c2eda.zip
hdf5-8e14272cdb356c619fa286e0420dbc14a36c2eda.tar.gz
hdf5-8e14272cdb356c619fa286e0420dbc14a36c2eda.tar.bz2
[svn-r17138] Description:
Disable use of temporary file space allocation when using a parallel VFD, until we've made changes to broadcast the new address of the metadata when it is relocated down into 'normal' file space. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.8 (amazon) in debug mode Mac OS X/32 10.5.8 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5HFiblock.c')
-rw-r--r--src/H5HFiblock.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index 3383ef9..c0fa1e4 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -600,8 +600,14 @@ HDfprintf(stderr, "%s: new_next_entry = %u\n", FUNC, new_next_entry);
iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock);
/* Allocate [temporary] space for the new indirect block on disk */
- if(HADDR_UNDEF == (new_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size)))
- HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
+ if(H5F_USE_TMP_SPACE(hdr->f)) {
+ if(HADDR_UNDEF == (new_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size)))
+ HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
+ } /* end if */
+ else {
+ if(HADDR_UNDEF == (new_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size)))
+ HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
+ } /* end else */
#ifdef QAK
HDfprintf(stderr, "%s: Check 1.0 - iblock->addr = %a, new_addr = %a\n", FUNC, iblock->addr, new_addr);
#endif /* QAK */
@@ -771,8 +777,14 @@ HDfprintf(stderr, "%s: iblock->nrows = %u\n", FUNC, iblock->nrows);
iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock);
/* Allocate [temporary] space for the new indirect block on disk */
- if(HADDR_UNDEF == (new_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size)))
- HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
+ if(H5F_USE_TMP_SPACE(hdr->f)) {
+ if(HADDR_UNDEF == (new_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size)))
+ HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
+ } /* end if */
+ else {
+ if(HADDR_UNDEF == (new_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size)))
+ HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
+ } /* end else */
#ifdef QAK
HDfprintf(stderr, "%s: new_addr = %a\n", FUNC, new_addr);
#endif /* QAK */
@@ -1087,8 +1099,14 @@ HDfprintf(stderr, "%s: dir_rows = %u\n", FUNC, dir_rows);
iblock->child_iblocks = NULL;
/* Allocate [temporary] space for the indirect block on disk */
- if(HADDR_UNDEF == (*addr_p = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
+ if(H5F_USE_TMP_SPACE(hdr->f)) {
+ if(HADDR_UNDEF == (*addr_p = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
+ } /* end if */
+ else {
+ if(HADDR_UNDEF == (*addr_p = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
+ } /* end else */
iblock->addr = *addr_p;
/* Attach to parent indirect block, if there is one */