Skip to content

Commit

Permalink
Merge pull request #228 from openmopac/godotalgorithm-patch-1
Browse files Browse the repository at this point in the history
Further delay of null file handle closing
  • Loading branch information
godotalgorithm authored Nov 17, 2024
2 parents c44737d + 2cb8ec7 commit 509a629
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/interface/mopac_api_finalize.F90
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ module subroutine mopac_finalize(properties)
! record properties
if (.not. moperr) call mopac_record(properties)

! close dummy output file to free up /dev/null
close(iw)

! collect error messages & assign NULL pointers for memory safety
if (moperr) then
properties%charge = c_null_ptr
Expand Down Expand Up @@ -91,8 +88,12 @@ module subroutine mopac_finalize(properties)
! deallocate memory
call setup_mopac_arrays(0,0)
if (mozyme) call delete_MOZYME_arrays()

! turn use_disk back on
use_disk = .true.

! close dummy output file to free up /dev/null
close(iw)
end subroutine mopac_finalize

subroutine mopac_record(properties)
Expand Down

0 comments on commit 509a629

Please sign in to comment.