Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
More doc for SMPI
[simgrid.git] / src / smpi / colls / smpi_coll.cpp
index 4daa1d5..cf22e98 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();
 }
 
@@ -283,7 +284,8 @@ static s_mpi_coll_description_t* find_coll_description(const std::string& collec
   std::string name_list = table->at(0).name;
   for (unsigned long i = 1; i < table->size(); i++)
     name_list = name_list + ", " + table->at(i).name;
-  xbt_die("Collective '%s' has no algorithm '%s'! Valid algorithms: %s.", collective.c_str(), algo.c_str(), name_list.c_str());
+  xbt_die("Collective '%s' has no algorithm '%s'! Valid algorithms: %s. Please use --help-coll for details.",
+          collective.c_str(), algo.c_str(), name_list.c_str());
 }
 
 int (*colls::gather)(const void* send_buff, int send_count, MPI_Datatype send_type, void* recv_buff, int recv_count,