Skip to content

Commit

Permalink
fix: root pe bug with fms2_io::flush_file (#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
uramirez8707 authored Apr 14, 2022
1 parent 7768ad1 commit 6d3c464
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fms2_io/netcdf_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2283,8 +2283,10 @@ subroutine flush_file(fileobj)

integer :: err !< Netcdf error code

err = nf90_sync(fileobj%ncid)
call check_netcdf_code(err, "Flush_file: File:"//trim(fileobj%path))
if (fileobj%is_root) then
err = nf90_sync(fileobj%ncid)
call check_netcdf_code(err, "Flush_file: File:"//trim(fileobj%path))
endif
end subroutine flush_file

end module netcdf_io_mod
Expand Down

0 comments on commit 6d3c464

Please sign in to comment.