Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/partition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ int main(int argc, char** argv)

wcs::Partition_Info pinfo(rnet_ptr);
pinfo.scan(cfg.verbose);
pinfo.report();
pinfo.report(cfg.dbglvl < 513);

std::cout << "objval = " << objval << std::endl;

Expand Down
25 changes: 16 additions & 9 deletions src/partition/partition_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ static void show_max_per_part(
const MaxPerPart& mpp,
const std::string& title,
size_t nparts,
const Partition_Info::graph_t& g)
const Partition_Info::graph_t& g,
bool brief_max)
{
using std::operator<<;
using namespace std;
Expand All @@ -241,10 +242,16 @@ static void show_max_per_part(
if (mx.first <= 0ul) {
continue;
}
const auto vt_str = Vertex::vt_str.at(static_cast<Vertex::vertex_type>(t+1));
for (const auto& vd: mx.second) {
const auto v_label = g[vd].get_label();
str += ' ' + vt_str + " <" + v_label + ", " + to_string(mx.first) + ">";
const auto vt_str
= Vertex::vt_str.at(static_cast<Vertex::vertex_type>(t+1));
if (brief_max) {
str += " <" + vt_str + ' ' + to_string(mx.first) + '>';
} else {
for (const auto& vd: mx.second) {
const auto v_label = g[vd].get_label();
str += ' ' + vt_str
+ " <" + v_label + ", " + to_string(mx.first) + ">";
}
}
}
cout << str << endl;
Expand Down Expand Up @@ -282,7 +289,7 @@ static void show_comm_volume_per_part(
}
}

void Partition_Info::report() const
void Partition_Info::report(bool brief_max) const
{
using std::operator<<;
using namespace std;
Expand All @@ -306,15 +313,15 @@ void Partition_Info::report() const
std::cout << "--------------------------------------";
show_max_per_part<n_types>(m_max_indegree,
"\nMaximum of indegrees of local vertices:",
m_num_parts, g);
m_num_parts, g, brief_max);

show_max_per_part<n_types>(m_max_outdegree,
"\nMaximum of outdegrees of local vertices:",
m_num_parts, g);
m_num_parts, g, brief_max);

show_max_per_part<n_types>(m_max_degree,
"\nMaximum of degrees of local vertices:",
m_num_parts, g);
m_num_parts, g, brief_max);

std::cout << "--------------------------------------";
show_sum_per_part<n_types>(m_load,
Expand Down
2 changes: 1 addition & 1 deletion src/partition/partition_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Partition_Info

void reset_num_partitions();
void scan(bool verbose = false);
void report() const;
void report(bool brief_max = false) const;

protected:
/// Network with partition info
Expand Down