WriteArray_HDF5_real_r3_parallel Subroutine

private subroutine WriteArray_HDF5_real_r3_parallel(fileId, arrayName, hfArray, offset, globalDims)

Arguments

TypeIntentOptionalAttributesName
integer(kind=HID_T), intent(in) :: fileId
character, intent(in) :: arrayName
real(kind=prec), intent(in), dimension(:,:,:):: hfArray
integer(kind=HID_T), intent(in) :: offset(1:3)
integer(kind=HID_T), intent(in) :: globalDims(1:3)

Calls

proc~~writearray_hdf5_real_r3_parallel~~CallsGraph proc~writearray_hdf5_real_r3_parallel WriteArray_HDF5_real_r3_parallel h5pset_dxpl_mpio_f h5pset_dxpl_mpio_f proc~writearray_hdf5_real_r3_parallel->h5pset_dxpl_mpio_f h5sclose_f h5sclose_f proc~writearray_hdf5_real_r3_parallel->h5sclose_f h5dwrite_f h5dwrite_f proc~writearray_hdf5_real_r3_parallel->h5dwrite_f h5pcreate_f h5pcreate_f proc~writearray_hdf5_real_r3_parallel->h5pcreate_f h5screate_simple_f h5screate_simple_f proc~writearray_hdf5_real_r3_parallel->h5screate_simple_f h5dcreate_f h5dcreate_f proc~writearray_hdf5_real_r3_parallel->h5dcreate_f h5sselect_hyperslab_f h5sselect_hyperslab_f proc~writearray_hdf5_real_r3_parallel->h5sselect_hyperslab_f h5pclose_f h5pclose_f proc~writearray_hdf5_real_r3_parallel->h5pclose_f h5dclose_f h5dclose_f proc~writearray_hdf5_real_r3_parallel->h5dclose_f

Called by

proc~~writearray_hdf5_real_r3_parallel~~CalledByGraph proc~writearray_hdf5_real_r3_parallel WriteArray_HDF5_real_r3_parallel interface~writearray_hdf5 WriteArray_HDF5 interface~writearray_hdf5->proc~writearray_hdf5_real_r3_parallel proc~write_mesh2d_t Write_Mesh2D_t proc~write_mesh2d_t->interface~writearray_hdf5 proc~writehdf5_lagrange_t WriteHDF5_Lagrange_t proc~writehdf5_lagrange_t->interface~writearray_hdf5 proc~writehdf5_vector3d_t WriteHDF5_Vector3D_t proc~writehdf5_vector3d_t->interface~writearray_hdf5 proc~writehdf5_mpi_scalar3d_t WriteHDF5_MPI_Scalar3D_t proc~writehdf5_mpi_scalar3d_t->interface~writearray_hdf5 proc~writehdf5_mpi_vector2d_t WriteHDF5_MPI_Vector2D_t proc~writehdf5_mpi_vector2d_t->interface~writearray_hdf5 proc~writehdf5_scalar2d_t WriteHDF5_Scalar2D_t proc~writehdf5_scalar2d_t->interface~writearray_hdf5 proc~writehdf5_vector2d_t WriteHDF5_Vector2D_t proc~writehdf5_vector2d_t->interface~writearray_hdf5 proc~write_geometry1d Write_Geometry1D proc~write_geometry1d->interface~writearray_hdf5 proc~writehdf5_mpi_vector3d_t WriteHDF5_MPI_Vector3D_t proc~writehdf5_mpi_vector3d_t->interface~writearray_hdf5 proc~write_mesh1d Write_Mesh1D proc~write_mesh1d->interface~writearray_hdf5 proc~writehdf5_scalar3d_t WriteHDF5_Scalar3D_t proc~writehdf5_scalar3d_t->interface~writearray_hdf5 proc~write_mesh3d_t Write_Mesh3D_t proc~write_mesh3d_t->interface~writearray_hdf5 proc~writehdf5_mpi_scalar2d_t WriteHDF5_MPI_Scalar2D_t proc~writehdf5_mpi_scalar2d_t->interface~writearray_hdf5 proc~writehdf5_scalar1d_t WriteHDF5_Scalar1D_t proc~writehdf5_scalar1d_t->interface~writearray_hdf5

Contents


Source Code

  subroutine WriteArray_HDF5_real_r3_parallel(fileId,arrayName,hfArray,offset,globalDims)
    implicit none
    integer(HID_T),intent(in) :: fileId
    character(*),intent(in) :: arrayName
    integer(HID_T),intent(in) :: offset(1:3)
    real(prec),dimension(:,:,:),intent(in) :: hfArray
    integer(HID_T),intent(in) :: globalDims(1:3)
    ! Local
    integer(HID_T) :: plistId
    integer(HID_T) :: dsetId
    integer(HID_T) :: filespace
    integer(HID_T) :: memspace
    integer(HSIZE_T) :: dims(1:3)
    integer :: error

    dims = shape(hfArray)

    call h5screate_simple_f(3,globalDims,filespace,error)
    call h5screate_simple_f(3,dims,memspace,error)

    call h5dcreate_f(fileId,trim(arrayName),HDF5_IO_PREC,filespace,dsetId,error)

    call h5sselect_hyperslab_f(filespace, &
                               H5S_SELECT_SET_F, &
                               offset, &
                               dims, &
                               error)

    call h5pcreate_f(H5P_DATASET_XFER_F,plistId,error)
    call h5pset_dxpl_mpio_f(plistId,H5FD_MPIO_COLLECTIVE_F,error)
    call h5dwrite_f(dsetId,HDF5_IO_PREC,hfArray,dims,error, &
                    mem_space_id=memspace,file_space_id=filespace,xfer_prp=plistId)

    if(error /= 0) then
      print*,'Failure to write dataset'
      stop 1
    endif

    call h5pclose_f(plistId,error)
    call h5sclose_f(filespace,error)
    call h5dclose_f(dSetId,error)
    call h5sclose_f(memspace,error)

  endsubroutine WriteArray_HDF5_real_r3_parallel