256 characters is enough for material.config

larger values waste memory and decrease readability.
Still need to discuss how geom files are handled, for them longer limits make sense
This commit is contained in:
Martin Diehl 2018-07-16 12:08:22 +02:00
parent b26c4a39ef
commit a1ad18c88a
2 changed files with 8 additions and 8 deletions

View File

@ -180,9 +180,9 @@ recursive function IO_recursiveRead(fileName) result(fileContent)
implicit none
character(len=*), intent(in) :: fileName
character(len=1024), dimension(:), allocatable :: fileContent
character(len=1024), dimension(:), allocatable :: includedContent
character(len=1024) :: line
character(len=256), dimension(:), allocatable :: fileContent
character(len=256), dimension(:), allocatable :: includedContent
character(len=256) :: line
character(len=:), allocatable :: rawData
integer(pInt) :: fileLength, fileUnit,startPos,endPos,&
myTotalLines,l,includedLines, missingLines,i
@ -207,6 +207,7 @@ recursive function IO_recursiveRead(fileName) result(fileContent)
do while (startPos <= len(rawData))
l = l + 1
endPos = endPos + scan(rawData(startPos:),new_line(''))
if(endPos - startPos >256) write(6,*) 'mist'
line = rawData(startPos:endPos-1)
startPos = endPos + 1

View File

@ -109,10 +109,10 @@ subroutine config_init()
implicit none
integer(pInt) :: myDebug,i
character(len=65536) :: &
character(len=256) :: &
line, &
part
character(len=65536), dimension(:), allocatable :: fileContent
character(len=256), dimension(:), allocatable :: fileContent
logical :: jobSpecificConfig
write(6,'(/,a)') ' <<<+- config init -+>>>'
@ -187,12 +187,11 @@ subroutine parseFile(line,&
implicit none
character(len=*), dimension(:), allocatable, intent(inout) :: sectionNames
type(tPartitionedStringList), allocatable, dimension(:), intent(out) :: part
character(len=65536), dimension(:), intent(in) :: fileContent
character(len=65536),intent(out) :: line
character(len=256), dimension(:), intent(in) :: fileContent
character(len=256),intent(out) :: line
integer(pInt), allocatable, dimension(:) :: chunkPos
integer(pInt) :: s,i
character(len=65536) :: devNull
character(len=64) :: tag
logical :: echo