36 F5printf(200,
"F5Tcheck_committed()" );
37 switch(H5Tget_class( fieldtype ) )
40 if (H5Tcommitted(fieldtype)>0)
60hid_t
F5Lcreate(hid_t R_id,
const char*fieldname,
int dimension,
const hsize_t*dims,
61 hid_t fieldtype, hid_t dataset_creation_property_id)
63hid_t ds_id, creator_id, id;
67 F5printf(30,
"F5Lcreate(%s): INVALID field type %d!?", fieldname, (
int)fieldtype);
71 ds_id = H5Screate_simple(dimension, dims, NULL);
74 F5printf(30,
"F5Lcreate(): cannot create dataset!?");
80 creator_id = dataset_creation_property_id<0 ? H5Pcreate(H5P_DATASET_CREATE) : dataset_creation_property_id;
81 id =
F5Dcreate(R_id, fieldname, fieldtype, ds_id, creator_id);
84 F5printf(30,
"F5Lcreate(): F5Dappend(loc=%d,%s,dims=%d,,type=%d...) FAILED!\n",
85 (
int)R_id, fieldname, dimension, (
int)fieldtype );
89 F5printf(40,
"F5Lcreate(): F5Dappend(%d,%s,...) DONE!\n", (
int)R_id, fieldname);
99 if (dataset_creation_property_id<0)
100 H5Pclose(creator_id);
112static herr_t get_type_by_iteration(hid_t group_id,
const char *member_name,
void *operator_data)
116int FieldIDisGroup = 0;
117hid_t lapl_id = H5P_DEFAULT;
120 if (member_name[0] ==
'.')
122 F5printf(1,
"F5Lget_type(): ** performance warning ** - identifying field type by iteration, but skipping dot-fragment %s", member_name );
127 H5L_info_t link_info;
128 herr_t status = H5Lget_info(group_id, member_name, &link_info, H5P_DEFAULT);
131 F5printf(1,
"F5Lget_type(): ** performance warning ** - cannot receive link status for fragment %s", member_name );
134 if (link_info.type == H5L_TYPE_EXTERNAL)
136 F5printf(1,
"F5Lget_type(): ** performance warning ** - identifying field type by inspecting skipped fragment %s", member_name );
141 F5printf(1,
"F5Lget_type(): ** performance warning ** - identifying field type by inspecting fragment %s", member_name );
144 loc_id = H5Dopen2(group_id, member_name, lapl_id);
153 lapl_id = H5Pcreate( H5P_GROUP_ACCESS );
154 H5Pset_elink_fapl( lapl_id, T->
fapl_id);
157 loc_id = H5Gopen2(group_id, member_name, lapl_id);
160 if (lapl_id != H5P_DEFAULT)
163 if (loc_id<0)
return 0;
167 if (FieldIDisGroup)
H5Gclose(loc_id);
168 else H5Dclose(loc_id);
173hid_t
F5Lget_type(hid_t Field_hid,
int FieldIDisGroup, hid_t fapl_id)
175 F5printf(40,
"F5Lget_type(%lu,%s)", (
unsigned long)Field_hid, FieldIDisGroup?
"Is group":
"Is dataset");
179 F5printf(40,
"F5Lget_type(): no valid Field id specified");
185 hid_t attr_hid, Type_id = -1;
192 Type_id = H5Aget_type(attr_hid);
203 Type_id = H5Aget_type(attr_hid);
205 F5printf(40,
"F5Lget_type(): no `%s' attribute, but uniform base attribute %s found.",
209 F5printf(1,
"F5Lget_type(): no `%s' attribute, ** performance warning ** - identifying field type by iteration over field fragments!",
215 H5Giterate(Field_hid,
".", 0, get_type_by_iteration, &T);
221 hid_t NCSA_image_version =
F5Atry_to_open(Field_hid,
"IMAGE_VERSION");
222 if (NCSA_image_version>0)
225 H5Aclose( NCSA_image_version );
228 hid_t Type_id = H5Aget_type(attr_hid);
231fprintf(stderr,
"F5Lget_type(): found NCSA image with `%s' attribute, return its type.\n",
FIBER_HDF5_TYPEID_ATTRIB);
237 hid_t type_id = H5Dget_type(Field_hid);
238 if (H5Tis_commmitted(type_id)
240 int NAttribs = H5Aget_num_attrs( type_id );
241 F5printf(20,
"HDF5 Type %lu has %d attributes", (
unsigned long)type_id, NAttribs);
246 return H5Dget_type(Field_hid);
252hid_t space_id, attr_id;
256 F5printf(40,
"-- F5Lget_space(): Determine skeleton topology.");
264 hsize_t TotalNumber = 1;
266 space_id = H5Aget_space(attr_id);
267 rank = H5Sget_simple_extent_npoints(space_id);
273 for(i=0; i<rank; i++)
276 TotalNumber *= dims[i];
280 F5printf(20,
" F5Lget_space(): Unknown topology, might be complex.");
284 space_id = H5Screate_simple(rank, dims, dims);
288 space_id = H5Dget_space(Field_id);
296 F5printf(20,
" F5Lset_space(): field already has dimensions set or invalid Field id or write error.");
304hid_t type_id =
F5Lget_type( CompoundGroupID, 1, 0);
305int nComponents = H5Tget_nmembers( type_id );
309 for(i=0; i<nComponents; i++)
311 char * comp_name = H5Tget_member_name( type_id, i );
312 hid_t sep_id = H5Dopen2(CompoundGroupID, comp_name, H5P_DEFAULT);
313 H5free_memory( comp_name );
315 hid_t space_id = H5Dget_space( sep_id );
317 rank = H5Sget_simple_extent_dims(space_id, dims, NULL);
329hid_t type_id =
F5Lget_type( CompoundGroupID, 1, 0);
330int nComponents = H5Tget_nmembers( type_id );
333 for(i=0; i<nComponents; i++)
335 char * comp_name = H5Tget_member_name( type_id, i );
336 hid_t sep_id = H5Dopen2(CompoundGroupID, comp_name, H5P_DEFAULT);
337 H5free_memory( comp_name );
339 space_id = H5Dget_space( sep_id );
357hid_t
F5Lwrite(hid_t R_id,
const char*fieldname,
int dimension,
const hsize_t*dims,
358 hid_t fieldtype, hid_t memtype,
const void * dataPtr,
359 hid_t enum_type, hid_t dcpl_id)
364 F5printf(3,
"F5Lwrite(%d,%s,%d,...): INVALID field type %d!",
365 (
int)R_id, fieldname, dimension, (
int)fieldtype );
370 F5printf(3,
"F5Lwrite(%d,%s,%d,...): WARNING - NO DATA!\n",
371 (
int)R_id, fieldname, dimension );
374 id =
F5Lcreate(R_id, fieldname, dimension, dims, fieldtype, dcpl_id);
376 F5printf(10,
"F5 Warning: F5Lwrite(%s): type not committed!\n", fieldname);
380 F5printf(3,
"F5Lwrite(%d,%s,%d,...): Could not create field!",
381 (
int)R_id, fieldname, dimension);
385 F5printf(30,
"F5Lwrite(): Field created, set enum");
389 hid_t xfer_plist_id = H5P_DEFAULT;
392 herr_t err = H5Dwrite(
id, memtype>0?memtype:fieldtype, H5S_ALL, H5S_ALL, xfer_plist_id, dataPtr);
397 F5printf(3,
"F5Lwrite(%d,%s,%d,...): Could not write field!",
398 (
int)R_id, fieldname, dimension);
409 hsize_t nElements, hid_t fieldtype, hid_t memtype,
410 const void * dataPtr, hid_t enum_type, hid_t property_id)
412 return F5Lwrite(R_id, fieldname, 1, &nElements,
413 fieldtype, memtype, dataPtr, enum_type, property_id);
418hid_t
F5LwriteS(hid_t R_id,
const char*fieldname,
int dimension,
const hsize_t*dims,
419 hid_t fieldtype, hid_t memtype,
const void * dataPtr,
420 hid_t enum_type, hid_t dcpl_id)
426 F5printf(30,
"F5LwriteS(%d,%s,%d,...): INVALID field type %d!",
427 (
int)R_id, fieldname, dimension, (
int)fieldtype );
431 if ( H5Tget_class( fieldtype ) != H5T_COMPOUND )
433 F5printf(30,
"F5LwriteS(%d,%s,%d,...): Not a compound type %d!",
434 (
int)R_id, fieldname, dimension, (
int)fieldtype );
438 printf(
"F5 Warning: F5LwriteS(%s): type not committed!\n", fieldname);
443 F5printf(30,
"F5LwriteS(%d,%s,%d,...): WARNING - NO DATA!\n",
444 (
int)R_id, fieldname, dimension );
447 nComponents = H5Tget_nmembers(fieldtype);
455 F5printf(30,
"F5LwriteS(%d,%s,%d,...): Could not create compound group!",
456 (
int)R_id, fieldname, dimension);
460 F5printf(30,
"F5Lwrite(): Field created, set enum");
468 hid_t ds_id = H5Screate_simple(dimension, dims, NULL);
472 for(comp=0; comp<nComponents; comp++)
474 char* ComponentName = H5Tget_member_name(fieldtype, comp);
475 hid_t ComponentType = H5Tget_member_type(fieldtype, comp);
476 hid_t MemComponentType;
480 int mem_idx = H5Tget_member_index(memtype, ComponentName);
483 F5printf(10,
"**F5LwriteS(%s) could not find memory equivalent "
484 " of save component %s!",
485 fieldname, ComponentName);
486 MemComponentType = ComponentType;
487 H5Iinc_ref( MemComponentType );
491 F5printf(10,
"F5LwriteS(%s): member type %s : %d -> %d",
492 fieldname, ComponentName, mem_idx, comp);
493 MemComponentType = H5Tget_member_type(memtype, mem_idx);
498 MemComponentType = ComponentType;
499 H5Iinc_ref( MemComponentType );
502 hid_t D_id = H5Dcreate2(
id, ComponentName, ComponentType, ds_id,
511 hid_t xfer_plist_id = H5P_DEFAULT;
517 const int FastestDimension = dimension-1;
519 for(k=0; k<dimension; k++)
521 mem_dataspace[k] = dims[k];
525 mem_dataspace[FastestDimension] = nComponents*dims[FastestDimension];
526 start [FastestDimension] = comp;
527 stride[FastestDimension] = nComponents;
529 mem_space_id = H5Screate_simple(dimension, mem_dataspace, NULL);
530 H5Sselect_hyperslab(mem_space_id, H5S_SELECT_SET, start, stride, dims, NULL);
532 herr = H5Dwrite(D_id, MemComponentType, mem_space_id, H5S_ALL, xfer_plist_id, dataPtr);
535 F5printf(1,
"**F5LwriteS(%s) could not save component %s!",
536 fieldname, ComponentName);
540 H5free_memory(ComponentName);
552int F5LreadS(hid_t Container_id, hid_t LoadID,
void * dataPtr,
556int nComponents = H5Tget_nmembers( LoadID );
557hid_t dapl_id = H5P_DEFAULT;
560 for(i=0; i<nComponents; i++)
562 char * comp_name = H5Tget_member_name( LoadID, i );
563 hid_t comp_id = H5Dopen2(Container_id, comp_name, dapl_id);
565 hid_t space_id = H5Dget_space( comp_id );
570 int subrank = H5Sget_simple_extent_dims(space_id, blocksize, NULL);
571 int k, FastestDimension;
574 nDimensions = subrank;
575 else if (subrank != nDimensions)
577 F5printf(-1,
"F5LreadS() Incompatible component subspace!?!!?");
579 FastestDimension = nDimensions-1;
580 for(k=0; k<nDimensions; k++)
582 mem_dataspace[k] = blocksize[k];
586 mem_dataspace[FastestDimension] = nComponents*blocksize[FastestDimension];
587 start [FastestDimension] = i;
588 stride[FastestDimension] = nComponents;
594 hid_t mem_space_id = H5Screate_simple(subrank, mem_dataspace, NULL);
595 H5Sselect_hyperslab(mem_space_id, H5S_SELECT_SET, start, stride, blocksize, NULL);
598 herr_t read_error = H5Dread(comp_id, ElementLoadID, mem_space_id, space_id, H5P_DEFAULT, dataPtr);
601 F5printf(0,
"F5readS() Component subspace read error at %s", comp_name);
607 H5free_memory( comp_name );
611 H5Sclose(mem_space_id);
623#define MAX_BLOCKNAME 1024
625static const char*blockname(
char*dest,
int dimensions,
const hsize_t*start)
627 puts(
"Default blockname is unimplemented!");
632 int rank,
const hsize_t*full_dims,
633 const hsize_t*datasize,
634 hid_t fieldtype, hid_t memtype,
const void * dataPtr,
635 const hsize_t*datastart,
636 const hsize_t*start_border,
const hsize_t*end_border,
637 const char*fraction_name,
638 hid_t enum_type, hid_t property_id)
644 F5printf(0,
"F5Lwrite_fraction() for field %s has no datastart given for fragment %s",
645 fieldname, fraction_name);
649 F5printf(20,
"F5Lwrite_fraction(rank=%d)", rank);
651 F5printf(20,
"F5Lwrite_fraction(%lux%lux%lu)",
652 (
long)datasize[0], (
long)datasize[1], (
long)datasize[2]);
657 F5printf(1,
"F5Lwrite_fraction() - FAILED to append field fragment group.");
663 B_id =
F5Lwrite(F_id, fraction_name?fraction_name:blockname(myBlockname, rank, datastart),
664 rank, datasize, fieldtype, memtype, dataPtr, enum_type, property_id);
668 F5printf(1,
"F5Lwrite_fraction() - FAILED to append field fragment data.");
678 F5printf(1,
"F5Lwrite_fraction() - FAILED to write FIBER_FRAGMENT_OFFSET_ATTRIBUTE");
692 int rank,
const hsize_t*full_dims,
693 const hsize_t*datasize,
694 hid_t fieldtype, hid_t memtype,
const void * dataPtr,
695 const hsize_t*datastart,
696 const hsize_t*start_border,
const hsize_t*end_border,
697 const char*fraction_name,
698 hid_t enum_type, hid_t property_id)
702 F5printf(-1,
"F5Lwrite_fractionS(rank=%d)", rank);
707 F5printf(1,
"F5Lwrite_fractionS() - FAILED to append field fragment group.");
712 B_id =
F5LwriteS(F_id, fraction_name?fraction_name:blockname(myBlockname, rank, datastart),
713 rank, datasize, fieldtype, memtype, dataPtr, enum_type, property_id);
717 F5printf(1,
"F5Lwrite_fractionS() - FAILED to append field fragment data.");
740 const char *target_file_name,
741 const char *target_obj_name,
744 int rank,
const hsize_t*full_dims,
745 const hsize_t*datasize,
746 hid_t fieldtype, hid_t memtype,
const void * dataPtr,
747 const hsize_t*datastart,
748 const hsize_t*start_border,
const hsize_t*end_border,
749 const char*fraction_name,
750 hid_t enum_type, hid_t property_id)
754 F5printf(20,
"F5Lwrite_fraction(rank=%d)", rank);
756 F5printf(20,
"F5Lwrite_fraction(%lux%lux%lu)",
757 (
long)datasize[0], (
long)datasize[1], (
long)datasize[2]);
759 F_id =
F5Gappend_external(R_id, fieldname, target_file_name, target_obj_name, prefix );
762 F5printf(20,
"F5Lwrite_fraction_external() - FAILED to create external field fragment.");
768 B_id =
F5Lwrite(F_id, fraction_name?fraction_name:blockname(myBlockname, rank, datastart),
769 rank, datasize, fieldtype, memtype, dataPtr, enum_type, property_id);
773 F5printf(1,
"F5Lwrite_fraction_external() - FAILED to append field fragment data.");
794 int rank,
const hsize_t*full_dims,
795 const hsize_t*datasize,
796 hid_t fieldtype, hid_t memtype,
const void *
const*dataPtr,
797 const hsize_t*datastart,
798 const hsize_t*start_border,
const hsize_t*end_border,
799 const char*fraction_name,
800 hid_t enum_type, hid_t property_id)
805 F5printf(10,
"F5LSwrite_fraction(field=%s, fragment=%s)",
806 fieldname, fraction_name);
810 F5printf(60,
" start=[%d,%d,%d] size=[%d,%d,%d] full=[%d,%d,%d]\n",
811 (
int)full_dims[0], (
int)full_dims[1], (
int)full_dims[2],
812 (
int)datastart[0], (
int)datastart[1], (
int)datastart[2],
813 (
int)datasize[0], (
int)datasize[1] , (
int)datasize[2]
821 B_id =
F5Lwrites(F_id, fraction_name?fraction_name:blockname(myBlockname, rank, datastart),
822 rank, datasize, fieldtype, memtype, dataPtr, enum_type, property_id);
839 F5printf(11,
"~F5LSwrite_fraction(field=%s, fragment=%s)\n",
840 fieldname, fraction_name);
852hid_t
F5Lwrite_linear(hid_t R_id,
const char*fieldname,
int dimension,
const hsize_t*dims,
854 const void * base,
const void * delta)
875 F5printf(50,
"F5 Warning: F5Lwrite_linear(%s): cannot create group (already exists?)\n", fieldname);
880 printf(
"F5 Warning: F5Lwrite_linear(%s): type not committed!\n", fieldname);
887 space_hid = H5Screate(H5S_SCALAR);
890 H5P_DEFAULT, H5P_DEFAULT);
892 H5Awrite(attr_hid, fieldtype, base );
898 H5P_DEFAULT, H5P_DEFAULT);
900 H5Awrite(attr_hid, fieldtype, delta );
913 void * base,
void * delta)
917hid_t attr_id, space_id;
929 rank = H5Tget_nmembers( fieldtype );
935#ifdef F5_BACKWARD_COMPATIBILITY
945#ifdef F5_BACKWARD_COMPATIBILITY
949 space_id = H5Aget_space(attr_id);
950 file_rank = H5Sget_simple_extent_npoints(space_id);
953 if (file_rank != rank)
956 rank, (
int)file_rank);
969 for(i=0; i<rank; i++)
990 F_id = H5Gopen2(Rep_id, fieldname, H5P_DEFAULT);
1033hid_t ds_id = H5Screate(H5S_SCALAR);
1034hid_t creator_id = H5Pcreate(H5P_DATASET_CREATE);
1036hid_t F_id = H5Dcreate2(R_id, fieldname, fieldtype, ds_id, creator_id, H5P_DEFAULT, H5P_DEFAULT);
1038 H5Dwrite(F_id, fieldtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, value);
1041 H5Pclose(creator_id);
1054hid_t TypeAttrDS_hid;
1062 F5printf(5,
"F5 Warning: F5Dset_type_attribute(): type already exists!\n");
1063 H5Aclose(TypeAttr_hid);
1067 TypeAttrDS_hid = H5Screate(H5S_SCALAR);
1069 H5P_DEFAULT, H5P_DEFAULT);
1072 F5printf(1,
"F5Dset_type_attribute::H5Acreate() failed.");
1073 H5Sclose(TypeAttrDS_hid);
1077 buf = calloc( H5Tget_size(fieldtype), 1);
1078 herr = H5Awrite(TypeAttr_hid, fieldtype, buf);
1079 if (herr<0)
F5printf(1,
"F5Dset_type_attribute::H5Awrite() failed.");
1080 H5Sclose(TypeAttrDS_hid);
1081 H5Aclose(TypeAttr_hid);
1085 F5printf(0,
"F5 Warning: F5Dset_type_attribute(): compound type not committed!\n");
1096hid_t
F5Lwrites(hid_t R_id,
const char*fieldname,
int dimension,
const hsize_t*dims,
1097 hid_t fieldtype, hid_t memtype,
const void *
const*dataPtr,
1098 hid_t enum_type, hid_t property_id)
1100hid_t ds_id = H5Screate_simple(dimension, dims, NULL);
1101hid_t creator_id = property_id<0 ? H5Pcreate(H5P_DATASET_CREATE) : property_id;
1105 F5printf(10,
"F5Lwrites(field=%s) %dx%dx%d",
1106 fieldname, (
int)dims[0], (
int)dims[1], (
int)dims[2] );
1108 F5printf(10,
"F5Lwrites(field=%s)\n", fieldname);
1112 printf(
"F5 Warning: F5Lwrites(%s): type not committed!\n", fieldname);
1114 switch( H5Tget_class( fieldtype ) )
1119 int Ncomponents = H5Tget_nmembers(fieldtype);
1121 F_id =
F5Gcreate(R_id, fieldname, Ncomponents, 16);
1123 F5printf(1,
"**F5Lwrites(%s) could not create separated compound group!",
1129 for(comp=0; comp<Ncomponents; comp++)
1131 hid_t id, ComponentType, MemComponentType;
1132 char * ComponentName;
1133 const void * data = dataPtr[comp];
1136 if (!data)
continue;
1137 ComponentName = H5Tget_member_name(fieldtype, comp);
1138 ComponentType = H5Tget_member_type(fieldtype, comp);
1142 int mem_idx = H5Tget_member_index(memtype, ComponentName);
1145 F5printf(10,
"**F5Lwrites(%s) could not find memory equivalent "
1146 " of save component %s!",
1147 fieldname, ComponentName);
1148 MemComponentType = ComponentType;
1149 H5Iinc_ref( MemComponentType );
1153 F5printf(10,
"F5Lwrites(%s): member type %s : %d -> %d",
1154 fieldname, ComponentName, mem_idx, comp);
1156 data = dataPtr[mem_idx];
1157 MemComponentType = H5Tget_member_type(memtype, mem_idx);
1162 MemComponentType = ComponentType;
1163 H5Iinc_ref( MemComponentType );
1166 id = H5Dcreate2(F_id, ComponentName, ComponentType, ds_id, creator_id, H5P_DEFAULT, H5P_DEFAULT);
1167 herr = H5Dwrite(
id, MemComponentType, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
1169 F5printf(1,
"**F5Lwrites(%s) could not save component %s!",
1170 fieldname, ComponentName);
1173 H5free_memory(ComponentName);
1182 F_id = H5Dcreate2(R_id, fieldname, fieldtype, ds_id, creator_id, H5P_DEFAULT, H5P_DEFAULT);
1183 H5Dwrite(F_id, memtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, *dataPtr);
1189 F5printf(-1,
"F5Lwrites(field=%s) CANNOT WRITE SPECIFIED FIELD TYPE as seperated compound, because it is not a compound\n", fieldname, F_id);
1195 H5Pclose(creator_id);
1197 F5printf(10,
"~F5Lwrites(field=%s), id=%d\n", fieldname, F_id);
1202hid_t
F5LwriteX(hid_t R_id,
const char*fieldname,
int rank,
const hsize_t*dims,
1203 hid_t fieldtype, hid_t memtype,
1204 const void *
const*dataPtr,
const int*polynom_order,
1205 const int component_map[],
1207 hid_t ProcIDLocation)
1213const int MaxComponentNameLength = 16;
1215 if (rank==3)
F5printf(10,
"F5LwriteX(field=%s) %dx%dx%d", fieldname, (
int)dims[0], (
int)dims[1], (
int)dims[2] );
1216 if (rank==2)
F5printf(10,
"F5LwriteX(field=%s) %dx%d" , fieldname, (
int)dims[0], (
int)dims[1] );
1217 else F5printf(10,
"F5LwriteX(field=%s)\n", fieldname);
1219 if ( H5Tget_class( fieldtype ) != H5T_COMPOUND)
1221 printf(
"F5 Warning: F5LwriteX(%s): type is not a compound type!\n", fieldname);
1226 printf(
"F5 Warning: F5LwriteX(%s): no component map!\n", fieldname);
1230 Ncomponents = H5Tget_nmembers(fieldtype);
1231 for(i=0; i<rank; i++)
1233 if (component_map[i]<0 || component_map[i]>=Ncomponents)
1235 printf(
"F5 Warning: F5LwriteX(%s): invalid component map!\n", fieldname);
1241 printf(
"F5 Warning: F5LwriteX(%s): type not committed?!\n", fieldname);
1243 F_id =
F5Gcreate(R_id, fieldname, Ncomponents, MaxComponentNameLength);
1246 F5printf(1,
"**F5LwriteX(%s) could not create direct product group!", fieldname);
1250 creator_id = property_id<0 ? H5Pcreate(H5P_DATASET_CREATE) : property_id;
1255 for(comp=0; comp<Ncomponents; comp++)
1258 hid_t id, ComponentType, MemComponentType;
1259 char * ComponentName;
1260 const void * data = dataPtr[comp];
1262 hsize_t poly_order = polynom_order[comp];
1265 if (!data)
continue;
1266 ComponentName = H5Tget_member_name(fieldtype, comp);
1267 ComponentType = H5Tget_member_type(fieldtype, comp);
1270 int mem_idx = H5Tget_member_index(memtype, ComponentName);
1273 F5printf(10,
"**F5LwriteX(%s) could not find memory equivalent of save component %s!",
1274 fieldname, ComponentName);
1275 MemComponentType = ComponentType;
1279 data = dataPtr[mem_idx];
1280 poly_order = polynom_order[mem_idx];
1282 MemComponentType = H5Tget_member_type(memtype, mem_idx);
1284 F5printf(10,
"F5LwriteX(%s): member type %s : %d -> %d (polynomial order %d, data at %p)",
1285 fieldname, ComponentName, mem_idx, comp, (
int)(poly_order), data);
1289 F5printf(10,
"F5LwriteX(%s): member type %s : No polynom data - member not saved!",
1290 fieldname, ComponentName );
1292 H5free_memory(ComponentName);
1300 MemComponentType = ComponentType;
1301 F5printf(10,
"F5LwriteX(%s): no component type remapping...", fieldname);
1304 ds_id = H5Screate_simple(1, &poly_order, NULL);
1305 id = H5Dcreate2(F_id, ComponentName, ComponentType, ds_id, creator_id, H5P_DEFAULT, H5P_DEFAULT);
1308 F5printf(1,
"**F5LwriteX(%s) could not create component %s!",
1309 fieldname, ComponentName);
1312 herr = H5Dwrite(
id, MemComponentType, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
1315 F5printf(1,
"**F5LwriteX(%s) could not save component %s!",
1316 fieldname, ComponentName);
1319 F5printf(1,
"**F5LwriteX() set field ProcArray enum...");
1328 H5free_memory(ComponentName);
1333 H5Pclose(creator_id);
1335 F5printf(10,
"~F5LwriteX(%s), id=%d\n", fieldname, F_id);
hid_t F5Atry_to_open(hid_t location, const char *name)
int F5Asave_ints(hid_t loc_id, const char *name, const int data[], hsize_t n)
int F5Tcheck_committed(hid_t fieldtype)
hid_t F5Lwrite_fractionS(hid_t R_id, const char *fieldname, int rank, const hsize_t *full_dims, const hsize_t *datasize, hid_t fieldtype, hid_t memtype, const void *dataPtr, const hsize_t *datastart, const hsize_t *start_border, const hsize_t *end_border, const char *fraction_name, hid_t enum_type, hid_t property_id)
hid_t F5Lwrite_fraction_external(hid_t R_id, const char *fieldname, const char *target_file_name, const char *target_obj_name, const char *prefix, int rank, const hsize_t *full_dims, const hsize_t *datasize, hid_t fieldtype, hid_t memtype, const void *dataPtr, const hsize_t *datastart, const hsize_t *start_border, const hsize_t *end_border, const char *fraction_name, hid_t enum_type, hid_t property_id)
hid_t F5Lget_space(hid_t Field_id)
int F5Dset_type_attribute(hid_t F_id, hid_t fieldtype)
hid_t F5LwriteX(hid_t R_id, const char *fieldname, int rank, const hsize_t *dims, hid_t fieldtype, hid_t memtype, const void *const *dataPtr, const int *polynom_order, const int component_map[], hid_t property_id, hid_t ProcIDLocation)
int F5Lis_linear(hid_t Rep_id, const char *fieldname)
#define FIBER_UNIFORMARRAY_DELTA_ATTRIBUTE
#define FIBER_HDF5_TYPEID_ATTRIB
#define FIBER_UNIFORMARRAY_BASE_ATTRIBUTE
#define FIBER_FRAGMENT_NOOVERLAP_START_ATTRIBUTE
#define FIBER_FRAGMENT_NOOVERLAP_END_ATTRIBUTE
#define FIBER_FIELD_DATASPACE_DIMENSIONS_ATTRIBUTE
#define FIBER_HDF5_COMPONENTMAP_ATTRIB
#define FIBER_FRAGMENT_OFFSET_ATTRIBUTE
herr_t F_H5Aread(hid_t attr_id, hid_t mem_type_id, void *buf, const char *name)
#define F5printf(verbosity,...)
herr_t F5Tset_field_ProcArray_enum(hid_t loc_id, ProceduralArrayType what, hid_t ProcTypeIdLocation)
herr_t F5Tset_field_enum(hid_t loc_id, hid_t enum_type_id, ArrayType what)
hid_t F5Lread_linear(hid_t F_id, hsize_t *dims, hid_t fieldtype, void *base, void *delta)
int F5LAsave_dimensions(hid_t Field_id, const char *aname, int rank, const hsize_t *dims)
hid_t F5Lcreate(hid_t R_id, const char *fieldname, int dimension, const hsize_t *dims, hid_t fieldtype, hid_t dataset_creation_property_id)
hid_t F5Lwrite(hid_t R_id, const char *fieldname, int dimension, const hsize_t *dims, hid_t fieldtype, hid_t memtype, const void *dataPtr, hid_t enum_type, hid_t dcpl_id)
int F5Lset_space(hid_t Field_id, int rank, const hsize_t *dims)
int F5Lget_compound_extent_dims(hid_t CompoundGroupID, hsize_t *dims)
hid_t F5Lwrite_fraction(hid_t R_id, const char *fieldname, int rank, const hsize_t *full_dims, const hsize_t *datasize, hid_t fieldtype, hid_t memtype, const void *dataPtr, const hsize_t *datastart, const hsize_t *start_border, const hsize_t *end_border, const char *fraction_name, hid_t enum_type, hid_t property_id)
hid_t F5LwriteS(hid_t R_id, const char *fieldname, int dimension, const hsize_t *dims, hid_t fieldtype, hid_t memtype, const void *dataPtr, hid_t enum_type, hid_t dcpl_id)
int F5LreadS(hid_t Container_id, hid_t LoadID, void *dataPtr, hid_t ElementLoadID)
hid_t F5Lwrites(hid_t R_id, const char *fieldname, int dimension, const hsize_t *dims, hid_t fieldtype, hid_t memtype, const void *const *dataPtr, hid_t enum_type, hid_t property_id)
hid_t F5Lwrite_entity(hid_t R_id, const char *fieldname, hid_t fieldtype, const void *value)
hid_t F5Lget_compound_space(hid_t CompoundGroupID)
hid_t F5Lwrite_linear(hid_t R_id, const char *fieldname, int dimension, const hsize_t *dims, hid_t fieldtype, const void *base, const void *delta)
hid_t F5LSwrite_fraction(hid_t R_id, const char *fieldname, int rank, const hsize_t *full_dims, const hsize_t *datasize, hid_t fieldtype, hid_t memtype, const void *const *dataPtr, const hsize_t *datastart, const hsize_t *start_border, const hsize_t *end_border, const char *fraction_name, hid_t enum_type, hid_t property_id)
hid_t F5Lget_type(hid_t Field_hid, int FieldIDisGroup, hid_t fapl_id)
hid_t F5Lwrite1D(hid_t R_id, const char *fieldname, hsize_t nElements, hid_t fieldtype, hid_t memtype, const void *dataPtr, hid_t enum_type, hid_t property_id)
hid_t F5Aopen_name(hid_t location, const char *name)
hid_t F5Gcreate(hid_t loc_id, const char *name, int est_num_entries, int est_name_len)
hid_t F5Gappend_external(hid_t loc_id, const char *name, const char *target_file_name, const char *target_obj_name, const char *prefix)
hid_t F5Dcreate(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t create_plist_id)
herr_t F5Xclose(hid_t obj_id)
hid_t F5Gappend(hid_t loc_id, const char *name)