Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Got rid of spurious flush command and simplified the driver a tad
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Dec 11, 2022
1 parent a7fb1c7 commit 69ebd88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/io/io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,6 @@ module subroutine io_dump_system(self, param)
call nc%initialize(dump_param)
call self%write_frame(nc, dump_param)
call nc%close()
! Syncrhonize the disk and memory buffer of the NetCDF file (e.g. commit the frame files stored in memory to disk)
call nc%flush(param)
end associate

idx = idx + 1
Expand Down
13 changes: 7 additions & 6 deletions src/main/swiftest_driver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,14 @@ program swiftest_driver

associate (system_history => param%system_history)
! If this is a new run, compute energy initial conditions (if energy tracking is turned on) and write the initial conditions to file.
if (param%lrestart) then
if (param%lenergy) call system%conservation_report(param, lterminal=.true.)
else
if (param%lenergy) call system%conservation_report(param, lterminal=.false.) ! This will save the initial values of energy and momentum
call system_history%take_snapshot(param,system)
call system_history%dump(param)
if (param%lenergy) then
if (param%lrestart) then
call system%conservation_report(param, lterminal=.true.)
else
call system%conservation_report(param, lterminal=.false.) ! This will save the initial values of energy and momentum
end if
end if
call system_history%take_snapshot(param,system)
call system%dump(param)

write(display_unit, *) " *************** Main Loop *************** "
Expand Down

0 comments on commit 69ebd88

Please sign in to comment.