From 363a95d5b7c40fdc57799a5d5bc04016d6a6ac2c Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 8 Mar 2019 09:16:31 +0100 Subject: [PATCH] not needed --- src/IO.f90 | 30 +++++++++--------------------- src/mesh_abaqus.f90 | 4 +--- src/mesh_grid.f90 | 5 +---- src/mesh_marc.f90 | 4 +--- 4 files changed, 12 insertions(+), 31 deletions(-) diff --git a/src/IO.f90 b/src/IO.f90 index 6f655b145..8364c00db 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -415,26 +415,22 @@ end subroutine IO_write_jobFile !> @brief opens binary file containing array of pReal numbers to given unit for writing. File is !! named after solver job name plus given extension and located in current working directory !-------------------------------------------------------------------------------------------------- -subroutine IO_write_jobRealFile(fileUnit,ext,recMultiplier) +subroutine IO_write_jobRealFile(fileUnit,ext) use DAMASK_interface, only: & getSolverJobName implicit none integer(pInt), intent(in) :: fileUnit !< file unit character(len=*), intent(in) :: ext !< extension of file - integer(pInt), intent(in), optional :: recMultiplier !< record length (multiple of pReal Numbers, if not given set to one) integer(pInt) :: myStat character(len=1024) :: path path = trim(getSolverJobName())//'.'//ext - if (present(recMultiplier)) then - open(fileUnit,status='replace',form='unformatted',access='direct', & - recl=pReal*recMultiplier,iostat=myStat,file=path) - else + open(fileUnit,status='replace',form='unformatted',access='direct', & recl=pReal,iostat=myStat,file=path) - endif + if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path) @@ -445,25 +441,21 @@ end subroutine IO_write_jobRealFile !> @brief opens binary file containing array of pReal numbers to given unit for reading. File is !! located in current working directory !-------------------------------------------------------------------------------------------------- -subroutine IO_read_realFile(fileUnit,ext,modelName,recMultiplier) +subroutine IO_read_realFile(fileUnit,ext,modelName) implicit none integer(pInt), intent(in) :: fileUnit !< file unit character(len=*), intent(in) :: ext, & !< extension of file modelName !< model name, in case of restart not solver job name - integer(pInt), intent(in), optional :: recMultiplier !< record length (multiple of pReal Numbers, if not given set to one) integer(pInt) :: myStat character(len=1024) :: path path = trim(modelName)//'.'//ext - if (present(recMultiplier)) then - open(fileUnit,status='old',form='unformatted',access='direct', & - recl=pReal*recMultiplier,iostat=myStat,file=path) - else + open(fileUnit,status='old',form='unformatted',access='direct', & recl=pReal,iostat=myStat,file=path) - endif + if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path) end subroutine IO_read_realFile @@ -473,25 +465,21 @@ end subroutine IO_read_realFile !> @brief opens binary file containing array of pInt numbers to given unit for reading. File is !! located in current working directory !-------------------------------------------------------------------------------------------------- -subroutine IO_read_intFile(fileUnit,ext,modelName,recMultiplier) +subroutine IO_read_intFile(fileUnit,ext,modelName) implicit none integer(pInt), intent(in) :: fileUnit !< file unit character(len=*), intent(in) :: ext, & !< extension of file modelName !< model name, in case of restart not solver job name - integer(pInt), intent(in), optional :: recMultiplier !< record length (multiple of pReal Numbers, if not given set to one) integer(pInt) :: myStat character(len=1024) :: path path = trim(modelName)//'.'//ext - if (present(recMultiplier)) then - open(fileUnit,status='old',form='unformatted',access='direct', & - recl=pInt*recMultiplier,iostat=myStat,file=path) - else + open(fileUnit,status='old',form='unformatted',access='direct', & recl=pInt,iostat=myStat,file=path) - endif + if (myStat /= 0) call IO_error(100_pInt,ext_msg=path) end subroutine IO_read_intFile diff --git a/src/mesh_abaqus.f90 b/src/mesh_abaqus.f90 index 4e923606e..d871203af 100644 --- a/src/mesh_abaqus.f90 +++ b/src/mesh_abaqus.f90 @@ -427,9 +427,7 @@ subroutine mesh_init(ip,el) use DAMASK_interface use IO, only: & IO_open_InputFile, & - IO_timeStamp, & - IO_error, & - IO_write_jobFile + IO_error use debug, only: & debug_e, & debug_i, & diff --git a/src/mesh_grid.f90 b/src/mesh_grid.f90 index 424456e3a..6235e4c1d 100644 --- a/src/mesh_grid.f90 +++ b/src/mesh_grid.f90 @@ -176,10 +176,7 @@ subroutine mesh_init(ip,el) use DAMASK_interface use IO, only: & IO_open_file, & - IO_error, & - IO_timeStamp, & - IO_error, & - IO_write_jobFile + IO_error use debug, only: & debug_e, & debug_i, & diff --git a/src/mesh_marc.f90 b/src/mesh_marc.f90 index 0c7d332c9..0bb54ffb8 100644 --- a/src/mesh_marc.f90 +++ b/src/mesh_marc.f90 @@ -286,9 +286,7 @@ subroutine mesh_init(ip,el) use DAMASK_interface use IO, only: & IO_open_InputFile, & - IO_timeStamp, & - IO_error, & - IO_write_jobFile + IO_error use debug, only: & debug_e, & debug_i, &