Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Complete "smpirun -help" [ci-skip]
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 13 Jun 2023 12:09:15 +0000 (14:09 +0200)
committerAdrien Gougeon <adrien.gougeon@ens-rennes.fr>
Thu, 15 Jun 2023 16:58:51 +0000 (18:58 +0200)
src/smpi/colls/smpi_coll.cpp
src/smpi/smpirun.in

index 4daa1d5..c2c0000 100644 (file)
@@ -255,15 +255,16 @@ std::string colls::get_smpi_coll_help()
       });
   std::ostringstream oss;
   std::string title = "Available collective algorithms (select them with \"smpi/collective_name:algo_name\"):";
-  oss << title << '\n' << std::setfill('=') << std::setw(title.length() + 1);
+  oss << title << '\n' << std::setfill('=') << std::setw(title.length() + 1) << '\n';
   for (auto const& [coll, algos] : smpi_coll_descriptions) {
     std::string line = "Collective: \"" + coll + "\"";
-    oss << '\n' << line << '\n' << std::setfill('-') << std::setw(line.length() + 1) << '\n';
+    oss << line << '\n' << std::setfill('-') << std::setw(line.length() + 1) << '\n';
     oss << std::setfill(' ') << std::left;
     for (auto const& [name, descr, _] : algos)
       oss << "  " << std::setw(max_name_len) << name << " " << descr << "\n";
-    oss << std::right;
+    oss << std::right << '\n';
   }
+  oss << "Please see https://simgrid.org/doc/latest/app_smpi.html#available-algorithms for more information.\n";
   return oss.str();
 }
 
index b52c5e1..194934f 100755 (executable)
@@ -59,6 +59,8 @@ Options:
 
   -version                   # Displays the SimGrid version (human readable)
   -git-version               # Displays the git hash of SimGrid
+  -help                      # Displays this information
+  -help-coll                 # Displays all available collective algorithms
 
 or (deprecated usage):
   $0 [-keep-temps] [-np <numprocs>] [-bandwidth <bytes/sec>] [-latency <secs>] program [program-options]
@@ -240,7 +242,7 @@ while true; do
             usage
             exit 0
             ;;
-        "--help-coll")
+        "-help-coll" | "--help-coll")
             ${WRAPPER} "@SMPIMAIN@" --help-coll
             exit 0
             ;;