diff options
-rw-r--r-- | src/H5Opublic.h | 14 | ||||
-rw-r--r-- | src/H5Pfcpl.c | 2 | ||||
-rwxr-xr-x | src/H5SM.c | 24 | ||||
-rwxr-xr-x | test/objcopy.c | 2 | ||||
-rw-r--r-- | test/tattr.c | 34 | ||||
-rw-r--r-- | test/tsohm.c | 84 | ||||
-rw-r--r-- | tools/h5repack/h5repack_copy.c | 10 |
7 files changed, 83 insertions, 87 deletions
diff --git a/src/H5Opublic.h b/src/H5Opublic.h index 64fdd07..acce42c 100644 --- a/src/H5Opublic.h +++ b/src/H5Opublic.h @@ -52,13 +52,13 @@ * but we need to assign each kind of message to a different bit so that * one index can hold multiple types.) */ -#define H5O_MESG_NONE_FLAG 0x0000 /* No shared messages */ -#define H5O_MESG_SDSPACE_FLAG 0x0001 /* Simple Dataspace Message. */ -#define H5O_MESG_DTYPE_FLAG 0x0002 /* Datatype Message. */ -#define H5O_MESG_FILL_FLAG 0x0004 /* Fill Value Message. */ -#define H5O_MESG_PLINE_FLAG 0x0008 /* Filter pipeline message. */ -#define H5O_MESG_ATTR_FLAG 0x0010 /* Attribute Message. */ -#define H5O_MESG_ALL_FLAG (H5O_MESG_SDSPACE_FLAG | H5O_MESG_DTYPE_FLAG | H5O_MESG_FILL_FLAG | H5O_MESG_PLINE_FLAG | H5O_MESG_ATTR_FLAG) +#define H5O_SHMESG_NONE_FLAG 0x0000 /* No shared messages */ +#define H5O_SHMESG_SDSPACE_FLAG ((unsigned)1 << 0x0001) /* Simple Dataspace Message. */ +#define H5O_SHMESG_DTYPE_FLAG ((unsigned)1 << 0x0003) /* Datatype Message. */ +#define H5O_SHMESG_FILL_FLAG ((unsigned)1 << 0x0005) /* Fill Value Message. */ +#define H5O_SHMESG_PLINE_FLAG ((unsigned)1 << 0x000b) /* Filter pipeline message. */ +#define H5O_SHMESG_ATTR_FLAG ((unsigned)1 << 0x000c) /* Attribute Message. */ +#define H5O_SHMESG_ALL_FLAG (H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_FILL_FLAG | H5O_SHMESG_PLINE_FLAG | H5O_SHMESG_ATTR_FLAG) /* Object header status flag definitions */ #define H5O_HDR_CHUNK0_SIZE 0x03 /* 2-bit field indicating # of bytes to store the size of chunk 0's data */ diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c index 6345961..8fd4909 100644 --- a/src/H5Pfcpl.c +++ b/src/H5Pfcpl.c @@ -757,7 +757,7 @@ H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_ H5TRACE4("e", "iIuIuIu", plist_id, index_num, mesg_type_flags, min_mesg_size); /* Check arguments */ - if(mesg_type_flags > H5O_MESG_ALL_FLAG) + if(mesg_type_flags > H5O_SHMESG_ALL_FLAG) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "unrecognized flags in mesg_type_flags"); /* Get the plist structure */ @@ -220,7 +220,7 @@ H5SM_init(H5F_t *f, H5P_genplist_t * fc_plist, const H5O_loc_t *ext_loc, hid_t d /* Check for sharing attributes in this file, which means that creation * indices must be tracked on object header message in the file. */ - if(type_flags_used & H5O_MESG_ATTR_FLAG) + if(type_flags_used & H5O_SHMESG_ATTR_FLAG) f->shared->store_msg_crt_idx = TRUE; /* Write shared message information to the superblock extension */ @@ -263,22 +263,18 @@ H5SM_type_to_flag(unsigned type_id, unsigned *type_flag) /* Translate the H5O type_id into an H5SM type flag */ switch(type_id) { + case H5O_FILL_ID: + type_id = H5O_FILL_NEW_ID; + /* Fall through... */ + case H5O_SDSPACE_ID: - *type_flag = H5O_MESG_SDSPACE_FLAG; - break; case H5O_DTYPE_ID: - *type_flag = H5O_MESG_DTYPE_FLAG; - break; - case H5O_FILL_ID: case H5O_FILL_NEW_ID: - *type_flag = H5O_MESG_FILL_FLAG; - break; case H5O_PLINE_ID: - *type_flag = H5O_MESG_PLINE_FLAG; - break; case H5O_ATTR_ID: - *type_flag = H5O_MESG_ATTR_FLAG; + *type_flag = (unsigned)1 << type_id; break; + default: HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "unknown message type ID") } /* end switch */ @@ -307,7 +303,7 @@ done: ssize_t H5SM_get_index(const H5SM_master_table_t *table, unsigned type_id) { - ssize_t x; + size_t x; unsigned type_flag; ssize_t ret_value = FAIL; @@ -322,7 +318,7 @@ H5SM_get_index(const H5SM_master_table_t *table, unsigned type_id) */ for(x = 0; x < table->num_indexes; ++x) if(table->indexes[x].mesg_types & type_flag) - HGOTO_DONE(x) + HGOTO_DONE((ssize_t)x) /* At this point, ret_value is either the location of the correct * index or it's still FAIL because we didn't find an index. @@ -1828,7 +1824,7 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist, hid_t dxpl_id) /* Check for sharing attributes in this file, which means that creation * indices must be tracked on object header message in the file. */ - if(index_flags[u] & H5O_MESG_ATTR_FLAG) + if(index_flags[u] & H5O_SHMESG_ATTR_FLAG) shared->store_msg_crt_idx = TRUE; } /* end for */ diff --git a/test/objcopy.c b/test/objcopy.c index 69a6769..b2df288 100755 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -7181,7 +7181,7 @@ main(void) /* Create an FCPL with sharing enabled */ if((fcpl_shared = H5Pcreate(H5P_FILE_CREATE)) < 0) TEST_ERROR if(H5Pset_shared_mesg_nindexes(fcpl_shared, 1) < 0) TEST_ERROR - if(H5Pset_shared_mesg_index(fcpl_shared, 0, H5O_MESG_ALL_FLAG, (size_t) 10) < 0) TEST_ERROR + if(H5Pset_shared_mesg_index(fcpl_shared, 0, H5O_SHMESG_ALL_FLAG, (size_t) 10) < 0) TEST_ERROR /* Test in all configurations */ for(configuration = 0; configuration <= MAX_CONFIGURATION; configuration++) { diff --git a/test/tattr.c b/test/tattr.c index a6ea79e..c04af07 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -7274,7 +7274,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl) /* Make attributes > 500 bytes shared */ ret = H5Pset_shared_mesg_nindexes(my_fcpl, (unsigned)1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_MESG_ATTR_FLAG, (unsigned)500); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_SHMESG_ATTR_FLAG, (unsigned)500); CHECK_I(ret, "H5Pset_shared_mesg_index"); } /* end if */ else { @@ -7284,13 +7284,13 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl) CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); /* Make attributes > 500 bytes shared */ - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_MESG_ATTR_FLAG, (unsigned)500); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_SHMESG_ATTR_FLAG, (unsigned)500); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Make datatypes & dataspaces > 1 byte shared (i.e. all of them :-) */ - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)1, H5O_MESG_DTYPE_FLAG, (unsigned)1); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)1, H5O_SHMESG_DTYPE_FLAG, (unsigned)1); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)2, H5O_MESG_SDSPACE_FLAG, (unsigned)1); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)2, H5O_SHMESG_SDSPACE_FLAG, (unsigned)1); CHECK_I(ret, "H5Pset_shared_mesg_index"); } /* end else */ @@ -7600,7 +7600,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl) /* Make attributes > 500 bytes shared */ ret = H5Pset_shared_mesg_nindexes(my_fcpl, (unsigned)1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_MESG_ATTR_FLAG, (unsigned)500); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_SHMESG_ATTR_FLAG, (unsigned)500); CHECK_I(ret, "H5Pset_shared_mesg_index"); } /* end if */ else { @@ -7610,13 +7610,13 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl) CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); /* Make attributes > 500 bytes shared */ - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_MESG_ATTR_FLAG, (unsigned)500); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_SHMESG_ATTR_FLAG, (unsigned)500); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Make datatypes & dataspaces > 1 byte shared (i.e. all of them :-) */ - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)1, H5O_MESG_DTYPE_FLAG, (unsigned)1); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)1, H5O_SHMESG_DTYPE_FLAG, (unsigned)1); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)2, H5O_MESG_SDSPACE_FLAG, (unsigned)1); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)2, H5O_SHMESG_SDSPACE_FLAG, (unsigned)1); CHECK_I(ret, "H5Pset_shared_mesg_index"); } /* end else */ @@ -8041,7 +8041,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl) /* Make attributes > 500 bytes shared */ ret = H5Pset_shared_mesg_nindexes(my_fcpl, (unsigned)1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_MESG_ATTR_FLAG, (unsigned)500); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_SHMESG_ATTR_FLAG, (unsigned)500); CHECK_I(ret, "H5Pset_shared_mesg_index"); } /* end if */ else { @@ -8051,13 +8051,13 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl) CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); /* Make attributes > 500 bytes shared */ - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_MESG_ATTR_FLAG, (unsigned)500); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_SHMESG_ATTR_FLAG, (unsigned)500); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Make datatypes & dataspaces > 1 byte shared (i.e. all of them :-) */ - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)1, H5O_MESG_DTYPE_FLAG, (unsigned)1); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)1, H5O_SHMESG_DTYPE_FLAG, (unsigned)1); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)2, H5O_MESG_SDSPACE_FLAG, (unsigned)1); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)2, H5O_SHMESG_SDSPACE_FLAG, (unsigned)1); CHECK_I(ret, "H5Pset_shared_mesg_index"); } /* end else */ @@ -8405,7 +8405,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl) /* Make attributes > 500 bytes shared */ ret = H5Pset_shared_mesg_nindexes(my_fcpl, (unsigned)1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_MESG_ATTR_FLAG, (unsigned)500); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_SHMESG_ATTR_FLAG, (unsigned)500); CHECK_I(ret, "H5Pset_shared_mesg_index"); } /* end if */ else { @@ -8415,13 +8415,13 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl) CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); /* Make attributes > 500 bytes shared */ - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_MESG_ATTR_FLAG, (unsigned)500); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)0, H5O_SHMESG_ATTR_FLAG, (unsigned)500); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Make datatypes & dataspaces > 1 byte shared (i.e. all of them :-) */ - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)1, H5O_MESG_DTYPE_FLAG, (unsigned)1); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)1, H5O_SHMESG_DTYPE_FLAG, (unsigned)1); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)2, H5O_MESG_SDSPACE_FLAG, (unsigned)1); + ret = H5Pset_shared_mesg_index(my_fcpl, (unsigned)2, H5O_SHMESG_SDSPACE_FLAG, (unsigned)1); CHECK_I(ret, "H5Pset_shared_mesg_index"); } /* end else */ @@ -8879,7 +8879,7 @@ test_attr(void) /* Make attributes > 1 byte shared (i.e. all of them :-) */ ret = H5Pset_shared_mesg_nindexes(fcpl2, (unsigned)1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl2, (unsigned)0, H5O_MESG_ATTR_FLAG, (unsigned)1); + ret = H5Pset_shared_mesg_index(fcpl2, (unsigned)0, H5O_SHMESG_ATTR_FLAG, (unsigned)1); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Loop over using new group format */ diff --git a/test/tsohm.c b/test/tsohm.c index c985493..abdbe77 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -33,10 +33,10 @@ const unsigned def_minsizes[H5O_SHMESG_MAX_NINDEXES] = {250,250,250,250,250,250} /* Non-default SOHM values for testing */ #define TEST_NUM_INDEXES 4 const unsigned test_type_flags[H5O_SHMESG_MAX_NINDEXES] = - {H5O_MESG_FILL_FLAG, - H5O_MESG_DTYPE_FLAG | H5O_MESG_ATTR_FLAG, - H5O_MESG_SDSPACE_FLAG, - H5O_MESG_PLINE_FLAG, + {H5O_SHMESG_FILL_FLAG, + H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_ATTR_FLAG, + H5O_SHMESG_SDSPACE_FLAG, + H5O_SHMESG_PLINE_FLAG, 0, 0}; const unsigned test_minsizes[H5O_SHMESG_MAX_NINDEXES] = {0, 2, 40, 100, 3, 1000}; #define TEST_L2B 65 @@ -326,20 +326,20 @@ static void test_sohm_fcpl(void) VERIFY(ret, -1, "H5Pset_shared_mesg_index"); /* Setting an unknown flag (all flags + 1) should fail */ - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_ALL_FLAG + 1, 15); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_ALL_FLAG + 1, 15); VERIFY(ret, -1, "H5Pset_shared_mesg_index"); /* Try setting two different indexes to hold fill messages. They * should hold even very small messages for testing, even though we * wouldn't really want to share such tiny messages in the real world. */ - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_FILL_FLAG, 15); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_FILL_FLAG, 15); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_FILL_FLAG, 15); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_FILL_FLAG, 15); CHECK_I(ret, "H5Pset_shared_mesg_index"); fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl_id, H5P_DEFAULT); VERIFY(fid, -1, "H5Fcreate"); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_DTYPE_FLAG | H5O_MESG_FILL_FLAG, 15); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_FILL_FLAG, 15); CHECK_I(ret, "H5Pset_shared_mesg_index"); fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl_id, H5P_DEFAULT); VERIFY(fid, -1, "H5Fcreate"); @@ -733,7 +733,7 @@ static void test_sohm_size1(void) h5_stat_size_t sohm_btree_final_filesize2; H5O_info_t oinfo; unsigned num_indexes = 1; - unsigned index_flags = H5O_MESG_DTYPE_FLAG; + unsigned index_flags = H5O_SHMESG_DTYPE_FLAG; unsigned min_mesg_size = 50; unsigned list_max = 11; unsigned btree_min = 10; @@ -1097,42 +1097,42 @@ static void test_sohm_attrs(void) /* Run tests with only one kind of message to be shared */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ATTR_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ATTR_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); /* Verify */ sohm_attr_helper(fcpl_id); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_DTYPE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_DTYPE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); /* Run with any two types shared */ - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG | H5O_MESG_DTYPE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_DTYPE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ATTR_FLAG | H5O_MESG_DTYPE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ATTR_FLAG | H5O_SHMESG_DTYPE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG | H5O_MESG_ATTR_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_ATTR_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); /* Run test with all three kinds of message shared */ - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG | H5O_MESG_DTYPE_FLAG | H5O_MESG_ATTR_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_ATTR_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); @@ -1141,19 +1141,19 @@ static void test_sohm_attrs(void) /* Try using two indexes */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ATTR_FLAG | H5O_MESG_DTYPE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ATTR_FLAG | H5O_SHMESG_DTYPE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_SDSPACE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_SDSPACE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_DTYPE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_DTYPE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_ATTR_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_ATTR_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); @@ -1162,7 +1162,7 @@ static void test_sohm_attrs(void) /* One index for each kind of message */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, 3); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 2, H5O_MESG_SDSPACE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 2, H5O_SHMESG_SDSPACE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); @@ -1980,7 +1980,7 @@ static void test_sohm_size2(int close_reopen) ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 20); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 20); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Set the indexes to use a medium-sized list */ @@ -2028,11 +2028,11 @@ static void test_sohm_size2(int close_reopen) ret = H5Pset_shared_mesg_nindexes(fcpl_id, 3); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG | H5O_MESG_DTYPE_FLAG, 20); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_DTYPE_FLAG, 20); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_FILL_FLAG | H5O_MESG_PLINE_FLAG, 20); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_FILL_FLAG | H5O_SHMESG_PLINE_FLAG, 20); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(fcpl_id, 2, H5O_MESG_ATTR_FLAG, 20); + ret = H5Pset_shared_mesg_index(fcpl_id, 2, H5O_SHMESG_ATTR_FLAG, 20); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Use lists that are the same size as the "medium" list on the previous @@ -2057,11 +2057,11 @@ static void test_sohm_size2(int close_reopen) /* Edit the same property list (this should work) and don't share all messages. */ - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_PLINE_FLAG, 20); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_PLINE_FLAG, 20); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_DTYPE_FLAG | H5O_MESG_FILL_FLAG, 100000); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_FILL_FLAG, 100000); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(fcpl_id, 2, H5O_MESG_ATTR_FLAG | H5O_MESG_SDSPACE_FLAG, 20); + ret = H5Pset_shared_mesg_index(fcpl_id, 2, H5O_SHMESG_ATTR_FLAG | H5O_SHMESG_SDSPACE_FLAG, 20); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Use "normal-sized" lists. */ @@ -2084,7 +2084,7 @@ static void test_sohm_size2(int close_reopen) /* Change the second index to hold only gigantic messages. Result should * be the same as the previous file. */ - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_DTYPE_FLAG | H5O_MESG_FILL_FLAG, 100000); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_FILL_FLAG, 100000); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Get the file size & verify its contents */ @@ -2099,7 +2099,7 @@ static void test_sohm_size2(int close_reopen) * as one gains from sharing them. */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_DTYPE_FLAG | H5O_MESG_SDSPACE_FLAG, 1); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_SDSPACE_FLAG, 1); ret = H5Pset_shared_mesg_phase_change(fcpl_id, 1000, 900); /* Get the file size & verify its contents */ @@ -2107,7 +2107,7 @@ static void test_sohm_size2(int close_reopen) size2_verify(); /* Create the same file but don't share the really tiny messages */ - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_DTYPE_FLAG | H5O_MESG_SDSPACE_FLAG, 100); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_SDSPACE_FLAG, 100); ret = H5Pset_shared_mesg_phase_change(fcpl_id, 1000, 900); /* Get the file size & verify its contents */ @@ -2786,7 +2786,7 @@ test_sohm_delete(void) CHECK_I(fcpl_id, "H5Pcreate"); ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 16); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 16); CHECK_I(ret, "H5Pset_shared_mesg_index"); @@ -2814,9 +2814,9 @@ test_sohm_delete(void) /* Use two indexes */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG | H5O_MESG_ATTR_FLAG, 16); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_ATTR_FLAG, 16); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_DTYPE_FLAG, 16); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_DTYPE_FLAG, 16); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Use big list indexes */ @@ -2844,7 +2844,7 @@ test_sohm_delete(void) ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); for(x=DELETE_MIN_MESG_SIZE; x<=DELETE_MAX_MESG_SIZE; x += 10) { - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, (size_t) x); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, (size_t) x); CHECK_I(ret, "H5Pset_shared_mesg_phase_change"); delete_helper(fcpl_id, dspace_id, dcpl_id); } @@ -2992,9 +2992,9 @@ test_sohm_delete_revert(void) CHECK_I(fcpl_id, "H5Pcreate"); ret = H5Pset_shared_mesg_nindexes(fcpl_id, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_DTYPE_FLAG, 10); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_DTYPE_FLAG, 10); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_SDSPACE_FLAG, 10); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_SDSPACE_FLAG, 10); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Call the helper function to test this FCPL. */ @@ -3011,7 +3011,7 @@ test_sohm_delete_revert(void) /* Try sharing all messages */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 10); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 10); CHECK_I(ret, "H5Pset_shared_mesg_index"); ret = H5Pset_shared_mesg_phase_change(fcpl_id, 10, 5); CHECK_I(ret, "H5Pset_shared_mesg_phase_change"); @@ -3038,7 +3038,7 @@ test_sohm_delete_revert(void) /* Try with shared messages enabled, but when messages are too big * to be shared. */ - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 35); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 35); CHECK_I(ret, "H5Pset_shared_mesg_phase_change"); ret = test_sohm_delete_revert_helper(fcpl_id); CHECK_I(ret, "test_sohm_delete_revert_helper"); @@ -3138,7 +3138,7 @@ test_sohm_extlink(void) CHECK_I(fcpl_id, "H5Pcreate"); ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 16); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 16); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Test using external links when the source or destination file uses @@ -3686,7 +3686,7 @@ test_sohm_extend_dset(void) /* Only dataspaces */ - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG, 16); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG, 16); CHECK_I(ret, "H5Pset_shared_mesg_index"); ret = test_sohm_extend_dset_helper(fcpl_id, FALSE); @@ -3697,7 +3697,7 @@ test_sohm_extend_dset(void) /* All messages */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 16); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 16); CHECK_I(ret, "H5Pset_shared_mesg_index"); ret = test_sohm_extend_dset_helper(fcpl_id, FALSE); diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c index c9b9df8..9a255b2 100644 --- a/tools/h5repack/h5repack_copy.c +++ b/tools/h5repack/h5repack_copy.c @@ -130,23 +130,23 @@ int copy_objects(const char* fnamein, if(options->msg_size[i] > 0) { switch(i) { case 0: - mesg_type_flags[nindex] = H5O_MESG_SDSPACE_FLAG; + mesg_type_flags[nindex] = H5O_SHMESG_SDSPACE_FLAG; break; case 1: - mesg_type_flags[nindex] = H5O_MESG_DTYPE_FLAG; + mesg_type_flags[nindex] = H5O_SHMESG_DTYPE_FLAG; break; case 2: - mesg_type_flags[nindex] = H5O_MESG_FILL_FLAG; + mesg_type_flags[nindex] = H5O_SHMESG_FILL_FLAG; break; case 3: - mesg_type_flags[nindex] = H5O_MESG_PLINE_FLAG; + mesg_type_flags[nindex] = H5O_SHMESG_PLINE_FLAG; break; case 4: - mesg_type_flags[nindex] = H5O_MESG_ATTR_FLAG; + mesg_type_flags[nindex] = H5O_SHMESG_ATTR_FLAG; break; } /* end switch */ min_mesg_sizes[nindex] = (unsigned)options->msg_size[i]; |