Unverified Commit e52b46e0 authored by Graham, Aaron's avatar Graham, Aaron Committed by GitHub
Browse files

Hdf5 auto open (#330)

* auto-open HDF5 and use REQUIRE more

* Fix some formatting issues in HDF5

* Add vs code to gitignore

* Update HDF5 test
parent 799950fd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18,3 +18,4 @@ fort.*
/.egdist
/.gitdist
*.sublime-*
.vscode
+705 −778
Original line number Diff line number Diff line
@@ -567,12 +567,9 @@ SUBROUTINE init_HDF5FileType(thisHDF5File,filename,mode,zlibOpt)
  TYPE(StringType) :: fpath,fname,fext,mode_in
  INTEGER(SIK) :: unitno
  LOGICAL(SBK) :: ostat,exists
  IF(thisHDF5File%isinit) THEN
    CALL thisHDF5File%e%raiseError(modName//'::'//myName// &
        ' - HDF5file '//thisHDF5File%getFileName()// &
        ' is already initialized!')
    RETURN
  ENDIF

  REQUIRE(.NOT.thisHDF5File%isInit)

  CALL getFileParts(filename,fpath,fname,fext,thisHDF5File%e)
  CALL thisHDF5File%setFilePath(CHAR(fpath))
  CALL thisHDF5File%setFileName(CHAR(fname))
@@ -723,7 +720,8 @@ SUBROUTINE open_HDF5FileType(file)
  INTEGER :: acc
  INTEGER(HID_T) :: plist_id

  IF(file%isinit) THEN
  REQUIRE(file%isinit)

  CALL h5pcreate_f(H5P_FILE_ACCESS_F,plist_id,error)
  CALL h5pset_fclose_degree_f(plist_id,H5F_CLOSE_SEMI_F,error)

@@ -759,7 +757,7 @@ SUBROUTINE open_HDF5FileType(file)
  ELSE
    CALL file%setOpenStat(.TRUE.)
  ENDIF
  ENDIF

#endif
ENDSUBROUTINE open_HDF5FileType
!
@@ -774,13 +772,12 @@ SUBROUTINE close_HDF5FileType(file)
#ifdef FUTILITY_HAVE_HDF5
  CHARACTER(LEN=*),PARAMETER :: myName='close_HDF5FileType'
  LOGICAL(SBK) :: lastStopOnError

  REQUIRE(file%isinit)

  lastStopOnError=file%e%isStopOnError()
  CALL file%e%setStopOnError(.FALSE.)
  !Check init status
  IF(.NOT.file%isinit) THEN
    CALL file%e%raiseError(modName// &
        '::'//myName//' - File object not initialized.')
  ELSE

  !Check open status.
  IF(file%isopen()) THEN
    CALL h5fclose_f(file%file_id,error)
@@ -792,8 +789,9 @@ SUBROUTINE close_HDF5FileType(file)
      CALL file%setOpenStat(.FALSE.)
    ENDIF
  ENDIF
  ENDIF

  CALL file%e%setStopOnError(lastStopOnError)

#endif
ENDSUBROUTINE close_HDF5FileType
!
@@ -813,7 +811,8 @@ SUBROUTINE delete_HDF5FileType(file)
  CHARACTER(LEN=*),PARAMETER :: myName='delete_HDF5FileType'
  CHARACTER(LEN=EXCEPTION_MAX_MESG_LENGTH) :: emesg

  IF(file%isinit) THEN
  REQUIRE(file%isInit)

  !So, HDF5 is special in that the unitno assigned isn't used in the
  !fopen() operation.  So, regardless of the %isOpen() status, it needs
  !to be opened.
@@ -833,7 +832,6 @@ SUBROUTINE delete_HDF5FileType(file)
  ELSE
    CALL file%setOpenStat(.FALSE.)
  ENDIF
  ENDIF
#else
  ! We dont have HDF5, so we can't initialize
  CALL file%e%raiseWarning('The HDF5 library is not present in '// &
@@ -899,17 +897,9 @@ SUBROUTINE ls_HDF5FileType(thisHDF5File,path,objs)
  INTEGER(HID_T) :: grp_id
  INTEGER :: store_type,nlinks,max_corder

  ! Make sure the object is initialized
  IF(.NOT.thisHDF5File%isinit) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName// &
        '::'//myName//' - File object not initialized.')
  ELSEIF(.NOT.thisHDF5File%isOpen()) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName//'::'//myName// &
        ' - HDF5file '//thisHDF5File%getFileName()// &
        ' is not opened!')
  ELSE
  REQUIRE(thisHDF5File%isinit)

  IF(.NOT.thisHDF5File%isOpen()) CALL thisHDF5File%fopen()
  IF(ALLOCATED(objs)) THEN
    !objs=''
    DEALLOCATE(objs)
@@ -938,7 +928,6 @@ SUBROUTINE ls_HDF5FileType(thisHDF5File,path,objs)
    IF(error /= 0) CALL thisHDF5File%e%raiseError(modName//'::'//myName// &
        ' - Unable to close group.')
  ENDIF
  ENDIF
#endif
ENDSUBROUTINE ls_HDF5FileType
!
@@ -960,21 +949,10 @@ RECURSIVE SUBROUTINE mkdir_HDF5FileType(thisHDF5File,path)
  LOGICAL :: dset_exists
  INTEGER(SIK) :: lastslash

  ! Make sure the object is initialized
  IF(.NOT.thisHDF5File%isinit) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName// &
        '::'//myName//' - File object not initialized.')
  ! Ensure that we have write permissions to the file
  ELSEIF(.NOT.thisHDF5File%isWrite()) THEN
    CALL thisHDF5File%e%raiseError(modName &
        //'::'//myName//' - Can not create group in read-only file.')
  ELSEIF(.NOT.thisHDF5File%isOpen()) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName//'::'//myName// &
        ' - HDF5file '//thisHDF5File%getFileName()// &
        ' is already not opened!')
  ELSE
  REQUIRE(thisHDF5File%isinit)
  REQUIRE(thisHDF5File%isWrite())

  IF(.NOT.thisHDF5File%isOpen()) CALL thisHDF5File%fopen()
  ! Convert the path to use slashes
  path2=convertPath(path)

@@ -1007,7 +985,6 @@ RECURSIVE SUBROUTINE mkdir_HDF5FileType(thisHDF5File,path)
          ' - Failed to create HDF5 group.')
    ENDIF
  ENDIF
  ENDIF
#endif
ENDSUBROUTINE mkdir_HDF5FileType
!
@@ -1029,21 +1006,10 @@ SUBROUTINE mkalldir_HDF5FileType(thisHDF5File,path)
  TYPE(StringType) :: path2,tmppath
  INTEGER(HID_T) :: group_id

  ! Make sure the object is initialized
  IF(.NOT.thisHDF5File%isinit) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName// &
        '::'//myName//' - File object not initialized.')
  ! Ensure that we have write permissions to the file
  ELSEIF(.NOT.thisHDF5File%isWrite()) THEN
    CALL thisHDF5File%e%raiseError(modName &
        //'::'//myName//' - Can not create group in read-only file.')
  ELSEIF(.NOT.thisHDF5File%isOpen()) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName//'::'//myName// &
        ' - HDF5file '//thisHDF5File%getFileName()// &
        ' is already not opened!')
  ELSE
  REQUIRE(thisHDF5File%isinit)
  REQUIRE(thisHDF5File%isWrite())

  IF(.NOT.thisHDF5File%isOpen()) CALL thisHDF5File%fopen()
  error=0
  ! Convert the path to use slashes
  path2=convertPath(TRIM(path))
@@ -1070,7 +1036,6 @@ SUBROUTINE mkalldir_HDF5FileType(thisHDF5File,path)
    CALL thisHDF5File%e%raiseDebug(modName//'::'//myName// &
        ' - Failed to create HDF5 group.')
  ENDIF
  ENDIF
#endif
ENDSUBROUTINE mkalldir_HDF5FileType
!
@@ -1091,18 +1056,9 @@ FUNCTION ngrp_HDF5FileType(thisHDF5File,path) RESULT(ngrp)
  INTEGER(HID_T) :: grp_id
  INTEGER :: store_type,nlinks,max_corder

  ! Make sure the object is initialized
  IF(.NOT.thisHDF5File%isinit) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName// &
        '::'//myName//' - File object not initialized.')
  ELSEIF(.NOT.thisHDF5File%isOpen()) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName//'::'//myName// &
        ' - HDF5file '//thisHDF5File%getFileName()// &
        ' is already not opened!')
  ELSE
  REQUIRE(thisHDF5File%isinit)

  IF(.NOT.thisHDF5File%isOpen()) CALL thisHDF5File%fopen()
  path2=convertPath(path)

  CALL h5gopen_f(thisHDF5File%file_id,CHAR(path2),grp_id,error)
