MADNESS 0.10.1
|
measure the memory usage of all FunctionImpl objects of all worlds More...
Classes | |
struct | MemInfo |
struct | MemKey |
Public Member Functions | |
void | clear_map () |
reset the memory map | |
void | measure_and_print (World &world) |
measure the memory usage of all objects of all worlds | |
std::map< std::string, double > | memory_per_host (World &world) const |
accumulate the memory usage of all objects of all worlds over all ranks per host | |
std::map< std::string, double > | memory_per_host_local () const |
accumulate the memory usage of all objects of all worlds for this rank per host | |
void | print_memory_map (World &world, std::string msg="") |
void | search_all_worlds () |
void | search_world (World &world) |
double | total_memory (World &world) const |
return the total memory usage over all hosts | |
Static Public Member Functions | |
static double | get_rss_usage_in_GB () |
Private Types | |
typedef std::map< MemKey, MemInfo > | MemInfoMapT |
Private Member Functions | |
template<typename T , std::size_t NDIM> | |
void | add_memory_to_map (const FunctionImpl< T, NDIM > &f) |
template<typename T , std::size_t NDIM> | |
const FunctionImpl< T, NDIM > * | cast_to_funcimpl_ptr (const uniqueidT obj_id) |
Private Attributes | |
MemInfoMapT | world_memory_map |
keeps track of the memory usage of all objects of one or many worlds on this rank | |
measure the memory usage of all FunctionImpl objects of all worlds
Assuming FunctionImpl are the largest objects in a calculation data is kept as key-value pairs in a map: key=world_id,rank,hostname,NDIM, value=#functions,memory_GB
|
private |
|
inlineprivate |
References madness::f, NDIM, madness::print(), T(), and world_memory_map.
Referenced by search_world().
|
inlineprivate |
|
inline |
reset the memory map
References world_memory_map.
|
inlinestatic |
Referenced by print_memory_map().
|
inline |
measure the memory usage of all objects of all worlds
References madness::WorldGopInterface::fence(), madness::World::gop, print_memory_map(), and search_all_worlds().
Referenced by test_size().
|
inline |
accumulate the memory usage of all objects of all worlds over all ranks per host
References madness::World::gop, memory_per_host(), memory_per_host_local(), and madness::WorldGopInterface::sum().
Referenced by memory_per_host(), memory_per_host_local(), and print_memory_map().
|
inline |
accumulate the memory usage of all objects of all worlds for this rank per host
References memory_per_host(), and world_memory_map.
Referenced by memory_per_host(), and print_memory_map().
|
inline |
[in] | msg | a message to print before the memory map |
[in] | world | used only for clean printing |
References bufsize, madness::WorldGopInterface::concat0(), madness::WorldGopInterface::fence(), get_rss_usage_in_GB(), madness::World::gop, memory_per_host(), memory_per_host_local(), madness::print(), madness::World::rank(), madness::WorldGopInterface::sum(), and world_memory_map.
Referenced by measure_and_print(), and test_size().
|
inline |
add all FunctionImpl<T,NDIM> objects of all worlds to the memory map the memory map is a rank-local object
References madness::World::exists(), madness::World::get_world_ids(), madness::print(), search_world(), and madness::World::world_from_id().
Referenced by measure_and_print(), and test_size().
|
inline |
add all FunctionImpl<T,NDIM> objects of the given world to the memory map the memory map is a rank-local object
References add_memory_to_map(), madness::World::get_object_ids(), madness::print(), and madness::World::rank().
Referenced by search_all_worlds(), and test_size().
|
inline |
return the total memory usage over all hosts
References madness::World::gop, madness::WorldGopInterface::sum(), total_memory(), and world_memory_map.
Referenced by test_size(), and total_memory().
|
private |
keeps track of the memory usage of all objects of one or many worlds on this rank
Referenced by add_memory_to_map(), clear_map(), memory_per_host_local(), print_memory_map(), and total_memory().