2003-04-01 01:59:04 +08:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
2007-02-07 22:56:24 +08:00
|
|
|
* Copyright by The HDF Group. *
|
2003-04-01 01:59:04 +08:00
|
|
|
* Copyright by the Board of Trustees of the University of Illinois. *
|
|
|
|
* All rights reserved. *
|
|
|
|
* *
|
|
|
|
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
|
|
|
* terms governing use, modification, and redistribution, is contained in *
|
|
|
|
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
|
|
|
* of the source code distribution tree; Copyright.html can be found at the *
|
|
|
|
* root level of an installed copy of the electronic HDF5 document set and *
|
|
|
|
* is linked from the top-level documents page. It can also be found at *
|
2007-02-07 22:56:24 +08:00
|
|
|
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
|
|
|
* access to either file, you may request a copy from help@hdfgroup.org. *
|
2003-04-01 01:59:04 +08:00
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
2000-05-19 03:13:33 +08:00
|
|
|
/********************************************************************
|
|
|
|
*
|
|
|
|
* Testing for thread safety in H5A (dataset attribute) library
|
|
|
|
* operations. -- Threaded program --
|
|
|
|
* ------------------------------------------------------------------
|
|
|
|
*
|
[svn-r14187] Description:
Put H5Acreate() under API versioning, with all internal usage shifted
to H5Acreate2().
Add regression tests for H5Acreate1().
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-05 06:19:07 +08:00
|
|
|
* Plan: Attempt to break H5Acreate2 by making many simultaneous create
|
2000-05-19 03:13:33 +08:00
|
|
|
* calls.
|
|
|
|
*
|
[svn-r14187] Description:
Put H5Acreate() under API versioning, with all internal usage shifted
to H5Acreate2().
Add regression tests for H5Acreate1().
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-05 06:19:07 +08:00
|
|
|
* Claim: N calls to H5Acreate2 should create N attributes for a dataset
|
2000-05-19 03:13:33 +08:00
|
|
|
* if threadsafe. If some unprotected shared data exists for the
|
|
|
|
* dataset (eg, a count of the number of attributes in the
|
|
|
|
* dataset), there is a small chance that consecutive reads occur
|
|
|
|
* before a write to that shared variable.
|
|
|
|
*
|
2000-05-19 05:44:13 +08:00
|
|
|
* HDF5 APIs exercised in thread:
|
[svn-r14187] Description:
Put H5Acreate() under API versioning, with all internal usage shifted
to H5Acreate2().
Add regression tests for H5Acreate1().
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-05 06:19:07 +08:00
|
|
|
* H5Acreate2, H5Awrite, H5Aclose.
|
2000-05-19 05:44:13 +08:00
|
|
|
*
|
2000-05-19 03:13:33 +08:00
|
|
|
* Created: Oct 5 1999
|
|
|
|
* Programmer: Chee Wai LEE
|
|
|
|
*
|
|
|
|
* Modification History
|
|
|
|
* --------------------
|
2000-05-20 07:00:03 +08:00
|
|
|
*
|
|
|
|
* 15 May 2000, Chee Wai LEE
|
|
|
|
* Incorporated into library tests.
|
|
|
|
*
|
|
|
|
* 19 May 2000, Bill Wendling
|
|
|
|
* Changed so that it creates its own HDF5 file and removes it at cleanup
|
2004-01-10 09:41:13 +08:00
|
|
|
* time.
|
2000-05-19 03:13:33 +08:00
|
|
|
*
|
|
|
|
********************************************************************/
|
|
|
|
|
|
|
|
#include "ttsafe.h"
|
|
|
|
|
2003-06-26 10:10:33 +08:00
|
|
|
#ifdef H5_HAVE_THREADSAFE
|
2000-05-19 03:13:33 +08:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2000-05-20 07:00:03 +08:00
|
|
|
#define FILENAME "ttsafe_acreate.h5"
|
|
|
|
#define DATASETNAME "IntData"
|
|
|
|
#define NUM_THREADS 16
|
|
|
|
|
2000-05-19 03:13:33 +08:00
|
|
|
void *tts_acreate_thread(void *);
|
|
|
|
|
|
|
|
typedef struct acreate_data_struct {
|
2000-05-20 07:00:03 +08:00
|
|
|
hid_t dataset;
|
|
|
|
hid_t datatype;
|
|
|
|
hid_t dataspace;
|
|
|
|
int current_index;
|
2000-05-19 03:13:33 +08:00
|
|
|
} ttsafe_name_data_t;
|
|
|
|
|
2000-05-20 07:00:03 +08:00
|
|
|
void tts_acreate(void)
|
|
|
|
{
|
2004-01-10 09:41:13 +08:00
|
|
|
/* Pthread declarations */
|
|
|
|
pthread_t threads[NUM_THREADS];
|
|
|
|
|
|
|
|
/* HDF5 data declarations */
|
|
|
|
hid_t file, dataset;
|
|
|
|
hid_t dataspace, datatype;
|
|
|
|
hid_t attribute;
|
|
|
|
hsize_t dimsf[1]; /* dataset dimensions */
|
|
|
|
|
|
|
|
/* data declarations */
|
|
|
|
int data; /* data to write */
|
|
|
|
int buffer, ret, i;
|
|
|
|
|
2005-08-14 04:53:35 +08:00
|
|
|
ttsafe_name_data_t *attrib_data;
|
2004-01-10 09:41:13 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Create an HDF5 file using H5F_ACC_TRUNC access, default file
|
|
|
|
* creation plist and default file access plist
|
|
|
|
*/
|
|
|
|
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
2005-08-20 23:45:13 +08:00
|
|
|
assert(file>=0);
|
2004-01-10 09:41:13 +08:00
|
|
|
|
|
|
|
/* create a simple dataspace for the dataset */
|
|
|
|
dimsf[0] = 1;
|
|
|
|
dataspace = H5Screate_simple(1, dimsf, NULL);
|
2005-08-20 23:45:13 +08:00
|
|
|
assert(dataspace>=0);
|
2004-01-10 09:41:13 +08:00
|
|
|
|
|
|
|
/* define datatype for the data using native little endian integers */
|
|
|
|
datatype = H5Tcopy(H5T_NATIVE_INT);
|
|
|
|
H5Tset_order(datatype, H5T_ORDER_LE);
|
|
|
|
|
|
|
|
/* create a new dataset within the file */
|
[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
|
|
|
dataset = H5Dcreate2(file, DATASETNAME, datatype, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
|
|
|
assert(dataset >= 0);
|
2004-01-10 09:41:13 +08:00
|
|
|
|
|
|
|
/* initialize data for dataset and write value to dataset */
|
|
|
|
data = NUM_THREADS;
|
[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
|
|
|
ret = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &data);
|
|
|
|
assert(ret >= 0);
|
2004-01-10 09:41:13 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Simultaneously create a large number of attributes to be associated
|
|
|
|
* with the dataset
|
|
|
|
*/
|
[svn-r14185] Description:
Move H5Aopen_name() routine to deprecated symbol section and replace
internal usage with H5Aopen().
Add simple regression test for H5Aopen_name() to deprecated routine
test.
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-05 03:29:58 +08:00
|
|
|
for(i = 0; i < NUM_THREADS; i++) {
|
2004-01-10 09:41:13 +08:00
|
|
|
attrib_data = malloc(sizeof(ttsafe_name_data_t));
|
|
|
|
attrib_data->dataset = dataset;
|
|
|
|
attrib_data->datatype = datatype;
|
|
|
|
attrib_data->dataspace = dataspace;
|
|
|
|
attrib_data->current_index = i;
|
[svn-r14185] Description:
Move H5Aopen_name() routine to deprecated symbol section and replace
internal usage with H5Aopen().
Add simple regression test for H5Aopen_name() to deprecated routine
test.
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-05 03:29:58 +08:00
|
|
|
ret = pthread_create(&threads[i], NULL, tts_acreate_thread, attrib_data);
|
|
|
|
assert(ret == 0);
|
|
|
|
} /* end for */
|
2004-01-10 09:41:13 +08:00
|
|
|
|
[svn-r14185] Description:
Move H5Aopen_name() routine to deprecated symbol section and replace
internal usage with H5Aopen().
Add simple regression test for H5Aopen_name() to deprecated routine
test.
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-05 03:29:58 +08:00
|
|
|
for(i = 0; i < NUM_THREADS; i++) {
|
|
|
|
ret = pthread_join(threads[i], NULL);
|
|
|
|
assert(ret == 0);
|
|
|
|
} /* end for */
|
2005-08-20 04:00:17 +08:00
|
|
|
|
2004-01-10 09:41:13 +08:00
|
|
|
|
|
|
|
/* verify the correctness of the test */
|
[svn-r14185] Description:
Move H5Aopen_name() routine to deprecated symbol section and replace
internal usage with H5Aopen().
Add simple regression test for H5Aopen_name() to deprecated routine
test.
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-05 03:29:58 +08:00
|
|
|
for(i = 0; i < NUM_THREADS; i++) {
|
|
|
|
attribute = H5Aopen(dataset, ".", gen_name(i), H5P_DEFAULT, H5P_DEFAULT);
|
2004-01-10 09:41:13 +08:00
|
|
|
|
[svn-r14185] Description:
Move H5Aopen_name() routine to deprecated symbol section and replace
internal usage with H5Aopen().
Add simple regression test for H5Aopen_name() to deprecated routine
test.
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-05 03:29:58 +08:00
|
|
|
if(attribute < 0)
|
2004-01-10 09:41:13 +08:00
|
|
|
TestErrPrintf("unable to open appropriate attribute. Test failed!\n");
|
|
|
|
else {
|
|
|
|
ret = H5Aread(attribute, H5T_NATIVE_INT, &buffer);
|
2006-06-27 22:45:06 +08:00
|
|
|
|
[svn-r14185] Description:
Move H5Aopen_name() routine to deprecated symbol section and replace
internal usage with H5Aopen().
Add simple regression test for H5Aopen_name() to deprecated routine
test.
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-05 03:29:58 +08:00
|
|
|
if(ret < 0 || buffer != i)
|
2004-01-10 09:41:13 +08:00
|
|
|
TestErrPrintf("wrong data values. Test failed!\n");
|
|
|
|
|
|
|
|
H5Aclose(attribute);
|
[svn-r14185] Description:
Move H5Aopen_name() routine to deprecated symbol section and replace
internal usage with H5Aopen().
Add simple regression test for H5Aopen_name() to deprecated routine
test.
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-05 03:29:58 +08:00
|
|
|
} /* end else */
|
|
|
|
} /* end for */
|
2004-01-10 09:41:13 +08:00
|
|
|
|
|
|
|
/* close remaining resources */
|
[svn-r14185] Description:
Move H5Aopen_name() routine to deprecated symbol section and replace
internal usage with H5Aopen().
Add simple regression test for H5Aopen_name() to deprecated routine
test.
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-05 03:29:58 +08:00
|
|
|
ret = H5Sclose(dataspace);
|
|
|
|
assert(ret >= 0);
|
|
|
|
ret = H5Tclose(datatype);
|
|
|
|
assert(ret >= 0);
|
|
|
|
ret = H5Dclose(dataset);
|
|
|
|
assert(ret >= 0);
|
|
|
|
ret = H5Fclose(file);
|
|
|
|
assert(ret >= 0);
|
2000-05-19 03:13:33 +08:00
|
|
|
}
|
|
|
|
|
2000-05-20 07:00:03 +08:00
|
|
|
void *tts_acreate_thread(void *client_data)
|
|
|
|
{
|
2004-12-29 22:26:20 +08:00
|
|
|
hid_t attribute;
|
|
|
|
char *attribute_name;
|
|
|
|
int *attribute_data; /* data for attributes */
|
|
|
|
|
|
|
|
ttsafe_name_data_t *attrib_data;
|
|
|
|
|
|
|
|
attrib_data = (ttsafe_name_data_t *)client_data;
|
|
|
|
|
|
|
|
/* Create attribute */
|
|
|
|
attribute_name = gen_name(attrib_data->current_index);
|
[svn-r14187] Description:
Put H5Acreate() under API versioning, with all internal usage shifted
to H5Acreate2().
Add regression tests for H5Acreate1().
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-05 06:19:07 +08:00
|
|
|
attribute = H5Acreate2(attrib_data->dataset, ".", attribute_name,
|
2004-12-29 22:26:20 +08:00
|
|
|
attrib_data->datatype, attrib_data->dataspace,
|
[svn-r14187] Description:
Put H5Acreate() under API versioning, with all internal usage shifted
to H5Acreate2().
Add regression tests for H5Acreate1().
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-05 06:19:07 +08:00
|
|
|
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
2004-12-29 22:26:20 +08:00
|
|
|
|
|
|
|
/* Write data to the attribute */
|
|
|
|
attribute_data = malloc(sizeof(int));
|
|
|
|
*attribute_data = attrib_data->current_index;
|
|
|
|
H5Awrite(attribute, H5T_NATIVE_INT, attribute_data);
|
|
|
|
H5Aclose(attribute);
|
|
|
|
return NULL;
|
2000-05-19 03:13:33 +08:00
|
|
|
}
|
|
|
|
|
2000-05-20 07:00:03 +08:00
|
|
|
void cleanup_acreate(void)
|
|
|
|
{
|
2004-12-29 22:26:20 +08:00
|
|
|
HDunlink(FILENAME);
|
2000-05-19 03:13:33 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /*H5_HAVE_THREADSAFE*/
|