avoid checking of unitialized variables

This commit is contained in:
Martin Diehl 2019-04-04 11:49:23 +02:00
parent bc4b79a3a2
commit 280a11c4bc
2 changed files with 852 additions and 842 deletions

View File

@ -20,21 +20,21 @@ module HDF5_utilities
!> @details for parallel IO, all dimension except for the last need to match !> @details for parallel IO, all dimension except for the last need to match
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
interface HDF5_read interface HDF5_read
module procedure HDF5_read_pReal1 module procedure HDF5_read_real1
module procedure HDF5_read_pReal2 module procedure HDF5_read_real2
module procedure HDF5_read_pReal3 module procedure HDF5_read_real3
module procedure HDF5_read_pReal4 module procedure HDF5_read_real4
module procedure HDF5_read_pReal5 module procedure HDF5_read_real5
module procedure HDF5_read_pReal6 module procedure HDF5_read_real6
module procedure HDF5_read_pReal7 module procedure HDF5_read_real7
module procedure HDF5_read_pInt1 module procedure HDF5_read_int1
module procedure HDF5_read_pInt2 module procedure HDF5_read_int2
module procedure HDF5_read_pInt3 module procedure HDF5_read_int3
module procedure HDF5_read_pInt4 module procedure HDF5_read_int4
module procedure HDF5_read_pInt5 module procedure HDF5_read_int5
module procedure HDF5_read_pInt6 module procedure HDF5_read_int6
module procedure HDF5_read_pInt7 module procedure HDF5_read_int7
end interface HDF5_read end interface HDF5_read
@ -43,21 +43,21 @@ module HDF5_utilities
!> @details for parallel IO, all dimension except for the last need to match !> @details for parallel IO, all dimension except for the last need to match
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
interface HDF5_write interface HDF5_write
module procedure HDF5_write_pReal1 module procedure HDF5_write_real1
module procedure HDF5_write_pReal2 module procedure HDF5_write_real2
module procedure HDF5_write_pReal3 module procedure HDF5_write_real3
module procedure HDF5_write_pReal4 module procedure HDF5_write_real4
module procedure HDF5_write_pReal5 module procedure HDF5_write_real5
module procedure HDF5_write_pReal6 module procedure HDF5_write_real6
module procedure HDF5_write_pReal7 module procedure HDF5_write_real7
module procedure HDF5_write_pInt1 module procedure HDF5_write_int1
module procedure HDF5_write_pInt2 module procedure HDF5_write_int2
module procedure HDF5_write_pInt3 module procedure HDF5_write_int3
module procedure HDF5_write_pInt4 module procedure HDF5_write_int4
module procedure HDF5_write_pInt5 module procedure HDF5_write_int5
module procedure HDF5_write_pInt6 module procedure HDF5_write_int6
module procedure HDF5_write_pInt7 module procedure HDF5_write_int7
end interface HDF5_write end interface HDF5_write
@ -66,8 +66,8 @@ module HDF5_utilities
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
interface HDF5_addAttribute interface HDF5_addAttribute
module procedure HDF5_addAttribute_str module procedure HDF5_addAttribute_str
module procedure HDF5_addAttribute_pInt module procedure HDF5_addAttribute_int
module procedure HDF5_addAttribute_pReal module procedure HDF5_addAttribute_real
end interface HDF5_addAttribute end interface HDF5_addAttribute
@ -86,6 +86,10 @@ module HDF5_utilities
HDF5_objectExists HDF5_objectExists
contains contains
!--------------------------------------------------------------------------------------------------
!> @brief open libary and do sanity checks
!--------------------------------------------------------------------------------------------------
subroutine HDF5_utilities_init subroutine HDF5_utilities_init
implicit none implicit none
@ -336,7 +340,7 @@ end subroutine HDF5_addAttribute_str
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief adds a integer attribute to the path given relative to the location !> @brief adds a integer attribute to the path given relative to the location
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_addAttribute_pInt(loc_id,attrLabel,attrValue,path) subroutine HDF5_addAttribute_int(loc_id,attrLabel,attrValue,path)
implicit none implicit none
integer(HID_T), intent(in) :: loc_id integer(HID_T), intent(in) :: loc_id
@ -377,13 +381,13 @@ subroutine HDF5_addAttribute_pInt(loc_id,attrLabel,attrValue,path)
call h5sclose_f(space_id,hdferr) call h5sclose_f(space_id,hdferr)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_addAttribute_pInt: h5sclose_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_addAttribute_pInt: h5sclose_f')
end subroutine HDF5_addAttribute_pInt end subroutine HDF5_addAttribute_int
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief adds a integer attribute to the path given relative to the location !> @brief adds a integer attribute to the path given relative to the location
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_addAttribute_pReal(loc_id,attrLabel,attrValue,path) subroutine HDF5_addAttribute_real(loc_id,attrLabel,attrValue,path)
implicit none implicit none
integer(HID_T), intent(in) :: loc_id integer(HID_T), intent(in) :: loc_id
@ -424,14 +428,13 @@ subroutine HDF5_addAttribute_pReal(loc_id,attrLabel,attrValue,path)
call h5sclose_f(space_id,hdferr) call h5sclose_f(space_id,hdferr)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_addAttribute_pReal: h5sclose_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_addAttribute_pReal: h5sclose_f')
end subroutine HDF5_addAttribute_pReal end subroutine HDF5_addAttribute_real
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief set link to object in results file !> @brief set link to object in results file
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_setLink(loc_id,target_name,link_name) subroutine HDF5_setLink(loc_id,target_name,link_name)
use hdf5
implicit none implicit none
character(len=*), intent(in) :: target_name, link_name character(len=*), intent(in) :: target_name, link_name
@ -454,7 +457,7 @@ end subroutine HDF5_setLink
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief read dataset of type pReal with 1 dimension !> @brief read dataset of type pReal with 1 dimension
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_read_pReal1(loc_id,dataset,datasetName,parallel) subroutine HDF5_read_real1(loc_id,dataset,datasetName,parallel)
implicit none implicit none
real(pReal), intent(inout), dimension(:) :: dataset real(pReal), intent(inout), dimension(:) :: dataset
@ -486,16 +489,16 @@ subroutine HDF5_read_pReal1(loc_id,dataset,datasetName,parallel)
call h5dread_f(dset_id, H5T_NATIVE_DOUBLE,dataset,totalShape, hdferr,& call h5dread_f(dset_id, H5T_NATIVE_DOUBLE,dataset,totalShape, hdferr,&
file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id) file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_pReal1: h5dread_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_real1: h5dread_f')
call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id) call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id)
end subroutine HDF5_read_pReal1 end subroutine HDF5_read_real1
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief read dataset of type pReal with 2 dimensions !> @brief read dataset of type pReal with 2 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_read_pReal2(loc_id,dataset,datasetName,parallel) subroutine HDF5_read_real2(loc_id,dataset,datasetName,parallel)
implicit none implicit none
real(pReal), intent(inout), dimension(:,:) :: dataset real(pReal), intent(inout), dimension(:,:) :: dataset
@ -527,16 +530,16 @@ subroutine HDF5_read_pReal2(loc_id,dataset,datasetName,parallel)
call h5dread_f(dset_id, H5T_NATIVE_DOUBLE,dataset,totalShape, hdferr,& call h5dread_f(dset_id, H5T_NATIVE_DOUBLE,dataset,totalShape, hdferr,&
file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id) file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_pReal2: h5dread_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_real2: h5dread_f')
call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id) call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id)
end subroutine HDF5_read_pReal2 end subroutine HDF5_read_real2
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief read dataset of type pReal with 2 dimensions !> @brief read dataset of type pReal with 2 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_read_pReal3(loc_id,dataset,datasetName,parallel) subroutine HDF5_read_real3(loc_id,dataset,datasetName,parallel)
implicit none implicit none
real(pReal), intent(inout), dimension(:,:,:) :: dataset real(pReal), intent(inout), dimension(:,:,:) :: dataset
@ -568,16 +571,16 @@ subroutine HDF5_read_pReal3(loc_id,dataset,datasetName,parallel)
call h5dread_f(dset_id, H5T_NATIVE_DOUBLE,dataset,totalShape, hdferr,& call h5dread_f(dset_id, H5T_NATIVE_DOUBLE,dataset,totalShape, hdferr,&
file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id) file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_pReal3: h5dread_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_real3: h5dread_f')
call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id) call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id)
end subroutine HDF5_read_pReal3 end subroutine HDF5_read_real3
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief read dataset of type pReal with 4 dimensions !> @brief read dataset of type pReal with 4 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_read_pReal4(loc_id,dataset,datasetName,parallel) subroutine HDF5_read_real4(loc_id,dataset,datasetName,parallel)
implicit none implicit none
real(pReal), intent(inout), dimension(:,:,:,:) :: dataset real(pReal), intent(inout), dimension(:,:,:,:) :: dataset
@ -609,16 +612,16 @@ subroutine HDF5_read_pReal4(loc_id,dataset,datasetName,parallel)
call h5dread_f(dset_id, H5T_NATIVE_DOUBLE,dataset,totalShape, hdferr,& call h5dread_f(dset_id, H5T_NATIVE_DOUBLE,dataset,totalShape, hdferr,&
file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id) file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_pReal4: h5dread_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_real4: h5dread_f')
call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id) call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id)
end subroutine HDF5_read_pReal4 end subroutine HDF5_read_real4
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief read dataset of type pReal with 5 dimensions !> @brief read dataset of type pReal with 5 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_read_pReal5(loc_id,dataset,datasetName,parallel) subroutine HDF5_read_real5(loc_id,dataset,datasetName,parallel)
implicit none implicit none
real(pReal), intent(inout), dimension(:,:,:,:,:) :: dataset real(pReal), intent(inout), dimension(:,:,:,:,:) :: dataset
@ -650,16 +653,16 @@ subroutine HDF5_read_pReal5(loc_id,dataset,datasetName,parallel)
call h5dread_f(dset_id, H5T_NATIVE_DOUBLE,dataset,totalShape, hdferr,& call h5dread_f(dset_id, H5T_NATIVE_DOUBLE,dataset,totalShape, hdferr,&
file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id) file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_pReal5: h5dread_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_real5: h5dread_f')
call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id) call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id)
end subroutine HDF5_read_pReal5 end subroutine HDF5_read_real5
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief read dataset of type pReal with 6 dimensions !> @brief read dataset of type pReal with 6 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_read_pReal6(loc_id,dataset,datasetName,parallel) subroutine HDF5_read_real6(loc_id,dataset,datasetName,parallel)
implicit none implicit none
real(pReal), intent(inout), dimension(:,:,:,:,:,:) :: dataset real(pReal), intent(inout), dimension(:,:,:,:,:,:) :: dataset
@ -691,16 +694,16 @@ subroutine HDF5_read_pReal6(loc_id,dataset,datasetName,parallel)
call h5dread_f(dset_id, H5T_NATIVE_DOUBLE,dataset,totalShape, hdferr,& call h5dread_f(dset_id, H5T_NATIVE_DOUBLE,dataset,totalShape, hdferr,&
file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id) file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_pReal6: h5dread_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_real6: h5dread_f')
call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id) call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id)
end subroutine HDF5_read_pReal6 end subroutine HDF5_read_real6
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief read dataset of type pReal with 7 dimensions !> @brief read dataset of type pReal with 7 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_read_pReal7(loc_id,dataset,datasetName,parallel) subroutine HDF5_read_real7(loc_id,dataset,datasetName,parallel)
implicit none implicit none
real(pReal), intent(inout), dimension(:,:,:,:,:,:,:) :: dataset real(pReal), intent(inout), dimension(:,:,:,:,:,:,:) :: dataset
@ -732,17 +735,17 @@ subroutine HDF5_read_pReal7(loc_id,dataset,datasetName,parallel)
call h5dread_f(dset_id, H5T_NATIVE_DOUBLE,dataset,totalShape, hdferr,& call h5dread_f(dset_id, H5T_NATIVE_DOUBLE,dataset,totalShape, hdferr,&
file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id) file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_pReal7: h5dread_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_real7: h5dread_f')
call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id) call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id)
end subroutine HDF5_read_pReal7 end subroutine HDF5_read_real7
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief read dataset of type pInt with 1 dimension !> @brief read dataset of type pInt with 1 dimension
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_read_pInt1(loc_id,dataset,datasetName,parallel) subroutine HDF5_read_int1(loc_id,dataset,datasetName,parallel)
implicit none implicit none
integer, intent(inout), dimension(:) :: dataset integer, intent(inout), dimension(:) :: dataset
@ -774,16 +777,16 @@ subroutine HDF5_read_pInt1(loc_id,dataset,datasetName,parallel)
call h5dread_f(dset_id, H5T_NATIVE_INTEGER,dataset,totalShape, hdferr,& call h5dread_f(dset_id, H5T_NATIVE_INTEGER,dataset,totalShape, hdferr,&
file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id) file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_pInt1: h5dread_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_int1: h5dread_f')
call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id) call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id)
end subroutine HDF5_read_pInt1 end subroutine HDF5_read_int1
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief read dataset of type pInt with 2 dimensions !> @brief read dataset of type pInt with 2 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_read_pInt2(loc_id,dataset,datasetName,parallel) subroutine HDF5_read_int2(loc_id,dataset,datasetName,parallel)
implicit none implicit none
integer, intent(inout), dimension(:,:) :: dataset integer, intent(inout), dimension(:,:) :: dataset
@ -815,16 +818,16 @@ subroutine HDF5_read_pInt2(loc_id,dataset,datasetName,parallel)
call h5dread_f(dset_id, H5T_NATIVE_INTEGER,dataset,totalShape, hdferr,& call h5dread_f(dset_id, H5T_NATIVE_INTEGER,dataset,totalShape, hdferr,&
file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id) file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_pInt2: h5dread_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_int2: h5dread_f')
call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id) call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id)
end subroutine HDF5_read_pInt2 end subroutine HDF5_read_int2
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief read dataset of type pInt with 3 dimensions !> @brief read dataset of type pInt with 3 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_read_pInt3(loc_id,dataset,datasetName,parallel) subroutine HDF5_read_int3(loc_id,dataset,datasetName,parallel)
implicit none implicit none
integer, intent(inout), dimension(:,:,:) :: dataset integer, intent(inout), dimension(:,:,:) :: dataset
@ -856,16 +859,16 @@ subroutine HDF5_read_pInt3(loc_id,dataset,datasetName,parallel)
call h5dread_f(dset_id, H5T_NATIVE_INTEGER,dataset,totalShape, hdferr,& call h5dread_f(dset_id, H5T_NATIVE_INTEGER,dataset,totalShape, hdferr,&
file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id) file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_pInt3: h5dread_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_int3: h5dread_f')
call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id) call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id)
end subroutine HDF5_read_pInt3 end subroutine HDF5_read_int3
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief read dataset of type pInt withh 4 dimensions !> @brief read dataset of type pInt withh 4 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_read_pInt4(loc_id,dataset,datasetName,parallel) subroutine HDF5_read_int4(loc_id,dataset,datasetName,parallel)
implicit none implicit none
integer, intent(inout), dimension(:,:,:,:) :: dataset integer, intent(inout), dimension(:,:,:,:) :: dataset
@ -897,16 +900,16 @@ subroutine HDF5_read_pInt4(loc_id,dataset,datasetName,parallel)
call h5dread_f(dset_id, H5T_NATIVE_INTEGER,dataset,totalShape, hdferr,& call h5dread_f(dset_id, H5T_NATIVE_INTEGER,dataset,totalShape, hdferr,&
file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id) file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_pInt4: h5dread_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_int4: h5dread_f')
call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id) call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id)
end subroutine HDF5_read_pInt4 end subroutine HDF5_read_int4
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief read dataset of type pInt with 5 dimensions !> @brief read dataset of type pInt with 5 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_read_pInt5(loc_id,dataset,datasetName,parallel) subroutine HDF5_read_int5(loc_id,dataset,datasetName,parallel)
implicit none implicit none
integer, intent(inout), dimension(:,:,:,:,:) :: dataset integer, intent(inout), dimension(:,:,:,:,:) :: dataset
@ -938,16 +941,16 @@ subroutine HDF5_read_pInt5(loc_id,dataset,datasetName,parallel)
call h5dread_f(dset_id, H5T_NATIVE_INTEGER,dataset,totalShape, hdferr,& call h5dread_f(dset_id, H5T_NATIVE_INTEGER,dataset,totalShape, hdferr,&
file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id) file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_pInt5: h5dread_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_int5: h5dread_f')
call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id) call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id)
end subroutine HDF5_read_pInt5 end subroutine HDF5_read_int5
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief read dataset of type pInt with 6 dimensions !> @brief read dataset of type pInt with 6 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_read_pInt6(loc_id,dataset,datasetName,parallel) subroutine HDF5_read_int6(loc_id,dataset,datasetName,parallel)
implicit none implicit none
integer, intent(inout), dimension(:,:,:,:,:,:) :: dataset integer, intent(inout), dimension(:,:,:,:,:,:) :: dataset
@ -979,16 +982,16 @@ subroutine HDF5_read_pInt6(loc_id,dataset,datasetName,parallel)
call h5dread_f(dset_id, H5T_NATIVE_INTEGER,dataset,totalShape, hdferr,& call h5dread_f(dset_id, H5T_NATIVE_INTEGER,dataset,totalShape, hdferr,&
file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id) file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_pInt6: h5dread_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_int6: h5dread_f')
call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id) call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id)
end subroutine HDF5_read_pInt6 end subroutine HDF5_read_int6
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief read dataset of type pInt with 7 dimensions !> @brief read dataset of type pInt with 7 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_read_pInt7(loc_id,dataset,datasetName,parallel) subroutine HDF5_read_int7(loc_id,dataset,datasetName,parallel)
implicit none implicit none
integer, intent(inout), dimension(:,:,:,:,:,:,:) :: dataset integer, intent(inout), dimension(:,:,:,:,:,:,:) :: dataset
@ -1020,17 +1023,17 @@ subroutine HDF5_read_pInt7(loc_id,dataset,datasetName,parallel)
call h5dread_f(dset_id, H5T_NATIVE_INTEGER,dataset,totalShape, hdferr,& call h5dread_f(dset_id, H5T_NATIVE_INTEGER,dataset,totalShape, hdferr,&
file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id) file_space_id = filespace_id, xfer_prp = plist_id, mem_space_id = memspace_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_pInt7: h5dread_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_read_int7: h5dread_f')
call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id) call finalize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_id)
end subroutine HDF5_read_pInt7 end subroutine HDF5_read_int7
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief write dataset of type pReal with 1 dimension !> @brief write dataset of type pReal with 1 dimension
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_write_pReal1(loc_id,dataset,datasetName,parallel) subroutine HDF5_write_real1(loc_id,dataset,datasetName,parallel)
implicit none implicit none
real(pReal), intent(inout), dimension(:) :: dataset real(pReal), intent(inout), dimension(:) :: dataset
@ -1059,19 +1062,20 @@ subroutine HDF5_write_pReal1(loc_id,dataset,datasetName,parallel)
myStart, totalShape,loc_id,myShape,datasetName,H5T_NATIVE_DOUBLE,.false.) myStart, totalShape,loc_id,myShape,datasetName,H5T_NATIVE_DOUBLE,.false.)
endif endif
if (product(totalShape) /= 0) & if (product(totalShape) /= 0) then
call h5dwrite_f(dset_id, H5T_NATIVE_DOUBLE,dataset,int(totalShape,HSIZE_T), hdferr,& call h5dwrite_f(dset_id, H5T_NATIVE_DOUBLE,dataset,int(totalShape,HSIZE_T), hdferr,&
file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id) file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_pReal1: h5dwrite_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_real1: h5dwrite_f')
endif
call finalize_write(plist_id, dset_id, filespace_id, memspace_id) call finalize_write(plist_id, dset_id, filespace_id, memspace_id)
end subroutine HDF5_write_pReal1 end subroutine HDF5_write_real1
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief write dataset of type pReal with 2 dimensions !> @brief write dataset of type pReal with 2 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_write_pReal2(loc_id,dataset,datasetName,parallel) subroutine HDF5_write_real2(loc_id,dataset,datasetName,parallel)
implicit none implicit none
real(pReal), intent(inout), dimension(:,:) :: dataset real(pReal), intent(inout), dimension(:,:) :: dataset
@ -1100,19 +1104,20 @@ subroutine HDF5_write_pReal2(loc_id,dataset,datasetName,parallel)
myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_DOUBLE,.false.) myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_DOUBLE,.false.)
endif endif
if (product(totalShape) /= 0) & if (product(totalShape) /= 0) then
call h5dwrite_f(dset_id, H5T_NATIVE_DOUBLE,dataset,int(totalShape,HSIZE_T), hdferr,& call h5dwrite_f(dset_id, H5T_NATIVE_DOUBLE,dataset,int(totalShape,HSIZE_T), hdferr,&
file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id) file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_pReal2: h5dwrite_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_real2: h5dwrite_f')
endif
call finalize_write(plist_id, dset_id, filespace_id, memspace_id) call finalize_write(plist_id, dset_id, filespace_id, memspace_id)
end subroutine HDF5_write_pReal2 end subroutine HDF5_write_real2
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief write dataset of type pReal with 3 dimensions !> @brief write dataset of type pReal with 3 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_write_pReal3(loc_id,dataset,datasetName,parallel) subroutine HDF5_write_real3(loc_id,dataset,datasetName,parallel)
implicit none implicit none
real(pReal), intent(inout), dimension(:,:,:) :: dataset real(pReal), intent(inout), dimension(:,:,:) :: dataset
@ -1141,19 +1146,20 @@ subroutine HDF5_write_pReal3(loc_id,dataset,datasetName,parallel)
myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_DOUBLE,.false.) myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_DOUBLE,.false.)
endif endif
if (product(totalShape) /= 0) & if (product(totalShape) /= 0) then
call h5dwrite_f(dset_id, H5T_NATIVE_DOUBLE,dataset,int(totalShape,HSIZE_T), hdferr,& call h5dwrite_f(dset_id, H5T_NATIVE_DOUBLE,dataset,int(totalShape,HSIZE_T), hdferr,&
file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id) file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_pReal3: h5dwrite_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_real3: h5dwrite_f')
endif
call finalize_write(plist_id, dset_id, filespace_id, memspace_id) call finalize_write(plist_id, dset_id, filespace_id, memspace_id)
end subroutine HDF5_write_pReal3 end subroutine HDF5_write_real3
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief write dataset of type pReal with 4 dimensions !> @brief write dataset of type pReal with 4 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_write_pReal4(loc_id,dataset,datasetName,parallel) subroutine HDF5_write_real4(loc_id,dataset,datasetName,parallel)
implicit none implicit none
real(pReal), intent(inout), dimension(:,:,:,:) :: dataset real(pReal), intent(inout), dimension(:,:,:,:) :: dataset
@ -1182,20 +1188,21 @@ subroutine HDF5_write_pReal4(loc_id,dataset,datasetName,parallel)
myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_DOUBLE,.false.) myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_DOUBLE,.false.)
endif endif
if (product(totalShape) /= 0) & if (product(totalShape) /= 0) then
call h5dwrite_f(dset_id, H5T_NATIVE_DOUBLE,dataset,int(totalShape,HSIZE_T), hdferr,& call h5dwrite_f(dset_id, H5T_NATIVE_DOUBLE,dataset,int(totalShape,HSIZE_T), hdferr,&
file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id) file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_pReal4: h5dwrite_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_real4: h5dwrite_f')
endif
call finalize_write(plist_id, dset_id, filespace_id, memspace_id) call finalize_write(plist_id, dset_id, filespace_id, memspace_id)
end subroutine HDF5_write_pReal4 end subroutine HDF5_write_real4
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief write dataset of type pReal with 5 dimensions !> @brief write dataset of type pReal with 5 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_write_pReal5(loc_id,dataset,datasetName,parallel) subroutine HDF5_write_real5(loc_id,dataset,datasetName,parallel)
implicit none implicit none
real(pReal), intent(inout), dimension(:,:,:,:,:) :: dataset real(pReal), intent(inout), dimension(:,:,:,:,:) :: dataset
@ -1224,19 +1231,20 @@ subroutine HDF5_write_pReal5(loc_id,dataset,datasetName,parallel)
myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_DOUBLE,.false.) myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_DOUBLE,.false.)
endif endif
if (product(totalShape) /= 0) & if (product(totalShape) /= 0) then
call h5dwrite_f(dset_id, H5T_NATIVE_DOUBLE,dataset,int(totalShape,HSIZE_T), hdferr,& call h5dwrite_f(dset_id, H5T_NATIVE_DOUBLE,dataset,int(totalShape,HSIZE_T), hdferr,&
file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id) file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_pReal5: h5dwrite_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_real5: h5dwrite_f')
endif
call finalize_write(plist_id, dset_id, filespace_id, memspace_id) call finalize_write(plist_id, dset_id, filespace_id, memspace_id)
end subroutine HDF5_write_pReal5 end subroutine HDF5_write_real5
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief write dataset of type pReal with 6 dimensions !> @brief write dataset of type pReal with 6 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_write_pReal6(loc_id,dataset,datasetName,parallel) subroutine HDF5_write_real6(loc_id,dataset,datasetName,parallel)
implicit none implicit none
real(pReal), intent(inout), dimension(:,:,:,:,:,:) :: dataset real(pReal), intent(inout), dimension(:,:,:,:,:,:) :: dataset
@ -1265,19 +1273,20 @@ subroutine HDF5_write_pReal6(loc_id,dataset,datasetName,parallel)
myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_DOUBLE,.false.) myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_DOUBLE,.false.)
endif endif
if (product(totalShape) /= 0) & if (product(totalShape) /= 0) then
call h5dwrite_f(dset_id, H5T_NATIVE_DOUBLE,dataset,int(totalShape,HSIZE_T), hdferr,& call h5dwrite_f(dset_id, H5T_NATIVE_DOUBLE,dataset,int(totalShape,HSIZE_T), hdferr,&
file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id) file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_pReal6: h5dwrite_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_real6: h5dwrite_f')
endif
call finalize_write(plist_id, dset_id, filespace_id, memspace_id) call finalize_write(plist_id, dset_id, filespace_id, memspace_id)
end subroutine HDF5_write_pReal6 end subroutine HDF5_write_real6
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief write dataset of type pReal with 7 dimensions !> @brief write dataset of type pReal with 7 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_write_pReal7(loc_id,dataset,datasetName,parallel) subroutine HDF5_write_real7(loc_id,dataset,datasetName,parallel)
implicit none implicit none
real(pReal), intent(inout), dimension(:,:,:,:,:,:,:) :: dataset real(pReal), intent(inout), dimension(:,:,:,:,:,:,:) :: dataset
@ -1306,20 +1315,21 @@ subroutine HDF5_write_pReal7(loc_id,dataset,datasetName,parallel)
myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_DOUBLE,.false.) myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_DOUBLE,.false.)
endif endif
if (product(totalShape) /= 0) & if (product(totalShape) /= 0) then
call h5dwrite_f(dset_id, H5T_NATIVE_DOUBLE,dataset,int(totalShape,HSIZE_T), hdferr,& call h5dwrite_f(dset_id, H5T_NATIVE_DOUBLE,dataset,int(totalShape,HSIZE_T), hdferr,&
file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id) file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_pReal7: h5dwrite_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_real7: h5dwrite_f')
endif
call finalize_write(plist_id, dset_id, filespace_id, memspace_id) call finalize_write(plist_id, dset_id, filespace_id, memspace_id)
end subroutine HDF5_write_pReal7 end subroutine HDF5_write_real7
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief write dataset of type pInt with 1 dimension !> @brief write dataset of type pInt with 1 dimension
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_write_pInt1(loc_id,dataset,datasetName,parallel) subroutine HDF5_write_int1(loc_id,dataset,datasetName,parallel)
implicit none implicit none
integer, intent(inout), dimension(:) :: dataset integer, intent(inout), dimension(:) :: dataset
@ -1348,19 +1358,20 @@ subroutine HDF5_write_pInt1(loc_id,dataset,datasetName,parallel)
myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_INTEGER,.false.) myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_INTEGER,.false.)
endif endif
if (product(totalShape) /= 0) & if (product(totalShape) /= 0) then
call h5dwrite_f(dset_id, H5T_NATIVE_INTEGER,dataset,int(totalShape,HSIZE_T), hdferr,& call h5dwrite_f(dset_id, H5T_NATIVE_INTEGER,dataset,int(totalShape,HSIZE_T), hdferr,&
file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id) file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_pInt1: h5dwrite_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_int1: h5dwrite_f')
endif
call finalize_write(plist_id, dset_id, filespace_id, memspace_id) call finalize_write(plist_id, dset_id, filespace_id, memspace_id)
end subroutine HDF5_write_pInt1 end subroutine HDF5_write_int1
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief write dataset of type pInt with 2 dimensions !> @brief write dataset of type pInt with 2 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_write_pInt2(loc_id,dataset,datasetName,parallel) subroutine HDF5_write_int2(loc_id,dataset,datasetName,parallel)
implicit none implicit none
integer, intent(inout), dimension(:,:) :: dataset integer, intent(inout), dimension(:,:) :: dataset
@ -1389,19 +1400,20 @@ subroutine HDF5_write_pInt2(loc_id,dataset,datasetName,parallel)
myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_INTEGER,.false.) myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_INTEGER,.false.)
endif endif
if (product(totalShape) /= 0) & if (product(totalShape) /= 0) then
call h5dwrite_f(dset_id, H5T_NATIVE_INTEGER,dataset,int(totalShape,HSIZE_T), hdferr,& call h5dwrite_f(dset_id, H5T_NATIVE_INTEGER,dataset,int(totalShape,HSIZE_T), hdferr,&
file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id) file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_pInt2: h5dwrite_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_int2: h5dwrite_f')
endif
call finalize_write(plist_id, dset_id, filespace_id, memspace_id) call finalize_write(plist_id, dset_id, filespace_id, memspace_id)
end subroutine HDF5_write_pInt2 end subroutine HDF5_write_int2
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief write dataset of type pInt with 3 dimensions !> @brief write dataset of type pInt with 3 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_write_pInt3(loc_id,dataset,datasetName,parallel) subroutine HDF5_write_int3(loc_id,dataset,datasetName,parallel)
implicit none implicit none
integer, intent(inout), dimension(:,:,:) :: dataset integer, intent(inout), dimension(:,:,:) :: dataset
@ -1430,19 +1442,20 @@ subroutine HDF5_write_pInt3(loc_id,dataset,datasetName,parallel)
myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_INTEGER,.false.) myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_INTEGER,.false.)
endif endif
if (product(totalShape) /= 0) & if (product(totalShape) /= 0) then
call h5dwrite_f(dset_id, H5T_NATIVE_INTEGER,dataset,int(totalShape,HSIZE_T), hdferr,& call h5dwrite_f(dset_id, H5T_NATIVE_INTEGER,dataset,int(totalShape,HSIZE_T), hdferr,&
file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id) file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_pInt3: h5dwrite_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_int3: h5dwrite_f')
endif
call finalize_write(plist_id, dset_id, filespace_id, memspace_id) call finalize_write(plist_id, dset_id, filespace_id, memspace_id)
end subroutine HDF5_write_pInt3 end subroutine HDF5_write_int3
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief write dataset of type pInt with 4 dimensions !> @brief write dataset of type pInt with 4 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_write_pInt4(loc_id,dataset,datasetName,parallel) subroutine HDF5_write_int4(loc_id,dataset,datasetName,parallel)
implicit none implicit none
integer, intent(inout), dimension(:,:,:,:) :: dataset integer, intent(inout), dimension(:,:,:,:) :: dataset
@ -1471,19 +1484,20 @@ subroutine HDF5_write_pInt4(loc_id,dataset,datasetName,parallel)
myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_INTEGER,.false.) myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_INTEGER,.false.)
endif endif
if (product(totalShape) /= 0) & if (product(totalShape) /= 0) then
call h5dwrite_f(dset_id, H5T_NATIVE_INTEGER,dataset,int(totalShape,HSIZE_T), hdferr,& call h5dwrite_f(dset_id, H5T_NATIVE_INTEGER,dataset,int(totalShape,HSIZE_T), hdferr,&
file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id) file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_pInt4: h5dwrite_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_int4: h5dwrite_f')
endif
call finalize_write(plist_id, dset_id, filespace_id, memspace_id) call finalize_write(plist_id, dset_id, filespace_id, memspace_id)
end subroutine HDF5_write_pInt4 end subroutine HDF5_write_int4
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief write dataset of type pInt with 5 dimensions !> @brief write dataset of type pInt with 5 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_write_pInt5(loc_id,dataset,datasetName,parallel) subroutine HDF5_write_int5(loc_id,dataset,datasetName,parallel)
implicit none implicit none
integer, intent(inout), dimension(:,:,:,:,:) :: dataset integer, intent(inout), dimension(:,:,:,:,:) :: dataset
@ -1512,19 +1526,20 @@ subroutine HDF5_write_pInt5(loc_id,dataset,datasetName,parallel)
myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_INTEGER,.false.) myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_INTEGER,.false.)
endif endif
if (product(totalShape) /= 0) & if (product(totalShape) /= 0) then
call h5dwrite_f(dset_id, H5T_NATIVE_INTEGER,dataset,int(totalShape,HSIZE_T), hdferr,& call h5dwrite_f(dset_id, H5T_NATIVE_INTEGER,dataset,int(totalShape,HSIZE_T), hdferr,&
file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id) file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_pInt5: h5dwrite_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_int5: h5dwrite_f')
endif
call finalize_write(plist_id, dset_id, filespace_id, memspace_id) call finalize_write(plist_id, dset_id, filespace_id, memspace_id)
end subroutine HDF5_write_pInt5 end subroutine HDF5_write_int5
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief write dataset of type pInt with 6 dimensions !> @brief write dataset of type pInt with 6 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_write_pInt6(loc_id,dataset,datasetName,parallel) subroutine HDF5_write_int6(loc_id,dataset,datasetName,parallel)
implicit none implicit none
integer, intent(inout), dimension(:,:,:,:,:,:) :: dataset integer, intent(inout), dimension(:,:,:,:,:,:) :: dataset
@ -1553,19 +1568,20 @@ subroutine HDF5_write_pInt6(loc_id,dataset,datasetName,parallel)
myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_INTEGER,.false.) myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_INTEGER,.false.)
endif endif
if (product(totalShape) /= 0) & if (product(totalShape) /= 0) then
call h5dwrite_f(dset_id, H5T_NATIVE_INTEGER,dataset,int(totalShape,HSIZE_T), hdferr,& call h5dwrite_f(dset_id, H5T_NATIVE_INTEGER,dataset,int(totalShape,HSIZE_T), hdferr,&
file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id) file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_pInt6: h5dwrite_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_int6: h5dwrite_f')
endif
call finalize_write(plist_id, dset_id, filespace_id, memspace_id) call finalize_write(plist_id, dset_id, filespace_id, memspace_id)
end subroutine HDF5_write_pInt6 end subroutine HDF5_write_int6
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief write dataset of type pInt with 7 dimensions !> @brief write dataset of type pInt with 7 dimensions
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_write_pInt7(loc_id,dataset,datasetName,parallel) subroutine HDF5_write_int7(loc_id,dataset,datasetName,parallel)
implicit none implicit none
integer, intent(inout), dimension(:,:,:,:,:,:,:) :: dataset integer, intent(inout), dimension(:,:,:,:,:,:,:) :: dataset
@ -1594,14 +1610,15 @@ subroutine HDF5_write_pInt7(loc_id,dataset,datasetName,parallel)
myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_INTEGER,.false.) myStart, totalShape, loc_id,myShape,datasetName,H5T_NATIVE_INTEGER,.false.)
endif endif
if (product(totalShape) /= 0) & if (product(totalShape) /= 0) then
call h5dwrite_f(dset_id, H5T_NATIVE_INTEGER,dataset,int(totalShape,HSIZE_T), hdferr,& call h5dwrite_f(dset_id, H5T_NATIVE_INTEGER,dataset,int(totalShape,HSIZE_T), hdferr,&
file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id) file_space_id = filespace_id, mem_space_id = memspace_id, xfer_prp = plist_id)
if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_pInt7: h5dwrite_f') if (hdferr < 0) call IO_error(1_pInt,ext_msg='HDF5_write_int7: h5dwrite_f')
endif
call finalize_write(plist_id, dset_id, filespace_id, memspace_id) call finalize_write(plist_id, dset_id, filespace_id, memspace_id)
end subroutine HDF5_write_pInt7 end subroutine HDF5_write_int7
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------

