From 1696277a6c8c3324c31e0ea49bcd0a9e5c0d01c6 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 10 May 2002 10:39:44 -0500 Subject: [svn-r5386] Purpose: Bug Fix Description: Currently, only process 0 is writing attribute data to a file. This is incorrect, because the raw data for attributes is cached in memory until the object header is written and other processes are not able to read the correct attribute information. Solution: Have all processes participate in writing the attribute data. Platforms tested: IRIX64 6.5 (modi4) --- testpar/t_mdset.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index d49ca90..df12bcd 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -390,8 +390,7 @@ void write_attribute(hid_t obj_id, int this_type, int num) sprintf(attr_name, "Group Attribute %d", num); sid = H5Screate(H5S_SCALAR); aid = H5Acreate(obj_id, attr_name, H5T_NATIVE_INT, sid, H5P_DEFAULT); - if(MAINPROCESS) - H5Awrite(aid, H5T_NATIVE_INT, &num); + H5Awrite(aid, H5T_NATIVE_INT, &num); H5Aclose(aid); H5Sclose(sid); } @@ -401,8 +400,7 @@ void write_attribute(hid_t obj_id, int this_type, int num) attr_data[i] = i; sid = H5Screate_simple(dspace_rank, dspace_dims, NULL); aid = H5Acreate(obj_id, attr_name, H5T_NATIVE_INT, sid, H5P_DEFAULT); - if(MAINPROCESS) - H5Awrite(aid, H5T_NATIVE_INT, attr_data); + H5Awrite(aid, H5T_NATIVE_INT, attr_data); H5Aclose(aid); H5Sclose(sid); } -- cgit v0.12