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
|
|
|
* 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 *
|
2021-02-17 22:52:04 +08:00
|
|
|
* distribution tree, or in https://www.hdfgroup.org/licenses. *
|
2017-04-18 03:32:16 +08:00
|
|
|
* 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-01-31 07:32:28 +08:00
|
|
|
/*
|
1998-03-05 00:20:23 +08:00
|
|
|
* Purpose: Tests extendible datasets.
|
1998-01-31 07:32:28 +08:00
|
|
|
*/
|
1998-11-03 01:58:28 +08:00
|
|
|
|
2001-04-04 02:09:16 +08:00
|
|
|
#include "h5test.h"
|
1998-11-03 01:58:28 +08:00
|
|
|
|
2023-06-19 13:13:38 +08:00
|
|
|
static const char *FILENAME[] = {"extend", NULL};
|
1998-11-03 01:58:28 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
#define N1X 100 /* USE AN EVEN NUMBER! */
|
|
|
|
#define N1Y 100 /* USE AN EVEN NUMBER! */
|
|
|
|
#define N2X (N1X / 2)
|
|
|
|
#define N2Y (N1Y / 2)
|
1998-01-31 07:32:28 +08:00
|
|
|
|
2003-06-11 02:44:29 +08:00
|
|
|
/* Data buffers */
|
2020-09-30 22:27:10 +08:00
|
|
|
static int **buf1 = NULL;
|
2022-07-27 05:45:46 +08:00
|
|
|
static int *buf1_data = NULL;
|
2020-09-30 22:27:10 +08:00
|
|
|
static int **buf2 = NULL;
|
2022-07-27 05:45:46 +08:00
|
|
|
static int *buf2_data = NULL;
|
2003-06-11 02:44:29 +08:00
|
|
|
|
1998-01-31 07:32:28 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2003-06-11 02:44:29 +08:00
|
|
|
* Function: write_data
|
1998-01-31 07:32:28 +08:00
|
|
|
*
|
2003-06-11 02:44:29 +08:00
|
|
|
* Purpose: Create extendible dataset and test extend/write/read
|
1998-01-31 07:32:28 +08:00
|
|
|
*
|
2003-06-11 02:44:29 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
1998-01-31 07:32:28 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
2003-06-12 11:40:34 +08:00
|
|
|
static int
|
2003-06-11 02:44:29 +08:00
|
|
|
write_data(const char *msg, hid_t file, const char *name, hid_t cparms, hid_t mem_space)
|
1998-01-31 07:32:28 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t dataset, file_space, half_space;
|
|
|
|
static const hsize_t dims[2] = {N1X, N1Y};
|
|
|
|
static const hsize_t half_dims[2] = {N2X, N2Y};
|
|
|
|
hsize_t size[2];
|
|
|
|
hsize_t max_size[2] = {0, 0};
|
|
|
|
hsize_t offset[2];
|
|
|
|
int i, j, k, m;
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
|
|
|
|
TESTING(msg);
|
|
|
|
|
|
|
|
/* Create the dataset */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset = H5Dcreate2(file, name, H5T_NATIVE_INT, mem_space, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
|
|
|
|
TEST_ERROR;
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
|
|
|
|
/* Write the data */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < 5; i++)
|
|
|
|
for (j = 0; j < 5; j++) {
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
|
2020-01-16 01:32:01 +08:00
|
|
|
/* Extend the dataset */
|
|
|
|
offset[0] = (hsize_t)(i * N1X);
|
|
|
|
offset[1] = (hsize_t)(j * N1Y);
|
2020-09-30 22:27:10 +08:00
|
|
|
size[0] = offset[0] + N1X;
|
|
|
|
size[1] = offset[1] + N1Y;
|
|
|
|
if (size[0] > max_size[0] || size[1] > max_size[1]) {
|
|
|
|
if (size[0] > max_size[0])
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
max_size[0] = size[0];
|
2020-09-30 22:27:10 +08:00
|
|
|
if (size[1] > max_size[1])
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
max_size[1] = size[1];
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dset_extent(dataset, max_size) < 0)
|
|
|
|
TEST_ERROR;
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
} /* end if */
|
|
|
|
|
2020-01-16 01:32:01 +08:00
|
|
|
/* Select a hyperslab */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((file_space = H5Dget_space(dataset)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Sselect_hyperslab(file_space, H5S_SELECT_SET, offset, NULL, dims, NULL) < 0)
|
|
|
|
TEST_ERROR;
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
|
2020-01-16 01:32:01 +08:00
|
|
|
/* Write to the hyperslab */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, buf1_data) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Sclose(file_space) < 0)
|
|
|
|
TEST_ERROR;
|
2020-01-16 01:32:01 +08:00
|
|
|
} /* end for */
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
|
|
|
|
/* Read the data */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((half_space = H5Screate_simple(2, half_dims, NULL)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if ((file_space = H5Dget_space(dataset)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
for (i = 0; i < 10; i++) {
|
|
|
|
for (j = 0; j < 10; j++) {
|
2020-01-16 01:32:01 +08:00
|
|
|
|
|
|
|
/* Select a hyperslab */
|
|
|
|
offset[0] = (hsize_t)(i * N2X);
|
|
|
|
offset[1] = (hsize_t)(j * N2Y);
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Sselect_hyperslab(file_space, H5S_SELECT_SET, offset, NULL, half_dims, NULL) < 0)
|
|
|
|
TEST_ERROR;
|
2020-01-16 01:32:01 +08:00
|
|
|
|
|
|
|
/* Read */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dread(dataset, H5T_NATIVE_INT, half_space, file_space, H5P_DEFAULT, buf2_data) < 0)
|
|
|
|
TEST_ERROR;
|
2020-01-16 01:32:01 +08:00
|
|
|
|
|
|
|
/* Compare */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (k = 0; k < N2X; k++)
|
|
|
|
for (m = 0; m < N2Y; m++)
|
|
|
|
if (buf2[k][m] != buf1[(i % 2) * N2X + k][(j % 2) * N2Y + m]) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf(" i=%d, j=%d, k=%d, m=%d\n", i, j, k, m);
|
|
|
|
printf(" buf2[%d][%d]=%d\n", k, m, buf2[k][m]);
|
|
|
|
printf(" buf1[%d][%d]=%d\n", (i % 2) * N2X + k, (j % 2) * N2Y + m,
|
|
|
|
buf1[(i % 2) * N2X + k][(j % 2) * N2Y + m]);
|
2020-01-16 01:32:01 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
} /* end if */
|
2020-09-30 22:27:10 +08:00
|
|
|
} /* end for */
|
|
|
|
} /* end for */
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
|
|
|
|
/* Cleanup */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dclose(dataset) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Sclose(file_space) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Sclose(half_space) < 0)
|
|
|
|
TEST_ERROR;
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
|
|
|
|
PASSED();
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
|
|
|
return -1;
|
|
|
|
} /* end write_data() */
|
|
|
|
|
|
|
|
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
2020-09-30 22:27:10 +08:00
|
|
|
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: write_data_deprec
|
|
|
|
*
|
|
|
|
* Purpose: Create extendible dataset and test extend/write/read, with
|
|
|
|
* deprecated API routine (H5Dextend)
|
|
|
|
*
|
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static int
|
|
|
|
write_data_deprec(const char *msg, hid_t file, const char *name, hid_t cparms, hid_t mem_space)
|
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t dataset, file_space, half_space;
|
|
|
|
static const hsize_t dims[2] = {N1X, N1Y};
|
|
|
|
static const hsize_t half_dims[2] = {N2X, N2Y};
|
|
|
|
static hsize_t size[2];
|
|
|
|
hsize_t offset[2];
|
|
|
|
int i, j, k, m;
|
1998-01-31 07:32:28 +08:00
|
|
|
|
2003-06-11 02:44:29 +08:00
|
|
|
TESTING(msg);
|
1998-01-31 07:32:28 +08:00
|
|
|
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
/* Create the dataset */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset = H5Dcreate2(file, name, H5T_NATIVE_INT, mem_space, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
|
|
|
|
TEST_ERROR;
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
|
1998-01-31 07:32:28 +08:00
|
|
|
/* Write the data */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < 5; i++)
|
|
|
|
for (j = 0; j < 5; j++) {
|
1998-01-31 07:32:28 +08:00
|
|
|
|
2020-01-16 01:32:01 +08:00
|
|
|
/* Extend the dataset */
|
|
|
|
offset[0] = (hsize_t)(i * N1X);
|
|
|
|
offset[1] = (hsize_t)(j * N1Y);
|
2020-09-30 22:27:10 +08:00
|
|
|
size[0] = offset[0] + N1X;
|
|
|
|
size[1] = offset[1] + N1Y;
|
|
|
|
if (H5Dextend(dataset, size) < 0)
|
|
|
|
TEST_ERROR;
|
1998-01-31 07:32:28 +08:00
|
|
|
|
2020-01-16 01:32:01 +08:00
|
|
|
/* Select a hyperslab */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((file_space = H5Dget_space(dataset)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Sselect_hyperslab(file_space, H5S_SELECT_SET, offset, NULL, dims, NULL) < 0)
|
|
|
|
TEST_ERROR;
|
1998-01-31 07:32:28 +08:00
|
|
|
|
2020-01-16 01:32:01 +08:00
|
|
|
/* Write to the hyperslab */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, buf1_data) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Sclose(file_space) < 0)
|
|
|
|
TEST_ERROR;
|
2020-01-16 01:32:01 +08:00
|
|
|
} /* end for */
|
1998-01-31 07:32:28 +08:00
|
|
|
|
|
|
|
/* Read the data */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((half_space = H5Screate_simple(2, half_dims, NULL)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if ((file_space = H5Dget_space(dataset)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
for (i = 0; i < 10; i++) {
|
|
|
|
for (j = 0; j < 10; j++) {
|
2020-01-16 01:32:01 +08:00
|
|
|
|
|
|
|
/* Select a hyperslab */
|
|
|
|
offset[0] = (hsize_t)(i * N2X);
|
|
|
|
offset[1] = (hsize_t)(j * N2Y);
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Sselect_hyperslab(file_space, H5S_SELECT_SET, offset, NULL, half_dims, NULL) < 0)
|
|
|
|
TEST_ERROR;
|
2020-01-16 01:32:01 +08:00
|
|
|
|
|
|
|
/* Read */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dread(dataset, H5T_NATIVE_INT, half_space, file_space, H5P_DEFAULT, buf2_data) < 0)
|
|
|
|
TEST_ERROR;
|
2020-01-16 01:32:01 +08:00
|
|
|
|
|
|
|
/* Compare */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (k = 0; k < N2X; k++)
|
|
|
|
for (m = 0; m < N2Y; m++)
|
|
|
|
if (buf2[k][m] != buf1[(i % 2) * N2X + k][(j % 2) * N2Y + m]) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf(" i=%d, j=%d, k=%d, m=%d\n", i, j, k, m);
|
|
|
|
printf(" buf2[%d][%d]=%d\n", k, m, buf2[k][m]);
|
|
|
|
printf(" buf1[%d][%d]=%d\n", (i % 2) * N2X + k, (j % 2) * N2Y + m,
|
|
|
|
buf1[(i % 2) * N2X + k][(j % 2) * N2Y + m]);
|
2020-01-16 01:32:01 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
} /* end if */
|
2020-09-30 22:27:10 +08:00
|
|
|
} /* end for */
|
|
|
|
} /* end for */
|
1998-01-31 07:32:28 +08:00
|
|
|
|
2003-06-11 02:44:29 +08:00
|
|
|
/* Cleanup */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dclose(dataset) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Sclose(file_space) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Sclose(half_space) < 0)
|
|
|
|
TEST_ERROR;
|
2003-06-11 02:44:29 +08:00
|
|
|
|
1998-11-21 11:36:51 +08:00
|
|
|
PASSED();
|
2003-06-11 02:44:29 +08:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
|
|
|
return -1;
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
} /* end write_data_deprec() */
|
|
|
|
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
2003-06-11 02:44:29 +08:00
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2019-09-07 09:06:26 +08:00
|
|
|
* Function: main
|
2003-06-11 02:44:29 +08:00
|
|
|
*
|
2019-09-07 09:06:26 +08:00
|
|
|
* Purpose: Tests extendible datasets
|
2003-06-11 02:44:29 +08:00
|
|
|
*
|
2019-09-07 09:06:26 +08:00
|
|
|
* Return: EXIT_SUCCESS/EXIT_FAILURE
|
2003-06-11 02:44:29 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
int
|
2020-09-30 22:27:10 +08:00
|
|
|
main(void)
|
2003-06-11 02:44:29 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t file, mem_space, cparms;
|
|
|
|
hid_t fapl;
|
|
|
|
int nerrors = 0;
|
|
|
|
static const hsize_t dims[2] = {N1X, N1Y};
|
|
|
|
static const hsize_t chunk_dims[2] = {N2X, N2Y};
|
|
|
|
static hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
|
|
|
|
char filename[1024];
|
|
|
|
int i, j;
|
2006-08-01 03:46:16 +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
|
|
|
h5_reset();
|
|
|
|
fapl = h5_fileaccess();
|
2006-08-01 03:46:16 +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 buffer and space */
|
2023-06-29 06:48:12 +08:00
|
|
|
if (NULL == (buf1_data = (int *)calloc(N1X * N1Y, sizeof(int))))
|
2020-01-16 01:32:01 +08:00
|
|
|
TEST_ERROR;
|
2023-06-29 06:48:12 +08:00
|
|
|
if (NULL == (buf1 = (int **)calloc(N1X, sizeof(buf1_data))))
|
2020-01-16 01:32:01 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
for (i = 0; i < N1X; i++)
|
|
|
|
buf1[i] = buf1_data + (i * N1Y);
|
|
|
|
|
2023-06-29 06:48:12 +08:00
|
|
|
if (NULL == (buf2_data = (int *)calloc(N2X * N2Y, sizeof(int))))
|
2020-01-16 01:32:01 +08:00
|
|
|
TEST_ERROR;
|
2023-06-29 06:48:12 +08:00
|
|
|
if (NULL == (buf2 = (int **)calloc(N2X, sizeof(buf2_data))))
|
2020-01-16 01:32:01 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
for (i = 0; i < N2X; i++)
|
|
|
|
buf2[i] = buf2_data + (i * N2Y);
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < N1X; i++)
|
|
|
|
for (j = 0; j < N1Y; j++)
|
2020-01-16 01:32:01 +08:00
|
|
|
buf1[i][j] = i * N1Y + j;
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((mem_space = H5Screate_simple(2, dims, maxdims)) < 0)
|
|
|
|
TEST_ERROR;
|
2006-08-01 03:46:16 +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
|
|
|
/* Create the file */
|
|
|
|
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
|
|
|
|
TEST_ERROR;
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +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
|
|
|
/* Create the dataset creation property list */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Pset_chunk(cparms, 2, chunk_dims) < 0)
|
|
|
|
TEST_ERROR;
|
2006-08-01 03:46:16 +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
|
|
|
/* Test with incremental allocation */
|
2020-09-30 22:27:10 +08:00
|
|
|
nerrors +=
|
|
|
|
write_data("extendible dataset with incr. allocation", file, "dataset1a", cparms, mem_space) < 0 ? 1
|
|
|
|
: 0;
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
2020-09-30 22:27:10 +08:00
|
|
|
nerrors += write_data_deprec("extendible dataset with incr. allocation w/deprec. symbols", file,
|
|
|
|
"dataset1b", cparms, mem_space) < 0
|
|
|
|
? 1
|
|
|
|
: 0;
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
2006-08-01 03:46:16 +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
|
|
|
/* Test with early allocation */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Pset_alloc_time(cparms, H5D_ALLOC_TIME_EARLY) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
nerrors +=
|
|
|
|
write_data("extendible dataset with early allocation", file, "dataset2a", cparms, mem_space) < 0 ? 1
|
|
|
|
: 0;
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
2020-09-30 22:27:10 +08:00
|
|
|
nerrors += write_data_deprec("extendible dataset with early allocation w/deprec. symbols", file,
|
|
|
|
"dataset2b", cparms, mem_space) < 0
|
|
|
|
? 1
|
|
|
|
: 0;
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
2006-08-01 03:46:16 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Pclose(cparms) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Sclose(mem_space) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Fclose(file) < 0)
|
|
|
|
TEST_ERROR;
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +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);
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (nerrors) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("***** %d FAILURE%s! *****\n", nerrors, (1 == nerrors) ? "" : "S");
|
2023-06-29 23:18:01 +08:00
|
|
|
exit(EXIT_FAILURE);
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
} /* end if */
|
[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
|
|
|
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("All extend 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-21 11:36:51 +08:00
|
|
|
|
2023-06-29 06:48:12 +08:00
|
|
|
free(buf1);
|
|
|
|
free(buf1_data);
|
|
|
|
free(buf2);
|
|
|
|
free(buf2_data);
|
2020-01-16 01:32:01 +08:00
|
|
|
|
2023-06-29 23:18:01 +08:00
|
|
|
exit(EXIT_SUCCESS);
|
2006-08-01 03:46:16 +08:00
|
|
|
|
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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-08 23:26:02 +08:00
|
|
|
error:
|
2020-01-16 01:32:01 +08:00
|
|
|
|
2023-06-29 06:48:12 +08:00
|
|
|
free(buf1);
|
|
|
|
free(buf1_data);
|
|
|
|
free(buf2);
|
|
|
|
free(buf2_data);
|
2020-01-16 01:32:01 +08:00
|
|
|
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("*** One or more extend tests failed ***\n");
|
2023-06-29 23:18:01 +08:00
|
|
|
exit(EXIT_FAILURE);
|
2019-09-07 09:06:26 +08:00
|
|
|
} /* end main() */
|