H5Part  1.6.6
Functions
Setting up the Data Model
H5Block C API

Functions

h5part_int64_t H5Block3dGetPartitionOfProc (H5PartFile *f, const h5part_int64_t proc, h5part_int64_t *i_start, h5part_int64_t *i_end, h5part_int64_t *j_start, h5part_int64_t *j_end, h5part_int64_t *k_start, h5part_int64_t *k_end)
h5part_int64_t H5Block3dGetProcOf (H5PartFile *f, h5part_int64_t i, h5part_int64_t j, h5part_int64_t k)
h5part_int64_t H5Block3dGetReducedPartitionOfProc (H5PartFile *f, h5part_int64_t proc, h5part_int64_t *i_start, h5part_int64_t *i_end, h5part_int64_t *j_start, h5part_int64_t *j_end, h5part_int64_t *k_start, h5part_int64_t *k_end)
h5part_int64_t H5BlockDefine3DChunkDims (H5PartFile *f, const h5part_int64_t i, const h5part_int64_t j, const h5part_int64_t k)
h5part_int64_t H5BlockDefine3DFieldLayout (H5PartFile *f, const h5part_int64_t i_start, const h5part_int64_t i_end, const h5part_int64_t j_start, const h5part_int64_t j_end, const h5part_int64_t k_start, const h5part_int64_t k_end)
h5part_int64_t H5BlockGet3DChunkDims (H5PartFile *f, const char *field_name, h5part_int64_t *dims)
h5part_int64_t H5BlockGetFieldInfo (H5PartFile *f, const h5part_int64_t idx, char *field_name, const h5part_int64_t len_field_name, h5part_int64_t *grid_rank, h5part_int64_t *grid_dims, h5part_int64_t *field_rank, h5part_int64_t *type)
h5part_int64_t H5BlockGetFieldInfoByName (H5PartFile *f, const char *field_name, h5part_int64_t *grid_rank, h5part_int64_t *grid_dims, h5part_int64_t *field_rank, h5part_int64_t *type)
h5part_int64_t H5BlockGetNumFields (H5PartFile *f)
h5part_int64_t H5BlockHasFieldData (H5PartFile *f)

Function Documentation

h5part_int64_t H5Block3dGetPartitionOfProc ( H5PartFile *  f,
const h5part_int64_t  proc,
h5part_int64_t *  i_start,
h5part_int64_t *  i_end,
h5part_int64_t *  j_start,
h5part_int64_t *  j_end,
h5part_int64_t *  k_start,
h5part_int64_t *  k_end 
)

Return partition of processor proc as specified with H5BlockDefine3dLayout().

Returns:
H5PART_SUCCESS on success.
H5PART_ERR_INVAL if proc is invalid.
Parameters:
fIN: File handle
procIN: Processor to get partition from
i_startOUT: start index of i
i_endOUT: end index of i
j_startOUT: start index of j
j_endOUT: end index of j
k_startOUT: start index of k
k_endOUT: end index of k
h5part_int64_t H5Block3dGetProcOf ( H5PartFile *  f,
h5part_int64_t  i,
h5part_int64_t  j,
h5part_int64_t  k 
)

Returns the processor computing the reduced (ghostzone-free) partition given by the coordinates i, j and k.

Returns:
H5PART_SUCCESS or error code
Parameters:
fIN: File handle
iIN: i coordinate
jIN: j coordinate
kIN: k coordinate
h5part_int64_t H5Block3dGetReducedPartitionOfProc ( H5PartFile *  f,
h5part_int64_t  proc,
h5part_int64_t *  i_start,
h5part_int64_t *  i_end,
h5part_int64_t *  j_start,
h5part_int64_t *  j_end,
h5part_int64_t *  k_start,
h5part_int64_t *  k_end 
)

Return reduced (ghost-zone free) partition of processor proc as specified with H5BlockDefine3dLayout().