@@ -1119,7 +1075,6 @@ FUNCTION ngrp_HDF5FileType(thisHDF5File,path) RESULT(ngrp)
      myName//' - Failed to close HDF group')

  ngrp=nlinks
  ENDIF
#else
  ngrp=0
#endif
@@ -1144,9 +1099,11 @@ FUNCTION isgrp_HDF5FileType(thisHDF5File,path) RESULT(bool)
  INTEGER(HID_T) :: obj_id
  INTEGER(SIK) :: type

  REQUIRE(thisHDF5File%isinit)

  ! Make sure the object is initialized, and opened
  bool=.FALSE.
  IF(thisHDF5File%isinit .AND. thisHDF5File%isOpen()) THEN
  IF(.NOT.thisHDF5File%isOpen()) CALL thisHDF5File%fopen()
  bool=thisHDF5File%pathExists(path)
  IF(bool) THEN
    path2=convertPath(path)
@@ -1163,7 +1120,6 @@ FUNCTION isgrp_HDF5FileType(thisHDF5File,path) RESULT(bool)
    IF(error /= 0) CALL thisHDF5File%e%raiseDebug(modName//'::'// &
        myName//' - Failed to close HDF object!')
  ENDIF
  ENDIF
#else
  bool=.FALSE.
#endif
@@ -1187,9 +1143,11 @@ FUNCTION pathexists_HDF5FileType(thisHDF5File,path) RESULT(bool)
  TYPE(StringType) :: strpath,path2
  TYPE(StringType),ALLOCATABLE :: segments(:)

  REQUIRE(thisHDF5File%isinit)

  ! Make sure the object is initialized, and opened
  bool=.FALSE.
  IF(thisHDF5File%isinit .AND. thisHDF5File%isOpen()) THEN
  IF(.NOT.thisHDF5File%isOpen()) CALL thisHDF5File%fopen()
  strpath=convertPath(path)
  segments=strpath%split('/')
  bool=.TRUE.
@@ -1199,7 +1157,6 @@ FUNCTION pathexists_HDF5FileType(thisHDF5File,path) RESULT(bool)
    CALL h5lexists_f(thisHDF5File%file_id,CHAR(path2),bool,error)
    IF(.NOT.bool) EXIT
  ENDDO !iseg
  ENDIF
#else
  bool=.FALSE.
#endif
@@ -1315,10 +1272,10 @@ SUBROUTINE getChunkSize_HDF5FileType(thisHDF5File,path,cdims)
ENDSUBROUTINE getChunkSize_HDF5FileType
!
!-------------------------------------------------------------------------------
!> @brief
!> @brief Creates a hard link between 2 datasets
!> @param thisHDF5File the HDF5FileType object to interrogate
!> @param source_path the path in the file to create a link to
!> @param link_path
!> @param link_path the path of the link
!>
!>
SUBROUTINE createHardLink_HDF5FileType(thisHDF5File,source_path,link_path)
@@ -6560,7 +6517,20 @@ ENDFUNCTION convertPath
#ifdef FUTILITY_HAVE_HDF5
!
!-------------------------------------------------------------------------------
!> @brief
!> @brief Prepares to write an object to an HDF5 file
!> @param thisHDF5File the file object to write to
!> @param rank the rank of the array to write to a dataset
!> @param gdims the global dimensions of the data
!> @param ldims the local dimensions of the data
!> @param path the path to which to write the data
!> @param mem the HDF5 type of data to write
!> @param dset_id the HDF5 ID for this dataset
!> @param dpsace_id the HDF5 ID for the dataspace
!> @param gspace_id the HDF5 ID for the global space
!> @param plist_id the HDF5 parameter list ID
!> @param error the error code for preparing the file; 0 indicates no error
!> @param cnt a count used for hyperslab stuff
!> @param offset an offset used for hyperslab stuff
!>
SUBROUTINE preWrite(thisHDF5File,rank,gdims,ldims,path,mem,dset_id,dspace_id, &
    gspace_id,plist_id,error,cnt,offset)
@@ -6586,25 +6556,12 @@ SUBROUTINE preWrite(thisHDF5File,rank,gdims,ldims,path,mem,dset_id,dspace_id, &
  INTEGER(SIK) :: lastslash
  TYPE(StringType) :: path2

  REQUIRE(thisHDF5File%isinit)
  REQUIRE(thisHDF5File%isWrite())

  error=0
  dset_id=-1
  ! Make sure the object is initialized
  IF(.NOT.thisHDF5File%isinit) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName// &
        '::'//myName//' - File object not initialized.')
    error=-1
  ! Check that the file is writable. Best to catch this before HDF5 does.
  ELSEIF(.NOT.thisHDF5File%isWrite()) THEN
    CALL thisHDF5File%e%raiseError(modName//'::'//myName// &
        ' - File is readonly!')
    error=-2
  ! Check that the file is Open.
  ELSEIF(.NOT.thisHDF5File%isOpen()) THEN
    CALL thisHDF5File%e%raiseError(modName//'::'//myName// &
        ' - File is not Open!')
    error=-3
  ELSE
  IF(.NOT.thisHDF5File%isOpen()) CALL thisHDF5File%fopen()
  file_id=thisHDF5File%file_id

  !> Convert path here, further reducing code
@@ -6744,11 +6701,16 @@ SUBROUTINE preWrite(thisHDF5File,rank,gdims,ldims,path,mem,dset_id,dspace_id, &
!            ' - Could not set property list for collective mpi write.')
!        ENDIF
!#endif
  ENDIF
ENDSUBROUTINE preWrite
!
!-------------------------------------------------------------------------------
!> @brief
!> @brief Completes the writing of an object to an HDF5 file
!> @param thisHDF5File the file object to write to
!> @param error the error code for preparing the file; 0 indicates no error
!> @param dset_id the HDF5 ID for this dataset
!> @param dpsace_id the HDF5 ID for the dataspace
!> @param gspace_id the HDF5 ID for the global space
!> @param plist_id the HDF5 parameter list ID
!>
SUBROUTINE postWrite(thisHDF5File,error,dset_id,dspace_id,gspace_id,plist_id)
  CHARACTER(LEN=*),PARAMETER :: myName='postWrite'
@@ -6759,20 +6721,10 @@ SUBROUTINE postWrite(thisHDF5File,error,dset_id,dspace_id,gspace_id,plist_id)
  INTEGER(HID_T),INTENT(INOUT) :: gspace_id
  INTEGER(HID_T),INTENT(INOUT) :: plist_id

  ! Make sure the object is initialized
  IF(.NOT.thisHDF5File%isinit) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName// &
        '::'//myName//' - File object not initialized.')
  ! Check that the file is writable. Best to catch this before HDF5 does.
  ELSEIF(.NOT.thisHDF5File%isWrite()) THEN
    CALL thisHDF5File%e%raiseError(modName//'::'//myName// &
        ' - File is not Writable!')
  ! Check that the file is Open.
  ELSEIF(.NOT.thisHDF5File%isOpen()) THEN
    CALL thisHDF5File%e%raiseError(modName//'::'//myName// &
        ' - File is not Open!')
  ELSE
  REQUIRE(thisHDF5File%isinit)
  REQUIRE(thisHDF5File%isWrite())

  IF(.NOT.thisHDF5File%isOpen()) CALL thisHDF5File%fopen()
  IF(error /= 0) CALL thisHDF5File%e%raiseError(modName//'::'//myName// &
      ' - Could not write to the dataset.')
  ! Close the dataset
@@ -6789,11 +6741,17 @@ SUBROUTINE postWrite(thisHDF5File,error,dset_id,dspace_id,gspace_id,plist_id)
  CALL h5pclose_f(plist_id,error)
  IF(error /= 0) CALL thisHDF5File%e%raiseError(modName//'::'//myName// &
      ' - Could not close the parameter list.')
  ENDIF
ENDSUBROUTINE postWrite
!
!-------------------------------------------------------------------------------
!> @brief
!> @brief Prepares to read a dataset from an HDF5 file
!> @param thisHDF5File the file object to write to
!> @param path the path of the data to read
!> @param rank the rank of the data to read
!> @param dset_id the HDF5 ID for this dataset
!> @param dpsace_id the HDF5 ID for the dataspace
!> @param dims the dimensions of the data to read
!> @param error the error code for preparing the file; 0 indicates no error
!>
SUBROUTINE preRead(thisHDF5File,path,rank,dset_id,dspace_id,dims,error)
  CHARACTER(LEN=*),PARAMETER :: myName='preRead'
@@ -6808,19 +6766,10 @@ SUBROUTINE preRead(thisHDF5File,path,rank,dset_id,dspace_id,dims,error)
  INTEGER :: ndims
  INTEGER(HSIZE_T) :: maxdims(rank)

  REQUIRE(thisHDF5File%isinit)
  REQUIRE(thisHDF5File%isRead())

  error=0
  ! Make sure the object is initialized
  IF(.NOT.thisHDF5File%isinit) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName// &
        '::'//myName//' - File object not initialized.')
    error=-1
  ELSEIF(.NOT.thisHDF5File%isRead()) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName// &
        '::'//myName//' - File is not Readable!')
    error=-2
  ELSE
  ! Open the dataset
  CALL h5dopen_f(thisHDF5File%file_id, path, dset_id, error)
  IF(error /= 0) CALL thisHDF5File%e%raiseError(modName//'::'//myName// &
@@ -6844,7 +6793,6 @@ SUBROUTINE preRead(thisHDF5File,path,rank,dset_id,dspace_id,dims,error)
  ELSE
    dims=1
  ENDIF
  ENDIF
ENDSUBROUTINE preRead
#endif
!
@@ -6871,22 +6819,11 @@ FUNCTION getDataShape(thisHDF5File,dsetname) RESULT(dataShape)
  INTEGER(HID_T) :: dspace_id
  INTEGER(HSIZE_T),ALLOCATABLE :: dims(:),maxdims(:)

  REQUIRE(thisHDF5File%isinit)
  REQUIRE(thisHDF5File%isRead())

  error=0
  ! Make sure the object is initialized
  IF(.NOT.thisHDF5File%isinit) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName// &
        '::'//myName//' - File object not initialized.')
    error=-1
  ELSEIF(.NOT.thisHDF5File%isRead()) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName// &
        '::'//myName//' - File is not Readable!')
    error=-2
  ELSE
    IF(.NOT.thisHDF5File%isOpen()) THEN
        CALL thisHDF5File%fopen()
    ENDIF
  IF(.NOT.thisHDF5File%isOpen()) CALL thisHDF5File%fopen()
  path=convertPath(dsetname)

  ! Open the dataset
@@ -6912,7 +6849,6 @@ FUNCTION getDataShape(thisHDF5File,dsetname) RESULT(dataShape)
  ! Copy to the Futility integer type
  ALLOCATE(dataShape(SIZE(dims)))
  dataShape(:)=dims(:)
  ENDIF
#endif
ENDFUNCTION getDataShape
!
@@ -6938,22 +6874,11 @@ FUNCTION getDataType(thisHDF5File,dsetname) RESULT(dataType)
  INTEGER(HID_T) :: dset_id,dtype
  INTEGER(HSIZE_T) :: dtype_prec

  REQUIRE(thisHDF5File%isinit)
  REQUIRE(thisHDF5File%isRead())

  error=0
  ! Make sure the object is initialized
  IF(.NOT.thisHDF5File%isinit) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName// &
        '::'//myName//' - File object not initialized.')
    error=-1
  ELSEIF(.NOT.thisHDF5File%isRead()) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName// &
        '::'//myName//' - File is not Readable!')
    error=-2
  ELSE
    IF(.NOT.thisHDF5File%isOpen()) THEN
        CALL thisHDF5File%fopen()
    ENDIF
  IF(.NOT.thisHDF5File%isOpen()) CALL thisHDF5File%fopen()
  path=convertPath(dsetname)

  ! Open the dataset
@@ -6992,12 +6917,16 @@ FUNCTION getDataType(thisHDF5File,dsetname) RESULT(dataType)
        ' - Unsupported data type '//str(class_type)//' returned!  Only types '// &
        str(H5T_FLOAT_F)//', '//str(H5T_INTEGER_F)//', '//str(H5T_STRING_F)//' are supported.')
  ENDIF
  ENDIF
#endif
ENDFUNCTION getDataType
!
!-------------------------------------------------------------------------------
!> @brief
!> @brief Completes the reading of a dataset from an HDF5 file
!> @param thisHDF5File the file object to write to
!> @param path the path of the data to read
!> @param dset_id the HDF5 ID for this dataset
!> @param dpsace_id the HDF5 ID for the dataspace
!> @param error the error code for preparing the file; 0 indicates no error
!>
#ifdef FUTILITY_HAVE_HDF5
SUBROUTINE postRead(thisHDF5File,path,dset_id,dspace_id,error)
@@ -7010,16 +6939,9 @@ SUBROUTINE postRead(thisHDF5File,path,dset_id,dspace_id,error)

  INTEGER(HSIZE_T),ALLOCATABLE :: cdims(:)

  ! Make sure the object is initialized
  IF(.NOT.thisHDF5File%isinit) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName// &
        '::'//myName//' - File object not initialized.')
  ELSEIF(.NOT.thisHDF5File%isRead()) THEN
    CALL thisHDF5File%e%setStopOnError(.FALSE.)
    CALL thisHDF5File%e%raiseError(modName// &
        '::'//myName//' - File is not Readable!')
  ELSE
  REQUIRE(thisHDF5File%isinit)
  REQUIRE(thisHDF5File%isRead())

  IF(error /= 0) THEN
    !See if failed read was due to OOM on decompress
    IF(isCompressed_HDF5FileType(thisHDF5File,path)) THEN
@@ -7045,7 +6967,6 @@ SUBROUTINE postRead(thisHDF5File,path,dset_id,dspace_id,error)
  CALL h5sclose_f(dspace_id,error)
  IF(error /= 0) CALL thisHDF5File%e%raiseError(modName//'::'//myName// &
      ' - Failed to close dataspace for "'//TRIM(path)//'".')
  ENDIF
ENDSUBROUTINE postRead
!
!------------------------------------------------------------------------------
@@ -7099,6 +7020,12 @@ ENDSUBROUTINE compute_chunk_size
!
!-------------------------------------------------------------------------------
!> @brief Use to create an attribute
!> @param this the HDF5 file object
!> @param attr_name the name of the attribute
!> @param atype_id the HDF5 attribute type ID
!> @param dspace_id the dataspace ID
!> @param attr_id the attribute ID
!>
#ifdef FUTILITY_HAVE_HDF5
SUBROUTINE createAttribute(this,obj_id,attr_name,atype_id,dspace_id,attr_id)
  CHARACTER(LEN=*),PARAMETER :: myName='createAttribute'
@@ -7288,7 +7215,7 @@ SUBROUTINE read_attribute_st0(this,obj_name,attr_name,attr_val)
  CALL close_attribute(this,attr_id)
  CALL close_object(this,obj_id)
#endif
End SUBROUTINE read_attribute_st0
ENDSUBROUTINE read_attribute_st0
!
!-------------------------------------------------------------------------------
!> @brief Set-up to read  a string value attribute from a known dataset
@@ -7307,7 +7234,7 @@ SUBROUTINE read_attribute_c0(this,obj_name,attr_name,attr_val)
  CALL this%read_attribute(obj_name,attr_name,str_val)

  attr_val=CHAR(str_val)
End SUBROUTINE read_attribute_c0
ENDSUBROUTINE read_attribute_c0
!
!-------------------------------------------------------------------------------
!> @brief Reads a string value attribute from a known dataset
+4 −3
Original line number Diff line number Diff line
@@ -74,11 +74,12 @@ CHARACTER(LEN=*),PARAMETER :: modName='MEMORYPROFILER'
CONTAINS
!
!-------------------------------------------------------------------------------
!> @brief the procudere to
!> @brief the procedure to intialize a memory profiler object
!> @param thisMP the memory profiler
!> @param params
!> @param pe the parallel environment
!> @param myLog the log file; optional
!> @param params the input parameter list; optional
!>
!TODO  Need to get control rod movement passed in
SUBROUTINE init_MemProf(thisMP,pe,mylog,params)
  CLASS(Memory_Profiler),INTENT(INOUT) :: thisMP
  TYPE(ParallelEnvType),TARGET,INTENT(IN) :: pe
+0 −240

File changed.

Preview size limit exceeded, changes collapsed.