mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-25 17:00:45 +08:00
[svn-r13650] Description:
Clean up problems from error handling API changes in parallel and threadsafe builds. Tested on: FreeBSD/64 6.2 (liberty) w/parallel & threadsafe
This commit is contained in:
parent
c8f12172f1
commit
6151c1cd90
@ -44,10 +44,6 @@
|
||||
#include "H5Cpkg.h" /* Cache */
|
||||
#include "H5SLprivate.h" /* Skip lists */
|
||||
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
#include <mpi.h>
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
|
||||
|
||||
#define H5AC_DEBUG_DIRTY_BYTES_CREATION 0
|
||||
|
||||
|
@ -304,7 +304,7 @@ H5E_term_interface(void)
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static H5E_t *
|
||||
H5E_t *
|
||||
H5E_get_stack(void)
|
||||
{
|
||||
H5E_t *estack;
|
||||
@ -321,7 +321,7 @@ H5E_get_stack(void)
|
||||
/* Set the thread-specific info */
|
||||
estack->nused = 0;
|
||||
estack->new_api = TRUE;
|
||||
estack->u.func_stack = (H5E_auto2_t)H5Eprint2;
|
||||
estack->u.func2 = (H5E_auto2_t)H5Eprint2;
|
||||
estack->auto_data = NULL;
|
||||
|
||||
/* (It's not necessary to release this in this API, it is
|
||||
|
@ -56,7 +56,7 @@
|
||||
#define WRITE_NUMBER 37
|
||||
|
||||
static herr_t error_callback(hid_t , void *);
|
||||
static herr_t walk_error_callback(unsigned, const H5E_error_stack_t *, void *);
|
||||
static herr_t walk_error_callback(unsigned, const H5E_error2_t *, void *);
|
||||
static void *tts_error_thread(void *);
|
||||
|
||||
/* Global variables */
|
||||
@ -163,16 +163,16 @@ void *tts_error_thread(void UNUSED *arg)
|
||||
{
|
||||
hid_t dataspace, datatype, dataset;
|
||||
hsize_t dimsf[1]; /* dataset dimensions */
|
||||
H5E_auto_stack_t old_error_cb;
|
||||
H5E_auto2_t old_error_cb;
|
||||
void *old_error_client_data;
|
||||
int value;
|
||||
int ret;
|
||||
|
||||
/* preserve previous error stack handler */
|
||||
H5Eget_auto_stack(H5E_DEFAULT, &old_error_cb, &old_error_client_data);
|
||||
H5Eget_auto2(H5E_DEFAULT, &old_error_cb, &old_error_client_data);
|
||||
|
||||
/* set each thread's error stack handler */
|
||||
H5Eset_auto_stack(H5E_DEFAULT, error_callback, NULL);
|
||||
H5Eset_auto2(H5E_DEFAULT, error_callback, NULL);
|
||||
|
||||
/* define dataspace for dataset */
|
||||
dimsf[0] = 1;
|
||||
@ -198,7 +198,7 @@ void *tts_error_thread(void UNUSED *arg)
|
||||
assert(ret>=0);
|
||||
|
||||
/* turn our error stack handler off */
|
||||
H5Eset_auto_stack(H5E_DEFAULT, old_error_cb, old_error_client_data);
|
||||
H5Eset_auto2(H5E_DEFAULT, old_error_cb, old_error_client_data);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -213,11 +213,11 @@ herr_t error_callback(hid_t estack_id, void *client_data)
|
||||
error_count++;
|
||||
ret=pthread_mutex_unlock(&error_mutex);
|
||||
assert(ret==0);
|
||||
return H5Ewalk_stack(H5E_DEFAULT, H5E_WALK_DOWNWARD, walk_error_callback, client_data);
|
||||
return H5Ewalk2(H5E_DEFAULT, H5E_WALK_DOWNWARD, walk_error_callback, client_data);
|
||||
}
|
||||
|
||||
static
|
||||
herr_t walk_error_callback(unsigned n, const H5E_error_stack_t *err_desc, void UNUSED *client_data)
|
||||
herr_t walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void UNUSED *client_data)
|
||||
{
|
||||
hid_t maj_num, min_num;
|
||||
|
||||
|
@ -132,7 +132,7 @@ int
|
||||
main(int argc, char* argv[])
|
||||
{
|
||||
hid_t fapl1, fapl2;
|
||||
H5E_auto_stack_t func;
|
||||
H5E_auto2_t func;
|
||||
|
||||
char name[1024];
|
||||
const char *envval = NULL;
|
||||
@ -176,8 +176,8 @@ main(int argc, char* argv[])
|
||||
* so we turn off the error stack temporarily */
|
||||
if(mpi_rank == 0)
|
||||
TESTING("H5Fflush (part2 without flush)");
|
||||
H5Eget_auto_stack(H5E_DEFAULT,&func,NULL);
|
||||
H5Eset_auto_stack(H5E_DEFAULT, NULL, NULL);
|
||||
H5Eget_auto2(H5E_DEFAULT,&func,NULL);
|
||||
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
|
||||
|
||||
h5_fixname(FILENAME[1], fapl2, name, sizeof name);
|
||||
if(check_file(name, fapl2))
|
||||
@ -192,7 +192,7 @@ main(int argc, char* argv[])
|
||||
H5_FAILED()
|
||||
goto error;
|
||||
}
|
||||
H5Eset_auto_stack(H5E_DEFAULT, func, NULL);
|
||||
H5Eset_auto2(H5E_DEFAULT, func, NULL);
|
||||
|
||||
|
||||
h5_cleanup(&FILENAME[0], fapl1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user