Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
More references for parameters of type std::function.
[simgrid.git] / src / smpi / internals / smpi_global.cpp
index d63e822..70def16 100644 (file)
@@ -423,7 +423,7 @@ typedef std::function<int(int argc, char *argv[])> smpi_entry_point_type;
 typedef int (* smpi_c_entry_point_type)(int argc, char **argv);
 typedef void (*smpi_fortran_entry_point_type)();
 
-static int smpi_run_entry_point(smpi_entry_point_type entry_point, const std::string& executable_path,
+static int smpi_run_entry_point(const smpi_entry_point_type& entry_point, const std::string& executable_path,
                                 std::vector<std::string> args)
 {
   // copy C strings, we need them writable
@@ -661,8 +661,6 @@ static void smpi_init_privatization_no_dlopen(const std::string& executable)
 
 int smpi_main(const char* executable, int argc, char* argv[])
 {
-  srand(SMPI_RAND_SEED);
-
   if (getenv("SMPI_PRETEND_CC") != nullptr) {
     /* Hack to ensure that smpicc can pretend to be a simple compiler. Particularly handy to pass it to the
      * configuration tools */