Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a cmake flag to not compile MSG at all
[simgrid.git] / teshsuite / xbt / parmap_bench / parmap_bench.cpp
index db7c43e..1270071 100644 (file)
@@ -1,11 +1,11 @@
-/* Copyright (c) 2012-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2012-2020. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/internal_config.h" // HAVE_FUTEX_H
 #include "xbt/parmap.hpp"
-#include <simgrid/msg.h>
+#include <simgrid/s4u/Engine.hpp>
 #include <xbt.h>
 
 #include <cstdlib>
@@ -15,9 +15,9 @@
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(parmap_bench, "Bench for parmap");
 
-#define MODES_DEFAULT 0x7
-#define ARRAY_SIZE 10007
-#define FIBO_MAX 25
+constexpr unsigned MODES_DEFAULT = 0x7;
+constexpr unsigned ARRAY_SIZE    = 10007;
+constexpr unsigned FIBO_MAX      = 25;
 
 void (*fun_to_apply)(unsigned*);
 
@@ -113,7 +113,7 @@ int main(int argc, char* argv[])
   unsigned modes = MODES_DEFAULT;
 
   xbt_log_control_set("parmap_bench.fmt:[%c/%p]%e%m%n");
-  MSG_init(&argc, argv);
+  simgrid::s4u::Engine e(&argc, argv);
 
   if (argc != 3 && argc != 4) {
     XBT_INFO("Usage: %s nthreads timeout [modes]", argv[0]);