View File

@ -5,9 +5,6 @@
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH !> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module results module results
use prec
use IO
use HDF5
use HDF5_utilities use HDF5_utilities
#ifdef PETSc #ifdef PETSc
use PETSC use PETSC
@ -135,8 +132,6 @@ end function results_addGroup
!> @brief set link to object in results file !> @brief set link to object in results file
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine results_setLink(path,link) subroutine results_setLink(path,link)
use hdf5_utilities, only: &
HDF5_setLink
implicit none implicit none
character(len=*), intent(in) :: path, link character(len=*), intent(in) :: path, link
@ -163,7 +158,6 @@ end subroutine results_addAttribute
!> @brief remove link to an object !> @brief remove link to an object
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine results_removeLink(link) subroutine results_removeLink(link)
use hdf5
implicit none implicit none
character(len=*), intent(in) :: link character(len=*), intent(in) :: link
@ -313,7 +307,6 @@ end subroutine results_writeTensorDataset_int
!> @brief adds the unique mapping from spatial position and constituent ID to results !> @brief adds the unique mapping from spatial position and constituent ID to results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_mappingPhase(mapping,mapping2,Nconstituents,material_phase,phase_name,dataspace_size,mpiOffset,mpiOffset_phase) subroutine HDF5_mappingPhase(mapping,mapping2,Nconstituents,material_phase,phase_name,dataspace_size,mpiOffset,mpiOffset_phase)
use hdf5
implicit none implicit none
integer(pInt), intent(in) :: Nconstituents, dataspace_size, mpiOffset integer(pInt), intent(in) :: Nconstituents, dataspace_size, mpiOffset