mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Don't keep ACE file open during entire read_ace_table subroutine.
This commit is contained in:
parent
4654ee4e8d
commit
bd39560484
1 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
!===============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue