Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Nov 18, 2023
1 parent be12c7d commit 5552eff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/wrench/simgrid_S4U_util/S4U_CommPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ namespace wrench {
*/
S4U_CommPort *S4U_CommPort::getTemporaryCommPort() {
if (S4U_CommPort::free_commports.empty()) {
throw std::runtime_error("S4U_CommPort::getTemporaryCommPort(): Out of commports! "
"(Increase the commport pool size with the --wrench-commport-pool-size command-line argument (default is 50000))");
throw std::runtime_error("S4U_CommPort::getTemporaryCommPort(): Out of communication ports! "
"(Increase the communication port pool size with the --wrench-commport-pool-size command-line argument (default is 50000))");
}

// std::cerr << "FREE MAILBOX: " << S4U_CommPort::free_commports.size() << "\n";
Expand Down
2 changes: 1 addition & 1 deletion src/wrench/simulation/Simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ namespace wrench {
std::cout << " (use --log=xxx.threshold=info to enable log category xxxx)\n";
std::cout << " --help-logs for detailed help on (SimGrid's) logging options/syntax)\n";
std::cout << " --help-simgrid: show full help on general Simgrid command-line arguments\n";
std::cout << " --wrench-commport-pool-size=<integer>: set the number of SimGrid commports used by WRENCH (default: 50000).\n";
std::cout << " --wrench-commport-pool-size=<integer>: set the number of communication ports used by WRENCH (default: 50000).\n";
std::cout << " This value may need to be increased, especially for simulations that simulate many\n";
std::cout << " failures, for which WRENCH has a hard time avoiding all commport-related memory leaks\n";
std::cout << " --wrench-default-control-message-size=<double>: the default size of control messages in bytes (default: 1024).\n";
Expand Down
6 changes: 3 additions & 3 deletions test/simulation/SimulationCommandLineArgumentsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,14 @@ void SimulationCommandLineArgumentsTest::do_CommPortPoolSizeArgument_test() {
int argc = 2;
auto argv = (char **) calloc(argc, sizeof(char *));
argv[0] = strdup("unit_test");
argv[1] = strdup("--wrench-commport_name-pool-size1000");
argv[1] = strdup("--wrench-commport-pool-size1000");

ASSERT_THROW(simulation->init(&argc, argv), std::invalid_argument);

argv[1] = strdup("--wrench-commport_name-pool-size=-1000");
argv[1] = strdup("--wrench-commport-pool-size=-1000");
ASSERT_THROW(simulation->init(&argc, argv), std::invalid_argument);

argv[1] = strdup("--wrench-commport_name-pool-size=1000");
argv[1] = strdup("--wrench-commport-pool-size=1000");
ASSERT_NO_THROW(simulation->init(&argc, argv));

for (int i = 0; i < argc; i++)
Expand Down

0 comments on commit 5552eff

Please sign in to comment.