allow for longer pathes when openening files
corrected error messages concerning file openening
This commit is contained in:
parent
97db70cf23
commit
9c63005c8f
|
@ -52,7 +52,7 @@
|
|||
endif
|
||||
enddo
|
||||
else
|
||||
call IO_error(100) ! cannot open input file
|
||||
call IO_error(101) ! cannot open input file
|
||||
endif
|
||||
|
||||
100 close(fileunit)
|
||||
|
|
12
code/IO.f90
12
code/IO.f90
|
@ -52,8 +52,9 @@ endsubroutine
|
|||
character(len=*), parameter :: pathSep = achar(47)//achar(92) ! /, \
|
||||
character(len=*) relPath
|
||||
integer(pInt) unit
|
||||
character(256) path
|
||||
character(1024) path
|
||||
|
||||
path=''
|
||||
inquire(6, name=path) ! determine outputfile
|
||||
open(unit,status='old',err=100,file=path(1:scan(path,pathSep,back=.true.))//relPath)
|
||||
IO_open_file = .true.
|
||||
|
@ -75,9 +76,10 @@ endsubroutine
|
|||
|
||||
integer(pInt), intent(in) :: unit
|
||||
integer(pInt) extPos
|
||||
character(256) outName
|
||||
character(1024) outName
|
||||
character(3) ext
|
||||
|
||||
outName=''
|
||||
inquire(6, name=outName) ! determine outputfileName
|
||||
extPos = len_trim(outName)-2
|
||||
! if(outName(extPos:extPos+2)=='out') then
|
||||
|
@ -788,7 +790,7 @@ endfunction
|
|||
use prec, only: pReal,pInt
|
||||
implicit none
|
||||
|
||||
integer(pInt) unit,i,j,l,count
|
||||
integer(pInt) unit,l,count
|
||||
integer(pInt) IO_countContinousIntValues
|
||||
integer(pInt), parameter :: maxNchunks = 64
|
||||
integer(pInt), dimension(1+2*maxNchunks) :: pos
|
||||
|
@ -948,7 +950,9 @@ endfunction
|
|||
case (50)
|
||||
msg = 'Error writing constitutive output description'
|
||||
case (100)
|
||||
msg = 'Error reading from configuration file'
|
||||
msg = 'Cannot open config file'
|
||||
case (101)
|
||||
msg = 'Cannot open input file'
|
||||
case (105)
|
||||
msg = 'Error reading from ODF file'
|
||||
case (110)
|
||||
|
|
|
@ -675,7 +675,7 @@ subroutine lattice_init()
|
|||
write(6,*) '$Id$'
|
||||
write(6,*)
|
||||
|
||||
if(.not. IO_open_file(fileunit,material_configFile)) call IO_error (100) ! corrupt config file
|
||||
if(.not. IO_open_file(fileunit,material_configFile)) call IO_error(100) ! cannot open config file
|
||||
Nsections = IO_countSections(fileunit,material_partPhase)
|
||||
lattice_Nstructure = 2_pInt + sum(IO_countTagInPart(fileunit,material_partPhase,'covera_ratio',Nsections)) ! fcc + bcc + all hex
|
||||
! lattice_Nstructure = Nsections + 2_pInt ! most conservative assumption
|
||||
|
|
|
@ -81,7 +81,7 @@ subroutine material_init()
|
|||
write(6,*) '$Id$'
|
||||
write(6,*)
|
||||
|
||||
if(.not. IO_open_file(fileunit,material_configFile)) call IO_error (100) ! corrupt config file
|
||||
if(.not. IO_open_file(fileunit,material_configFile)) call IO_error(100) ! cannot open config file
|
||||
call material_parseHomogenization(fileunit,material_partHomogenization)
|
||||
call material_parseMicrostructure(fileunit,material_partMicrostructure)
|
||||
call material_parseTexture(fileunit,material_partTexture)
|
||||
|
|
|
@ -242,7 +242,7 @@
|
|||
|
||||
parallelExecution = (mesh_Nelems == mesh_NcpElems) ! plus potential killer from non-local constitutive
|
||||
else
|
||||
call IO_error(100) ! cannot open input file
|
||||
call IO_error(101) ! cannot open input file
|
||||
endif
|
||||
|
||||
FEsolving_execElem = (/1,mesh_NcpElems/)
|
||||
|
|
Loading…
Reference in New Issue