diff --git a/code/debug.f90 b/code/debug.f90 index 80f0c326c..5e1b49114 100644 --- a/code/debug.f90 +++ b/code/debug.f90 @@ -128,6 +128,7 @@ subroutine debug_init nMPstate, & nHomog use IO, only: & + IO_read, & IO_error, & IO_open_file_stat, & IO_isBlank, & @@ -144,8 +145,8 @@ subroutine debug_init integer(pInt) :: i, what integer(pInt), dimension(1+2*maxNchunks) :: positions - character(len=64) :: tag - character(len=1024) :: line + character(len=65536) :: tag + character(len=65536) :: line write(6,'(/,a)') ' <<<+- debug init -+>>>' write(6,'(a)') ' $Id$' @@ -175,9 +176,11 @@ subroutine debug_init !-------------------------------------------------------------------------------------------------- ! try to open the config file + + fileExists: if(IO_open_file_stat(fileunit,debug_configFile)) then - do - read(fileunit,'(a1024)',END=100) line + do while (trim(line) /= '#EOF#') ! read thru sections of phase part + line = IO_read(fileunit) if (IO_isBlank(line)) cycle ! skip empty lines positions = IO_stringPos(line,maxNchunks) tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key @@ -223,7 +226,7 @@ subroutine debug_init case ('other') what = debug_MAXNTYPE + 2_pInt end select - if(what /= 0) then + if (what /= 0) then do i = 2_pInt, positions(1) select case(IO_lc(IO_stringValue(line,positions,i))) case('basic') @@ -246,7 +249,7 @@ subroutine debug_init enddo endif enddo - 100 close(fileunit) + close(fileunit) do i = 1_pInt, debug_maxNtype if (debug_level(i) == 0) & diff --git a/code/homogenization_RGC.f90 b/code/homogenization_RGC.f90 index 71b786e0b..5f2a988fe 100644 --- a/code/homogenization_RGC.f90 +++ b/code/homogenization_RGC.f90 @@ -108,8 +108,8 @@ subroutine homogenization_RGC_init(myFile) integer(pInt), parameter :: maxNchunks = 4_pInt integer(pInt), dimension(1_pInt+2_pInt*maxNchunks) :: positions integer(pInt) ::section=0_pInt, maxNinstance, i,j,e, output=-1_pInt, mySize, myInstance - character(len=64) :: tag - character(len=1024) :: line = '' + character(len=65536) :: tag + character(len=65536) :: line = '' write(6,'(/,3a)') ' <<<+- homogenization_',trim(homogenization_RGC_label),' init -+>>>' write(6,'(a)') ' $Id$' @@ -135,12 +135,12 @@ subroutine homogenization_RGC_init(myFile) rewind(myFile) - do while (IO_lc(IO_getTag(line,'<','>')) /= material_partHomogenization) ! wind forward to - read(myFile,'(a1024)',END=100) line + do while (trim(line) /= '#EOF#' .and. IO_lc(IO_getTag(line,'<','>')) /= material_partHomogenization) ! wind forward to + line = IO_read(myFile) enddo - do ! read thru sections of phase part - read(myFile,'(a1024)',END=100) line + do while (trim(line) /= '#EOF#') + line = IO_read(myFile) if (IO_isBlank(line)) cycle ! skip empty lines if (IO_getTag(line,'<','>') /= '') exit ! stop at next part if (IO_getTag(line,'[',']') /= '') then ! next section @@ -198,7 +198,7 @@ subroutine homogenization_RGC_init(myFile) endif enddo elementLooping -100 if (iand(debug_level(debug_homogenization),debug_levelExtensive) /= 0_pInt) then + if (iand(debug_level(debug_homogenization),debug_levelExtensive) /= 0_pInt) then do i = 1_pInt,maxNinstance write(6,'(a15,1x,i4)') 'instance: ', i write(6,*) diff --git a/code/homogenization_isostrain.f90 b/code/homogenization_isostrain.f90 index 6a3e8d74b..c08387fe8 100644 --- a/code/homogenization_isostrain.f90 +++ b/code/homogenization_isostrain.f90 @@ -68,8 +68,8 @@ subroutine homogenization_isostrain_init(myFile) integer(pInt), dimension(1_pInt+2_pInt*maxNchunks) :: positions integer(pInt) section, i, j, output, mySize integer :: maxNinstance, k ! no pInt (stores a system dependen value from 'count' - character(len=64) :: tag - character(len=1024) :: line = '' ! to start initialized + character(len=65536) :: tag + character(len=65536) :: line = '' ! to start initialized write(6,*) @@ -94,12 +94,12 @@ subroutine homogenization_isostrain_init(myFile) rewind(myFile) section = 0_pInt - do while (IO_lc(IO_getTag(line,'<','>')) /= material_partHomogenization) ! wind forward to - read(myFile,'(a1024)',END=100) line + do while (trim(line) /= '#EOF#' .and. IO_lc(IO_getTag(line,'<','>')) /= material_partHomogenization) ! wind forward to + line = IO_read(myFile) enddo - do ! read thru sections of phase part - read(myFile,'(a1024)',END=100) line + do while (trim(line) /= '#EOF#') + line = IO_read(myFile) if (IO_isBlank(line)) cycle ! skip empty lines if (IO_getTag(line,'<','>') /= '') exit ! stop at next part if (IO_getTag(line,'[',']') /= '') then ! next section @@ -122,7 +122,7 @@ subroutine homogenization_isostrain_init(myFile) endif enddo -100 do k = 1,maxNinstance + do k = 1,maxNinstance homogenization_isostrain_sizeState(i) = 0_pInt do j = 1_pInt,maxval(homogenization_Noutput)