Skip to content

Commit

Permalink
TEST: fix help print (openucx#874)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei-Lebedev authored and janjust committed Jan 31, 2024
1 parent bdbb99c commit 5d4f8fe
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/mpi/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static std::vector<std::string> str_split(const char *value, const char *delimit
return rst;
}

void PrintHelp()
void print_help()
{
std::cout <<
"-c, --colls <c1,c2,..>\n\tlist of collectives: "
Expand Down Expand Up @@ -168,10 +168,8 @@ static ucc_coll_type_t coll_str_to_type(std::string coll)
} else if (coll == "scatterv") {
return UCC_COLL_TYPE_SCATTERV;
} else {
std::cerr << "incorrect coll type: " << coll << std::endl;
PrintHelp();
throw std::string("incorrect coll type: ") + coll;
}
throw std::string("incorrect coll type: ") + coll;
}

static ucc_memory_type_t mtype_str_to_type(std::string mtype)
Expand Down Expand Up @@ -394,7 +392,7 @@ int init_rand_seed(int user_seed)
return seed;
}

void PrintInfo()
void print_info()
{
int world_rank;
MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
Expand Down Expand Up @@ -548,7 +546,7 @@ int main(int argc, char *argv[])
if (!err.empty() || show_help) {
if (rank == 0) {
std::cerr << "ParseArgs error:" << err << "\n\n";
PrintHelp();
print_help();
}
goto mpi_exit;
}
Expand Down Expand Up @@ -589,7 +587,7 @@ int main(int argc, char *argv[])
test->set_max_size(test_max_size);
test_rand_seed = init_rand_seed(test_rand_seed);

PrintInfo();
print_info();

for (auto inpl : inplace) {
for (auto pers : persistent) {
Expand Down

0 comments on commit 5d4f8fe

Please sign in to comment.