SELF_MultiSetIO_3D Module

HDF5 helpers for writing and reading per-set element data in a multi-set model file, and for checking a dataset's extent before reading it.

A set's data on rank r covers set-global elements elemOffset+1 .. elemOffset+nLocal of a dataset whose last dimension is the set's global element count. A rank may own no elements of a set (nLocal = 0); it still takes part in every collective call and selects nothing in both the file and memory spaces. SELF_HDF5's parallel array routines always select the local shape, which is why these exist.

Collectives. With parallel = .true., dataset creation and the transfers are collective over the file's communicator: every rank must call each routine for every dataset, in the same order. With parallel = .false. the file is serial and the whole array is written or read.


Uses

  • module~~self_multisetio_3d~~UsesGraph module~self_multisetio_3d SELF_MultiSetIO_3D module~self_constants SELF_Constants module~self_multisetio_3d->module~self_constants HDF5 HDF5 module~self_multisetio_3d->HDF5 iso_c_binding iso_c_binding module~self_constants->iso_c_binding iso_fortran_env iso_fortran_env module~self_constants->iso_fortran_env

Used by

  • module~~self_multisetio_3d~~UsedByGraph module~self_multisetio_3d SELF_MultiSetIO_3D module~self_multisetmodel3d_t SELF_MultiSetModel3D_t module~self_multisetmodel3d_t->module~self_multisetio_3d module~self_multisetmodel3d SELF_MultiSetModel3D module~self_multisetmodel3d->module~self_multisetmodel3d_t module~self_multisetmodel3d~2 SELF_MultiSetModel3D module~self_multisetmodel3d~2->module~self_multisetmodel3d_t

Contents


Functions

public function DatasetLength1D_HDF5(fileId, arrayName) result(n)

Number of entries in the one-dimensional dataset arrayName, or -1 if it does not exist or has a different rank.

Arguments

TypeIntentOptionalAttributesName
integer(kind=HID_T), intent(in) :: fileId
character, intent(in) :: arrayName

Return Value integer


Subroutines

public subroutine ReadSetArray_HDF5(fileId, arrayName, hfArray, elemOffset, nGlobalElem, parallel)

Read this rank's block of arrayName, elements elemOffset+1 .. elemOffset+nLocal, into hfArray(1:Np,1:Np,1:Np,1:nLocal). nLocal may be 0.

Read more…

Arguments

TypeIntentOptionalAttributesName
integer(kind=HID_T), intent(in) :: fileId
character, intent(in) :: arrayName
real(kind=prec), intent(inout) :: hfArray(:,:,:,:)
integer, intent(in) :: elemOffset
integer, intent(in) :: nGlobalElem
logical, intent(in) :: parallel

public subroutine WriteSetArray_HDF5(fileId, arrayName, hfArray, elemOffset, nGlobalElem, parallel)

Create arrayName with shape (Np,Np,Np,nGlobalElem) and write this rank's block hfArray(1:Np,1:Np,1:Np,1:nLocal) at element offset elemOffset.

Read more…

Arguments

TypeIntentOptionalAttributesName
integer(kind=HID_T), intent(in) :: fileId
character, intent(in) :: arrayName
real(kind=prec), intent(in) :: hfArray(:,:,:,:)
integer, intent(in) :: elemOffset
integer, intent(in) :: nGlobalElem
logical, intent(in) :: parallel