[svn-r339] Changes since 19980408
----------------------
./src/H5Osdspace.c
./html/H5.format.html
In the past we were allowed to have >2GB files on a 32-bit
machine as long as no dataset within the file was larger than
4GB (or whatever sizeof(size_t) is). That's been fixed now.
All dataset size calculations are done with `hsize_t' which is
normally defined as `unsigned long long'.
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fprivate.h
./src/H5P.c
./src/H5Ppublic.h
The file family member size can now be set/queried. The
default is still 64MB, but it can be set to 1GB by saying:
H5Pset_family (plist, 30, H5P_DEFAULT);
When opening an existing file family the specified
bits-per-member is ignored and the first member of the family
determines the bits-per-member, which can be retrieved with
H5Pget_family().
./acconfig.h
./configure.in
./src/H5config.h
./src/H5public.h
Added `--disable-hsizet' so that those with old GCC compilers
(<2.8.1) can still compile the code.
./src/H5.c
./src/H5private.h
Added HDfprintf() which works just like fprintf() except you
can give `H' as a size modifier for the integer conversions
and supply an `hsize_t' or `hssize_t' argument without casting
it. For instance:
hsize_t npoints = H5Sget_npoints(space);
HDfprintf(stdout,"Dataset has %Hd (%#018Hx) points\n",
npoints, npoints);
You can now give `%a' as a format to print an address, but all
formating flags are ignored and it causes the return value of
HDfprintf() to not include the characters in the address (but
who uses the return value anyway :-). Example:
H5G_t *grp;
HDfprintf(stdout, "Group object header at %a\n",
&(grp->ent.header));
Added HDstrtoll() which works exactly like [HD]strtol() except
the result is an int64.
./src/debug.c
Large addresses can now be entered from the command-line. Use
either decimal, octal (leading `0') or hexadecimal (leading
`0x') when giving the address.
./src/h5ls.c
The printf format for dataset dimensions was changed to `%Hu'
to support large datasets.
./test/big.c [NEW]
A test for big datasets on 32-bit machines. This test is not
run by default. Don't try to run it on an nfs-mounted file
system or other file system that doesn't support holes because
it creates two 32GB datasets of all zero.
1998-04-10 04:22:11 +08:00
|
|
|
|
/*
|
|
|
|
|
* Copyright (C) 1998 NCSA
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Programmer: Robb Matzke <matzke@llnl.gov>
|
|
|
|
|
* Wednesday, April 8, 1998
|
|
|
|
|
*/
|
|
|
|
|
#include <assert.h>
|
1998-04-15 00:44:46 +08:00
|
|
|
|
#include <ctype.h>
|
1998-07-16 05:21:15 +08:00
|
|
|
|
#include <fcntl.h>
|
[svn-r339] Changes since 19980408
----------------------
./src/H5Osdspace.c
./html/H5.format.html
In the past we were allowed to have >2GB files on a 32-bit
machine as long as no dataset within the file was larger than
4GB (or whatever sizeof(size_t) is). That's been fixed now.
All dataset size calculations are done with `hsize_t' which is
normally defined as `unsigned long long'.
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fprivate.h
./src/H5P.c
./src/H5Ppublic.h
The file family member size can now be set/queried. The
default is still 64MB, but it can be set to 1GB by saying:
H5Pset_family (plist, 30, H5P_DEFAULT);
When opening an existing file family the specified
bits-per-member is ignored and the first member of the family
determines the bits-per-member, which can be retrieved with
H5Pget_family().
./acconfig.h
./configure.in
./src/H5config.h
./src/H5public.h
Added `--disable-hsizet' so that those with old GCC compilers
(<2.8.1) can still compile the code.
./src/H5.c
./src/H5private.h
Added HDfprintf() which works just like fprintf() except you
can give `H' as a size modifier for the integer conversions
and supply an `hsize_t' or `hssize_t' argument without casting
it. For instance:
hsize_t npoints = H5Sget_npoints(space);
HDfprintf(stdout,"Dataset has %Hd (%#018Hx) points\n",
npoints, npoints);
You can now give `%a' as a format to print an address, but all
formating flags are ignored and it causes the return value of
HDfprintf() to not include the characters in the address (but
who uses the return value anyway :-). Example:
H5G_t *grp;
HDfprintf(stdout, "Group object header at %a\n",
&(grp->ent.header));
Added HDstrtoll() which works exactly like [HD]strtol() except
the result is an int64.
./src/debug.c
Large addresses can now be entered from the command-line. Use
either decimal, octal (leading `0') or hexadecimal (leading
`0x') when giving the address.
./src/h5ls.c
The printf format for dataset dimensions was changed to `%Hu'
to support large datasets.
./test/big.c [NEW]
A test for big datasets on 32-bit machines. This test is not
run by default. Don't try to run it on an nfs-mounted file
system or other file system that doesn't support holes because
it creates two 32GB datasets of all zero.
1998-04-10 04:22:11 +08:00
|
|
|
|
#include <hdf5.h>
|
1998-04-15 00:44:46 +08:00
|
|
|
|
#include <math.h>
|
1998-07-16 05:21:15 +08:00
|
|
|
|
#include <stdio.h>
|
1998-04-15 00:44:46 +08:00
|
|
|
|
#include <stdlib.h>
|
1998-07-16 05:21:15 +08:00
|
|
|
|
#include <sys/stat.h>
|
1998-04-15 00:44:46 +08:00
|
|
|
|
|
|
|
|
|
#include <H5private.h> /*needed for HDfprintf() */
|
|
|
|
|
|
|
|
|
|
#define FNAME "big%05d.h5"
|
1998-07-16 05:21:15 +08:00
|
|
|
|
#define DNAME "big.data"
|
1998-04-15 00:44:46 +08:00
|
|
|
|
#define WRT_N 50
|
|
|
|
|
#define WRT_SIZE 4*1024
|
1998-05-14 01:58:24 +08:00
|
|
|
|
#define FAMILY_SIZE 1024*1024*1024
|
1998-10-24 02:16:48 +08:00
|
|
|
|
#if defined(WIN32)
|
|
|
|
|
#define GB8LL ((unsigned __int64)8*1024*1024*1024)
|
|
|
|
|
#else
|
1998-07-16 05:21:15 +08:00
|
|
|
|
#define GB8LL ((unsigned long long)8*1024*1024*1024)
|
1998-10-24 02:16:48 +08:00
|
|
|
|
#endif
|
1998-04-15 00:44:46 +08:00
|
|
|
|
static hsize_t
|
|
|
|
|
randll (hsize_t limit)
|
|
|
|
|
{
|
|
|
|
|
hsize_t acc = rand ();
|
|
|
|
|
acc *= rand ();
|
|
|
|
|
|
|
|
|
|
return acc % limit;
|
|
|
|
|
}
|
|
|
|
|
|
1998-07-16 05:21:15 +08:00
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
* Function: display_error_cb
|
|
|
|
|
*
|
|
|
|
|
* Purpose: Displays the error stack after printing "*FAILED*".
|
|
|
|
|
*
|
|
|
|
|
* Return: Success: 0
|
|
|
|
|
*
|
|
|
|
|
* Failure: -1
|
|
|
|
|
*
|
|
|
|
|
* Programmer: Robb Matzke
|
|
|
|
|
* Wednesday, March 4, 1998
|
|
|
|
|
*
|
|
|
|
|
* Modifications:
|
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
static herr_t
|
|
|
|
|
display_error_cb (void __unused__ *client_data)
|
|
|
|
|
{
|
|
|
|
|
puts ("*FAILED*");
|
|
|
|
|
H5Eprint (stdout);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
[svn-r339] Changes since 19980408
----------------------
./src/H5Osdspace.c
./html/H5.format.html
In the past we were allowed to have >2GB files on a 32-bit
machine as long as no dataset within the file was larger than
4GB (or whatever sizeof(size_t) is). That's been fixed now.
All dataset size calculations are done with `hsize_t' which is
normally defined as `unsigned long long'.
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fprivate.h
./src/H5P.c
./src/H5Ppublic.h
The file family member size can now be set/queried. The
default is still 64MB, but it can be set to 1GB by saying:
H5Pset_family (plist, 30, H5P_DEFAULT);
When opening an existing file family the specified
bits-per-member is ignored and the first member of the family
determines the bits-per-member, which can be retrieved with
H5Pget_family().
./acconfig.h
./configure.in
./src/H5config.h
./src/H5public.h
Added `--disable-hsizet' so that those with old GCC compilers
(<2.8.1) can still compile the code.
./src/H5.c
./src/H5private.h
Added HDfprintf() which works just like fprintf() except you
can give `H' as a size modifier for the integer conversions
and supply an `hsize_t' or `hssize_t' argument without casting
it. For instance:
hsize_t npoints = H5Sget_npoints(space);
HDfprintf(stdout,"Dataset has %Hd (%#018Hx) points\n",
npoints, npoints);
You can now give `%a' as a format to print an address, but all
formating flags are ignored and it causes the return value of
HDfprintf() to not include the characters in the address (but
who uses the return value anyway :-). Example:
H5G_t *grp;
HDfprintf(stdout, "Group object header at %a\n",
&(grp->ent.header));
Added HDstrtoll() which works exactly like [HD]strtol() except
the result is an int64.
./src/debug.c
Large addresses can now be entered from the command-line. Use
either decimal, octal (leading `0') or hexadecimal (leading
`0x') when giving the address.
./src/h5ls.c
The printf format for dataset dimensions was changed to `%Hu'
to support large datasets.
./test/big.c [NEW]
A test for big datasets on 32-bit machines. This test is not
run by default. Don't try to run it on an nfs-mounted file
system or other file system that doesn't support holes because
it creates two 32GB datasets of all zero.
1998-04-10 04:22:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
1998-07-16 05:21:15 +08:00
|
|
|
|
* Function: is_sparse
|
|
|
|
|
*
|
|
|
|
|
* Purpose: Determines if the file system of the current working
|
|
|
|
|
* directory supports holes.
|
|
|
|
|
*
|
|
|
|
|
* Return: Success: Non-zero if holes are supported; zero
|
|
|
|
|
* otherwise.
|
|
|
|
|
*
|
|
|
|
|
* Failure: zero
|
|
|
|
|
*
|
|
|
|
|
* Programmer: Robb Matzke
|
|
|
|
|
* Wednesday, July 15, 1998
|
|
|
|
|
*
|
|
|
|
|
* Modifications:
|
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
static int
|
|
|
|
|
is_sparse(void)
|
|
|
|
|
{
|
|
|
|
|
int fd;
|
|
|
|
|
struct stat sb;
|
|
|
|
|
|
|
|
|
|
if ((fd=open("x.h5", O_RDWR|O_TRUNC|O_CREAT, 0666))<0) return 0;
|
|
|
|
|
if (lseek(fd, 1024*1024, SEEK_SET)!=1024*1024) return 0;
|
|
|
|
|
if (5!=write(fd, "hello", 5)) return 0;
|
|
|
|
|
if (stat("x.h5", &sb)<0) return 0;
|
|
|
|
|
if (unlink("x.h5")<0) return 0;
|
1998-10-24 02:16:48 +08:00
|
|
|
|
#if !defined(WIN32)
|
1998-07-16 05:21:15 +08:00
|
|
|
|
return (sb.st_blocks*512 < (unsigned)sb.st_size);
|
1998-10-24 02:16:48 +08:00
|
|
|
|
#else
|
|
|
|
|
return (0);
|
|
|
|
|
#endif
|
1998-07-16 05:21:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
1998-08-07 05:32:33 +08:00
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
* Function: enough_room
|
|
|
|
|
*
|
|
|
|
|
* Purpose: Tries to create a bunch of sparse files to see if quotas will
|
|
|
|
|
* get in the way. Some systems also have problems opening
|
|
|
|
|
* enough files and we'll check that too.
|
|
|
|
|
*
|
|
|
|
|
* Return: Success: Non-zero
|
|
|
|
|
*
|
|
|
|
|
* Failure: zero
|
|
|
|
|
*
|
|
|
|
|
* Programmer: Robb Matzke
|
|
|
|
|
* Thursday, August 6, 1998
|
|
|
|
|
*
|
|
|
|
|
* Modifications:
|
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
static int
|
|
|
|
|
enough_room(void)
|
|
|
|
|
{
|
|
|
|
|
int ret_value=0;
|
|
|
|
|
int fd[68];
|
|
|
|
|
size_t i, size = (size_t)1 << 30;
|
|
|
|
|
char name[32];
|
|
|
|
|
|
|
|
|
|
/* Initialize file descriptors */
|
|
|
|
|
for (i=0; i<NELMTS(fd); i++) fd[i] = -1;
|
|
|
|
|
|
|
|
|
|
/* Create files */
|
|
|
|
|
for (i=0; i<NELMTS(fd); i++) {
|
|
|
|
|
sprintf(name, FNAME, i);
|
|
|
|
|
if ((fd[i]=open(name, O_RDWR|O_CREAT|O_TRUNC, 0666))<0) {
|
|
|
|
|
goto done;
|
|
|
|
|
}
|
|
|
|
|
if ((ssize_t)size != lseek(fd[i], size, SEEK_SET)) {
|
|
|
|
|
goto done;
|
|
|
|
|
}
|
|
|
|
|
if (1!=write(fd[i], "X", 1)) {
|
|
|
|
|
goto done;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ret_value = 1;
|
|
|
|
|
|
|
|
|
|
done:
|
|
|
|
|
for (i=0; i<NELMTS(fd) && fd[i]>=0; i++) {
|
|
|
|
|
sprintf(name, FNAME, i);
|
|
|
|
|
close(fd[i]);
|
|
|
|
|
unlink(name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ret_value;
|
|
|
|
|
}
|
|
|
|
|
|
1998-07-16 05:21:15 +08:00
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
* Function: writer
|
[svn-r339] Changes since 19980408
----------------------
./src/H5Osdspace.c
./html/H5.format.html
In the past we were allowed to have >2GB files on a 32-bit
machine as long as no dataset within the file was larger than
4GB (or whatever sizeof(size_t) is). That's been fixed now.
All dataset size calculations are done with `hsize_t' which is
normally defined as `unsigned long long'.
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fprivate.h
./src/H5P.c
./src/H5Ppublic.h
The file family member size can now be set/queried. The
default is still 64MB, but it can be set to 1GB by saying:
H5Pset_family (plist, 30, H5P_DEFAULT);
When opening an existing file family the specified
bits-per-member is ignored and the first member of the family
determines the bits-per-member, which can be retrieved with
H5Pget_family().
./acconfig.h
./configure.in
./src/H5config.h
./src/H5public.h
Added `--disable-hsizet' so that those with old GCC compilers
(<2.8.1) can still compile the code.
./src/H5.c
./src/H5private.h
Added HDfprintf() which works just like fprintf() except you
can give `H' as a size modifier for the integer conversions
and supply an `hsize_t' or `hssize_t' argument without casting
it. For instance:
hsize_t npoints = H5Sget_npoints(space);
HDfprintf(stdout,"Dataset has %Hd (%#018Hx) points\n",
npoints, npoints);
You can now give `%a' as a format to print an address, but all
formating flags are ignored and it causes the return value of
HDfprintf() to not include the characters in the address (but
who uses the return value anyway :-). Example:
H5G_t *grp;
HDfprintf(stdout, "Group object header at %a\n",
&(grp->ent.header));
Added HDstrtoll() which works exactly like [HD]strtol() except
the result is an int64.
./src/debug.c
Large addresses can now be entered from the command-line. Use
either decimal, octal (leading `0') or hexadecimal (leading
`0x') when giving the address.
./src/h5ls.c
The printf format for dataset dimensions was changed to `%Hu'
to support large datasets.
./test/big.c [NEW]
A test for big datasets on 32-bit machines. This test is not
run by default. Don't try to run it on an nfs-mounted file
system or other file system that doesn't support holes because
it creates two 32GB datasets of all zero.
1998-04-10 04:22:11 +08:00
|
|
|
|
*
|
|
|
|
|
* Purpose: Creates a *big* dataset.
|
|
|
|
|
*
|
1998-07-16 05:21:15 +08:00
|
|
|
|
* Return: Success: 0
|
[svn-r339] Changes since 19980408
----------------------
./src/H5Osdspace.c
./html/H5.format.html
In the past we were allowed to have >2GB files on a 32-bit
machine as long as no dataset within the file was larger than
4GB (or whatever sizeof(size_t) is). That's been fixed now.
All dataset size calculations are done with `hsize_t' which is
normally defined as `unsigned long long'.
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fprivate.h
./src/H5P.c
./src/H5Ppublic.h
The file family member size can now be set/queried. The
default is still 64MB, but it can be set to 1GB by saying:
H5Pset_family (plist, 30, H5P_DEFAULT);
When opening an existing file family the specified
bits-per-member is ignored and the first member of the family
determines the bits-per-member, which can be retrieved with
H5Pget_family().
./acconfig.h
./configure.in
./src/H5config.h
./src/H5public.h
Added `--disable-hsizet' so that those with old GCC compilers
(<2.8.1) can still compile the code.
./src/H5.c
./src/H5private.h
Added HDfprintf() which works just like fprintf() except you
can give `H' as a size modifier for the integer conversions
and supply an `hsize_t' or `hssize_t' argument without casting
it. For instance:
hsize_t npoints = H5Sget_npoints(space);
HDfprintf(stdout,"Dataset has %Hd (%#018Hx) points\n",
npoints, npoints);
You can now give `%a' as a format to print an address, but all
formating flags are ignored and it causes the return value of
HDfprintf() to not include the characters in the address (but
who uses the return value anyway :-). Example:
H5G_t *grp;
HDfprintf(stdout, "Group object header at %a\n",
&(grp->ent.header));
Added HDstrtoll() which works exactly like [HD]strtol() except
the result is an int64.
./src/debug.c
Large addresses can now be entered from the command-line. Use
either decimal, octal (leading `0') or hexadecimal (leading
`0x') when giving the address.
./src/h5ls.c
The printf format for dataset dimensions was changed to `%Hu'
to support large datasets.
./test/big.c [NEW]
A test for big datasets on 32-bit machines. This test is not
run by default. Don't try to run it on an nfs-mounted file
system or other file system that doesn't support holes because
it creates two 32GB datasets of all zero.
1998-04-10 04:22:11 +08:00
|
|
|
|
*
|
1998-07-16 05:21:15 +08:00
|
|
|
|
* Failure: >0
|
[svn-r339] Changes since 19980408
----------------------
./src/H5Osdspace.c
./html/H5.format.html
In the past we were allowed to have >2GB files on a 32-bit
machine as long as no dataset within the file was larger than
4GB (or whatever sizeof(size_t) is). That's been fixed now.
All dataset size calculations are done with `hsize_t' which is
normally defined as `unsigned long long'.
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fprivate.h
./src/H5P.c
./src/H5Ppublic.h
The file family member size can now be set/queried. The
default is still 64MB, but it can be set to 1GB by saying:
H5Pset_family (plist, 30, H5P_DEFAULT);
When opening an existing file family the specified
bits-per-member is ignored and the first member of the family
determines the bits-per-member, which can be retrieved with
H5Pget_family().
./acconfig.h
./configure.in
./src/H5config.h
./src/H5public.h
Added `--disable-hsizet' so that those with old GCC compilers
(<2.8.1) can still compile the code.
./src/H5.c
./src/H5private.h
Added HDfprintf() which works just like fprintf() except you
can give `H' as a size modifier for the integer conversions
and supply an `hsize_t' or `hssize_t' argument without casting
it. For instance:
hsize_t npoints = H5Sget_npoints(space);
HDfprintf(stdout,"Dataset has %Hd (%#018Hx) points\n",
npoints, npoints);
You can now give `%a' as a format to print an address, but all
formating flags are ignored and it causes the return value of
HDfprintf() to not include the characters in the address (but
who uses the return value anyway :-). Example:
H5G_t *grp;
HDfprintf(stdout, "Group object header at %a\n",
&(grp->ent.header));
Added HDstrtoll() which works exactly like [HD]strtol() except
the result is an int64.
./src/debug.c
Large addresses can now be entered from the command-line. Use
either decimal, octal (leading `0') or hexadecimal (leading
`0x') when giving the address.
./src/h5ls.c
The printf format for dataset dimensions was changed to `%Hu'
to support large datasets.
./test/big.c [NEW]
A test for big datasets on 32-bit machines. This test is not
run by default. Don't try to run it on an nfs-mounted file
system or other file system that doesn't support holes because
it creates two 32GB datasets of all zero.
1998-04-10 04:22:11 +08:00
|
|
|
|
*
|
|
|
|
|
* Programmer: Robb Matzke
|
|
|
|
|
* Wednesday, April 8, 1998
|
|
|
|
|
*
|
|
|
|
|
* Modifications:
|
1998-07-16 05:21:15 +08:00
|
|
|
|
* Robb Matzke, 15 Jul 1998
|
|
|
|
|
* Addresses are written to the file DNAME instead of stdout.
|
[svn-r339] Changes since 19980408
----------------------
./src/H5Osdspace.c
./html/H5.format.html
In the past we were allowed to have >2GB files on a 32-bit
machine as long as no dataset within the file was larger than
4GB (or whatever sizeof(size_t) is). That's been fixed now.
All dataset size calculations are done with `hsize_t' which is
normally defined as `unsigned long long'.
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fprivate.h
./src/H5P.c
./src/H5Ppublic.h
The file family member size can now be set/queried. The
default is still 64MB, but it can be set to 1GB by saying:
H5Pset_family (plist, 30, H5P_DEFAULT);
When opening an existing file family the specified
bits-per-member is ignored and the first member of the family
determines the bits-per-member, which can be retrieved with
H5Pget_family().
./acconfig.h
./configure.in
./src/H5config.h
./src/H5public.h
Added `--disable-hsizet' so that those with old GCC compilers
(<2.8.1) can still compile the code.
./src/H5.c
./src/H5private.h
Added HDfprintf() which works just like fprintf() except you
can give `H' as a size modifier for the integer conversions
and supply an `hsize_t' or `hssize_t' argument without casting
it. For instance:
hsize_t npoints = H5Sget_npoints(space);
HDfprintf(stdout,"Dataset has %Hd (%#018Hx) points\n",
npoints, npoints);
You can now give `%a' as a format to print an address, but all
formating flags are ignored and it causes the return value of
HDfprintf() to not include the characters in the address (but
who uses the return value anyway :-). Example:
H5G_t *grp;
HDfprintf(stdout, "Group object header at %a\n",
&(grp->ent.header));
Added HDstrtoll() which works exactly like [HD]strtol() except
the result is an int64.
./src/debug.c
Large addresses can now be entered from the command-line. Use
either decimal, octal (leading `0') or hexadecimal (leading
`0x') when giving the address.
./src/h5ls.c
The printf format for dataset dimensions was changed to `%Hu'
to support large datasets.
./test/big.c [NEW]
A test for big datasets on 32-bit machines. This test is not
run by default. Don't try to run it on an nfs-mounted file
system or other file system that doesn't support holes because
it creates two 32GB datasets of all zero.
1998-04-10 04:22:11 +08:00
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
1998-07-16 05:21:15 +08:00
|
|
|
|
static int
|
1998-04-15 00:44:46 +08:00
|
|
|
|
writer (int wrt_n)
|
[svn-r339] Changes since 19980408
----------------------
./src/H5Osdspace.c
./html/H5.format.html
In the past we were allowed to have >2GB files on a 32-bit
machine as long as no dataset within the file was larger than
4GB (or whatever sizeof(size_t) is). That's been fixed now.
All dataset size calculations are done with `hsize_t' which is
normally defined as `unsigned long long'.
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fprivate.h
./src/H5P.c
./src/H5Ppublic.h
The file family member size can now be set/queried. The
default is still 64MB, but it can be set to 1GB by saying:
H5Pset_family (plist, 30, H5P_DEFAULT);
When opening an existing file family the specified
bits-per-member is ignored and the first member of the family
determines the bits-per-member, which can be retrieved with
H5Pget_family().
./acconfig.h
./configure.in
./src/H5config.h
./src/H5public.h
Added `--disable-hsizet' so that those with old GCC compilers
(<2.8.1) can still compile the code.
./src/H5.c
./src/H5private.h
Added HDfprintf() which works just like fprintf() except you
can give `H' as a size modifier for the integer conversions
and supply an `hsize_t' or `hssize_t' argument without casting
it. For instance:
hsize_t npoints = H5Sget_npoints(space);
HDfprintf(stdout,"Dataset has %Hd (%#018Hx) points\n",
npoints, npoints);
You can now give `%a' as a format to print an address, but all
formating flags are ignored and it causes the return value of
HDfprintf() to not include the characters in the address (but
who uses the return value anyway :-). Example:
H5G_t *grp;
HDfprintf(stdout, "Group object header at %a\n",
&(grp->ent.header));
Added HDstrtoll() which works exactly like [HD]strtol() except
the result is an int64.
./src/debug.c
Large addresses can now be entered from the command-line. Use
either decimal, octal (leading `0') or hexadecimal (leading
`0x') when giving the address.
./src/h5ls.c
The printf format for dataset dimensions was changed to `%Hu'
to support large datasets.
./test/big.c [NEW]
A test for big datasets on 32-bit machines. This test is not
run by default. Don't try to run it on an nfs-mounted file
system or other file system that doesn't support holes because
it creates two 32GB datasets of all zero.
1998-04-10 04:22:11 +08:00
|
|
|
|
{
|
|
|
|
|
hsize_t size1[4] = {8, 1024, 1024, 1024};
|
1998-07-16 05:21:15 +08:00
|
|
|
|
hsize_t size2[1] = {GB8LL};
|
1998-04-15 00:44:46 +08:00
|
|
|
|
hssize_t hs_start[1];
|
|
|
|
|
hsize_t hs_size[1];
|
|
|
|
|
hid_t plist, file, space1, space2, mem_space, d1, d2;
|
|
|
|
|
int *buf = malloc (sizeof(int) * WRT_SIZE);
|
|
|
|
|
int i, j;
|
1998-07-16 05:21:15 +08:00
|
|
|
|
FILE *out = fopen(DNAME, "w");
|
[svn-r339] Changes since 19980408
----------------------
./src/H5Osdspace.c
./html/H5.format.html
In the past we were allowed to have >2GB files on a 32-bit
machine as long as no dataset within the file was larger than
4GB (or whatever sizeof(size_t) is). That's been fixed now.
All dataset size calculations are done with `hsize_t' which is
normally defined as `unsigned long long'.
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fprivate.h
./src/H5P.c
./src/H5Ppublic.h
The file family member size can now be set/queried. The
default is still 64MB, but it can be set to 1GB by saying:
H5Pset_family (plist, 30, H5P_DEFAULT);
When opening an existing file family the specified
bits-per-member is ignored and the first member of the family
determines the bits-per-member, which can be retrieved with
H5Pget_family().
./acconfig.h
./configure.in
./src/H5config.h
./src/H5public.h
Added `--disable-hsizet' so that those with old GCC compilers
(<2.8.1) can still compile the code.
./src/H5.c
./src/H5private.h
Added HDfprintf() which works just like fprintf() except you
can give `H' as a size modifier for the integer conversions
and supply an `hsize_t' or `hssize_t' argument without casting
it. For instance:
hsize_t npoints = H5Sget_npoints(space);
HDfprintf(stdout,"Dataset has %Hd (%#018Hx) points\n",
npoints, npoints);
You can now give `%a' as a format to print an address, but all
formating flags are ignored and it causes the return value of
HDfprintf() to not include the characters in the address (but
who uses the return value anyway :-). Example:
H5G_t *grp;
HDfprintf(stdout, "Group object header at %a\n",
&(grp->ent.header));
Added HDstrtoll() which works exactly like [HD]strtol() except
the result is an int64.
./src/debug.c
Large addresses can now be entered from the command-line. Use
either decimal, octal (leading `0') or hexadecimal (leading
`0x') when giving the address.
./src/h5ls.c
The printf format for dataset dimensions was changed to `%Hu'
to support large datasets.
./test/big.c [NEW]
A test for big datasets on 32-bit machines. This test is not
run by default. Don't try to run it on an nfs-mounted file
system or other file system that doesn't support holes because
it creates two 32GB datasets of all zero.
1998-04-10 04:22:11 +08:00
|
|
|
|
|
1998-07-16 05:21:15 +08:00
|
|
|
|
printf("%-70s", "Writing large dataset");
|
1998-09-01 03:21:23 +08:00
|
|
|
|
fflush(stdout);
|
1998-07-16 05:21:15 +08:00
|
|
|
|
|
[svn-r339] Changes since 19980408
----------------------
./src/H5Osdspace.c
./html/H5.format.html
In the past we were allowed to have >2GB files on a 32-bit
machine as long as no dataset within the file was larger than
4GB (or whatever sizeof(size_t) is). That's been fixed now.
All dataset size calculations are done with `hsize_t' which is
normally defined as `unsigned long long'.
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fprivate.h
./src/H5P.c
./src/H5Ppublic.h
The file family member size can now be set/queried. The
default is still 64MB, but it can be set to 1GB by saying:
H5Pset_family (plist, 30, H5P_DEFAULT);
When opening an existing file family the specified
bits-per-member is ignored and the first member of the family
determines the bits-per-member, which can be retrieved with
H5Pget_family().
./acconfig.h
./configure.in
./src/H5config.h
./src/H5public.h
Added `--disable-hsizet' so that those with old GCC compilers
(<2.8.1) can still compile the code.
./src/H5.c
./src/H5private.h
Added HDfprintf() which works just like fprintf() except you
can give `H' as a size modifier for the integer conversions
and supply an `hsize_t' or `hssize_t' argument without casting
it. For instance:
hsize_t npoints = H5Sget_npoints(space);
HDfprintf(stdout,"Dataset has %Hd (%#018Hx) points\n",
npoints, npoints);
You can now give `%a' as a format to print an address, but all
formating flags are ignored and it causes the return value of
HDfprintf() to not include the characters in the address (but
who uses the return value anyway :-). Example:
H5G_t *grp;
HDfprintf(stdout, "Group object header at %a\n",
&(grp->ent.header));
Added HDstrtoll() which works exactly like [HD]strtol() except
the result is an int64.
./src/debug.c
Large addresses can now be entered from the command-line. Use
either decimal, octal (leading `0') or hexadecimal (leading
`0x') when giving the address.
./src/h5ls.c
The printf format for dataset dimensions was changed to `%Hu'
to support large datasets.
./test/big.c [NEW]
A test for big datasets on 32-bit machines. This test is not
run by default. Don't try to run it on an nfs-mounted file
system or other file system that doesn't support holes because
it creates two 32GB datasets of all zero.
1998-04-10 04:22:11 +08:00
|
|
|
|
/*
|
|
|
|
|
* We might be on a machine that has 32-bit files, so create an HDF5 file
|
|
|
|
|
* which is a family of files. Each member of the family will be 1GB
|
|
|
|
|
*/
|
1998-07-16 05:21:15 +08:00
|
|
|
|
if ((plist = H5Pcreate (H5P_FILE_ACCESS))<0) goto error;
|
|
|
|
|
if (H5Pset_family (plist, FAMILY_SIZE, H5P_DEFAULT)<0) goto error;
|
1998-05-22 23:05:53 +08:00
|
|
|
|
file = H5Fcreate (FNAME, H5F_ACC_TRUNC|H5F_ACC_DEBUG, H5P_DEFAULT, plist);
|
1998-07-16 05:21:15 +08:00
|
|
|
|
if (file<0) goto error;
|
|
|
|
|
if (H5Pclose (plist)<0) goto error;
|
[svn-r339] Changes since 19980408
----------------------
./src/H5Osdspace.c
./html/H5.format.html
In the past we were allowed to have >2GB files on a 32-bit
machine as long as no dataset within the file was larger than
4GB (or whatever sizeof(size_t) is). That's been fixed now.
All dataset size calculations are done with `hsize_t' which is
normally defined as `unsigned long long'.
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fprivate.h
./src/H5P.c
./src/H5Ppublic.h
The file family member size can now be set/queried. The
default is still 64MB, but it can be set to 1GB by saying:
H5Pset_family (plist, 30, H5P_DEFAULT);
When opening an existing file family the specified
bits-per-member is ignored and the first member of the family
determines the bits-per-member, which can be retrieved with
H5Pget_family().
./acconfig.h
./configure.in
./src/H5config.h
./src/H5public.h
Added `--disable-hsizet' so that those with old GCC compilers
(<2.8.1) can still compile the code.
./src/H5.c
./src/H5private.h
Added HDfprintf() which works just like fprintf() except you
can give `H' as a size modifier for the integer conversions
and supply an `hsize_t' or `hssize_t' argument without casting
it. For instance:
hsize_t npoints = H5Sget_npoints(space);
HDfprintf(stdout,"Dataset has %Hd (%#018Hx) points\n",
npoints, npoints);
You can now give `%a' as a format to print an address, but all
formating flags are ignored and it causes the return value of
HDfprintf() to not include the characters in the address (but
who uses the return value anyway :-). Example:
H5G_t *grp;
HDfprintf(stdout, "Group object header at %a\n",
&(grp->ent.header));
Added HDstrtoll() which works exactly like [HD]strtol() except
the result is an int64.
./src/debug.c
Large addresses can now be entered from the command-line. Use
either decimal, octal (leading `0') or hexadecimal (leading
`0x') when giving the address.
./src/h5ls.c
The printf format for dataset dimensions was changed to `%Hu'
to support large datasets.
./test/big.c [NEW]
A test for big datasets on 32-bit machines. This test is not
run by default. Don't try to run it on an nfs-mounted file
system or other file system that doesn't support holes because
it creates two 32GB datasets of all zero.
1998-04-10 04:22:11 +08:00
|
|
|
|
|
|
|
|
|
/* Create simple data spaces according to the size specified above. */
|
1998-07-16 05:21:15 +08:00
|
|
|
|
if ((space1 = H5Screate_simple (4, size1, size1))<0 ||
|
|
|
|
|
(space2 = H5Screate_simple (1, size2, size2))<0) {
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
[svn-r339] Changes since 19980408
----------------------
./src/H5Osdspace.c
./html/H5.format.html
In the past we were allowed to have >2GB files on a 32-bit
machine as long as no dataset within the file was larger than
4GB (or whatever sizeof(size_t) is). That's been fixed now.
All dataset size calculations are done with `hsize_t' which is
normally defined as `unsigned long long'.
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fprivate.h
./src/H5P.c
./src/H5Ppublic.h
The file family member size can now be set/queried. The
default is still 64MB, but it can be set to 1GB by saying:
H5Pset_family (plist, 30, H5P_DEFAULT);
When opening an existing file family the specified
bits-per-member is ignored and the first member of the family
determines the bits-per-member, which can be retrieved with
H5Pget_family().
./acconfig.h
./configure.in
./src/H5config.h
./src/H5public.h
Added `--disable-hsizet' so that those with old GCC compilers
(<2.8.1) can still compile the code.
./src/H5.c
./src/H5private.h
Added HDfprintf() which works just like fprintf() except you
can give `H' as a size modifier for the integer conversions
and supply an `hsize_t' or `hssize_t' argument without casting
it. For instance:
hsize_t npoints = H5Sget_npoints(space);
HDfprintf(stdout,"Dataset has %Hd (%#018Hx) points\n",
npoints, npoints);
You can now give `%a' as a format to print an address, but all
formating flags are ignored and it causes the return value of
HDfprintf() to not include the characters in the address (but
who uses the return value anyway :-). Example:
H5G_t *grp;
HDfprintf(stdout, "Group object header at %a\n",
&(grp->ent.header));
Added HDstrtoll() which works exactly like [HD]strtol() except
the result is an int64.
./src/debug.c
Large addresses can now be entered from the command-line. Use
either decimal, octal (leading `0') or hexadecimal (leading
`0x') when giving the address.
./src/h5ls.c
The printf format for dataset dimensions was changed to `%Hu'
to support large datasets.
./test/big.c [NEW]
A test for big datasets on 32-bit machines. This test is not
run by default. Don't try to run it on an nfs-mounted file
system or other file system that doesn't support holes because
it creates two 32GB datasets of all zero.
1998-04-10 04:22:11 +08:00
|
|
|
|
/* Create the datasets */
|
1998-07-16 05:21:15 +08:00
|
|
|
|
if ((d1=H5Dcreate (file, "d1", H5T_NATIVE_INT, space1, H5P_DEFAULT))<0 ||
|
|
|
|
|
(d2=H5Dcreate (file, "d2", H5T_NATIVE_INT, space2, H5P_DEFAULT))<0) {
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
1998-04-15 00:44:46 +08:00
|
|
|
|
|
|
|
|
|
/* Write some things to them randomly */
|
|
|
|
|
hs_size[0] = WRT_SIZE;
|
1998-07-16 05:21:15 +08:00
|
|
|
|
if ((mem_space = H5Screate_simple (1, hs_size, hs_size))<0) goto error;
|
1998-04-15 00:44:46 +08:00
|
|
|
|
for (i=0; i<wrt_n; i++) {
|
|
|
|
|
hs_start[0] = randll (size2[0]);
|
1998-07-16 05:21:15 +08:00
|
|
|
|
HDfprintf (out, "#%03d 0x%016Hx\n", i, hs_start[0]);
|
|
|
|
|
if (H5Sselect_hyperslab (space2, H5S_SELECT_SET, hs_start, NULL,
|
|
|
|
|
hs_size, NULL)<0) goto error;
|
1998-04-15 00:44:46 +08:00
|
|
|
|
for (j=0; j<WRT_SIZE; j++) {
|
|
|
|
|
buf[j] = i+1;
|
|
|
|
|
}
|
1998-07-16 05:21:15 +08:00
|
|
|
|
if (H5Dwrite (d2, H5T_NATIVE_INT, mem_space, space2,
|
|
|
|
|
H5P_DEFAULT, buf)<0) goto error;
|
1998-04-15 00:44:46 +08:00
|
|
|
|
}
|
|
|
|
|
|
1998-07-16 05:21:15 +08:00
|
|
|
|
if (H5Dclose (d1)<0) goto error;
|
|
|
|
|
if (H5Dclose (d2)<0) goto error;
|
|
|
|
|
if (H5Sclose (mem_space)<0) goto error;
|
|
|
|
|
if (H5Sclose (space1)<0) goto error;
|
|
|
|
|
if (H5Sclose (space2)<0) goto error;
|
|
|
|
|
if (H5Fclose (file)<0) goto error;
|
1998-04-15 00:44:46 +08:00
|
|
|
|
free (buf);
|
1998-07-16 05:21:15 +08:00
|
|
|
|
fclose(out);
|
|
|
|
|
puts(" PASSED");
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
error:
|
|
|
|
|
return 1;
|
1998-04-15 00:44:46 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
* Function: reader
|
|
|
|
|
*
|
|
|
|
|
* Purpose: Reads some data from random locations in the dataset.
|
|
|
|
|
*
|
1998-07-16 05:21:15 +08:00
|
|
|
|
* Return: Success: 0
|
|
|
|
|
*
|
|
|
|
|
* Failure: >0
|
1998-04-15 00:44:46 +08:00
|
|
|
|
*
|
|
|
|
|
* Programmer: Robb Matzke
|
|
|
|
|
* Friday, April 10, 1998
|
|
|
|
|
*
|
|
|
|
|
* Modifications:
|
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
1998-07-16 05:21:15 +08:00
|
|
|
|
static int
|
|
|
|
|
reader (void)
|
1998-04-15 00:44:46 +08:00
|
|
|
|
{
|
|
|
|
|
FILE *script;
|
|
|
|
|
hid_t plist, file, mspace, fspace, d2;
|
1998-07-16 05:21:15 +08:00
|
|
|
|
char ln[128], *s;
|
1998-04-15 00:44:46 +08:00
|
|
|
|
hssize_t hs_offset[1];
|
|
|
|
|
hsize_t hs_size[1] = {WRT_SIZE};
|
|
|
|
|
int *buf = malloc (sizeof(int) * WRT_SIZE);
|
1998-07-16 05:21:15 +08:00
|
|
|
|
int i, j, zero, wrong, nerrors=0;
|
1998-04-15 00:44:46 +08:00
|
|
|
|
|
|
|
|
|
/* Open script file */
|
1998-07-16 05:21:15 +08:00
|
|
|
|
script = fopen (DNAME, "r");
|
1998-04-15 00:44:46 +08:00
|
|
|
|
|
|
|
|
|
/* Open HDF5 file */
|
1998-07-16 05:21:15 +08:00
|
|
|
|
if ((plist = H5Pcreate (H5P_FILE_ACCESS))<0) goto error;
|
|
|
|
|
if (H5Pset_family (plist, FAMILY_SIZE, H5P_DEFAULT)<0) goto error;
|
|
|
|
|
if ((file = H5Fopen (FNAME, H5F_ACC_RDONLY|H5F_ACC_DEBUG, plist))<0) {
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
if (H5Pclose (plist)<0) goto error;
|
1998-04-15 00:44:46 +08:00
|
|
|
|
|
|
|
|
|
/* Open the dataset */
|
1998-07-16 05:21:15 +08:00
|
|
|
|
if ((d2 = H5Dopen (file, "d2"))<0) goto error;
|
|
|
|
|
if ((fspace = H5Dget_space (d2))<0) goto error;
|
1998-04-15 00:44:46 +08:00
|
|
|
|
|
|
|
|
|
/* Describe `buf' */
|
1998-07-16 05:21:15 +08:00
|
|
|
|
if ((mspace = H5Screate_simple (1, hs_size, hs_size))<0) goto error;
|
1998-04-15 00:44:46 +08:00
|
|
|
|
|
|
|
|
|
/* Read each region */
|
|
|
|
|
while (fgets (ln, sizeof(ln), script)) {
|
|
|
|
|
if ('#'!=ln[0]) break;
|
1998-05-14 01:58:24 +08:00
|
|
|
|
i = (int)strtol (ln+1, &s, 10);
|
1998-04-15 00:44:46 +08:00
|
|
|
|
hs_offset[0] = HDstrtoll (s, NULL, 0);
|
1998-07-16 05:21:15 +08:00
|
|
|
|
HDfprintf (stdout, "#%03d 0x%016Hx%47s", i, hs_offset[0], "");
|
1998-04-15 00:44:46 +08:00
|
|
|
|
fflush (stdout);
|
|
|
|
|
|
1998-07-16 05:21:15 +08:00
|
|
|
|
if (H5Sselect_hyperslab (fspace, H5S_SELECT_SET, hs_offset, NULL,
|
|
|
|
|
hs_size, NULL)<0) goto error;
|
|
|
|
|
if (H5Dread (d2, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT, buf)<0) {
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
1998-04-15 00:44:46 +08:00
|
|
|
|
|
|
|
|
|
/* Check */
|
|
|
|
|
for (j=zero=wrong=0; j<WRT_SIZE; j++) {
|
|
|
|
|
if (0==buf[j]) zero++;
|
|
|
|
|
else if (buf[j]!=i+1) wrong++;
|
|
|
|
|
}
|
|
|
|
|
if (zero) {
|
1998-07-16 05:21:15 +08:00
|
|
|
|
puts("*FAILED*");
|
|
|
|
|
printf(" %d zero%s\n", zero, 1==zero?"":"s");
|
1998-04-15 00:44:46 +08:00
|
|
|
|
} else if (wrong) {
|
1998-07-16 05:21:15 +08:00
|
|
|
|
puts("--SKIP--");
|
|
|
|
|
puts(" Possible overlap with another region.");
|
|
|
|
|
nerrors++;
|
1998-04-15 00:44:46 +08:00
|
|
|
|
} else {
|
1998-07-16 05:21:15 +08:00
|
|
|
|
puts(" PASSED");
|
1998-04-15 00:44:46 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
1998-07-16 05:21:15 +08:00
|
|
|
|
if (H5Dclose (d2)<0) goto error;
|
|
|
|
|
if (H5Sclose (mspace)<0) goto error;
|
|
|
|
|
if (H5Sclose (fspace)<0) goto error;
|
|
|
|
|
if (H5Fclose (file)<0) goto error;
|
1998-05-01 13:16:50 +08:00
|
|
|
|
free (buf);
|
1998-04-15 00:44:46 +08:00
|
|
|
|
fclose (script);
|
1998-07-16 05:21:15 +08:00
|
|
|
|
return nerrors;
|
|
|
|
|
|
|
|
|
|
error:
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
* Function: cleanup
|
|
|
|
|
*
|
|
|
|
|
* Purpose: Removes test files
|
|
|
|
|
*
|
|
|
|
|
* Return: void
|
|
|
|
|
*
|
|
|
|
|
* Programmer: Robb Matzke
|
|
|
|
|
* Thursday, June 4, 1998
|
|
|
|
|
*
|
|
|
|
|
* Modifications:
|
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
static void
|
|
|
|
|
cleanup (void)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
char buf[256];
|
|
|
|
|
|
|
|
|
|
if (!getenv ("HDF5_NOCLEANUP")) {
|
|
|
|
|
for (i=0; i<512; i++) {
|
|
|
|
|
sprintf(buf, FNAME, i);
|
|
|
|
|
remove(buf);
|
|
|
|
|
}
|
|
|
|
|
remove(DNAME);
|
|
|
|
|
}
|
1998-04-15 00:44:46 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
* Function: main
|
|
|
|
|
*
|
|
|
|
|
* Purpose:
|
|
|
|
|
*
|
|
|
|
|
* Return: Success:
|
|
|
|
|
*
|
|
|
|
|
* Failure:
|
|
|
|
|
*
|
|
|
|
|
* Programmer: Robb Matzke
|
|
|
|
|
* Friday, April 10, 1998
|
|
|
|
|
*
|
|
|
|
|
* Modifications:
|
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
int
|
1998-07-16 05:21:15 +08:00
|
|
|
|
main (void)
|
1998-04-15 00:44:46 +08:00
|
|
|
|
{
|
1998-07-16 05:21:15 +08:00
|
|
|
|
int nerrors = 0;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* We shouldn't run this test if the file system doesn't support holes
|
|
|
|
|
* because we would generate multi-gigabyte files.
|
|
|
|
|
*/
|
1998-08-07 05:32:33 +08:00
|
|
|
|
puts("Checking if file system is adequate for this test...");
|
1998-07-16 05:21:15 +08:00
|
|
|
|
if (!is_sparse()) {
|
|
|
|
|
puts("Test skipped because file system does not support holes.");
|
|
|
|
|
exit(0);
|
1998-04-15 00:44:46 +08:00
|
|
|
|
}
|
1998-08-07 05:32:33 +08:00
|
|
|
|
if (!enough_room()) {
|
|
|
|
|
puts("Test skipped because of quota (file size or num open files).");
|
|
|
|
|
exit(0);
|
|
|
|
|
}
|
1998-10-09 01:13:14 +08:00
|
|
|
|
if (sizeof(hsize_t)<=4) {
|
|
|
|
|
puts("Test skipped because the hdf5 library was configured with the");
|
|
|
|
|
puts("--disable-hsizet flag in order to work around a compiler bug.");
|
|
|
|
|
exit(0);
|
|
|
|
|
}
|
|
|
|
|
|
1998-08-07 05:32:33 +08:00
|
|
|
|
|
1998-07-16 05:21:15 +08:00
|
|
|
|
/* Set the error handler */
|
|
|
|
|
H5Eset_auto (display_error_cb, NULL);
|
|
|
|
|
|
|
|
|
|
if ((nerrors=writer(WRT_N))>0) exit(nerrors);
|
|
|
|
|
nerrors = reader();
|
|
|
|
|
cleanup();
|
|
|
|
|
return nerrors;
|
[svn-r339] Changes since 19980408
----------------------
./src/H5Osdspace.c
./html/H5.format.html
In the past we were allowed to have >2GB files on a 32-bit
machine as long as no dataset within the file was larger than
4GB (or whatever sizeof(size_t) is). That's been fixed now.
All dataset size calculations are done with `hsize_t' which is
normally defined as `unsigned long long'.
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fprivate.h
./src/H5P.c
./src/H5Ppublic.h
The file family member size can now be set/queried. The
default is still 64MB, but it can be set to 1GB by saying:
H5Pset_family (plist, 30, H5P_DEFAULT);
When opening an existing file family the specified
bits-per-member is ignored and the first member of the family
determines the bits-per-member, which can be retrieved with
H5Pget_family().
./acconfig.h
./configure.in
./src/H5config.h
./src/H5public.h
Added `--disable-hsizet' so that those with old GCC compilers
(<2.8.1) can still compile the code.
./src/H5.c
./src/H5private.h
Added HDfprintf() which works just like fprintf() except you
can give `H' as a size modifier for the integer conversions
and supply an `hsize_t' or `hssize_t' argument without casting
it. For instance:
hsize_t npoints = H5Sget_npoints(space);
HDfprintf(stdout,"Dataset has %Hd (%#018Hx) points\n",
npoints, npoints);
You can now give `%a' as a format to print an address, but all
formating flags are ignored and it causes the return value of
HDfprintf() to not include the characters in the address (but
who uses the return value anyway :-). Example:
H5G_t *grp;
HDfprintf(stdout, "Group object header at %a\n",
&(grp->ent.header));
Added HDstrtoll() which works exactly like [HD]strtol() except
the result is an int64.
./src/debug.c
Large addresses can now be entered from the command-line. Use
either decimal, octal (leading `0') or hexadecimal (leading
`0x') when giving the address.
./src/h5ls.c
The printf format for dataset dimensions was changed to `%Hu'
to support large datasets.
./test/big.c [NEW]
A test for big datasets on 32-bit machines. This test is not
run by default. Don't try to run it on an nfs-mounted file
system or other file system that doesn't support holes because
it creates two 32GB datasets of all zero.
1998-04-10 04:22:11 +08:00
|
|
|
|
}
|