summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-09-14 05:04:28 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-09-14 05:04:28 (GMT)
commit48339a4e26f071c7227b964f48e4d5600c26af16 (patch)
tree8d1b30401a326920818aa6037fdb3edf58aa54b2 /fortran
parent6a9aebbc41a2ae06756e2f70907fb0127d28b59b (diff)
downloadhdf5-48339a4e26f071c7227b964f48e4d5600c26af16.zip
hdf5-48339a4e26f071c7227b964f48e4d5600c26af16.tar.gz
hdf5-48339a4e26f071c7227b964f48e4d5600c26af16.tar.bz2
[svn-r9251] Purpose:
Bug fix Description: Correct typedef for dataset region references to avoid struct alignment issues on Crays. Solution: Change the typedef for hdset_reg_ref_t from a struct to an array of unsigned char's of the correct size and propagate the appropriate adjustments around the code. Platforms tested: FreeBSD 4.10 (sleipnir) Linux 2.4 (verbena) w/fortran Cray T90 (subzero) w/fortran Cray SV1 (wind) w/fortran & parallel Cray T3E (cyclone) w/fortran & parallel
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5Df.c8
-rw-r--r--fortran/src/H5Rf.c12
2 files changed, 10 insertions, 10 deletions
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c
index 05c11b9..5ac7d60 100644
--- a/fortran/src/H5Df.c
+++ b/fortran/src/H5Df.c
@@ -223,7 +223,7 @@ nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*(n));
if ( buf_c != NULL ) {
for (i = 0; i < n; i++) {
- HDmemcpy(buf_c[i].oid, buf, H5R_OBJ_REF_BUF_SIZE);
+ HDmemcpy(&buf_c[i], buf, H5R_OBJ_REF_BUF_SIZE);
buf = buf + REF_OBJ_BUF_LEN_F;
}
}
@@ -282,7 +282,7 @@ nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*(n));
if ( buf_c != NULL ) {
for (i = 0; i < n; i++) {
- HDmemcpy(buf_c[i].heapid, buf, H5R_DSET_REG_REF_BUF_SIZE);
+ HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE);
buf = buf + REF_REG_BUF_LEN_F;
}
}
@@ -420,7 +420,7 @@ nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i
ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
if (ret >=0) {
for (i = 0; i < n; i++) {
- HDmemcpy(buf, buf_c[i].oid, H5R_OBJ_REF_BUF_SIZE);
+ HDmemcpy(buf, &buf_c[i], H5R_OBJ_REF_BUF_SIZE);
buf = buf + REF_OBJ_BUF_LEN_F;
}
}
@@ -478,7 +478,7 @@ nh5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i
ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
if (ret >=0) {
for (i = 0; i < n; i++) {
- HDmemcpy(buf, buf_c[i].heapid, H5R_DSET_REG_REF_BUF_SIZE);
+ HDmemcpy(buf, &buf_c[i], H5R_DSET_REG_REF_BUF_SIZE);
buf = buf + REF_REG_BUF_LEN_F;
}
}
diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c
index 852028a..6e0d41a 100644
--- a/fortran/src/H5Rf.c
+++ b/fortran/src/H5Rf.c
@@ -53,7 +53,7 @@ nh5rcreate_object_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen)
HDfree(c_name);
if (ret_value_c >= 0) {
- HDmemcpy(ref, ref_c.oid, H5R_OBJ_REF_BUF_SIZE);
+ HDmemcpy(ref, &ref_c, H5R_OBJ_REF_BUF_SIZE);
ret_value = 0;
}
@@ -102,7 +102,7 @@ nh5rcreate_region_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid
HDfree(c_name);
if (ret_value_c >= 0) {
- HDmemcpy (ref, ref_c.heapid, H5R_DSET_REG_REF_BUF_SIZE);
+ HDmemcpy (ref, &ref_c, H5R_DSET_REG_REF_BUF_SIZE);
ret_value = 0;
}
return ret_value;
@@ -127,7 +127,7 @@ nh5rdereference_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id)
hdset_reg_ref_t ref_c;
hid_t c_obj_id;
- HDmemcpy (ref_c.heapid, ref, H5R_DSET_REG_REF_BUF_SIZE);
+ HDmemcpy (&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
/*
* Call H5Rdereference function.
@@ -160,7 +160,7 @@ nh5rdereference_object_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id)
hid_t c_obj_id;
hobj_ref_t ref_c;
- HDmemcpy (ref_c.oid, ref, H5R_OBJ_REF_BUF_SIZE);
+ HDmemcpy (&ref_c, ref, H5R_OBJ_REF_BUF_SIZE);
/*
* Call H5Rdereference function.
@@ -192,7 +192,7 @@ nh5rget_region_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *space_id)
hid_t c_space_id;
hdset_reg_ref_t ref_c;
- HDmemcpy (ref_c.heapid, ref, H5R_DSET_REG_REF_BUF_SIZE);
+ HDmemcpy (&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
/*
* Call H5Rget_region function.
@@ -225,7 +225,7 @@ nh5rget_object_type_obj_c (hid_t_f *dset_id, int_f *ref, int_f *obj_type)
int c_obj_type;
hobj_ref_t ref_c;
- HDmemcpy (ref_c.oid, ref, H5R_OBJ_REF_BUF_SIZE);
+ HDmemcpy (&ref_c, ref, H5R_OBJ_REF_BUF_SIZE);
/*
* Call H5Rget_object_type function.