Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
8f2b9dd
add distributed spmv scaling benchmark
MarcelKoch Apr 28, 2022
3ac2a09
initializes executor in solver benchmark correctly
MarcelKoch Oct 18, 2022
659863b
extracts stencil matrix generation into separate file
MarcelKoch Oct 19, 2022
51adeef
introduces intermediate matrix_type_factory map
MarcelKoch Oct 20, 2022
46b711c
simplifies stencil generation call
MarcelKoch Oct 21, 2022
92d1a39
uses json input format for scaling benchmark
MarcelKoch Oct 21, 2022
5948494
adds support for reading matrix files in distributed scaling benchmark
MarcelKoch Oct 21, 2022
ccfc418
renames scaling -> spmv benchmark
MarcelKoch Oct 21, 2022
83947bc
update doc
MarcelKoch Oct 21, 2022
66439c9
wip
MarcelKoch Oct 21, 2022
1a7031a
refactors (seq) solver benchmark
MarcelKoch Oct 24, 2022
c9be104
templates benchmark helper functions
MarcelKoch Oct 24, 2022
86fc085
removes warnings
MarcelKoch Oct 24, 2022
279b1b3
moves json set size
MarcelKoch Oct 24, 2022
ea26669
adds distributed solver benchmark
MarcelKoch Oct 24, 2022
7cbc2e5
passes in local and non-local formats as single string
MarcelKoch Oct 25, 2022
77ed4ba
refactors spmv benchmark
MarcelKoch Oct 25, 2022
812bd7e
adds distributed spmv
MarcelKoch Oct 31, 2022
287761b
enables stencil matrices for spmv similar benchmarks
MarcelKoch Oct 31, 2022
ba4b471
enables stencil matrices for seq solver benchmark
MarcelKoch Oct 31, 2022
241e11a
refactors blas and adds distributed blas
MarcelKoch Oct 31, 2022
c11ec4c
removes old distributed benchmarks
MarcelKoch Oct 31, 2022
2cd198c
restricts printing to mpi rank 0
MarcelKoch Nov 18, 2022
dd3187d
fixup namespaces after rebase
MarcelKoch Nov 18, 2022
b3aaa68
extracts input broadcasting
MarcelKoch Nov 18, 2022
d68472c
removes some code duplication
MarcelKoch Nov 18, 2022
8aafd82
fixup rebase issues
MarcelKoch Nov 18, 2022
acee19b
throws if can't generate matrix data
MarcelKoch Nov 18, 2022
a5da60a
interprets input size as global size
MarcelKoch Nov 18, 2022
04729f1
fixes stencil generation
MarcelKoch Nov 18, 2022
530acab
fixes missing include
MarcelKoch Nov 19, 2022
40c2cf5
review updates:
MarcelKoch Nov 23, 2022
67ca237
fixes distributed stencil matrix generation
MarcelKoch Nov 25, 2022
ae25fd0
review updates:
MarcelKoch Nov 28, 2022
53e7506
fixes return type in lambda
MarcelKoch Nov 29, 2022
a089931
review updates:
MarcelKoch Nov 30, 2022
05e3d24
removes special case to generate matrix with optimal comm
MarcelKoch Nov 30, 2022
ffd82c6
review updates:
MarcelKoch Jan 26, 2023
613acb3
Format files
ginkgo-bot Jan 27, 2023
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
Prev Previous commit
Next Next commit
extracts input broadcasting
  • Loading branch information
MarcelKoch committed Jan 27, 2023
commit b3aaa68458d1dd33c2b2e0f96044d690378abadd
15 changes: 1 addition & 14 deletions benchmark/blas/distributed/multi_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,7 @@ Parameters for a benchmark case are:

auto exec = executor_factory_mpi.at(FLAGS_executor)(comm.get());

std::string json_input;
if (rank == 0) {
std::string line;
while (std::cin >> line) {
json_input += line;
}
}
auto input_size = json_input.size();
comm.broadcast(exec->get_master(), &input_size, 1, 0);
json_input.resize(input_size);
comm.broadcast(exec->get_master(), &json_input[0],
static_cast<int>(input_size), 0);


std::string json_input = broadcast_json_input(std::cin, comm);
rapidjson::Document test_cases;
test_cases.Parse(json_input.c_str());
if (!test_cases.IsArray()) {
Expand Down
23 changes: 4 additions & 19 deletions benchmark/solver/distributed/solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,27 +135,12 @@ int main(int argc, char* argv[])
ss_rel_res_goal << std::scientific << FLAGS_rel_res_goal;


std::string json_input;
if (rank == 0) {
if (FLAGS_overhead) {
// Fake test case to run once
json_input += R"(
std::string json_input = FLAGS_overhead
? R"(
[{"filename": "overhead.mtx",
"optimal": {"spmv": "csr-csr"}]
)";
} else {
std::string line;
while (std::cin >> line) {
json_input += line;
}
}
}
auto input_size = json_input.size();
comm.broadcast(exec->get_master(), &input_size, 1, 0);
json_input.resize(input_size);
comm.broadcast(exec->get_master(), &json_input[0],
static_cast<int>(input_size), 0);

)"
: broadcast_json_input(std::cin, comm);
Comment thread
MarcelKoch marked this conversation as resolved.
rapidjson::Document test_cases;
test_cases.Parse(json_input.c_str());

Expand Down
14 changes: 1 addition & 13 deletions benchmark/spmv/distributed/spmv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,7 @@ int main(int argc, char* argv[])
}
}

std::string json_input;
if (rank == 0) {
std::string line;
while (std::cin >> line) {
json_input += line;
}
}
auto input_size = json_input.size();
comm.broadcast(exec->get_master(), &input_size, 1, 0);
json_input.resize(input_size);
comm.broadcast(exec->get_master(), &json_input[0],
static_cast<int>(input_size), 0);

std::string json_input = broadcast_json_input(std::cin, comm);
Comment thread
MarcelKoch marked this conversation as resolved.
rapidjson::Document test_cases;
test_cases.Parse(json_input.c_str());
if (!test_cases.IsArray()) {
Expand Down
23 changes: 23 additions & 0 deletions benchmark/utils/distributed_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,29 @@ using dist_mtx =
GlobalIndexType>;


std::string broadcast_json_input(std::istream& is,
gko::experimental::mpi::communicator comm)
{
auto exec = gko::ReferenceExecutor::create();

std::string json_input;
if (comm.rank() == 0) {
std::string line;
while (std::cin >> line) {
Comment thread
MarcelKoch marked this conversation as resolved.
Outdated
json_input += line;
}
}

auto input_size = json_input.size();
comm.broadcast(exec->get_master(), &input_size, 1, 0);
json_input.resize(input_size);
comm.broadcast(exec->get_master(), &json_input[0],
static_cast<int>(input_size), 0);

return json_input;
}


template <typename ValueType, typename IndexType>
gko::matrix_data<ValueType, IndexType> generate_matrix_data(
rapidjson::Value& test_case, gko::experimental::mpi::communicator comm)
Expand Down