From c01a59ae14083f59511cac96ae7ea8f058c4bc27 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 6 Aug 2013 13:40:06 -0400 Subject: Carpet: Remove aliased function Driver_TotalMemoryUsed --- Carpet/Carpet/interface.ccl | 13 ------ Carpet/Carpet/src/helpers.cc | 97 -------------------------------------------- 2 files changed, 110 deletions(-) diff --git a/Carpet/Carpet/interface.ccl b/Carpet/Carpet/interface.ccl index edd3e75a1..fe5c91d10 100644 --- a/Carpet/Carpet/interface.ccl +++ b/Carpet/Carpet/interface.ccl @@ -61,19 +61,6 @@ PROVIDES FUNCTION CCTK_MyHost WITH Carpet_MyHost LANGUAGE C PROVIDES FUNCTION CCTK_nHosts WITH Carpet_nHosts LANGUAGE C PROVIDES FUNCTION CCTK_nProcsOnHost WITH Carpet_nProcsOnHost LANGUAGE C PROVIDES FUNCTION CCTK_ProcsOnHost WITH Carpet_ProcsOnHost LANGUAGE C - - - -# Return total amount of memory used by Carpet -# These numbers report number of bytes for the current MPI process. -# They are mutually exclusive. -# The return value indicates success (0) or an error (negative). -CCTK_INT FUNCTION Driver_TotalMemoryUsed( \ - CCTK_REAL OUT metadata, \ - CCTK_REAL OUT grid_structure, \ - CCTK_REAL OUT grid_arrays, \ - CCTK_REAL OUT grid_functions) -PROVIDES FUNCTION Driver_TotalMemoryUsed WITH Carpet_TotalMemoryUsed LANGUAGE C diff --git a/Carpet/Carpet/src/helpers.cc b/Carpet/Carpet/src/helpers.cc index 83f9964d6..a34fd974c 100644 --- a/Carpet/Carpet/src/helpers.cc +++ b/Carpet/Carpet/src/helpers.cc @@ -575,101 +575,4 @@ namespace Carpet { return map0group; } - - - extern "C" - CCTK_INT Carpet_TotalMemoryUsed(CCTK_REAL* metadata, - CCTK_REAL* grid_structure, - CCTK_REAL* grid_arrays, - CCTK_REAL* grid_functions) - { - // Various metadata, excluding the small change - *metadata = 0.0 + - // memoryof(main_timer_tree) + - // memoryof(mode_timer_tree) + - memoryof(origin_space) + - memoryof(delta_space) + - // memoryof(domainspecs) + - memoryof(vhh) + - memoryof(vdd) + - memoryof(level_regridding_epochs); - // memoryof(groupdata) + - // memoryof(arrdata); - - // TODO: Add TimerNode.root(?), TimerSet.timers - - // Grid structure - *grid_structure = 0.0; - // Storage for grid arrays - *grid_arrays = 0.0; - // Storage for grid functions - *grid_functions = 0.0; - - for (size_t m=0; mtimelevels(ml, rl); - for (int lc=0; lcdata_pointer(tl, rl, lc, ml); - *grid_structure += memoryof(*d); - // TODO: add memoryof(d->_memory); - if (d->has_storage()) { - assert(d->proc() == myproc); - *grid_functions += d->size() * d->elementsize(); - } - } - } - } - } - } - } - } - } else { // not CCTK_GF - const int m = 0; - *grid_structure += 0.0 + - memoryof(*arrdata.AT(gi).AT(m).hh) + - memoryof(*arrdata.AT(gi).AT(m).dd) + - memoryof(*arrdata.AT(gi).AT(m).tt); - for (size_t vi=0; vitimelevels(ml, rl); - const int lc = 0; - for (int tl=0; tldata_pointer(tl, rl, lc, ml); - *grid_arrays += memoryof(*d); - // TODO: add memoryof(d->_memory); - if (d->has_storage()) { - assert(d->proc() == myproc); - *grid_functions += d->size() * d->elementsize(); - } - } - } - } - } - } - - return 0; - } - } // namespace Carpet -- cgit v1.2.3