Open_HDF5_parallel Subroutine

private subroutine Open_HDF5_parallel(fileName, accessFlag, fileId, mpiComm)

Arguments

TypeIntentOptionalAttributesName
character, intent(in) :: fileName
integer, intent(in) :: accessFlag
integer(kind=HID_T), intent(inout) :: fileId
integer, intent(in) :: mpiComm

Calls

proc~~open_hdf5_parallel~~CallsGraph proc~open_hdf5_parallel Open_HDF5_parallel h5open_f h5open_f proc~open_hdf5_parallel->h5open_f h5pset_fapl_mpio_f h5pset_fapl_mpio_f proc~open_hdf5_parallel->h5pset_fapl_mpio_f h5fcreate_f h5fcreate_f proc~open_hdf5_parallel->h5fcreate_f h5pcreate_f h5pcreate_f proc~open_hdf5_parallel->h5pcreate_f h5fopen_f h5fopen_f proc~open_hdf5_parallel->h5fopen_f h5pclose_f h5pclose_f proc~open_hdf5_parallel->h5pclose_f

Called by

proc~~open_hdf5_parallel~~CalledByGraph proc~open_hdf5_parallel Open_HDF5_parallel interface~open_hdf5 Open_HDF5 interface~open_hdf5->proc~open_hdf5_parallel proc~write_mesh2d_t Write_Mesh2D_t proc~write_mesh2d_t->interface~open_hdf5 proc~read_hopr_mesh3d_t Read_HOPr_Mesh3D_t proc~read_hopr_mesh3d_t->interface~open_hdf5 proc~write_dgmodel1d_t Write_DGModel1D_t proc~write_dgmodel1d_t->interface~open_hdf5 proc~read_hopr_mesh2d_t Read_HOPr_Mesh2D_t proc~read_hopr_mesh2d_t->interface~open_hdf5 proc~write_geometry1d Write_Geometry1D proc~write_geometry1d->interface~open_hdf5 proc~write_mesh1d Write_Mesh1D proc~write_mesh1d->interface~open_hdf5 proc~write_mesh3d_t Write_Mesh3D_t proc~write_mesh3d_t->interface~open_hdf5 proc~read_dgmodel1d_t Read_DGModel1D_t proc~read_dgmodel1d_t->interface~open_hdf5 proc~read_dgmodel3d_t Read_DGModel3D_t proc~read_dgmodel3d_t->interface~open_hdf5 proc~write_dgmodel3d_t Write_DGModel3D_t proc~write_dgmodel3d_t->interface~open_hdf5 proc~read_dgmodel2d_t Read_DGModel2D_t proc~read_dgmodel2d_t->interface~open_hdf5 proc~write_dgmodel2d_t Write_DGModel2D_t proc~write_dgmodel2d_t->interface~open_hdf5

Contents

Source Code


Source Code

  subroutine Open_HDF5_parallel(fileName,accessFlag,fileId,mpiComm)
    implicit none
    character(*),intent(in) :: fileName
    integer,intent(in) :: accessFlag
    integer(HID_T),intent(inout) :: fileId
    integer,intent(in) :: mpiComm
    ! Local
    integer(HID_T) :: plistId
    integer :: error

    call h5open_f(error)

    call h5pcreate_f(H5P_FILE_ACCESS_F,plistId,error)
    call h5pset_fapl_mpio_f(plistId,mpiComm,MPI_INFO_NULL,error)

    if(accessFlag == H5F_ACC_TRUNC_F) then
      call h5fcreate_f(trim(fileName),accessFlag,fileId,error,access_prp=plistId)
    else
      call h5fopen_f(trim(fileName),accessFlag,fileId,error,access_prp=plistId)
    endif
    call h5pclose_f(plistId,error)

    if(error == -1) then
      print*,'Failed to open '//trim(fileName)//'.'
      stop 1
    endif

  endsubroutine Open_HDF5_parallel