2003-04-01 01:59:04 +08:00
|
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
2007-02-07 22:56:24 +08:00
|
|
|
|
* Copyright by The HDF Group. *
|
2003-04-01 01:59:04 +08:00
|
|
|
|
* Copyright by the Board of Trustees of the University of Illinois. *
|
|
|
|
|
* All rights reserved. *
|
|
|
|
|
* *
|
|
|
|
|
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
|
|
|
|
* terms governing use, modification, and redistribution, is contained in *
|
|
|
|
|
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
|
|
|
|
* of the source code distribution tree; Copyright.html can be found at the *
|
|
|
|
|
* root level of an installed copy of the electronic HDF5 document set and *
|
|
|
|
|
* is linked from the top-level documents page. It can also be found at *
|
2007-02-07 22:56:24 +08:00
|
|
|
|
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
|
|
|
|
* access to either file, you may request a copy from help@hdfgroup.org. *
|
2003-04-01 01:59:04 +08:00
|
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
|
1998-11-25 22:58:22 +08:00
|
|
|
|
/*
|
|
|
|
|
* Programmer: Robb Matzke <matzke@llnl.gov>
|
|
|
|
|
* Tuesday, November 24, 1998
|
|
|
|
|
*
|
|
|
|
|
* Purpose: Test local heaps used by symbol tables (groups).
|
|
|
|
|
*/
|
2001-04-04 02:09:16 +08:00
|
|
|
|
#include "h5test.h"
|
2010-07-17 00:32:49 +08:00
|
|
|
|
#include "H5srcdir.h"
|
2005-07-03 00:36:15 +08:00
|
|
|
|
#include "H5ACprivate.h"
|
2001-04-04 02:09:16 +08:00
|
|
|
|
#include "H5HLprivate.h"
|
|
|
|
|
#include "H5Iprivate.h"
|
1998-11-25 22:58:22 +08:00
|
|
|
|
|
|
|
|
|
const char *FILENAME[] = {
|
|
|
|
|
"lheap",
|
|
|
|
|
NULL
|
|
|
|
|
};
|
|
|
|
|
|
2010-07-17 00:32:49 +08:00
|
|
|
|
#define TESTFILE "tsizeslheap.h5"
|
|
|
|
|
|
1998-11-25 22:58:22 +08:00
|
|
|
|
#define NOBJS 40
|
|
|
|
|
|
2004-07-17 04:48:40 +08:00
|
|
|
|
|
1998-11-25 22:58:22 +08:00
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
* Function: main
|
|
|
|
|
*
|
|
|
|
|
* Purpose: Create a file, create a local heap, write data into the local
|
|
|
|
|
* heap, close the file, open the file, read data out of the
|
|
|
|
|
* local heap, close the file.
|
|
|
|
|
*
|
|
|
|
|
* Return: Success: zero
|
|
|
|
|
*
|
|
|
|
|
* Failure: non-zero
|
|
|
|
|
*
|
|
|
|
|
* Programmer: Robb Matzke
|
|
|
|
|
* Tuesday, November 24, 1998
|
|
|
|
|
*
|
|
|
|
|
* Modifications:
|
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
int
|
|
|
|
|
main(void)
|
|
|
|
|
{
|
2001-10-25 02:02:27 +08:00
|
|
|
|
hid_t fapl=H5P_DEFAULT; /*file access properties */
|
1998-11-25 22:58:22 +08:00
|
|
|
|
hid_t file=-1; /*hdf5 file */
|
|
|
|
|
H5F_t *f=NULL; /*hdf5 file pointer */
|
|
|
|
|
char filename[1024]; /*file name */
|
|
|
|
|
haddr_t heap_addr; /*local heap address */
|
2007-05-11 04:35:35 +08:00
|
|
|
|
H5HL_t *heap = NULL; /*local heap */
|
1998-11-25 22:58:22 +08:00
|
|
|
|
size_t obj[NOBJS]; /*offsets within the heap */
|
|
|
|
|
int i, j; /*miscellaneous counters */
|
|
|
|
|
char buf[1024]; /*the value to store */
|
|
|
|
|
const char *s; /*value to read */
|
|
|
|
|
|
|
|
|
|
/* Reset library */
|
|
|
|
|
h5_reset();
|
|
|
|
|
fapl = h5_fileaccess();
|
|
|
|
|
|
[svn-r11008] Purpose:
Feature: tests now use parallel make and only run once
Description:
When make is invoked in parallel (using the -j option), several tests will
now be run simultaneously. This should speed up testing on a number of
systems.
When a test passes, it creates a foo.chkexe or foo.chksh file, which prevents
the test from running again unless the test or library changes.
Solution:
Most of the changes live in config/conclude.am. Added *.chkexe and *.chksh
files to the list of files to be cleaned at "make mostlyclean" time.
Parallel tests still run one at a time, but use the same make instructions
as serial tests.
Platforms tested:
mir, eirene, sleipnir, pommier, copper, modi4 (some errors occurred, probably
due to the test being run before updating hdf5. Will re-run tests after
checkin.)
2005-07-01 07:35:32 +08:00
|
|
|
|
|
1998-11-25 22:58:22 +08:00
|
|
|
|
/*
|
|
|
|
|
* Test writing to the heap...
|
|
|
|
|
*/
|
|
|
|
|
TESTING("local heap write");
|
|
|
|
|
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
|
|
|
|
|
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
|
|
|
|
|
goto error;
|
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling branch.
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/default API=1.8.x,
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.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-17 23:07:35 +08:00
|
|
|
|
if(NULL == (f = (H5F_t *)H5I_object(file))) {
|
2001-01-26 01:03:29 +08:00
|
|
|
|
H5_FAILED();
|
2007-04-12 09:59:45 +08:00
|
|
|
|
H5Eprint2(H5E_DEFAULT, stdout);
|
1998-11-25 22:58:22 +08:00
|
|
|
|
goto error;
|
|
|
|
|
}
|
2010-06-16 04:00:22 +08:00
|
|
|
|
if (H5AC_ignore_tags(f) < 0) {
|
|
|
|
|
H5_FAILED();
|
|
|
|
|
H5Eprint2(H5E_DEFAULT, stdout);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
2006-10-31 08:13:27 +08:00
|
|
|
|
if(H5HL_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)0, &heap_addr/*out*/) < 0) {
|
2001-01-26 01:03:29 +08:00
|
|
|
|
H5_FAILED();
|
2007-04-12 09:59:45 +08:00
|
|
|
|
H5Eprint2(H5E_DEFAULT, stdout);
|
1998-11-25 22:58:22 +08:00
|
|
|
|
goto error;
|
|
|
|
|
}
|
2015-06-18 08:58:49 +08:00
|
|
|
|
if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr, H5AC__NO_FLAGS_SET))) {
|
2007-05-11 04:35:35 +08:00
|
|
|
|
H5_FAILED();
|
|
|
|
|
H5Eprint2(H5E_DEFAULT, stdout);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
2006-10-31 08:13:27 +08:00
|
|
|
|
for(i = 0; i < NOBJS; i++) {
|
1998-11-25 22:58:22 +08:00
|
|
|
|
sprintf(buf, "%03d-", i);
|
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling branch.
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/default API=1.8.x,
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.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-17 23:07:35 +08:00
|
|
|
|
for(j = 4; j < i; j++)
|
|
|
|
|
buf[j] = '0' + j % 10;
|
|
|
|
|
if(j > 4)
|
|
|
|
|
buf[j] = '\0';
|
1998-11-25 22:58:22 +08:00
|
|
|
|
|
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling branch.
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/default API=1.8.x,
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.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-17 23:07:35 +08:00
|
|
|
|
if((size_t)(-1) == (obj[i] = H5HL_insert(f, H5P_DATASET_XFER_DEFAULT, heap, strlen(buf) + 1, buf))) {
|
2001-01-26 01:03:29 +08:00
|
|
|
|
H5_FAILED();
|
2007-04-12 09:59:45 +08:00
|
|
|
|
H5Eprint2(H5E_DEFAULT, stdout);
|
1998-11-25 22:58:22 +08:00
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
}
|
[svn-r18171] Description:
Bring r18169 from 'merge_metadata_journaling' branch back to trunk:
Converge changes on metadata_journaling branch and trunk:
- Remove H5F_t* parameter from H5HL_unprotect()
- Remove H5F_t* parameter from H5HL_dirty()
- Remove H5F_t* parameter from H5O_unprotect()
- Bring changes to metadata caching routines back:
- H5AC_pin_protected_entry()
- H5AC_resize_pinned_entry()
- H5AC_unpin_entry()
- H5AC_mark_pinned_entry_dirty()
- H5AC_mark_pinned_or_protected_entry_dirty()
- Revise internal H5C routines to drop H5F_t* and/or H5C_t* as
parameter where possible
- Revise tests to follow internal routine changes
Also, drop file/cache pointer parameter from create/destroy flush
dependency internal cache calls.
Also, other minor changes to speedup the 'cache' test.
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/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) 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.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
2010-01-27 23:07:42 +08:00
|
|
|
|
if(H5HL_unprotect(heap) < 0) {
|
2007-05-11 04:35:35 +08:00
|
|
|
|
H5_FAILED();
|
|
|
|
|
H5Eprint2(H5E_DEFAULT, stdout);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
1998-11-25 22:58:22 +08:00
|
|
|
|
if (H5Fclose(file)<0) goto error;
|
|
|
|
|
PASSED();
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Test reading from the heap...
|
|
|
|
|
*/
|
2001-10-25 02:02:27 +08:00
|
|
|
|
|
2007-06-16 03:11:59 +08:00
|
|
|
|
TESTING("local heap read");
|
|
|
|
|
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
|
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling branch.
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/default API=1.8.x,
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.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-17 23:07:35 +08:00
|
|
|
|
if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) goto error;
|
|
|
|
|
if(NULL == (f = (H5F_t *)H5I_object(file))) {
|
2007-06-16 03:11:59 +08:00
|
|
|
|
H5_FAILED();
|
|
|
|
|
H5Eprint2(H5E_DEFAULT, stdout);
|
|
|
|
|
goto error;
|
2006-08-01 03:46:16 +08:00
|
|
|
|
}
|
2010-06-16 04:00:22 +08:00
|
|
|
|
if (H5AC_ignore_tags(f) < 0) {
|
|
|
|
|
H5_FAILED();
|
|
|
|
|
H5Eprint2(H5E_DEFAULT, stdout);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling branch.
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/default API=1.8.x,
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.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-17 23:07:35 +08:00
|
|
|
|
for(i = 0; i < NOBJS; i++) {
|
2007-06-16 03:11:59 +08:00
|
|
|
|
sprintf(buf, "%03d-", i);
|
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling branch.
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/default API=1.8.x,
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.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-17 23:07:35 +08:00
|
|
|
|
for(j = 4; j < i; j++)
|
|
|
|
|
buf[j] = '0' + j % 10;
|
|
|
|
|
if(j > 4)
|
|
|
|
|
buf[j] = '\0';
|
2007-06-16 03:11:59 +08:00
|
|
|
|
|
2015-06-18 08:58:49 +08:00
|
|
|
|
if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr, H5AC__READ_ONLY_FLAG))) {
|
2007-06-16 03:11:59 +08:00
|
|
|
|
H5_FAILED();
|
|
|
|
|
H5Eprint2(H5E_DEFAULT, stdout);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
[svn-r18072] Description:
Bring r18071 from metadata journaling merge branch:
Refactor local heap routines with changes from metadata journaling
branch, along with other misc. changes as the changes on the metadata journaling
branch are being converged with the current state of the trunk.
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/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) 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.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-01-08 06:45:21 +08:00
|
|
|
|
if (NULL == (s = (const char *)H5HL_offset_into(heap, obj[i]))) {
|
2007-06-16 03:11:59 +08:00
|
|
|
|
H5_FAILED();
|
|
|
|
|
H5Eprint2(H5E_DEFAULT, stdout);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (strcmp(s, buf)) {
|
|
|
|
|
H5_FAILED();
|
|
|
|
|
printf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i]));
|
|
|
|
|
printf(" got: \"%s\"\n", s);
|
|
|
|
|
printf(" ans: \"%s\"\n", buf);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
[svn-r18171] Description:
Bring r18169 from 'merge_metadata_journaling' branch back to trunk:
Converge changes on metadata_journaling branch and trunk:
- Remove H5F_t* parameter from H5HL_unprotect()
- Remove H5F_t* parameter from H5HL_dirty()
- Remove H5F_t* parameter from H5O_unprotect()
- Bring changes to metadata caching routines back:
- H5AC_pin_protected_entry()
- H5AC_resize_pinned_entry()
- H5AC_unpin_entry()
- H5AC_mark_pinned_entry_dirty()
- H5AC_mark_pinned_or_protected_entry_dirty()
- Revise internal H5C routines to drop H5F_t* and/or H5C_t* as
parameter where possible
- Revise tests to follow internal routine changes
Also, drop file/cache pointer parameter from create/destroy flush
dependency internal cache calls.
Also, other minor changes to speedup the 'cache' test.
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/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) 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.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
2010-01-27 23:07:42 +08:00
|
|
|
|
if(H5HL_unprotect(heap) < 0) {
|
2007-06-16 03:11:59 +08:00
|
|
|
|
H5_FAILED();
|
|
|
|
|
H5Eprint2(H5E_DEFAULT, stdout);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
1998-11-25 22:58:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
2007-06-16 03:11:59 +08:00
|
|
|
|
if (H5Fclose(file)<0) goto error;
|
|
|
|
|
PASSED();
|
2010-07-17 00:32:49 +08:00
|
|
|
|
|
|
|
|
|
/* Check opening existing file non-default sizes of lengths and addresses */
|
|
|
|
|
TESTING("opening pre-created file with non-default sizes");
|
|
|
|
|
{
|
|
|
|
|
const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */
|
|
|
|
|
hid_t dset = -1;
|
|
|
|
|
file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
|
|
|
|
|
if(file >= 0){
|
|
|
|
|
if((dset = H5Dopen2(file, "/Dataset1", H5P_DEFAULT)) < 0)
|
|
|
|
|
TEST_ERROR
|
|
|
|
|
if(H5Dclose(dset) < 0) TEST_ERROR
|
|
|
|
|
if(H5Fclose(file) < 0) TEST_ERROR
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
H5_FAILED();
|
|
|
|
|
printf("***cannot open the pre-created non-default sizes test file (%s)\n",
|
|
|
|
|
testfile);
|
|
|
|
|
goto error;
|
|
|
|
|
} /* end else */
|
|
|
|
|
}
|
|
|
|
|
PASSED();
|
|
|
|
|
|
2011-04-16 06:05:23 +08:00
|
|
|
|
/* Verify symbol table messages are cached */
|
|
|
|
|
if(h5_verify_cached_stabs(FILENAME, fapl) < 0) TEST_ERROR
|
|
|
|
|
|
2007-06-16 03:11:59 +08:00
|
|
|
|
puts("All local heap tests passed.");
|
|
|
|
|
h5_cleanup(FILENAME, fapl);
|
|
|
|
|
|
1998-11-25 22:58:22 +08:00
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
error:
|
|
|
|
|
puts("*** TESTS FAILED ***");
|
|
|
|
|
H5E_BEGIN_TRY {
|
|
|
|
|
H5Fclose(file);
|
|
|
|
|
} H5E_END_TRY;
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling branch.
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/default API=1.8.x,
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.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-17 23:07:35 +08:00
|
|
|
|
|