2003-02-17 23:54:15 +08:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
2007-02-07 22:56:24 +08:00
|
|
|
* Copyright by The HDF Group. *
|
2003-02-17 23:54:15 +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 *
|
2017-04-18 03:32:16 +08:00
|
|
|
* the COPYING file, which can be found at the root of the source code *
|
|
|
|
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
|
|
|
|
* If you do not have access to either file, you may request a copy from *
|
|
|
|
* help@hdfgroup.org. *
|
2003-02-17 23:54:15 +08:00
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
/* Programmer: Robb Matzke <matzke@llnl.gov>
|
|
|
|
* Wednesday, October 15, 1997
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Purpose: Tests various aspects of indexed raw data storage.
|
1997-10-21 07:14:35 +08:00
|
|
|
*/
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
#define H5F_FRIEND /*suppress error about including H5Fpkg */
|
2000-10-10 15:44:33 +08:00
|
|
|
|
2001-04-04 02:09:16 +08:00
|
|
|
#include "h5test.h"
|
2018-02-15 00:08:09 +08:00
|
|
|
|
2001-04-04 02:09:16 +08:00
|
|
|
#include "H5Dprivate.h"
|
|
|
|
#include "H5Iprivate.h"
|
|
|
|
#include "H5Pprivate.h"
|
|
|
|
#include "H5Fpkg.h"
|
|
|
|
#include "H5Gprivate.h"
|
|
|
|
#include "H5Oprivate.h"
|
2014-02-14 06:12:46 +08:00
|
|
|
#include "H5VMprivate.h"
|
1997-10-21 07:14:35 +08:00
|
|
|
|
1998-11-25 22:58:22 +08:00
|
|
|
const char *FILENAME[] = {
|
|
|
|
"istore",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
1997-10-21 07:14:35 +08:00
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
#define TEST_SMALL 0x0001
|
|
|
|
#define TEST_MEDIUM 0x0002
|
|
|
|
#define TEST_LARGE 0x0004
|
1997-10-23 06:08:14 +08:00
|
|
|
|
2003-05-08 05:52:24 +08:00
|
|
|
/* The datatype of the dataset operated on by this test */
|
|
|
|
#define TEST_DATATYPE H5T_NATIVE_UCHAR
|
|
|
|
|
|
|
|
#define TEST_CHUNK_SIZE 50
|
|
|
|
#define TEST_SPARSE_SIZE 1000000
|
|
|
|
|
|
|
|
hsize_t chunk_dims[H5O_LAYOUT_NDIMS];
|
2004-12-29 22:26:20 +08:00
|
|
|
hsize_t zero[H5O_LAYOUT_NDIMS];
|
1998-01-21 03:10:08 +08:00
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
|
2012-03-21 05:42:38 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2018-02-15 00:08:09 +08:00
|
|
|
* Function: is_sparse
|
2012-03-21 05:42:38 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Purpose: Determines if the file system of the current working
|
|
|
|
* directory supports holes.
|
2012-03-21 05:42:38 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Return: Success: Non-zero if holes are supported; zero
|
|
|
|
* otherwise.
|
2012-03-21 05:42:38 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Failure: zero
|
2012-03-21 05:42:38 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Programmer: Robb Matzke
|
2012-03-21 05:42:38 +08:00
|
|
|
* Wednesday, July 15, 1998
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static int
|
|
|
|
is_sparse(void)
|
|
|
|
{
|
2018-02-15 00:08:09 +08:00
|
|
|
int fd;
|
|
|
|
h5_stat_t sb;
|
2012-03-21 05:42:38 +08:00
|
|
|
|
2017-04-29 06:13:22 +08:00
|
|
|
if ((fd = HDopen("x.h5", O_RDWR|O_TRUNC|O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0) return 0;
|
2012-03-21 05:42:38 +08:00
|
|
|
if (HDlseek(fd, (off_t)(1024*1024), SEEK_SET)!=1024*1024) return 0;
|
|
|
|
if (5!=HDwrite(fd, "hello", (size_t)5)) return 0;
|
|
|
|
if (HDclose(fd) < 0) return 0;
|
|
|
|
if (HDstat("x.h5", &sb) < 0) return 0;
|
|
|
|
if (HDremove("x.h5") < 0) return 0;
|
|
|
|
#ifdef H5_HAVE_STAT_ST_BLOCKS
|
|
|
|
return ((unsigned long)sb.st_blocks*512 < (unsigned long)sb.st_size);
|
|
|
|
#else
|
|
|
|
return (0);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
|
1997-10-21 07:14:35 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2018-02-15 00:08:09 +08:00
|
|
|
* Function: print_array
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Purpose: Prints the values in an array
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Return: void
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Programmer: Robb Matzke
|
|
|
|
* Friday, October 10, 1997
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
|
|
|
* Modifications:
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static void
|
1998-11-19 02:40:09 +08:00
|
|
|
print_array(uint8_t *array, size_t nx, size_t ny, size_t nz)
|
1997-10-21 07:14:35 +08:00
|
|
|
{
|
2018-02-15 00:08:09 +08:00
|
|
|
size_t i, j, k;
|
1998-01-17 06:23:43 +08:00
|
|
|
|
|
|
|
for (i = 0; i < nx; i++) {
|
2018-02-15 00:08:09 +08:00
|
|
|
if (nz > 1) {
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr,"i=%lu:\n", (unsigned long)i);
|
2018-02-15 00:08:09 +08:00
|
|
|
} else {
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr,"%03lu:", (unsigned long)i);
|
2018-02-15 00:08:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
for (j = 0; j < ny; j++) {
|
|
|
|
if (nz > 1)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr,"%03lu:", (unsigned long)j);
|
2018-02-15 00:08:09 +08:00
|
|
|
for (k = 0; k < nz; k++) {
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr," %3d", *array++);
|
2018-02-15 00:08:09 +08:00
|
|
|
}
|
|
|
|
if (nz > 1)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr,"\n");
|
2018-02-15 00:08:09 +08:00
|
|
|
}
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr,"\n");
|
1998-01-17 06:23:43 +08:00
|
|
|
}
|
1997-10-21 07:14:35 +08:00
|
|
|
}
|
1998-11-25 22:58:22 +08:00
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
|
1997-10-21 07:14:35 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2018-02-15 00:08:09 +08:00
|
|
|
* Function: new_object
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Purpose: Creates a new object that refers to a indexed storage of raw
|
|
|
|
* data. No raw data is stored.
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Return: Success: ID of dataset
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Failure: -1
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Programmer: Robb Matzke
|
|
|
|
* Wednesday, October 15, 1997
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
|
|
|
* Modifications:
|
2003-05-08 05:52:24 +08:00
|
|
|
* Converted to use datasets instead of directly messing with
|
|
|
|
* the istore routines, etc. since the new raw data architecture
|
|
|
|
* performs hyperslab operations at a higher level than the
|
|
|
|
* istore routines did and the new istore routines can't handle
|
|
|
|
* I/O on more than one chunk at a time. QAK - 2003/04/16
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
2003-05-08 05:52:24 +08:00
|
|
|
static hid_t
|
|
|
|
new_object(hid_t f, const char *name, int ndims, hsize_t dims[], hsize_t cdims[])
|
1997-10-21 07:14:35 +08:00
|
|
|
{
|
2003-05-08 05:52:24 +08:00
|
|
|
hid_t dataset; /* Dataset ID */
|
|
|
|
hid_t space; /* Dataspace ID */
|
|
|
|
hid_t dcpl; /* Dataset creation property list ID */
|
1998-01-17 06:23:43 +08:00
|
|
|
|
2003-05-08 05:52:24 +08:00
|
|
|
/* Create the dataset creation property list */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if ((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR;
|
1998-11-25 22:58:22 +08:00
|
|
|
|
2003-05-08 05:52:24 +08:00
|
|
|
/* Set the chunk dimensions */
|
|
|
|
if(H5Pset_chunk(dcpl, ndims, cdims) < 0) TEST_ERROR;
|
1998-11-25 22:58:22 +08:00
|
|
|
|
2003-05-08 05:52:24 +08:00
|
|
|
/* Create the dataspace */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if((space = H5Screate_simple(ndims, dims, NULL)) < 0) TEST_ERROR;
|
1998-11-25 22:58:22 +08:00
|
|
|
|
2003-05-08 05:52:24 +08:00
|
|
|
/* Create the dataset */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if((dataset = H5Dcreate2(f, name, TEST_DATATYPE, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) TEST_ERROR;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
|
|
|
/* Clean up */
|
1998-11-25 22:58:22 +08:00
|
|
|
|
2003-05-08 05:52:24 +08:00
|
|
|
/* Close property lists */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if(H5Pclose(dcpl) < 0) TEST_ERROR;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
|
|
|
/* Close dataspace */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if(H5Sclose(space) < 0) TEST_ERROR;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
|
|
|
return dataset;
|
|
|
|
|
|
|
|
error:
|
1998-11-25 22:58:22 +08:00
|
|
|
return -1;
|
1997-10-21 07:14:35 +08:00
|
|
|
}
|
1998-11-25 22:58:22 +08:00
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
|
1997-10-21 07:14:35 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2018-02-15 00:08:09 +08:00
|
|
|
* Function: test_create
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Purpose: Creates a named object that refers to indexed storage of raw
|
|
|
|
* data. No raw data is stored.
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Return: Success: SUCCEED
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Failure: FAIL
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Programmer: Robb Matzke
|
|
|
|
* Wednesday, October 15, 1997
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
|
|
|
* Modifications:
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
2003-05-08 05:52:24 +08:00
|
|
|
test_create(hid_t f, const char *prefix)
|
1997-10-21 07:14:35 +08:00
|
|
|
{
|
2003-05-08 05:52:24 +08:00
|
|
|
hid_t dataset; /* Dataset ID */
|
|
|
|
hsize_t dims[H5O_LAYOUT_NDIMS+1]; /* Dimensions of dataset */
|
2008-05-16 11:04:56 +08:00
|
|
|
hsize_t my_chunk_dims[H5O_LAYOUT_NDIMS+1]; /* Dimensions of chunks */
|
2003-05-08 05:52:24 +08:00
|
|
|
char name[256]; /* Dataset name */
|
|
|
|
unsigned u; /* Local index variable */
|
1997-10-21 07:14:35 +08:00
|
|
|
|
1998-11-25 22:58:22 +08:00
|
|
|
TESTING("istore create");
|
1997-10-21 07:14:35 +08:00
|
|
|
|
2008-05-16 11:04:56 +08:00
|
|
|
dims[0] = my_chunk_dims[0] = 1;
|
2003-05-08 05:52:24 +08:00
|
|
|
for (u = 1; u <= H5S_MAX_RANK; u++) {
|
|
|
|
/* Initialize the dimension size in this new dimension */
|
2008-05-16 11:04:56 +08:00
|
|
|
dims[u] = my_chunk_dims[u] = 2;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
|
|
|
/* Create chunked dataset of this dimensionality */
|
2018-03-19 07:36:49 +08:00
|
|
|
HDsnprintf(name, sizeof name, "%s_%02u", prefix, u);
|
2018-09-21 01:40:51 +08:00
|
|
|
if((dataset = new_object(f, name, (int)u, dims, my_chunk_dims)) < 0)
|
2018-03-19 07:36:49 +08:00
|
|
|
return FAIL;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
|
|
|
/* Close dataset created */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if(H5Dclose(dataset) < 0)
|
2003-05-08 05:52:24 +08:00
|
|
|
return FAIL;
|
1998-01-17 06:23:43 +08:00
|
|
|
}
|
|
|
|
|
1998-11-25 22:58:22 +08:00
|
|
|
PASSED();
|
1998-01-17 06:23:43 +08:00
|
|
|
return SUCCEED;
|
|
|
|
}
|
1998-11-25 22:58:22 +08:00
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
|
1997-10-21 07:14:35 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2018-02-15 00:08:09 +08:00
|
|
|
* Function: test_extend
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Purpose: Creates an empty object and then writes to it in such a way
|
|
|
|
* as to always extend the object's domain without creating
|
|
|
|
* holes and without causing the object to become concave.
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Return: Success: SUCCEED
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Failure: FAIL
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Programmer: Robb Matzke
|
|
|
|
* Wednesday, October 15, 1997
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
|
|
|
* Modifications:
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
2003-05-08 05:52:24 +08:00
|
|
|
test_extend(hid_t f, const char *prefix,
|
2018-02-15 00:08:09 +08:00
|
|
|
size_t nx, size_t ny, size_t nz)
|
1997-10-21 07:14:35 +08:00
|
|
|
{
|
2003-05-08 05:52:24 +08:00
|
|
|
hid_t dataset; /* Dataset ID */
|
|
|
|
hid_t fspace; /* Dataset's file dataspace */
|
|
|
|
hid_t mspace; /* Dataset's memory dataspace */
|
2018-02-15 00:08:09 +08:00
|
|
|
size_t i, j, k, ctr;
|
|
|
|
int ndims;
|
|
|
|
uint8_t *buf = NULL, *check = NULL, *whole = NULL;
|
|
|
|
char dims[64], s[256], name[256];
|
|
|
|
hsize_t offset[3];
|
|
|
|
hsize_t max_corner[3];
|
|
|
|
hsize_t size[3];
|
|
|
|
hsize_t whole_size[3];
|
|
|
|
hsize_t nelmts;
|
1998-01-17 06:23:43 +08:00
|
|
|
|
|
|
|
if (!nz) {
|
2018-02-15 00:08:09 +08:00
|
|
|
if (!ny) {
|
|
|
|
ndims = 1;
|
|
|
|
ny = nz = 1;
|
2019-08-16 05:46:00 +08:00
|
|
|
HDsprintf(dims, "%lu", (unsigned long) nx);
|
2018-02-15 00:08:09 +08:00
|
|
|
} else {
|
|
|
|
ndims = 2;
|
|
|
|
nz = 1;
|
2019-08-16 05:46:00 +08:00
|
|
|
HDsprintf(dims, "%lux%lu", (unsigned long) nx, (unsigned long) ny);
|
2018-02-15 00:08:09 +08:00
|
|
|
}
|
1998-01-17 06:23:43 +08:00
|
|
|
} else {
|
2018-02-15 00:08:09 +08:00
|
|
|
ndims = 3;
|
2019-08-16 05:46:00 +08:00
|
|
|
HDsprintf(dims, "%lux%lux%lu",
|
2018-02-15 00:08:09 +08:00
|
|
|
(unsigned long) nx, (unsigned long) ny, (unsigned long) nz);
|
1998-01-17 06:23:43 +08:00
|
|
|
}
|
|
|
|
|
2019-08-16 05:46:00 +08:00
|
|
|
HDsprintf(s, "istore extend: %s", dims);
|
2003-05-08 05:52:24 +08:00
|
|
|
TESTING(s);
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
buf = (uint8_t *)HDmalloc(nx * ny * nz);
|
|
|
|
check = (uint8_t *)HDmalloc(nx * ny * nz);
|
|
|
|
whole = (uint8_t *)HDcalloc((size_t)1, nx * ny * nz);
|
1998-01-17 06:23:43 +08:00
|
|
|
|
|
|
|
whole_size[0] = nx;
|
|
|
|
whole_size[1] = ny;
|
|
|
|
whole_size[2] = nz;
|
|
|
|
max_corner[0] = 0;
|
|
|
|
max_corner[1] = 0;
|
|
|
|
max_corner[2] = 0;
|
|
|
|
|
2003-05-08 05:52:24 +08:00
|
|
|
/* Build the new empty object */
|
2019-08-16 05:46:00 +08:00
|
|
|
HDsprintf(name, "%s_%s", prefix, dims);
|
2003-05-08 05:52:24 +08:00
|
|
|
if ((dataset=new_object(f, name, ndims, whole_size, whole_size)) < 0) {
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr," Cannot create %u-d object `%s'\n", ndims, name);
|
|
|
|
goto error;
|
2003-05-08 05:52:24 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Get dataset's dataspace */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if((fspace=H5Dget_space(dataset)) < 0) TEST_ERROR;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
1998-04-28 21:59:08 +08:00
|
|
|
for (ctr = 0;
|
2018-02-15 00:08:09 +08:00
|
|
|
H5VM_vector_lt_u((unsigned)ndims, max_corner, whole_size);
|
|
|
|
ctr++) {
|
|
|
|
|
|
|
|
/* Size and location */
|
|
|
|
if (0 == ctr) {
|
|
|
|
offset[0] = offset[1] = offset[2] = 0;
|
|
|
|
size[0] = size[1] = size[2] = 1;
|
|
|
|
nelmts = 1;
|
|
|
|
} else {
|
|
|
|
for (i=0, nelmts=1; i<(size_t)ndims; i++) {
|
|
|
|
if (ctr % (size_t)ndims == i) {
|
|
|
|
offset[i] = max_corner[i];
|
|
|
|
size[i] = MIN(1, whole_size[i] - offset[i]);
|
|
|
|
} else {
|
|
|
|
offset[i] = 0;
|
|
|
|
size[i] = max_corner[i];
|
|
|
|
}
|
|
|
|
nelmts *= size[i];
|
|
|
|
}
|
|
|
|
}
|
1997-10-21 07:14:35 +08:00
|
|
|
|
|
|
|
#if 0
|
2018-02-15 00:08:09 +08:00
|
|
|
if (0 == ctr)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr,"\n");
|
|
|
|
HDfprintf(stderr," Insert: ctr=%lu, corner=(%ld", (unsigned long)ctr, (long)offset[0]);
|
2018-02-15 00:08:09 +08:00
|
|
|
if (ndims > 1)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr,",%ld", (long)offset[1]);
|
2018-02-15 00:08:09 +08:00
|
|
|
if (ndims > 2)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr,",%ld", (long)offset[2]);
|
|
|
|
HDfprintf(stderr,"), size=(%lu", (unsigned long)size[0]);
|
2018-02-15 00:08:09 +08:00
|
|
|
if (ndims > 1)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr,",%lu", (unsigned long)size[1]);
|
2018-02-15 00:08:09 +08:00
|
|
|
if (ndims > 2)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr,",%lu", (unsigned long)size[2]);
|
2019-08-25 03:07:19 +08:00
|
|
|
HDfprintf(stderr,"), %lu element%s", (unsigned long)nelmts, 1 == nelmts ? "" : "s");
|
2018-02-15 00:08:09 +08:00
|
|
|
if (0 == nelmts)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr," *SKIPPED*");
|
|
|
|
HDfprintf(stderr,"\n");
|
1997-10-21 07:14:35 +08:00
|
|
|
#endif
|
1997-10-23 06:08:14 +08:00
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
/* Fill the source array */
|
|
|
|
if (0 == nelmts) continue;
|
|
|
|
HDmemset(buf, (signed)(128+ctr), (size_t)nelmts);
|
2003-05-08 05:52:24 +08:00
|
|
|
|
|
|
|
/* Create dataspace for selection in memory */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if((mspace=H5Screate_simple(1,&nelmts,NULL)) < 0) TEST_ERROR;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
|
|
|
/* Select region in file dataspace */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if(H5Sselect_hyperslab(fspace,H5S_SELECT_SET,offset,NULL,size,NULL) < 0) TEST_ERROR;
|
1998-04-09 05:43:02 +08:00
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
/* Write to disk */
|
|
|
|
if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf) < 0) {
|
|
|
|
H5_FAILED();
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr," Write failed: ctr=%lu\n", (unsigned long)ctr);
|
2018-02-15 00:08:09 +08:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Read from disk */
|
|
|
|
HDmemset(check, 0xff, (size_t)nelmts);
|
|
|
|
if (H5Dread(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, check) < 0) {
|
|
|
|
H5_FAILED();
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr," Read failed: ctr=%lu\n", (unsigned long)ctr);
|
2018-02-15 00:08:09 +08:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
if (HDmemcmp(buf, check, (size_t)nelmts)) {
|
|
|
|
H5_FAILED();
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr," Read check failed: ctr=%lu\n", (unsigned long)ctr);
|
|
|
|
HDfprintf(stderr," Wrote:\n");
|
2018-02-15 00:08:09 +08:00
|
|
|
print_array(buf, (size_t)size[0], (size_t)size[1],
|
|
|
|
(size_t)size[2]);
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr," Read:\n");
|
2018-02-15 00:08:09 +08:00
|
|
|
print_array(check, (size_t)size[0], (size_t)size[1],
|
|
|
|
(size_t)size[2]);
|
|
|
|
goto error;
|
|
|
|
}
|
1998-11-25 22:58:22 +08:00
|
|
|
|
2003-05-08 05:52:24 +08:00
|
|
|
/* Close memory dataspace */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if(H5Sclose(mspace) < 0) TEST_ERROR;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
/* Write to `whole' buffer for later checking */
|
|
|
|
H5VM_hyper_copy((unsigned)ndims, size,
|
|
|
|
whole_size, offset, whole, /*dst*/
|
|
|
|
size, H5VM_ZERO, buf); /*src*/
|
1998-04-09 05:43:02 +08:00
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
/* Update max corner */
|
|
|
|
for (i=0; i<(size_t)ndims; i++)
|
|
|
|
max_corner[i] = MAX(max_corner[i], offset[i]+size[i]);
|
1998-01-17 06:23:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Now read the entire array back out and check it */
|
2003-05-08 05:52:24 +08:00
|
|
|
HDmemset(buf, 0xff, nx * ny * nz);
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if (H5Dread(dataset, TEST_DATATYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) {
|
2018-02-15 00:08:09 +08:00
|
|
|
H5_FAILED();
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr," Read failed for whole array.\n");
|
2018-02-15 00:08:09 +08:00
|
|
|
goto error;
|
1998-01-17 06:23:43 +08:00
|
|
|
}
|
1998-11-25 22:58:22 +08:00
|
|
|
for (i=0; i<nx; i++) {
|
2018-02-15 00:08:09 +08:00
|
|
|
for (j=0; j<ny; j++) {
|
|
|
|
for (k=0; k<nz; k++) {
|
|
|
|
if (whole[i*ny*nz + j*nz + k] != buf[i*ny*nz + j*nz + k]) {
|
|
|
|
H5_FAILED();
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr," Check failed at i=%lu", (unsigned long)i);
|
2018-02-15 00:08:09 +08:00
|
|
|
if (ndims > 1) {
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr,", j=%lu", (unsigned long)j);
|
2018-02-15 00:08:09 +08:00
|
|
|
}
|
|
|
|
if (ndims > 2) {
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr,", k=%lu", (unsigned long)k);
|
2018-02-15 00:08:09 +08:00
|
|
|
}
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr,"\n Check array is:\n");
|
2018-02-15 00:08:09 +08:00
|
|
|
print_array(whole, nx, ny, nz);
|
2019-08-16 05:46:00 +08:00
|
|
|
HDfprintf(stderr," Value read is:\n");
|
2018-02-15 00:08:09 +08:00
|
|
|
print_array(buf, nx, ny, nz);
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
1998-01-17 06:23:43 +08:00
|
|
|
}
|
|
|
|
|
2003-05-08 05:52:24 +08:00
|
|
|
/* Close dataset's dataspace */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if(H5Sclose(fspace) < 0) TEST_ERROR;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
|
|
|
/* Close dataset */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if(H5Dclose(dataset) < 0) TEST_ERROR;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
|
|
|
/* Free memory used */
|
2003-11-08 23:32:53 +08:00
|
|
|
HDfree(buf);
|
|
|
|
HDfree(check);
|
|
|
|
HDfree(whole);
|
2003-05-08 05:52:24 +08:00
|
|
|
|
1998-11-25 22:58:22 +08:00
|
|
|
PASSED();
|
1998-01-17 06:23:43 +08:00
|
|
|
return SUCCEED;
|
|
|
|
|
2003-05-08 05:52:24 +08:00
|
|
|
error:
|
2003-11-08 23:32:53 +08:00
|
|
|
HDfree(buf);
|
|
|
|
HDfree(check);
|
|
|
|
HDfree(whole);
|
1998-01-17 06:23:43 +08:00
|
|
|
return FAIL;
|
|
|
|
}
|
1998-11-25 22:58:22 +08:00
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
|
1997-10-23 06:08:14 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2018-02-15 00:08:09 +08:00
|
|
|
* Function: test_sparse
|
1997-10-23 06:08:14 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Purpose: Creates a sparse matrix consisting of NBLOCKS randomly placed
|
|
|
|
* blocks each of size NX,NY,NZ.
|
1997-10-23 06:08:14 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Return: Success: SUCCEED
|
1997-10-23 06:08:14 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Failure: FAIL
|
1997-10-23 06:08:14 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Programmer: Robb Matzke
|
|
|
|
* Wednesday, October 22, 1997
|
1997-10-23 06:08:14 +08:00
|
|
|
*
|
|
|
|
* Modifications:
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
2003-05-08 05:52:24 +08:00
|
|
|
test_sparse(hid_t f, const char *prefix, size_t nblocks,
|
2018-02-15 00:08:09 +08:00
|
|
|
size_t nx, size_t ny, size_t nz, int skip_test)
|
1997-10-23 06:08:14 +08:00
|
|
|
{
|
2003-05-08 05:52:24 +08:00
|
|
|
hid_t dataset; /* Dataset ID */
|
|
|
|
hid_t fspace; /* Dataset's file dataspace */
|
|
|
|
hid_t mspace; /* Dataset's memory dataspace */
|
2018-02-15 00:08:09 +08:00
|
|
|
int ndims;
|
|
|
|
hsize_t ctr;
|
|
|
|
char dims[64], s[256], name[256];
|
|
|
|
hsize_t offset[3];
|
|
|
|
hsize_t size[3], total = 0;
|
|
|
|
uint8_t *buf = NULL;
|
|
|
|
hsize_t whole_size[3]; /* Size of dataset's dataspace */
|
2003-05-08 05:52:24 +08:00
|
|
|
size_t u; /* Local index variable */
|
1998-01-17 06:23:43 +08:00
|
|
|
|
|
|
|
if (!nz) {
|
2018-02-15 00:08:09 +08:00
|
|
|
if (!ny) {
|
|
|
|
ndims = 1;
|
|
|
|
ny = nz = 1;
|
2019-08-16 05:46:00 +08:00
|
|
|
HDsprintf(dims, "%lu", (unsigned long) nx);
|
2018-02-15 00:08:09 +08:00
|
|
|
} else {
|
|
|
|
ndims = 2;
|
|
|
|
nz = 1;
|
2019-08-16 05:46:00 +08:00
|
|
|
HDsprintf(dims, "%lux%lu", (unsigned long) nx, (unsigned long) ny);
|
2018-02-15 00:08:09 +08:00
|
|
|
}
|
1998-01-17 06:23:43 +08:00
|
|
|
} else {
|
2018-02-15 00:08:09 +08:00
|
|
|
ndims = 3;
|
2019-08-16 05:46:00 +08:00
|
|
|
HDsprintf(dims, "%lux%lux%lu",
|
2018-02-15 00:08:09 +08:00
|
|
|
(unsigned long) nx, (unsigned long) ny, (unsigned long) nz);
|
1998-01-17 06:23:43 +08:00
|
|
|
}
|
|
|
|
|
2019-08-16 05:46:00 +08:00
|
|
|
HDsprintf(s, "istore sparse: %s", dims);
|
2003-05-08 05:52:24 +08:00
|
|
|
TESTING(s);
|
2012-03-27 05:11:50 +08:00
|
|
|
if(skip_test){
|
|
|
|
SKIPPED()
|
|
|
|
return SUCCEED;
|
|
|
|
}
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
buf = (uint8_t *)HDmalloc(nx * ny * nz);
|
2003-05-18 05:51:57 +08:00
|
|
|
HDmemset(buf, 128, nx * ny * nz);
|
1998-01-17 06:23:43 +08:00
|
|
|
|
2003-05-08 05:52:24 +08:00
|
|
|
/* Set dimensions of dataset */
|
|
|
|
for (u=0; u<(size_t)ndims; u++)
|
|
|
|
whole_size[u]=TEST_SPARSE_SIZE;
|
2002-04-26 02:02:17 +08:00
|
|
|
|
2003-05-08 05:52:24 +08:00
|
|
|
/* Set dimensions of selection */
|
|
|
|
size[0] = nx;
|
|
|
|
size[1] = ny;
|
|
|
|
size[2] = nz;
|
2002-04-26 02:02:17 +08:00
|
|
|
|
1998-01-17 06:23:43 +08:00
|
|
|
/* Build the new empty object */
|
2019-08-16 05:46:00 +08:00
|
|
|
HDsprintf(name, "%s_%s", prefix, dims);
|
2003-05-08 05:52:24 +08:00
|
|
|
if ((dataset=new_object(f, name, ndims, whole_size, chunk_dims)) < 0) {
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(" Cannot create %u-d object `%s'\n", ndims, name);
|
|
|
|
goto error;
|
1998-01-17 06:23:43 +08:00
|
|
|
}
|
2003-05-08 05:52:24 +08:00
|
|
|
|
|
|
|
/* Get dataset's dataspace */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if((fspace=H5Dget_space(dataset)) < 0) TEST_ERROR;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
|
|
|
/* Create dataspace for memory buffer */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if((mspace=H5Screate_simple(ndims,size,NULL)) < 0) TEST_ERROR;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
1998-04-07 23:34:16 +08:00
|
|
|
for (ctr=0; ctr<nblocks; ctr++) {
|
2016-06-06 08:45:37 +08:00
|
|
|
offset[0] = (hsize_t)(HDrandom() % (int)(TEST_SPARSE_SIZE-nx));
|
|
|
|
offset[1] = (hsize_t)(HDrandom() % (int)(TEST_SPARSE_SIZE-ny));
|
|
|
|
offset[2] = (hsize_t)(HDrandom() % (int)(TEST_SPARSE_SIZE-nz));
|
2003-05-08 05:52:24 +08:00
|
|
|
|
|
|
|
/* Select region in file dataspace */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if(H5Sselect_hyperslab(fspace,H5S_SELECT_SET,offset,NULL,size,NULL) < 0) TEST_ERROR;
|
1998-04-09 05:43:02 +08:00
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
/* write to disk */
|
|
|
|
if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf) < 0) {
|
|
|
|
H5_FAILED();
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(" Write failed: ctr=%lu\n", (unsigned long)ctr);
|
|
|
|
HDprintf(" offset=(%lu", (unsigned long) (offset[0]));
|
2018-02-15 00:08:09 +08:00
|
|
|
if (ndims > 1)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(",%lu", (unsigned long) (offset[1]));
|
2018-02-15 00:08:09 +08:00
|
|
|
if (ndims > 2)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(",%lu", (unsigned long) (offset[2]));
|
|
|
|
HDprintf("), size=(%lu", (unsigned long) (size[0]));
|
2018-02-15 00:08:09 +08:00
|
|
|
if (ndims > 1)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(",%lu", (unsigned long) (size[1]));
|
2018-02-15 00:08:09 +08:00
|
|
|
if (ndims > 2)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(",%lu", (unsigned long) (size[2]));
|
|
|
|
HDprintf(")\n");
|
2018-02-15 00:08:09 +08:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
total += nx * ny * nz;
|
1997-11-14 22:42:14 +08:00
|
|
|
#if 0
|
2018-02-15 00:08:09 +08:00
|
|
|
HDfprintf(stderr,"ctr: ctr=%Zu, total=%Zu\n", ctr, total);
|
1997-11-14 22:42:14 +08:00
|
|
|
#endif
|
1997-10-23 06:08:14 +08:00
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
/* We don't test reading yet.... */
|
1998-01-17 06:23:43 +08:00
|
|
|
}
|
1997-10-23 06:08:14 +08:00
|
|
|
|
2003-05-08 05:52:24 +08:00
|
|
|
/* Close memory dataspace */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if(H5Sclose(mspace) < 0) TEST_ERROR;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
|
|
|
/* Close dataset's dataspace */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if(H5Sclose(fspace) < 0) TEST_ERROR;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
|
|
|
/* Close dataset */
|
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-12 00:24:11 +08:00
|
|
|
if(H5Dclose(dataset) < 0) TEST_ERROR;
|
2003-05-08 05:52:24 +08:00
|
|
|
|
2003-11-08 23:32:53 +08:00
|
|
|
HDfree(buf);
|
1998-11-25 22:58:22 +08:00
|
|
|
PASSED();
|
1998-01-17 06:23:43 +08:00
|
|
|
return SUCCEED;
|
|
|
|
|
2003-05-08 05:52:24 +08:00
|
|
|
error:
|
2003-11-08 23:32:53 +08:00
|
|
|
HDfree(buf);
|
1998-01-17 06:23:43 +08:00
|
|
|
return FAIL;
|
|
|
|
}
|
1998-06-06 05:03:49 +08:00
|
|
|
|
2018-02-15 00:08:09 +08:00
|
|
|
|
1997-10-21 07:14:35 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2018-02-15 00:08:09 +08:00
|
|
|
* Function: main
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2019-09-07 09:06:26 +08:00
|
|
|
* Purpose: Tests indexed storage
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2019-09-07 09:06:26 +08:00
|
|
|
* Return: EXIT_SUCCESS/EXIT_FAILURE
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
2018-02-15 00:08:09 +08:00
|
|
|
* Programmer: Robb Matzke
|
|
|
|
* Wednesday, October 15, 1997
|
1997-10-21 07:14:35 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
int
|
1998-01-17 06:23:43 +08:00
|
|
|
main(int argc, char *argv[])
|
1997-10-21 07:14:35 +08:00
|
|
|
{
|
2018-02-15 00:08:09 +08:00
|
|
|
hid_t fapl=-1, file=-1, fcpl=-1;
|
|
|
|
herr_t status;
|
|
|
|
int nerrors = 0;
|
|
|
|
unsigned size_of_test;
|
2003-05-08 05:52:24 +08:00
|
|
|
unsigned u; /* Local index variable */
|
2018-02-15 00:08:09 +08:00
|
|
|
char filename[1024];
|
2012-03-27 05:11:50 +08:00
|
|
|
int skip_test = 0;
|
2012-03-21 05:42:38 +08:00
|
|
|
int has_sparse_support = 0;
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
|
|
|
|
/* Parse arguments or assume these tests (`small', `medium' ) */
|
|
|
|
if (1 == argc) {
|
|
|
|
size_of_test = TEST_SMALL | TEST_MEDIUM | TEST_LARGE;
|
|
|
|
} else {
|
2018-02-15 00:08:09 +08:00
|
|
|
int i;
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
for (i = 1, size_of_test = 0; i < argc; i++) {
|
|
|
|
if (!strcmp(argv[i], "small")) {
|
|
|
|
size_of_test |= TEST_SMALL;
|
|
|
|
} else if (!strcmp(argv[i], "medium")) {
|
|
|
|
size_of_test |= TEST_MEDIUM;
|
|
|
|
} else if (!strcmp(argv[i], "large")) {
|
|
|
|
size_of_test |= TEST_LARGE;
|
|
|
|
} else {
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf("unrecognized argument: %s\n", argv[i]);
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf("Test sizes: ");
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
if (size_of_test & TEST_SMALL)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(" SMALL");
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
if (size_of_test & TEST_MEDIUM)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(" MEDIUM");
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
if (size_of_test & TEST_LARGE)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(" LARGE");
|
|
|
|
HDprintf("\n");
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
|
|
|
|
/* Set the random # seed */
|
[svn-r17980] Description:
Bring Coverity changes into the trunk: (also other minor cleanups)
r17955:
Fix Coverity item 24. Add missing error condition to
H5AC_ext_config_2_int_config.
r17956:
Fix Coverity item 24. Improve error checking in H5A_compact_build_table_cb.
r17957:
Fix Coverity item 150. Fix warning in H5A_compact_build_table_cb.
r17958:
Fix Coverity item 117. Fix error handling in H5B_shared_new.
r17959:
Fix Coverity item 209. Added an assertion for leaf->shared in
H5B2_cache_leaf_dest.
r17960:
Fix Coverity item 208. Added an assertion for internal->shared in
H5B2_cache_internal_dest.
r17961:
Fix Coverity item 89. Reworked the code to avoid array overrun in
H5C__autoadjust__ageout__insert_new_marker.
r17962:
Fix for coverity Resource_leak 195,203,204,205.
r17963:
Fix Coverity item 44. Prevented potential NULL dereference in H5D_btree_debug.
r17964:
Fix Coverity issues #197, 198 & 199: memory not being released. (Also
clean up other resource leaks in nearby and/or similar code).
r17965:
Fix Coverity issue #151: release resources on error
r17966:
Fix Coverity issue #187: Remove leftover code remnant from prior bugfix
which was causing resource leak of open files.
r17967:
Fixed Coverity issues # 193 & 194. Removed unnecessary memory allocation and
added comparison of length of path parameter to the size of the destination
buffer in h5import.h/h5import.c.
r17968:
Fix Coverity item 144. Fixed memory leak on error in H5D_chunk_copy.
r17969:
Fix for coverity Resource_leak #196.
r17970:
Coverity 167-173:
Initialized pointer of buffers.
In error handling, closed types and free memory.
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-10 20:36:56 +08:00
|
|
|
HDsrandom((unsigned)HDtime(NULL));
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
|
2012-03-21 05:42:38 +08:00
|
|
|
/* Check to see if the file system supports POSIX-style sparse files.
|
|
|
|
* Windows NTFS does not, so we want to avoid tests which create
|
|
|
|
* very large files.
|
|
|
|
*/
|
|
|
|
has_sparse_support = is_sparse();
|
|
|
|
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
/* Reset library */
|
|
|
|
h5_reset();
|
|
|
|
fapl = h5_fileaccess();
|
|
|
|
|
|
|
|
/* Use larger file addresses... */
|
|
|
|
fcpl = H5Pcreate(H5P_FILE_CREATE);
|
|
|
|
H5Pset_sizes(fcpl, (size_t)8, (size_t)0);
|
|
|
|
|
|
|
|
/* Create the test file */
|
|
|
|
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
|
|
|
|
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) {
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf("Cannot create file %s; test aborted\n", filename);
|
2019-09-07 09:06:26 +08:00
|
|
|
HDexit(EXIT_FAILURE);
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
}
|
1998-01-17 06:23:43 +08:00
|
|
|
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
/* Initialize chunk dimensions */
|
|
|
|
for(u = 0; u < H5O_LAYOUT_NDIMS; u++)
|
|
|
|
chunk_dims[u] = TEST_CHUNK_SIZE;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Creation test: Creates empty objects with various raw data sizes
|
|
|
|
* and alignments.
|
|
|
|
*/
|
|
|
|
status = test_create(file, "create");
|
|
|
|
nerrors += status < 0 ? 1 : 0;
|
|
|
|
|
|
|
|
if (size_of_test & TEST_SMALL) {
|
|
|
|
status = test_extend(file, "extend", (size_t)10, (size_t)0, (size_t)0);
|
|
|
|
nerrors += status < 0 ? 1 : 0;
|
|
|
|
status = test_extend(file, "extend", (size_t)10, (size_t)10, (size_t)0);
|
|
|
|
nerrors += status < 0 ? 1 : 0;
|
|
|
|
status = test_extend(file, "extend", (size_t)10, (size_t)10, (size_t)10);
|
|
|
|
nerrors += status < 0 ? 1 : 0;
|
|
|
|
}
|
|
|
|
if (size_of_test & TEST_MEDIUM) {
|
|
|
|
status = test_extend(file, "extend", (size_t)10000, (size_t)0, (size_t)0);
|
|
|
|
nerrors += status < 0 ? 1 : 0;
|
|
|
|
status = test_extend(file, "extend", (size_t)2500, (size_t)10, (size_t)0);
|
|
|
|
nerrors += status < 0 ? 1 : 0;
|
|
|
|
status = test_extend(file, "extend", (size_t)10, (size_t)400, (size_t)10);
|
|
|
|
nerrors += status < 0 ? 1 : 0;
|
|
|
|
}
|
2012-03-27 05:11:50 +08:00
|
|
|
skip_test = 0;
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
if (size_of_test & TEST_SMALL) {
|
2012-03-27 05:11:50 +08:00
|
|
|
status = test_sparse(file, "sparse", (size_t)100, (size_t)5, (size_t)0, (size_t)0, skip_test);
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
nerrors += status < 0 ? 1 : 0;
|
2012-03-27 05:11:50 +08:00
|
|
|
status = test_sparse(file, "sparse", (size_t)100, (size_t)3, (size_t)4, (size_t)0, skip_test);
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
nerrors += status < 0 ? 1 : 0;
|
2012-03-27 05:11:50 +08:00
|
|
|
status = test_sparse(file, "sparse", (size_t)100, (size_t)2, (size_t)3, (size_t)4, skip_test);
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
nerrors += status < 0 ? 1 : 0;
|
|
|
|
}
|
|
|
|
if (size_of_test & TEST_MEDIUM) {
|
2012-03-27 05:11:50 +08:00
|
|
|
status = test_sparse(file, "sparse", (size_t)1000, (size_t)30, (size_t)0, (size_t)0, skip_test);
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
nerrors += status < 0 ? 1 : 0;
|
2012-03-27 05:11:50 +08:00
|
|
|
status = test_sparse(file, "sparse", (size_t)2000, (size_t)7, (size_t)3, (size_t)0, skip_test);
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
nerrors += status < 0 ? 1 : 0;
|
2012-03-27 05:11:50 +08:00
|
|
|
status = test_sparse(file, "sparse", (size_t)2000, (size_t)4, (size_t)2, (size_t)3, skip_test);
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
nerrors += status < 0 ? 1 : 0;
|
|
|
|
}
|
2012-03-27 05:11:50 +08:00
|
|
|
skip_test = !has_sparse_support;
|
|
|
|
if (size_of_test & TEST_LARGE) {
|
2012-03-21 05:42:38 +08:00
|
|
|
/* This test is skipped if there is no POSIX-style sparse file support
|
|
|
|
* e.g.: Windows NTFS filesystems
|
|
|
|
*/
|
2012-03-27 05:11:50 +08:00
|
|
|
status = test_sparse(file, "sparse", (size_t)800, (size_t)50, (size_t)50, (size_t)50, skip_test);
|
2012-03-28 05:49:08 +08:00
|
|
|
if(skip_test)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(" The current VFD does not support sparse files on this platform.\n");
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
nerrors += status < 0 ? 1 : 0;
|
|
|
|
}
|
2003-05-08 05:52:24 +08:00
|
|
|
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
/* Close the test file and exit */
|
|
|
|
H5Pclose(fcpl);
|
|
|
|
H5Fclose(file);
|
2006-08-01 03:46:16 +08:00
|
|
|
|
2011-04-16 06:05:23 +08:00
|
|
|
/* Verify symbol table messages are cached */
|
|
|
|
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
|
|
|
|
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
if (nerrors) {
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf("***** %d I-STORE TEST%s FAILED! *****\n",
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
nerrors, 1 == nerrors ? "" : "S");
|
2019-09-07 09:06:26 +08:00
|
|
|
HDexit(EXIT_FAILURE);
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
}
|
2005-08-14 04:53:35 +08:00
|
|
|
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf("All i-store tests passed.\n");
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
|
|
|
|
h5_cleanup(FILENAME, fapl);
|
1998-11-25 22:58:22 +08:00
|
|
|
|
2019-09-07 09:06:26 +08:00
|
|
|
HDexit(EXIT_SUCCESS);
|
1997-10-21 07:14:35 +08:00
|
|
|
}
|
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-15 09:46:34 +08:00
|
|
|
|