Don't keep ACE file open during entire read_ace_table subroutine.

This commit is contained in:
Paul Romano 2012-09-05 16:07:42 -04:00
parent 4654ee4e8d
commit bd39560484

View file

@ -217,10 +217,14 @@ contains
! Read XSS array
read(UNIT=in, FMT='(4E20.0)') XSS
! Close ACE file
close(UNIT=in)
elseif (filetype == BINARY) then
! =======================================================================
! READ ACE TABLE IN BINARY FORMAT
! Open ACE file
open(UNIT=in, FILE=filename, STATUS='old', ACTION='read', &
ACCESS='direct', RECL=record_length)
@ -238,6 +242,9 @@ contains
j2 = min(length, j1 + entries - 1)
read(UNIT=IN, REC=location + i) (XSS(j), j=j1,j2)
end do
! Close ACE file
close(UNIT=in)
end if
! ==========================================================================
@ -287,8 +294,6 @@ contains
if(associated(nuc)) nullify(nuc)
if(associated(sab)) nullify(sab)
close(UNIT=in)
end subroutine read_ace_table
!===============================================================================