9#include <kernel/util/dist.hpp>
10#include <kernel/util/statistics.hpp>
11#include <kernel/util/memory_usage.hpp>
31 template <
typename SystemLevelType_,
typename DomainType_>
32 static void report(
double solver_toe,
int statistics_check,
int DOXY(shape_dimension),
33 std::deque<std::shared_ptr<SystemLevelType_>> & system_levels,
37 int rank(comm.
rank());
38 int nranks(comm.
size());
42 std::size_t la_size(0);
43 std::size_t mpi_size(0);
44 for(
const auto& sl : system_levels)
46 la_size += sl->bytes();
47 mpi_size += sl->gate_sys.bytes() + sl->coarse_muxer_sys.bytes();
52 Index cells_coarse_local = domain.back()->get_mesh().get_num_elements();
53 Index cells_coarse_max;
54 Index cells_coarse_min;
57 Index cells_fine_local = domain.front()->get_mesh().get_num_elements();
63 Index dofs_coarse_local = system_levels.back()->matrix_sys.local().columns();
64 Index dofs_coarse_max;
65 Index dofs_coarse_min;
68 Index dofs_fine_local = system_levels.front()->matrix_sys.local().columns();
74 Index nzes_coarse_local = system_levels.back()->matrix_sys.local().used_elements();
75 Index nzes_coarse_max;
76 Index nzes_coarse_min;
79 Index nzes_fine_local = system_levels.front()->matrix_sys.local().used_elements();
85 if (rank == 0 && statistics_check >= 0)
94 std::cout<<flops<<
"\n\n";
95 std::cout<<op_timings<<
"\n\n";
96 std::cout<<
String(
"Domain size:").
pad_back(20) << double(domain.bytes()) / (1024. * 1024.) <<
" MByte\n";
97 std::cout<<
String(
"MPI size:").
pad_back(20) << double(mpi_size) / (1024. * 1024.) <<
" MByte\n";
98 std::cout<<
String(
"LA size:").
pad_back(20) << double(la_size) / (1024. * 1024.) <<
" MByte\n\n";
101 std::cout<<
String(
"#Mesh cells:").
pad_back(20) <<
"coarse " << cells_coarse_max <<
"/" << cells_coarse_min <<
", fine " << cells_fine_max <<
"/" << cells_fine_min <<
"\n";
102 std::cout<<
String(
"#DOFs:").
pad_back(20) <<
"coarse " << dofs_coarse_max <<
"/" << dofs_coarse_min <<
", fine " << dofs_fine_max <<
"/" << dofs_fine_min <<
"\n";
103 std::cout<<
String(
"#NZEs").
pad_back(20) <<
"coarse " << nzes_coarse_max <<
"/" << nzes_coarse_min <<
", fine " << nzes_fine_max <<
"/" << nzes_fine_min <<
"\n";
106 if (statistics_check > 0)
static void report(double solver_toe, int statistics_check, int shape_dimension, std::deque< std::shared_ptr< SystemLevelType_ > > &system_levels, DomainType_ &domain)
Create a detailed report about the application execution.
void allreduce(const void *sendbuf, void *recvbuf, std::size_t count, const Datatype &datatype, const Operation &op) const
Blocking All-Reduce.
int size() const
Returns the size of this communicator.
int rank() const
Returns the rank of this process in this communicator.
static Comm world()
Returns a copy of the world communicator.
Memory usage info object.
String get_formatted_memory_usage() const
Retrieve formatted memory usage string.
static String get_formatted_solver_tree(String target="default")
Returns a descriptive string of the complete solver tree.
static String get_formatted_times(double total_time)
Retrieve formatted time consumption overview in percent relative to some provided total time.
static double toe_solve
time of solution in seconds, needs initialization
static String get_formatted_flops(double seconds, int ranks=1)
Retrieve formatted flops per second string.
static double toe_partition
time of partitioning in seconds, needs initialization
static double toe_assembly
time of assembly in seconds, needs initialization
String class implementation.
String pad_back(size_type len, char c=' ') const
Pads the back of the string up to a desired length.
String trim(const String &charset) const
Trims the string.
const Operation op_min(MPI_MIN)
Operation wrapper for MPI_MIN.
const Operation op_max(MPI_MAX)
Operation wrapper for MPI_MAX.
std::uint64_t Index
Index data type.