IO: Update error messages in read_restart_snapshot_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
64cd70413f
commit
cfb20624e7
52
src/io.F90
52
src/io.F90
@ -414,8 +414,8 @@ module io
|
|||||||
! if file does not exist, print error and quit the subroutine
|
! if file does not exist, print error and quit the subroutine
|
||||||
!
|
!
|
||||||
if (.not. info) then
|
if (.not. info) then
|
||||||
call print_error("io::read_data_h5", "File " // trim(fl) &
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
// " does not exist!")
|
, "File " // trim(fl) // " does not exist!")
|
||||||
return
|
return
|
||||||
end if ! file does not exist
|
end if ! file does not exist
|
||||||
|
|
||||||
@ -426,7 +426,7 @@ module io
|
|||||||
! in the case of error, print a message and quit the subroutine
|
! in the case of error, print a message and quit the subroutine
|
||||||
!
|
!
|
||||||
if (err < 0) then
|
if (err < 0) then
|
||||||
call print_error("io::read_data_h5" &
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
, "Cannot initialize the HDF5 Fortran interface!")
|
, "Cannot initialize the HDF5 Fortran interface!")
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
@ -438,7 +438,8 @@ module io
|
|||||||
! if the format verification failed, close the interface, print error and exit
|
! if the format verification failed, close the interface, print error and exit
|
||||||
!
|
!
|
||||||
if (err < 0) then
|
if (err < 0) then
|
||||||
call print_error("io::read_data_h5", "Cannot check the file format!")
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
|
, "Cannot check the file format!")
|
||||||
call h5close_f(err)
|
call h5close_f(err)
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
@ -446,8 +447,8 @@ module io
|
|||||||
! the file is not in the HDF5 format, print message and quit
|
! the file is not in the HDF5 format, print message and quit
|
||||||
!
|
!
|
||||||
if (.not. info) then
|
if (.not. info) then
|
||||||
call print_error("io::read_data_h5", "File " // trim(fl) &
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
// " is not an HDF5 file!")
|
, "File " // trim(fl) // " is not an HDF5 file!")
|
||||||
call h5close_f(err)
|
call h5close_f(err)
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
@ -459,7 +460,8 @@ module io
|
|||||||
! if the file could not be opened, print message and quit
|
! if the file could not be opened, print message and quit
|
||||||
!
|
!
|
||||||
if (err < 0) then
|
if (err < 0) then
|
||||||
call print_error("io::read_data_h5", "Cannot open file: " // trim(fl))
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
|
, "Cannot open file: " // trim(fl))
|
||||||
call h5close_f(err)
|
call h5close_f(err)
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
@ -479,7 +481,8 @@ module io
|
|||||||
! if the file could not be closed print message and quit
|
! if the file could not be closed print message and quit
|
||||||
!
|
!
|
||||||
if (err > 0) then
|
if (err > 0) then
|
||||||
call print_error("io::read_data_h5", "Cannot close file: " // trim(fl))
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
|
, "Cannot close file: " // trim(fl))
|
||||||
call h5close_f(err)
|
call h5close_f(err)
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
@ -505,8 +508,8 @@ module io
|
|||||||
! if file does not exist, print error and quit the subroutine
|
! if file does not exist, print error and quit the subroutine
|
||||||
!
|
!
|
||||||
if (.not. info) then
|
if (.not. info) then
|
||||||
call print_error("io::read_data_h5", "File " // trim(fl) &
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
// " does not exist!")
|
, "File " // trim(fl) // " does not exist!")
|
||||||
call h5close_f(err)
|
call h5close_f(err)
|
||||||
return
|
return
|
||||||
end if ! file does not exist
|
end if ! file does not exist
|
||||||
@ -518,7 +521,8 @@ module io
|
|||||||
! if the format verification failed, close the interface, print error and exit
|
! if the format verification failed, close the interface, print error and exit
|
||||||
!
|
!
|
||||||
if (err < 0) then
|
if (err < 0) then
|
||||||
call print_error("io::read_data_h5", "Cannot check the file format!")
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
|
, "Cannot check the file format!")
|
||||||
call h5close_f(err)
|
call h5close_f(err)
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
@ -526,8 +530,8 @@ module io
|
|||||||
! the file is not in the HDF5 format, print message and quit
|
! the file is not in the HDF5 format, print message and quit
|
||||||
!
|
!
|
||||||
if (.not. info) then
|
if (.not. info) then
|
||||||
call print_error("io::read_data_h5", "File " // trim(fl) &
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
// " is not an HDF5 file!")
|
, "File " // trim(fl) // " is not an HDF5 file!")
|
||||||
call h5close_f(err)
|
call h5close_f(err)
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
@ -539,7 +543,8 @@ module io
|
|||||||
! if the file could not be opened, print message and quit
|
! if the file could not be opened, print message and quit
|
||||||
!
|
!
|
||||||
if (err < 0) then
|
if (err < 0) then
|
||||||
call print_error("io::read_data_h5", "Cannot open file: " // trim(fl))
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
|
, "Cannot open file: " // trim(fl))
|
||||||
call h5close_f(err)
|
call h5close_f(err)
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
@ -555,7 +560,8 @@ module io
|
|||||||
! if the file could not be closed print message and quit
|
! if the file could not be closed print message and quit
|
||||||
!
|
!
|
||||||
if (err > 0) then
|
if (err > 0) then
|
||||||
call print_error("io::read_data_h5", "Cannot close file: " // trim(fl))
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
|
, "Cannot close file: " // trim(fl))
|
||||||
call h5close_f(err)
|
call h5close_f(err)
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
@ -587,8 +593,8 @@ module io
|
|||||||
! if file does not exist, print error and quit the subroutine
|
! if file does not exist, print error and quit the subroutine
|
||||||
!
|
!
|
||||||
if (.not. info) then
|
if (.not. info) then
|
||||||
call print_error("io::read_data_h5", "File " // trim(fl) &
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
// " does not exist!")
|
, "File " // trim(fl) // " does not exist!")
|
||||||
call h5close_f(err)
|
call h5close_f(err)
|
||||||
return
|
return
|
||||||
end if ! file does not exist
|
end if ! file does not exist
|
||||||
@ -600,7 +606,7 @@ module io
|
|||||||
! if the format verification failed, close the interface, print error and exit
|
! if the format verification failed, close the interface, print error and exit
|
||||||
!
|
!
|
||||||
if (err < 0) then
|
if (err < 0) then
|
||||||
call print_error("io::read_data_h5" &
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
, "Cannot check the file format!")
|
, "Cannot check the file format!")
|
||||||
call h5close_f(err)
|
call h5close_f(err)
|
||||||
return
|
return
|
||||||
@ -609,8 +615,8 @@ module io
|
|||||||
! the file is not in the HDF5 format, print message and quit
|
! the file is not in the HDF5 format, print message and quit
|
||||||
!
|
!
|
||||||
if (.not. info) then
|
if (.not. info) then
|
||||||
call print_error("io::read_data_h5", "File " // trim(fl) &
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
// " is not an HDF5 file!")
|
, "File " // trim(fl) // " is not an HDF5 file!")
|
||||||
call h5close_f(err)
|
call h5close_f(err)
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
@ -622,7 +628,7 @@ module io
|
|||||||
! if the file could not be opened, print message and quit
|
! if the file could not be opened, print message and quit
|
||||||
!
|
!
|
||||||
if (err < 0) then
|
if (err < 0) then
|
||||||
call print_error("io::read_data_h5" &
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
, "Cannot open file: " // trim(fl))
|
, "Cannot open file: " // trim(fl))
|
||||||
call h5close_f(err)
|
call h5close_f(err)
|
||||||
return
|
return
|
||||||
@ -639,7 +645,7 @@ module io
|
|||||||
! if the file could not be closed print message and quit
|
! if the file could not be closed print message and quit
|
||||||
!
|
!
|
||||||
if (err > 0) then
|
if (err > 0) then
|
||||||
call print_error("io::read_data_h5" &
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
, "Cannot close file: " // trim(fl))
|
, "Cannot close file: " // trim(fl))
|
||||||
call h5close_f(err)
|
call h5close_f(err)
|
||||||
return
|
return
|
||||||
@ -676,7 +682,7 @@ module io
|
|||||||
! check if the interface has been closed successfuly
|
! check if the interface has been closed successfuly
|
||||||
!
|
!
|
||||||
if (err > 0) then
|
if (err > 0) then
|
||||||
call print_error("io::read_data_h5" &
|
call print_error("io::read_restart_snapshot_h5" &
|
||||||
, "Cannot close the HDF5 Fortran interface!")
|
, "Cannot close the HDF5 Fortran interface!")
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
Loading…
x
Reference in New Issue
Block a user