Returns:
H5PART_SUCCESS on success.
H5PART_ERR_INVAL if proc is invalid.
Parameters:
fIN: File handle
procIN: Processor to get partition from
i_startOUT: start index of i
i_endOUT: end index of i
j_startOUT: start index of j
j_endOUT: end index of j
k_startOUT: start index of j
k_endOUT: end index of j
h5part_int64_t H5BlockDefine3DChunkDims ( H5PartFile *  f,
const h5part_int64_t  i,
const h5part_int64_t  j,
const h5part_int64_t  k 
)

Define the chunk dimensions and enable chunking in the underlying HDF5 dataset.

Returns:
H5PART_SUCCESS on success
Parameters:
fIN: File handle
iIN: size of i
jIN: size of j
kIN: size of k
h5part_int64_t H5BlockDefine3DFieldLayout ( H5PartFile *  f,
const h5part_int64_t  i_start,
const h5part_int64_t  i_end,
const h5part_int64_t  j_start,
const h5part_int64_t  j_end,
const h5part_int64_t  k_start,
const h5part_int64_t  k_end 
)

Defines the partition of the field that this processor owns, using Fortran ordering: the fastest moving index is i.

This routine uses an MPI_Allgather, so at large concurrency it should be called as infrequently as possible. For instance, if several timesteps use the same field dimensions, set the layout only once before the first timestep.

Returns:
H5PART_SUCCESS on success
H5PART_ERR_MPI
H5PART_ERR_HDF5
Parameters:
fIN: File handle
i_startIN: start index of i
i_endIN: end index of i
j_startIN: start index of j
j_endIN: end index of j
k_startIN: start index of k
k_endIN: end index of k
h5part_int64_t H5BlockGet3DChunkDims ( H5PartFile *  f,
const char *  field_name,
h5part_int64_t *  dims 
)

Lookup the chunk dimensions of the underlying HDF5 dataset.

Returns:
H5PART_SUCCESS on success
Parameters:
fIN: File handle
field_nameIN: name of dataset
dimsOUT: array containing the chunk dimensions
h5part_int64_t H5BlockGetFieldInfo ( H5PartFile *  f,
const h5part_int64_t  idx,
char *  field_name,
const h5part_int64_t  len_field_name,
h5part_int64_t *  grid_rank,
h5part_int64_t *  grid_dims,
h5part_int64_t *  field_rank,
h5part_int64_t *  type 
)

Get the name, rank and dimensions of the field specified by the index idx.

This function can be used to retrieve all fields bound to the current time-step by looping from 0 to the number of fields minus one. The number of fields bound to the current time-step can be queried by calling the function H5BlockGetNumFields().

Returns:
H5PART_SUCCESS or error code
Parameters:
fIN: file handle
idxIN: index of field
field_nameOUT: field name
len_field_nameIN: buffer size
grid_rankOUT: grid rank
grid_dimsOUT: grid dimensions
field_rankOUT: field rank
typeOUT: datatype
h5part_int64_t H5BlockGetFieldInfoByName ( H5PartFile *  f,
const char *  field_name,
h5part_int64_t *  grid_rank,
h5part_int64_t *  grid_dims,
h5part_int64_t *  field_rank,
h5part_int64_t *  type 
)

Get the rank and dimensions of the field specified by its name.

Returns:
H5PART_SUCCESS or error code
Parameters:
fIN: file handle
field_nameIN: field name
grid_rankOUT: grid rank
grid_dimsOUT: grid dimensions
field_rankOUT: field rank
typeOUT: datatype
h5part_int64_t H5BlockGetNumFields ( H5PartFile *  f)

Query number of fields in current time step.

Returns:
H5PART_SUCCESS or error code
Parameters:
fIN: file handle
h5part_int64_t H5BlockHasFieldData ( H5PartFile *  f)

Checks whether the current time-step has field data or not.

Returns:
H5PART_SUCCESS if field data is available otherwise H5PART_ERR_NOENTRY.
Parameters:
fIN: file handle