Skip to content

Commit

Permalink
Merge branch 'master' of gamera:/usr/local/gitroot/BoxLib
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Wang committed Aug 15, 2013
2 parents d7bbc61 + 31f91dd commit f4e7deb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
1 change: 0 additions & 1 deletion Tutorials/MultiGrid_F/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ f90sources += v_cycle.f90
f90sources += fmg_cycle.f90
f90sources += solve.f90

include ./GPackage.mak
VPATH_LOCATIONS += .

include $(BOXLIB_HOME)/Src/F_BaseLib/GPackage.mak
Expand Down
Empty file removed Tutorials/MultiGrid_F/GPackage.mak
Empty file.
31 changes: 18 additions & 13 deletions Tutorials/MultiGrid_F/main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ program main
integer :: max_iter
integer :: cycle_type
integer :: interp_type
integer :: verbose ! verbose > 2 will print arrays, so be careful with large data sets
integer :: verbose ! verbose > 2 will print arrays, so be careful with large data sets
logical :: memory_verbose ! this controls the printing of the memory stats only and is set below
integer :: rhs_type
integer :: coeffs_type
double precision :: eps
Expand Down Expand Up @@ -57,6 +58,8 @@ program main
! and OpenMP threads
call boxlib_initialize()

memory_verbose = .false.

! parallel_wtime() returns the number of wallclock-time seconds since
! the program began
start_time = parallel_wtime()
Expand Down Expand Up @@ -224,19 +227,21 @@ program main
call layout_flush_copyassoc_cache()

! Check for memory that should have been deallocated
if (parallel_IOProcessor()) then
print *, 'MEMORY STATS AT THE END OF PROGRAM'
print *, ''
if (memory_verbose) then
if (parallel_IOProcessor()) then
print *, 'MEMORY STATS AT THE END OF PROGRAM'
print *, ''
end if
call print(multifab_mem_stats(), " multifab")
call print(fab_mem_stats(), " fab")
call print(boxarray_mem_stats(), " boxarray")
call print(layout_mem_stats(), " layout")
call print(boxassoc_mem_stats(), " boxassoc")
call print(fgassoc_mem_stats(), " fgassoc")
call print(syncassoc_mem_stats(), " syncassoc")
call print(copyassoc_mem_stats(), " copyassoc")
call print(fluxassoc_mem_stats(), " fluxassoc")
end if
call print(multifab_mem_stats(), " multifab")
call print(fab_mem_stats(), " fab")
call print(boxarray_mem_stats(), " boxarray")
call print(layout_mem_stats(), " layout")
call print(boxassoc_mem_stats(), " boxassoc")
call print(fgassoc_mem_stats(), " fgassoc")
call print(syncassoc_mem_stats(), " syncassoc")
call print(copyassoc_mem_stats(), " copyassoc")
call print(fluxassoc_mem_stats(), " fluxassoc")

! parallel_wtime() returns the number of wallclock-time seconds since the program began
run_time = parallel_wtime() - start_time
Expand Down

0 comments on commit f4e7deb

Please sign in to comment.