Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Define context related globals as static members of Context.
[simgrid.git] / teshsuite / xbt / parmap_bench / parmap_bench.cpp
index c57a9b1..ccab38b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2012-2023. 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. */
@@ -128,12 +128,12 @@ int main(int argc, char* argv[])
   }
   timeout = atof(argv[2]);
   if (argc == 4)
-    modes = strtol(argv[2], NULL, 0);
+    modes = static_cast<unsigned>(strtoul(argv[2], nullptr, 0));
 
   XBT_INFO("Parmap benchmark with %d workers (modes = %#x)...", nthreads, modes);
   XBT_INFO("%s", "");
 
-  SIMIX_context_set_nthreads(nthreads);
+  simgrid::kernel::context::Context::set_nthreads(nthreads);
 
   XBT_INFO("Benchmark for parmap create+apply+destroy (small comp):");
   bench_all_modes(nthreads, timeout, modes, true, &fun_small_comp);