Skip to content
Open
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
24 changes: 14 additions & 10 deletions dash/examples/ex.07.locality-split/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ int main(int argc, char * argv[])
} else if (std::string(argv[1]) == "-ls") {
locality_split = true;
split_scope = DART_LOCALITY_SCOPE_NODE;
if (std::string(argv[2]) == "module") {
split_scope = DART_LOCALITY_SCOPE_MODULE;
} else if (std::string(argv[2]) == "numa") {
split_scope = DART_LOCALITY_SCOPE_NUMA;
} else if (std::string(argv[2]) == "core") {
split_scope = DART_LOCALITY_SCOPE_CORE;
}
if (argc >= 4) {
split_num_groups = static_cast<int>(strtol(argv[3], NULL, 10));
if (argc >= 3) {
if (std::string(argv[2]) == "node") {
split_scope = DART_LOCALITY_SCOPE_NODE;
} else if (std::string(argv[2]) == "module") {
split_scope = DART_LOCALITY_SCOPE_MODULE;
} else if (std::string(argv[2]) == "numa") {
split_scope = DART_LOCALITY_SCOPE_NUMA;
} else if (std::string(argv[2]) == "core") {
split_scope = DART_LOCALITY_SCOPE_CORE;
}
if (argc >= 4) {
split_num_groups = static_cast<int>(strtol(argv[3], NULL, 10));
}
}
}
}
Expand Down Expand Up @@ -76,7 +80,7 @@ int main(int argc, char * argv[])
<< endl
<< " ex.07.locality ";
if (locality_split) {
cout << "-ls " << argv[2] << " " << split_num_groups << ": "
cout << "-ls " << split_scope << " " << split_num_groups << ": "
<< "locality split into " << split_num_groups << " groups "
<< "at scope " << split_scope << endl;
} else {
Expand Down