ports/benchmarks/imb/files/patch-src__cpp_args__parser.cpp
Thierry Thomas 3eb5a6be9e benchmarks/imb: upgrade to 2021.3
This port was very outdated: releases notes are available at
<https://github.com/intel/mpi-benchmarks/releases>.

The PDF is no more included but the user guide is available at
<https://software.intel.com/en-us/imb-user-guide>.

Also modernize the port and switch from OpenMPI 3 to OpenMPI4 (optiopnal,
MPICH still being the default).
2023-04-16 10:18:59 +02:00

24 lines
1.1 KiB
C++

--- src_cpp/args_parser.cpp.orig 2021-10-01 13:09:19 UTC
+++ src_cpp/args_parser.cpp
@@ -299,7 +299,7 @@ void args_parser::print_help_advice() const {
#endif
void args_parser::print_help_advice() const {
- sout << "Try \"" << basename(argv[0]) << " " << option_starter << "help\" for usage information" << endl;
+ sout << "Try \"" << basename(const_cast<char*>(argv[0])) << " " << option_starter << "help\" for usage information" << endl;
}
// NOTE: This one is just to loop over expected_args 2-level array in a easier way.
@@ -381,10 +381,10 @@ void args_parser::print_help() const {
void args_parser::print_help() const {
if (program_name.size() != 0)
sout << program_name << endl;
- sout << "Usage: " << basename(argv[0]) << " ";
+ sout << "Usage: " << basename(const_cast<char*>(argv[0])) << " ";
string header;
header += "Usage: ";
- header += basename(argv[0]);
+ header += basename(const_cast<char*>(argv[0]));
header += " ";
size_t size = min(header.size(), (size_t)16);
string tab(size - 2, ' ');