Skip to content

Commit

Permalink
Merge pull request mom-ocean#1264 from mathomp4/feature/mathomp4/use-…
Browse files Browse the repository at this point in the history
…flush-function

Use flush function instead of subroutine/extension
  • Loading branch information
marshallward authored Dec 2, 2020
2 parents ca3ff96 + 7a2f645 commit c6074a9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config_src/solo_driver/MOM_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ program MOM_main
!$ call omp_set_num_threads(ocean_nthreads)
!$OMP PARALLEL
!$ write(6,*) "ocean_solo OMPthreading ", fms_affinity_get(), omp_get_thread_num(), omp_get_num_threads()
!$ call flush(6)
!$ flush(6)
!$OMP END PARALLEL

! Read ocean_solo restart, which can override settings from the namelist.
Expand Down
4 changes: 2 additions & 2 deletions src/diagnostics/MOM_PointAccel.F90
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ subroutine write_u_accel(I, j, um, hin, ADp, CDp, dt_in_T, G, GV, US, CS, vel_rp

write(file,'(2/)')

call flush(file)
flush(file)
endif

end subroutine write_u_accel
Expand Down Expand Up @@ -722,7 +722,7 @@ subroutine write_v_accel(i, J, vm, hin, ADp, CDp, dt_in_T, G, GV, US, CS, vel_rp

write(file,'(2/)')

call flush(file)
flush(file)
endif

end subroutine write_v_accel
Expand Down
2 changes: 1 addition & 1 deletion src/framework/MOM_domains.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ subroutine MOM_domains_init(MOM_dom, param_file, symmetric, static_memory, &
!$ call fms_affinity_set('OCEAN', ocean_omp_hyper_thread, ocean_nthreads)
!$ call omp_set_num_threads(ocean_nthreads)
!$ write(6,*) "MOM_domains_mod OMPthreading ", fms_affinity_get(), omp_get_thread_num(), omp_get_num_threads()
!$ call flush(6)
!$ flush(6)
!$ endif
#endif
call log_param(param_file, mdl, "!SYMMETRIC_MEMORY_", MOM_dom%symmetric, &
Expand Down
4 changes: 2 additions & 2 deletions src/framework/MOM_write_cputime.F90
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ subroutine MOM_write_cputime_end(CS)

! Flush and close the output files.
if (is_root_pe() .and. CS%fileCPU_ascii > 0) then
call flush(CS%fileCPU_ascii)
flush(CS%fileCPU_ascii)
call close_file(CS%fileCPU_ascii)
endif

Expand Down Expand Up @@ -200,7 +200,7 @@ subroutine write_cputime(day, n, CS, nmax, call_end)
reday, n, (CS%cputime2 / real(CLOCKS_PER_SEC)), &
d_cputime / real(CLOCKS_PER_SEC)

call flush(CS%fileCPU_ascii)
flush(CS%fileCPU_ascii)
endif
CS%previous_calls = CS%previous_calls + 1

Expand Down

0 comments on commit c6074a9

Please sign in to comment.