fixed errors found by regression tests:
the H5Fed file data structure can't be created by >1 MPI task, so it is disabled in parallel mode (for now) the H5Block3dSetHalo function was inverting the halo radii the h5b_test wasn't writing the correct data in the halo case
This commit is contained in:
+16
-14
@@ -116,12 +116,12 @@ H5Block3dSetView (
|
||||
h5_err_t
|
||||
H5Block3dGetView (
|
||||
h5_file_t *const f, /*!< IN: File handle */
|
||||
h5_size_t *i_start, /*!< OUT: start index of \c i */
|
||||
h5_size_t *i_end, /*!< OUT: end index of \c i */
|
||||
h5_size_t *j_start, /*!< OUT: start index of \c j */
|
||||
h5_size_t *j_end, /*!< OUT: end index of \c j */
|
||||
h5_size_t *k_start, /*!< OUT: start index of \c k */
|
||||
h5_size_t *k_end /*!< OUT: end index of \c k */
|
||||
h5_int64_t *i_start, /*!< OUT: start index of \c i */
|
||||
h5_int64_t *i_end, /*!< OUT: end index of \c i */
|
||||
h5_int64_t *j_start, /*!< OUT: start index of \c j */
|
||||
h5_int64_t *j_end, /*!< OUT: end index of \c j */
|
||||
h5_int64_t *k_start, /*!< OUT: start index of \c k */
|
||||
h5_int64_t *k_end /*!< OUT: end index of \c k */
|
||||
) {
|
||||
|
||||
SET_FNAME( f, __func__ );
|
||||
@@ -139,12 +139,12 @@ H5Block3dGetView (
|
||||
h5_err_t
|
||||
H5Block3dGetReducedView (
|
||||
h5_file_t *const f, /*!< IN: File handle */
|
||||
h5_size_t *i_start, /*!< OUT: start index of \c i */
|
||||
h5_size_t *i_end, /*!< OUT: end index of \c i */
|
||||
h5_size_t *j_start, /*!< OUT: start index of \c j */
|
||||
h5_size_t *j_end, /*!< OUT: end index of \c j */
|
||||
h5_size_t *k_start, /*!< OUT: start index of \c j */
|
||||
h5_size_t *k_end /*!< OUT: end index of \c j */
|
||||
h5_int64_t *i_start, /*!< OUT: start index of \c i */
|
||||
h5_int64_t *i_end, /*!< OUT: end index of \c i */
|
||||
h5_int64_t *j_start, /*!< OUT: start index of \c j */
|
||||
h5_int64_t *j_end, /*!< OUT: end index of \c j */
|
||||
h5_int64_t *k_start, /*!< OUT: start index of \c j */
|
||||
h5_int64_t *k_end /*!< OUT: end index of \c j */
|
||||
) {
|
||||
|
||||
SET_FNAME( f, __func__ );
|
||||
@@ -184,12 +184,14 @@ h5_err_t
|
||||
H5Block3dGetChunk (
|
||||
h5_file_t *const f, /*!< IN: File handle */
|
||||
const char *field_name, /*!< IN: name of dataset */
|
||||
h5_size_t *dims /*!< OUT: array containing the chunk dimensions */
|
||||
h5_int64_t *i, /*!< OUT: size of \c i */
|
||||
h5_int64_t *j, /*!< OUT: size of \c j */
|
||||
h5_int64_t *k /*!< OUT: size of \c k */
|
||||
) {
|
||||
|
||||
SET_FNAME( f, __func__ );
|
||||
|
||||
return h5b_3d_get_chunk(f, field_name, dims);
|
||||
return h5b_3d_get_chunk(f, field_name, i, j, k);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
+1
-1
@@ -43,5 +43,5 @@ libH5hutC_a_SOURCES = \
|
||||
H5Fed_store.c \
|
||||
H5Fed_tags.c
|
||||
|
||||
clean: cleam-am
|
||||
clean: clean-am
|
||||
|
||||
|
||||
+2
-18
@@ -96,20 +96,12 @@ h5bl_3d_getview (
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_size_t view[6];
|
||||
|
||||
h5_err_t herr = h5b_3d_get_view (
|
||||
filehandle,
|
||||
view+0, view+1, view+2, view+3, view+4, view+5 );
|
||||
i_start, i_end, j_start, j_end, k_start, k_end );
|
||||
if ( herr < 0 ) return herr;
|
||||
|
||||
*i_start = view[0]+1;
|
||||
*i_end = view[1]+1;
|
||||
*j_start = view[2]+1;
|
||||
*j_end = view[3]+1;
|
||||
*k_start = view[4]+1;
|
||||
*k_end = view[5]+1;
|
||||
|
||||
return H5_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -126,20 +118,12 @@ h5bl_3d_getreducedview (
|
||||
|
||||
h5_file_t *filehandle = (h5_file_t*)(size_t)*f;
|
||||
h5_set_funcname( filehandle, __func__ );
|
||||
h5_size_t view[6];
|
||||
|
||||
h5_err_t herr = h5b_3d_get_reduced_view (
|
||||
filehandle,
|
||||
view+0, view+1, view+2, view+3, view+4, view+5 );
|
||||
i_start, i_end, j_start, j_end, k_start, k_end );
|
||||
if ( herr < 0 ) return herr;
|
||||
|
||||
*i_start = view[0]+1;
|
||||
*i_end = view[1]+1;
|
||||
*j_start = view[2]+1;
|
||||
*j_end = view[3]+1;
|
||||
*k_start = view[4]+1;
|
||||
*k_end = view[5]+1;
|
||||
|
||||
return H5_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -168,7 +168,7 @@ h5pt_opena_par_align (
|
||||
|
||||
h5_int32_t fbits = H5_O_APPEND | _flagsfor2c ( flags2 );
|
||||
|
||||
h5_file_t* f = H5OpenFile( file_name2, ccomm, fbits, __func__ );
|
||||
h5_file_t* f = h5_open_file( file_name2, ccomm, fbits, __func__ );
|
||||
|
||||
free ( file_name2 );
|
||||
free ( flags2 );
|
||||
|
||||
@@ -24,7 +24,11 @@ h5_check_filehandle (
|
||||
h5_file_t* const f /*!< filehandle to check validity of */
|
||||
) {
|
||||
|
||||
if (f == NULL || f->file < 0 || f->u == NULL || f->b == NULL || f->t == NULL) {
|
||||
if (f == NULL || f->file < 0 || f->u == NULL || f->b == NULL
|
||||
#ifndef PARALLEL_IO
|
||||
|| f->t == NULL
|
||||
#endif
|
||||
) {
|
||||
return h5_error (
|
||||
f,
|
||||
H5_ERR_BADFD,
|
||||
@@ -225,7 +229,9 @@ h5priv_open_file (
|
||||
|
||||
TRY( h5upriv_open_file (f) );
|
||||
TRY( h5bpriv_open_file (f) );
|
||||
#ifndef PARALLEL_IO
|
||||
TRY( h5tpriv_open_file (f) );
|
||||
#endif
|
||||
return H5_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -339,7 +345,9 @@ h5_close_file (
|
||||
TRY( h5priv_close_step (f) );
|
||||
TRY( h5upriv_close_file (f) );
|
||||
TRY( h5bpriv_close_file (f) );
|
||||
#ifndef PARALLEL_IO
|
||||
TRY( h5tpriv_close_file (f) );
|
||||
#endif
|
||||
TRY( h5priv_close_hdf5_group (f, f->step_gid) );
|
||||
TRY( h5priv_close_hdf5_property (f, f->xfer_prop) );
|
||||
TRY( h5priv_close_hdf5_property (f, f->access_prop) );
|
||||
|
||||
+34
-40
@@ -523,12 +523,12 @@ h5b_3d_has_view (
|
||||
h5_err_t
|
||||
h5b_3d_set_view (
|
||||
h5_file_t *const f, /*!< IN: File handle */
|
||||
const h5_size_t i_start, /*!< IN: start index of \c i */
|
||||
const h5_size_t i_end, /*!< IN: end index of \c i */
|
||||
const h5_size_t j_start, /*!< IN: start index of \c j */
|
||||
const h5_size_t j_end, /*!< IN: end index of \c j */
|
||||
const h5_size_t k_start, /*!< IN: start index of \c k */
|
||||
const h5_size_t k_end /*!< IN: end index of \c k */
|
||||
const h5_int64_t i_start, /*!< IN: start index of \c i */
|
||||
const h5_int64_t i_end, /*!< IN: end index of \c i */
|
||||
const h5_int64_t j_start, /*!< IN: start index of \c j */
|
||||
const h5_int64_t j_end, /*!< IN: end index of \c j */
|
||||
const h5_int64_t k_start, /*!< IN: start index of \c k */
|
||||
const h5_int64_t k_end /*!< IN: end index of \c k */
|
||||
) {
|
||||
|
||||
h5b_partition_t *p = f->b->user_layout;
|
||||
@@ -590,12 +590,12 @@ h5b_3d_set_view (
|
||||
h5_err_t
|
||||
h5b_3d_get_view (
|
||||
h5_file_t *const f, /*!< IN: File handle */
|
||||
h5_size_t *i_start, /*!< OUT: start index of \c i */
|
||||
h5_size_t *i_end, /*!< OUT: end index of \c i */
|
||||
h5_size_t *j_start, /*!< OUT: start index of \c j */
|
||||
h5_size_t *j_end, /*!< OUT: end index of \c j */
|
||||
h5_size_t *k_start, /*!< OUT: start index of \c k */
|
||||
h5_size_t *k_end /*!< OUT: end index of \c k */
|
||||
h5_int64_t *i_start, /*!< OUT: start index of \c i */
|
||||
h5_int64_t *i_end, /*!< OUT: end index of \c i */
|
||||
h5_int64_t *j_start, /*!< OUT: start index of \c j */
|
||||
h5_int64_t *j_end, /*!< OUT: end index of \c j */
|
||||
h5_int64_t *k_start, /*!< OUT: start index of \c k */
|
||||
h5_int64_t *k_end /*!< OUT: end index of \c k */
|
||||
) {
|
||||
|
||||
h5b_partition_t *p = f->b->user_layout;
|
||||
@@ -613,12 +613,12 @@ h5b_3d_get_view (
|
||||
h5_err_t
|
||||
h5b_3d_get_reduced_view (
|
||||
h5_file_t *const f, /*!< IN: File handle */
|
||||
h5_size_t *i_start, /*!< OUT: start index of \c i */
|
||||
h5_size_t *i_end, /*!< OUT: end index of \c i */
|
||||
h5_size_t *j_start, /*!< OUT: start index of \c j */
|
||||
h5_size_t *j_end, /*!< OUT: end index of \c j */
|
||||
h5_size_t *k_start, /*!< OUT: start index of \c k */
|
||||
h5_size_t *k_end /*!< OUT: end index of \c k */
|
||||
h5_int64_t *i_start, /*!< OUT: start index of \c i */
|
||||
h5_int64_t *i_end, /*!< OUT: end index of \c i */
|
||||
h5_int64_t *j_start, /*!< OUT: start index of \c j */
|
||||
h5_int64_t *j_end, /*!< OUT: end index of \c j */
|
||||
h5_int64_t *k_start, /*!< OUT: start index of \c k */
|
||||
h5_int64_t *k_end /*!< OUT: end index of \c k */
|
||||
) {
|
||||
|
||||
h5b_partition_t *p = f->b->write_layout;
|
||||
@@ -636,9 +636,9 @@ h5b_3d_get_reduced_view (
|
||||
h5_err_t
|
||||
h5b_3d_set_chunk (
|
||||
h5_file_t *const f, /*!< IN: File handle */
|
||||
const h5_size_t i, /*!< IN: size of \c i */
|
||||
const h5_size_t j, /*!< IN: size of \c j */
|
||||
const h5_size_t k /*!< IN: size of \c k */
|
||||
const h5_int64_t i, /*!< IN: size of \c i */
|
||||
const h5_int64_t j, /*!< IN: size of \c j */
|
||||
const h5_int64_t k /*!< IN: size of \c k */
|
||||
) {
|
||||
|
||||
if ( i == 0 || j == 0 || k == 0 )
|
||||
@@ -662,7 +662,9 @@ h5_err_t
|
||||
h5b_3d_get_chunk (
|
||||
h5_file_t *const f, /*!< IN: File handle */
|
||||
const char *field_name, /*!< IN: name of dataset */
|
||||
h5_size_t *dims /*!< OUT: array containing the chunk dimensions */
|
||||
h5_int64_t *i, /*!< OUT: size of \c i */
|
||||
h5_int64_t *j, /*!< OUT: size of \c j */
|
||||
h5_int64_t *k /*!< OUT: size of \c k */
|
||||
) {
|
||||
|
||||
CHECK_TIMEGROUP ( f );
|
||||
@@ -681,15 +683,15 @@ h5b_3d_get_chunk (
|
||||
TRY( h5priv_close_hdf5_property(f, plist_id) );
|
||||
TRY( h5priv_close_hdf5_dataset(f, dataset_id) );
|
||||
|
||||
dims[0] = hdims[2];
|
||||
dims[1] = hdims[1];
|
||||
dims[2] = hdims[0];
|
||||
*i = hdims[2];
|
||||
*j = hdims[1];
|
||||
*k = hdims[0];
|
||||
|
||||
h5_info(f,
|
||||
"Found chunk dimensions (%lld,%lld,%lld)",
|
||||
(long long)dims[0],
|
||||
(long long)dims[1],
|
||||
(long long)dims[2] );
|
||||
(long long)hdims[0],
|
||||
(long long)hdims[1],
|
||||
(long long)hdims[2] );
|
||||
|
||||
return H5_SUCCESS;
|
||||
}
|
||||
@@ -818,20 +820,12 @@ h5b_3d_set_halo (
|
||||
|
||||
h5b_fdata_t *b = f->b;
|
||||
|
||||
b->user_layout->i_start -= k;
|
||||
b->user_layout->i_end += k;
|
||||
b->user_layout->i_start -= i;
|
||||
b->user_layout->i_end += i;
|
||||
b->user_layout->j_start -= j;
|
||||
b->user_layout->j_end += j;
|
||||
b->user_layout->k_start -= i;
|
||||
b->user_layout->k_end += i;
|
||||
|
||||
b->user_layout->i_start = MAX(0, b->user_layout->i_start);
|
||||
b->user_layout->j_start = MAX(0, b->user_layout->j_start);
|
||||
b->user_layout->k_start = MAX(0, b->user_layout->k_start);
|
||||
|
||||
b->user_layout->i_end = MIN(b->i_max, b->user_layout->i_end);
|
||||
b->user_layout->j_end = MIN(b->j_max, b->user_layout->j_end);
|
||||
b->user_layout->k_end = MIN(b->k_max, b->user_layout->k_end);
|
||||
b->user_layout->k_start -= k;
|
||||
b->user_layout->k_end += k;
|
||||
|
||||
return H5_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
#define __H5B_TYPES_PRIVATE_H
|
||||
|
||||
struct h5b_partition {
|
||||
h5_size_t i_start;
|
||||
h5_size_t i_end;
|
||||
h5_size_t j_start;
|
||||
h5_size_t j_end;
|
||||
h5_size_t k_start;
|
||||
h5_size_t k_end;
|
||||
h5_int64_t i_start;
|
||||
h5_int64_t i_end;
|
||||
h5_int64_t j_start;
|
||||
h5_int64_t j_end;
|
||||
h5_int64_t k_start;
|
||||
h5_int64_t k_end;
|
||||
};
|
||||
|
||||
struct h5b_fdata {
|
||||
|
||||
@@ -37,49 +37,51 @@ h5b_3d_has_view (
|
||||
h5_err_t
|
||||
h5b_3d_set_view (
|
||||
h5_file_t *const f, /*!< IN: File handle */
|
||||
const h5_size_t i_start, /*!< IN: start index of \c i */
|
||||
const h5_size_t i_end, /*!< IN: end index of \c i */
|
||||
const h5_size_t j_start, /*!< IN: start index of \c j */
|
||||
const h5_size_t j_end, /*!< IN: end index of \c j */
|
||||
const h5_size_t k_start, /*!< IN: start index of \c k */
|
||||
const h5_size_t k_end /*!< IN: end index of \c k */
|
||||
const h5_int64_t i_start, /*!< IN: start index of \c i */
|
||||
const h5_int64_t i_end, /*!< IN: end index of \c i */
|
||||
const h5_int64_t j_start, /*!< IN: start index of \c j */
|
||||
const h5_int64_t j_end, /*!< IN: end index of \c j */
|
||||
const h5_int64_t k_start, /*!< IN: start index of \c k */
|
||||
const h5_int64_t k_end /*!< IN: end index of \c k */
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5b_3d_get_view (
|
||||
h5_file_t *const f, /*!< IN: File handle */
|
||||
h5_size_t *i_start, /*!< OUT: start index of \c i */
|
||||
h5_size_t *i_end, /*!< OUT: end index of \c i */
|
||||
h5_size_t *j_start, /*!< OUT: start index of \c j */
|
||||
h5_size_t *j_end, /*!< OUT: end index of \c j */
|
||||
h5_size_t *k_start, /*!< OUT: start index of \c k */
|
||||
h5_size_t *k_end /*!< OUT: end index of \c k */
|
||||
h5_int64_t *i_start, /*!< OUT: start index of \c i */
|
||||
h5_int64_t *i_end, /*!< OUT: end index of \c i */
|
||||
h5_int64_t *j_start, /*!< OUT: start index of \c j */
|
||||
h5_int64_t *j_end, /*!< OUT: end index of \c j */
|
||||
h5_int64_t *k_start, /*!< OUT: start index of \c k */
|
||||
h5_int64_t *k_end /*!< OUT: end index of \c k */
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5b_3d_get_reduced_view (
|
||||
h5_file_t *const f, /*!< IN: File handle */
|
||||
h5_size_t *i_start, /*!< OUT: start index of \c i */
|
||||
h5_size_t *i_end, /*!< OUT: end index of \c i */
|
||||
h5_size_t *j_start, /*!< OUT: start index of \c j */
|
||||
h5_size_t *j_end, /*!< OUT: end index of \c j */
|
||||
h5_size_t *k_start, /*!< OUT: start index of \c k */
|
||||
h5_size_t *k_end /*!< OUT: end index of \c k */
|
||||
h5_int64_t *i_start, /*!< OUT: start index of \c i */
|
||||
h5_int64_t *i_end, /*!< OUT: end index of \c i */
|
||||
h5_int64_t *j_start, /*!< OUT: start index of \c j */
|
||||
h5_int64_t *j_end, /*!< OUT: end index of \c j */
|
||||
h5_int64_t *k_start, /*!< OUT: start index of \c k */
|
||||
h5_int64_t *k_end /*!< OUT: end index of \c k */
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5b_3d_set_chunk (
|
||||
h5_file_t *const f, /*!< IN: File handle */
|
||||
const h5_size_t i, /*!< IN: size of \c i */
|
||||
const h5_size_t j, /*!< IN: size of \c j */
|
||||
const h5_size_t k /*!< IN: size of \c k */
|
||||
const h5_int64_t i, /*!< IN: size of \c i */
|
||||
const h5_int64_t j, /*!< IN: size of \c j */
|
||||
const h5_int64_t k /*!< IN: size of \c k */
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5b_3d_get_chunk (
|
||||
h5_file_t *const f, /*!< IN: File handle */
|
||||
const char *field_name, /*!< IN: name of dataset */
|
||||
h5_size_t *dims /*!< OUT: array containing the chunk dimensions */
|
||||
h5_int64_t *i, /*!< OUT: size of \c i */
|
||||
h5_int64_t *j, /*!< OUT: size of \c j */
|
||||
h5_int64_t *k /*!< OUT: size of \c k */
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
|
||||
Reference in New Issue
Block a user