Skip to content

Commit d12240f

Browse files
committed
updates
1 parent e7ca70f commit d12240f

File tree

6 files changed

+24
-36
lines changed

6 files changed

+24
-36
lines changed

src/conversions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void convert_adjlist(std::string inputfile, Converter *converter)
116116

117117
void convert(std::string basefilename, Converter *converter)
118118
{
119-
LOG(INFO) << "shuffle `" << basefilename << "'";
119+
LOG(INFO) << "converting `" << basefilename << "'";
120120
if (basefilename.empty())
121121
LOG(FATAL) << "empty file name";
122122
if (converter->done()) {

src/dbh_partitioner.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@
66

77
DbhPartitioner::DbhPartitioner(std::string basefilename)
88
{
9-
if (!is_exists(binedgelist_name(basefilename))) {
10-
Timer convert_timer;
11-
convert_timer.start();
12-
convert(basefilename, new Converter(basefilename));
13-
convert_timer.stop();
14-
LOG(INFO) << "convert time: " << convert_timer.get_time();
15-
} else
16-
LOG(INFO) << "skip conversion";
9+
Timer convert_timer;
10+
convert_timer.start();
11+
convert(basefilename, new Converter(basefilename));
12+
convert_timer.stop();
13+
LOG(INFO) << "convert time: " << convert_timer.get_time();
1714

1815
total_time.start();
1916
LOG(INFO) << "initializing partitioner";

src/hsfc_partitioner.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,11 @@
1010
HsfcPartitioner::HsfcPartitioner(std::string basefilename)
1111
: basefilename(basefilename)
1212
{
13-
if (!is_exists(binedgelist_name(basefilename))) {
14-
Timer convert_timer;
15-
convert_timer.start();
16-
convert(basefilename, new Converter(basefilename));
17-
convert_timer.stop();
18-
LOG(INFO) << "convert time: " << convert_timer.get_time();
19-
} else
20-
LOG(INFO) << "skip conversion";
13+
Timer convert_timer;
14+
convert_timer.start();
15+
convert(basefilename, new Converter(basefilename));
16+
convert_timer.stop();
17+
LOG(INFO) << "convert time: " << convert_timer.get_time();
2118

2219
total_time.start();
2320
LOG(INFO) << "initializing partitioner";

src/neighbor_partitioner.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@
55
NeighborPartitioner::NeighborPartitioner(std::string basefilename)
66
: basefilename(basefilename), rd(), gen(rd()), writer(basefilename)
77
{
8-
if (!is_exists(shuffled_binedgelist_name(basefilename))) {
9-
Timer shuffle_timer;
10-
shuffle_timer.start();
11-
convert(basefilename, new Shuffler(basefilename));
12-
shuffle_timer.stop();
13-
LOG(INFO) << "shuffle time: " << shuffle_timer.get_time();
14-
} else
15-
LOG(INFO) << "skip shuffle";
8+
Timer shuffle_timer;
9+
shuffle_timer.start();
10+
convert(basefilename, new Shuffler(basefilename));
11+
shuffle_timer.stop();
12+
LOG(INFO) << "shuffle time: " << shuffle_timer.get_time();
1613

1714
total_time.start();
1815
LOG(INFO) << "initializing partitioner";

src/random_partitioner.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@
77

88
RandomPartitioner::RandomPartitioner(std::string basefilename)
99
{
10-
if (!is_exists(binedgelist_name(basefilename))) {
11-
Timer convert_timer;
12-
convert_timer.start();
13-
convert(basefilename, new Converter(basefilename));
14-
convert_timer.stop();
15-
LOG(INFO) << "convert time: " << convert_timer.get_time();
16-
} else
17-
LOG(INFO) << "skip conversion";
10+
Timer convert_timer;
11+
convert_timer.start();
12+
convert(basefilename, new Converter(basefilename));
13+
convert_timer.stop();
14+
LOG(INFO) << "convert time: " << convert_timer.get_time();
1815

1916
total_time.start();
2017
LOG(INFO) << "initializing partitioner";

src/util.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ inline std::string binedgelist_name(const std::string &basefilename)
3838
inline std::string shuffled_binedgelist_name(const std::string &basefilename)
3939
{
4040
std::stringstream ss;
41-
ss << basefilename << "shuffled.binedgelist";
41+
ss << basefilename << ".shuffled.binedgelist";
4242
return ss.str();
4343
}
4444
inline std::string degree_name(const std::string &basefilename)
@@ -58,13 +58,13 @@ inline std::string partitioned_name(const std::string &basefilename)
5858
inline std::string hilbert_name(const std::string &basefilename)
5959
{
6060
std::stringstream ss;
61-
ss << basefilename << ".hilbert.binedgelist";
61+
ss << basefilename << ".hilbert.bin";
6262
return ss.str();
6363
}
6464
inline std::string sorted_hilbert_name(const std::string &basefilename)
6565
{
6666
std::stringstream ss;
67-
ss << basefilename << ".sorted_hilbert.binedgelist";
67+
ss << basefilename << ".sorted_hilbert.bin";
6868
return ss.str();
6969
}
7070

0 commit comments

Comments
 (0)