Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge remote-tracking branch 'upstream/master'
authoronesphore <ndayishimiye.o@husky.neu.edu>
Wed, 27 Jun 2018 12:57:16 +0000 (14:57 +0200)
committeronesphore <ndayishimiye.o@husky.neu.edu>
Wed, 27 Jun 2018 12:57:16 +0000 (14:57 +0200)
(Boost has been upgraded in the remote repo)

260 files changed:
.circleci/config.yml
.gitignore
.mailmap
.travis.yml
CMakeLists.txt
ChangeLog
FindSimGrid.cmake
NEWS
README.md
doc/Doxyfile.in
doc/doxygen/inside_extending.doc
doc/doxygen/inside_release.doc
doc/doxygen/module-smpi.doc
doc/doxygen/ns3.doc
doc/doxygen/options.doc
doc/doxygen/platform.doc
doc/doxygen/uhood_switch.doc
examples/s4u/actor-migration/s4u-actor-migration.cpp
examples/s4u/cloud-capping/s4u-cloud-capping.cpp
examples/s4u/cloud-capping/s4u-cloud-capping.tesh
examples/s4u/cloud-migration/s4u-cloud-migration.cpp
examples/s4u/cloud-simple/s4u-cloud-simple.cpp
examples/s4u/dht-chord/s4u-dht-chord.tesh
examples/s4u/dht-kademlia/s4u-dht-kademlia.tesh
examples/s4u/energy-exec/s4u-energy-exec.cpp
examples/s4u/engine-filtering/s4u-engine-filtering.cpp
examples/s4u/exec-dvfs/s4u-exec-dvfs.cpp
examples/s4u/exec-remote/s4u-exec-remote.cpp
examples/s4u/io-file-system/s4u-io-file-system.cpp
examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp
examples/s4u/mutex/s4u-mutex.cpp
examples/s4u/platform-properties/s4u-platform-properties.cpp
examples/s4u/plugin-hostload/s4u-plugin-hostload.cpp
examples/simdag/test/sd_test.cpp
examples/smpi/CMakeLists.txt
examples/smpi/replay/actions1.txt
examples/smpi/replay/actions_allgatherv.txt
examples/smpi/replay/actions_allreduce.txt [moved from examples/smpi/replay/actions_allReduce.txt with 62% similarity]
examples/smpi/replay/actions_alltoall.txt
examples/smpi/replay/actions_alltoallv.txt
examples/smpi/replay/actions_reducescatter.txt
examples/smpi/replay/actions_waitall.txt
examples/smpi/replay/actions_with_isend.txt
examples/smpi/replay/replay.tesh
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace0.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace1.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace10.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace11.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace12.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace13.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace14.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace15.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace16.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace17.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace18.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace19.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace2.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace20.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace21.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace22.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace23.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace24.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace25.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace26.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace27.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace28.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace29.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace3.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace30.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace31.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace4.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace5.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace6.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace7.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace8.txt
examples/smpi/replay_multiple/ti_traces_32_1/ti_trace9.txt
include/simgrid/config.h.in [moved from include/simgrid_config.h.in with 96% similarity]
include/simgrid/engine.h
include/simgrid/jedule/jedule.hpp
include/simgrid/jedule/jedule_events.hpp
include/simgrid/jedule/jedule_platform.hpp
include/simgrid/jedule/jedule_sd_binding.h
include/simgrid/kernel/future.hpp
include/simgrid/kernel/routing/ClusterZone.hpp
include/simgrid/kernel/routing/DijkstraZone.hpp
include/simgrid/kernel/routing/DragonflyZone.hpp
include/simgrid/kernel/routing/EmptyZone.hpp
include/simgrid/kernel/routing/FatTreeZone.hpp
include/simgrid/kernel/routing/FloydZone.hpp
include/simgrid/kernel/routing/FullZone.hpp
include/simgrid/kernel/routing/NetPoint.hpp
include/simgrid/kernel/routing/NetZoneImpl.hpp
include/simgrid/kernel/routing/RoutedZone.hpp
include/simgrid/kernel/routing/TorusZone.hpp
include/simgrid/kernel/routing/VivaldiZone.hpp
include/simgrid/mailbox.h [new file with mode: 0644]
include/simgrid/modelchecker.h
include/simgrid/msg.h
include/simgrid/plugins/load_balancer.h
include/simgrid/s4u/Actor.hpp
include/simgrid/s4u/Comm.hpp
include/simgrid/s4u/Engine.hpp
include/simgrid/s4u/Host.hpp
include/simgrid/s4u/Link.hpp
include/simgrid/s4u/Mutex.hpp
include/simgrid/s4u/NetZone.hpp
include/simgrid/s4u/Storage.hpp
include/simgrid/s4u/VirtualMachine.hpp
include/simgrid/simix.hpp
include/simgrid/simix/blocking_simcall.hpp
include/simgrid/smpi/replay.hpp
include/simgrid_config.h [new file with mode: 0644]
include/smpi/smpi_helpers.h
include/smpi/smpi_helpers_internal.h [new file with mode: 0644]
include/xbt/automaton.h
include/xbt/backtrace.hpp
include/xbt/base.h
include/xbt/config.hpp
include/xbt/dict.h
include/xbt/exception.hpp
include/xbt/functional.hpp
include/xbt/future.hpp
include/xbt/log.hpp
include/xbt/misc.h
include/xbt/signal.hpp
include/xbt/string.hpp
include/xbt/sysdep.h
sonar-project.properties
src/bindings/java/jmsg_as.cpp
src/bindings/java/jmsg_host.cpp
src/bindings/java/jmsg_vm.cpp
src/bindings/java/org/simgrid/NativeLib.java
src/bindings/lua/lua_platf.cpp
src/include/xbt/mmalloc.h
src/instr/instr_interface.cpp
src/instr/instr_paje_events.hpp
src/instr/instr_platform.cpp
src/instr/instr_private.hpp
src/instr/jedule/jedule.cpp
src/instr/jedule/jedule_events.cpp
src/instr/jedule/jedule_platform.cpp
src/instr/jedule/jedule_sd_binding.cpp
src/kernel/lmm/maxmin.cpp
src/kernel/routing/ClusterZone.cpp
src/kernel/routing/DijkstraZone.cpp
src/kernel/routing/DragonflyZone.cpp
src/kernel/routing/EmptyZone.cpp
src/kernel/routing/FatTreeZone.cpp
src/kernel/routing/FloydZone.cpp
src/kernel/routing/FullZone.cpp
src/kernel/routing/NetPoint.cpp
src/kernel/routing/NetZoneImpl.cpp
src/kernel/routing/RoutedZone.cpp
src/kernel/routing/TorusZone.cpp
src/kernel/routing/VivaldiZone.cpp
src/mc/AddressSpace.hpp
src/mc/DwarfExpression.cpp
src/mc/DwarfExpression.hpp
src/mc/LocationList.hpp
src/mc/ModelChecker.cpp
src/mc/ModelChecker.hpp
src/mc/Transition.hpp
src/mc/Type.hpp
src/mc/checker/CommunicationDeterminismChecker.cpp
src/mc/checker/LivenessChecker.hpp
src/mc/mc_base.cpp
src/mc/mc_dwarf.cpp
src/mc/mc_forward.hpp
src/mc/mc_record.hpp
src/mc/mc_replay.hpp
src/mc/mc_snapshot.hpp
src/mc/mc_state.cpp
src/mc/mc_state.hpp
src/mc/remote/Channel.hpp
src/mc/remote/Client.hpp
src/mc/remote/RemoteClient.hpp
src/mc/remote/RemotePtr.hpp
src/mc/remote/mc_protocol.h
src/msg/msg_global.cpp
src/msg/msg_gos.cpp
src/msg/msg_legacy.cpp
src/msg/msg_mailbox.cpp [deleted file]
src/msg/msg_process.cpp
src/plugins/dirty_page_tracking.cpp
src/plugins/file_system/s4u_FileSystem.cpp
src/plugins/host_dvfs.cpp
src/plugins/host_energy.cpp
src/plugins/host_load.cpp
src/plugins/link_energy.cpp
src/plugins/vm/VirtualMachineImpl.cpp
src/plugins/vm/VirtualMachineImpl.hpp
src/plugins/vm/VmLiveMigration.cpp
src/plugins/vm/VmLiveMigration.hpp
src/plugins/vm/s4u_VirtualMachine.cpp
src/s4u/s4u_Engine.cpp
src/s4u/s4u_Host.cpp
src/s4u/s4u_Link.cpp
src/s4u/s4u_Mailbox.cpp
src/s4u/s4u_Mutex.cpp
src/s4u/s4u_Netzone.cpp
src/simdag/sd_task.cpp
src/simgrid/sg_config.cpp
src/simix/ActorImpl.cpp
src/simix/smx_deployment.cpp
src/simix/smx_global.cpp
src/smpi/bindings/smpi_pmpi_coll.cpp
src/smpi/bindings/smpi_pmpi_request.cpp
src/smpi/include/private.hpp
src/smpi/include/smpi_group.hpp
src/smpi/internals/smpi_bench.cpp
src/smpi/internals/smpi_dvfs.cpp
src/smpi/internals/smpi_global.cpp
src/smpi/internals/smpi_replay.cpp
src/smpi/mpi/smpi_group.cpp
src/smpi/mpi/smpi_request.cpp
src/smpi/smpicxx.in
src/surf/HostImpl.cpp
src/surf/StorageImpl.hpp
src/surf/cpu_cas01.hpp
src/surf/cpu_interface.cpp
src/surf/cpu_interface.hpp
src/surf/cpu_ti.hpp
src/surf/network_cm02.cpp
src/surf/network_ns3.cpp
src/surf/ns3/ns3_simulator.hpp
src/surf/ptask_L07.hpp
src/surf/sg_platf.cpp
src/surf/xml/platf_private.hpp
src/xbt/automaton/automaton.c
src/xbt/automaton/automaton_lexer.yy.c
src/xbt/automaton/automatonparse_promela.c
src/xbt/automaton/parserPromela.lex
src/xbt/automaton/parserPromela.tab.cacc
src/xbt/automaton/parserPromela.yacc
src/xbt/backtrace.cpp
src/xbt/backtrace_dummy.cpp
src/xbt/backtrace_linux.cpp
src/xbt/cunit.cpp
src/xbt/dict.cpp
src/xbt/dict_cursor.c
src/xbt/ex.cpp
src/xbt/exception.cpp
src/xbt/mmalloc/mrealloc.c
src/xbt/string.cpp
src/xbt/xbt_main.cpp
teshsuite/s4u/cloud-interrupt-migration/cloud-interrupt-migration.cpp
teshsuite/s4u/comm-pt2pt/comm-pt2pt.cpp
teshsuite/s4u/storage_client_server/storage_client_server.cpp
teshsuite/simix/generic-simcalls/generic-simcalls.cpp
teshsuite/simix/generic-simcalls/generic-simcalls.tesh
teshsuite/smpi/CMakeLists.txt
teshsuite/smpi/mpich3-test/pt2pt/CMakeLists.txt
teshsuite/surf/lmm_usage/lmm_usage.cpp
teshsuite/surf/maxmin_bench/maxmin_bench.cpp
tools/CMakeLists.txt
tools/cmake/DefinePackages.cmake
tools/cmake/Distrib.cmake
tools/cmake/src/internal_config.h.in
tools/internal/check_dist_archive.exclude
tools/simgrid_convert_TI_traces.py [new file with mode: 0755]

index e28a06b..b241f7f 100644 (file)
@@ -16,11 +16,8 @@ jobs:
     steps:
       - checkout
       - run:
-          name: Build da stuff
+          name: Configure, build and test da stuff
           command: |
-            mkdir _build
-            pushd _build; cmake -Denable_documentation=OFF -Denable_coverage=ON -Denable_java=ON -Denable_model-checking=OFF -Denable_lua=OFF -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=OFF -Denable_compile_warnings=ON ..
-      - run:
-          name: Test da stuff
-          command: |
-            pushd _build ; make -j4 && ctest -j4 --output-on-failure
+            mkdir _build && cd _build
+            cmake -Denable_documentation=OFF -Denable_coverage=ON -Denable_java=ON -Denable_model-checking=OFF -Denable_lua=OFF -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=OFF -Denable_compile_warnings=ON ..
+            make -j4 && ctest -j4 --output-on-failure
index 31e5101..9ddacb2 100644 (file)
@@ -40,7 +40,7 @@ src/*_unit.cpp
 src/*_unit.c
 ### Generated files
 _*.c
-include/simgrid_config.h
+include/simgrid/config.h
 include/smpi/smpif.h
 src/internal_config.h
 testprog
@@ -168,6 +168,7 @@ examples/s4u/energy-boot/s4u-energy-boot
 examples/s4u/energy-exec/s4u-energy-exec
 examples/s4u/energy-link/s4u-energy-link
 examples/s4u/energy-vm/s4u-energy-vm
+examples/s4u/engine-filtering/s4u-engine-filtering
 examples/s4u/exec-async/s4u-exec-async
 examples/s4u/exec-basic/s4u-exec-basic
 examples/s4u/exec-dvfs/s4u-exec-dvfs
index 47e5d3f..65f4a89 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -30,6 +30,7 @@ Tom Cornebize <tom.cornebize@ensimag.grenoble-inp.fr> <Ezibenroc@users.noreply.g
 Gabriel Corona <gabriel.corona@loria.fr> <coron00b@barbecue.loria.fr>
 Gabriel Corona <gabriel.corona@loria.fr> <gabriel.corona@enst-bretagne.fr>
 Augustin Degomme <adegomme@gmail.com>
+Augustin Degomme <adegomme@gmail.com> <ad254919@cardamome.intra.cea.fr>
 Augustin Degomme <adegomme@gmail.com> <adegomme@users.noreply.github.com>
 Augustin Degomme <adegomme@gmail.com> <augustin.degomme@imag.fr>
 Augustin Degomme <adegomme@gmail.com> <augustin.degomme@unibas.ch>
@@ -85,6 +86,7 @@ Pierre Navarro <pierre.navarro@imag.fr> <pierre@workhorse-2.local>
 Lucas Nussbaum <lucas.nussbaum@loria.fr> <lucas@lucas-nussbaum.net>
 Tien-Dat Phan <tien-dat.phan@irisa.fr>
 Martin Quinson <martin.quinson@ens-rennes.fr> <(no author)@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
+Martin Quinson <martin.quinson@ens-rennes.fr> <624847+mquinson@users.noreply.github.com>
 Martin Quinson <martin.quinson@ens-rennes.fr> <martin.quinson@irisa.fr>
 Martin Quinson <martin.quinson@ens-rennes.fr> <martin.quinson@loria.fr>
 Martin Quinson <martin.quinson@ens-rennes.fr> <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
index fcb08e6..f681cea 100644 (file)
@@ -13,13 +13,16 @@ compiler:
 #  - clang 
 addons:
   apt:
+    update: true
+    sources:
+    - sourceline: ppa:samuel-bachmann/boost # Get boost 1.60 for Trusty
     packages:
     - cmake
     - valgrind
     - default-jdk
     - gfortran
-    - libboost-dev
-    - libboost-all-dev
+    - libboost1.60-dev
+    - libboost1.60-all-dev
     - libdw-dev
     - libevent-dev
     - libunwind8-dev
index 28492c4..ca7a1da 100644 (file)
@@ -105,7 +105,7 @@ endif()
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
 
 set(SIMGRID_VERSION_MAJOR "3")
-set(SIMGRID_VERSION_MINOR "19")
+set(SIMGRID_VERSION_MINOR "20")
 set(SIMGRID_VERSION_PATCH "90")
 set(SIMGRID_VERSION_EXTRA "-DEVEL") # Extra words to add to version string (e.g. -rc1)
 
@@ -615,11 +615,11 @@ endif()
 
 # Avoid triggering a (full) rebuild by touching the files if they did not really change
 configure_file("${CMAKE_HOME_DIRECTORY}/tools/cmake/src/internal_config.h.in" "${CMAKE_BINARY_DIR}/src/internal_config.h.generated"    @ONLY IMMEDIATE)
-configure_file("${CMAKE_HOME_DIRECTORY}/include/simgrid_config.h.in"          "${CMAKE_BINARY_DIR}/include/simgrid_config.h.generated" @ONLY IMMEDIATE)
+configure_file("${CMAKE_HOME_DIRECTORY}/include/simgrid/config.h.in"          "${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated" @ONLY IMMEDIATE)
 execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/src/internal_config.h.generated ${CMAKE_BINARY_DIR}/src/internal_config.h)
-execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/simgrid_config.h.generated ${CMAKE_BINARY_DIR}/include/simgrid_config.h)
+execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated ${CMAKE_BINARY_DIR}/include/simgrid/config.h)
 file(REMOVE ${CMAKE_BINARY_DIR}/src/internal_config.h.generated)
-file(REMOVE ${CMAKE_BINARY_DIR}/include/simgrid_config.h.generated)
+file(REMOVE ${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated)
 
 # We need two versions of the SMPI scripts because they contain the path to the library
 # so, it depends of whether SimGrid is installed, or run from the sources (during the build)
@@ -679,7 +679,7 @@ endif()
 
 set(generated_headers_to_install
   ${CMAKE_CURRENT_BINARY_DIR}/include/smpi/mpif.h
-  ${CMAKE_CURRENT_BINARY_DIR}/include/simgrid_config.h
+  ${CMAKE_CURRENT_BINARY_DIR}/include/simgrid/config.h
   )
 
 set(generated_headers  ${CMAKE_CURRENT_BINARY_DIR}/src/internal_config.h )
@@ -700,7 +700,7 @@ set(generated_files_to_clean
 if(NOT "${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_HOME_DIRECTORY}")
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions0.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions0.txt COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions1.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions1.txt COPYONLY)
-  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_allReduce.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_allReduce.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_allreduce.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_allreduce.txt COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_barrier.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_barrier.txt COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_bcast.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_bcast.txt COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_with_isend.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_with_isend.txt COPYONLY)
@@ -754,7 +754,7 @@ if(NOT "${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_HOME_DIRECTORY}")
     ${generated_files_to_clean}
     ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions0.txt
     ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions1.txt
-    ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_allReduce.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_allreduce.txt
     ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_barrier.txt
     ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_bcast.txt
     ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_with_isend.txt
@@ -857,9 +857,9 @@ foreach(line ${config_output})
   message("   ${line}")
 endforeach()
 message("##########################################")
-message("####   Content of simgrid_config.h    ####")
+message("####   Content of simgrid/config.h    ####")
 message("##########################################")
-file(STRINGS ${CMAKE_CURRENT_BINARY_DIR}/include/simgrid_config.h config_output)
+file(STRINGS ${CMAKE_CURRENT_BINARY_DIR}/include/simgrid/config.h config_output)
 LIST(REMOVE_AT config_output 0 1 2 3 4 5 6 7 8 9 -1) # Pass the file header
 foreach(line ${config_output})
   message("   ${line}")
index fd2e22e..a4ff839 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,36 +1,89 @@
-SimGrid (3.20) NOT RELEASED YET (Release target: June 21. 2018 10:07 UTC)
+SimGrid (3.21) NOT RELEASED (Release Target: September 23. 2018, 1:54 UTC)
+
+
+
+
+SimGrid (3.20) Released June 24. 2018
+
+The proxy snake_case() release.
+
+S4U:
+ - The whole API is now using snake_case() instead of mixing it with camelCase.
+   Compatibility wrappers in place for one year.
+ - We took the opportunity to increase the consistency of the API.
+   Please report any remaining glitches.
+ - New function simgrid::s4u::Host::get_actor_count:
+   Returns the number of actors running on a specific host.
+
+SMPI:
+ - SMPI is now tested with ~45 proxy apps from various sources, with none or
+   only minor patching needed: check https://github.com/simgrid/SMPI-proxy-apps
+ - Replay: The replay file has been re-written in C++.
+ - Replay: Tags used for messages sent via MPI_Send / MPI_Recv are now
+   supported. They are stored in the trace and used when replayed.
+ - Basic support of MPI_Cancel. Robustness not guaranteed.
+ - Support of MPI_Win_allocate_shared, MPI_Win_shared_query, MPI_Comm_split_type
+   (only for MPI_COMM_TYPE_SHARED).
+ - New option: smpi/privatize-libs, to add external shared libs to be privatized
+   by SMPI. They will be copied locally and loaded separately by each process.
+   Example --cfg=smpi/privatize-libs:"libgfortran.so.3;libscalapack.so".
+ - Tracing: add tracing for MPI_Start, Startall, Testall, Testany
+ - Interception of getopt, getopt_long and getopt_long_only calls to avoid issues
+   with internal index optind with multiple processes. Only works if MPI_Init has
+   already been called.
+ - Fortran: SMPI builds a mpi.mod file which should allow use of "use mpi"
+   syntax without preprocessing tricks.
 
 TRACE
  - Change --cfg=tracing/msg/vm to --cfg=tracing/vm as virtual machine
    behavior tracing is no longer limited to MSG
-
-S4U:
- - Introduced new function simgrid::s4u::Host::get_actor_count. This function
-   returns the number of actors running on a specific host.
+ - TIT (Time Independent Traces): We finally support tags. Unfortunately,
+   this means that traces now need to be updated or re-obtained; both Irecv
+   and Isend lines in your traces have now in total 5 mandatory fields:
+      <rankid> <command> <to/from rankid> <tag> <size>
+   To update your traces, it suffices to add a 0 for the tag here.
+ - TIT now also supports waiting for a distinct request via MPI_Wait.
+   Wait/Test now wait for a specific request, not just the last one that was
+   issued. This unfortunately means another update, because we need to
+   identify which request you want to wait for. We do this via the
+   triplet (sender, receiver, tag), which needs to be added:
+      <rankid> <command> <sender> <receiver> <tag>
+ - Actions are now in lower case (e.g., "allReduce" becomes "allreduce").
+   New script simgrid_convert_TI_traces.py: upgrade your TI traces.
+
+MSG
+ - The deprecation of MSG is ongoing (but this should not impact you).
+   Many MSG functions are now simple wrappers on the C API of S4U. If
+   you wish to convert your code to S4U, find the S4U counterparts of
+   your MSG calls in src/msg/msg_legacy.cpp.
+ - MSG can still be used, but won't evolve anymore.
 
 Plugins:
- - Allow to run the Link energy plugin from the command line with 
+ - Allow to run the Link energy plugin from the command line with
    --cfg=plugin:link_energy
  - Rename Energy plugin into host_energy
  - Rename Load plugin into host_load
 
 simix:
  - Add parameter --cfg=simix/breakpoint to raise a SIGTRAP at given time.
-
-SMPI:
- - Replay: The replay file has been re-written in C++.
- - Replay: Tags used for messages sent via MPI_Send / MPI_Recv are now
-   supported. They are stored in the trace and used when replayed.
+ - kill simix::onDeadlock() that was somewhat dupplicating s4u::on_deadlock()
+ - Improve performance when handling timeouts of simix synchros.
 
 XBT:
  - Config: the C API is now deprecated (will be removed in 3.23), and
            the C++ API has been slightly improved.
 
+Other:
+ - Fix several build issues on OSX.
+ - Move simgrid_config.h to simgrid/config.h (old header still working)
+
 Fixed bugs:
  - #143: Setting a breakpoint at a given time
+ - #150: Inconsistent event names in SMPI replay
  - #258: daemonized actors hang after all non-daemonized actors have completed
  - #267: Linker error on unit_tmgr
- - #269: SMPI : tracing of MPI_Wait/all/any broken
+ - #269: SMPI: tracing of MPI_Wait/all/any broken
+ - SMPI: Fix various crashes with combined use of MPI_PROC_NULL and MPI_IGNORE_STATUS 
 
 ----------------------------------------------------------------------------
 
@@ -133,7 +186,9 @@ SimGrid (3.19) Released March 20 2018
  Fixed bugs:
  - #194: Feature request: simgrid::s4u::Comm::test_any()
  - #245: migrating an actor does not migrate its execution
+ - #253: Feature Request: expose clusters as objects
  - #254: Something seems wrong with s4u::Actor::kill(aid_t)
+ - #255: Tesh broken on Windows
  - #256: Modernize FindSimGrid.cmake
  - #257: Fix (ab)use of CMake install
 
@@ -185,7 +240,7 @@ SimGrid (3.18) Released December 24 2017
  Virtual Machines
  - Live migration is getting moved to a plugin. Dirty page tracking is
    the first part of this plugin. This imply that VM migration is now
-   only possible if one this function is called :
+   only possible if one this function is called:
     - C/MSG: MSG_vm_live_migration_plugin_init()
     - C/C++: sg_vm_live_migration_plugin_init()
     - Java:  Msg.liveMigrationInit()
@@ -336,12 +391,12 @@ SimGrid (3.16) Released June 22. 2017.
  SMPI
   - New algorithm to privatize globals: dlopen, with dynamic loading tricks
   - New option: smpi/keep-temps to not cleanup temp files
-  - New option : smpi/shared-malloc-blocksize . Relevant only when global shared
+  - New option: smpi/shared-malloc-blocksize . Relevant only when global shared
     mallocs mode is used, allows to change the size of the fake file used
     (default 1MB), to potentially limit the number of mappings for large runs.
   - Support for sparse privatized malloc with SMPI_PARTIAL_SHARED_MALLOC()
   - Fortran ifort and flang compilers support
-  - New RMA calls supported (experimental) :
+  - New RMA calls supported (experimental):
       - MPI_Win_allocate, MPI_Win_create_dynamic, MPI_Win_attach
       - MPI_Win_detach, MPI_Win_set_info, MPI_Win_get_info
       - MPI_Win_lock_all, MPI_Win_unlock_all, MPI_Win_flush
@@ -502,9 +557,9 @@ SimGrid (3.14) Released December 24. 2016
 
  * smpirun script should be (much) faster for large deployments.
 
- * SMPI tracing : fixed issue with poor matching of send/receives.
+ * SMPI tracing: fixed issue with poor matching of send/receives.
 
- * Replay : Fix broken waitall
+ * Replay: Fix broken waitall
 
  New functions and features
  * MSG_parallel_task_execute_with_timeout, to timeout computations.
@@ -756,7 +811,7 @@ SimGrid (3.12) stable; urgency=low
 
  SMPI:
  * New functions
-   - Onesided early support for : MPI_Win_(create, free, fence, get_name, set_name, get_group), MPI_Get, MPI_Put, MPI_Accumulate, MPI_Alloc_mem, MPI_Free_mem.
+   - Onesided early support for: MPI_Win_(create, free, fence, get_name, set_name, get_group), MPI_Get, MPI_Put, MPI_Accumulate, MPI_Alloc_mem, MPI_Free_mem.
    - MPI_Keyval*, MPI_Attr* functions, as well as MPI_Comm_attr*, MPI_Type_attr* variants (C only, no Fortran support yet)
    - MPI_Type_set_name, MPI_Type_get_name
    - MPI_*_c2f and MPI_*_f2c functions
@@ -765,13 +820,13 @@ SimGrid (3.12) stable; urgency=low
    - Activate a lot of new tests from the mpich 3 testsuite
  * Features
    - Constant times can be injected inside MPI_Wtime and MPI_Test through options smpi/wtime and smpi/test
-   - InfiniBand network model added : Based on the works of Jerome Vienne
+   - InfiniBand network model added: Based on the works of Jerome Vienne
      http://mescal.imag.fr/membres/jean-marc.vincent/index.html/PhD/Vienne.pdf
    - When smpi/display_timing is set, also display global simulation time and application times
    - Have smpirun, smpicc and friends display the simgrid git hash version on --git-version
  * Collective communications
    - SMP-aware algorithms are now dynamically handled. An internal communicator is created for each node, and an external one to handle communications between "leaders" of each node
-   - MVAPICH2 (1.9) collective algorithms selector : normal and SMP algorithms are handled, and selection logic is based on the one used on TACC's Stampede cluster (https://www.tacc.utexas.edu/stampede/).
+   - MVAPICH2 (1.9) collective algorithms selector: normal and SMP algorithms are handled, and selection logic is based on the one used on TACC's Stampede cluster (https://www.tacc.utexas.edu/stampede/).
    - Support for Rabenseifner Reduce/Allreduce algorithms (https://fs.hlrs.de/projects/par/mpi//myreduce.html)
  * Replay
    - Replay now uses algorithms from wanted collective selector
@@ -779,7 +834,7 @@ SimGrid (3.12) stable; urgency=low
    - Memory occupation of replay should now be contained (temporary buffers allocated in collective algorithms should be shared between processes)
    - Replay can now replay several traces at the same time (check examples/smpi/replay_multiple example), to simulate interactions between several applications on a given platform. User can specify the start time of each instance. This should also allow replay + actual applications to run.
  * Bug fixes
-   - [#17799] : have mpi_group_range_incl and mpi_group_range_excl better test some corner cases
+   - [#17799]: have mpi_group_range_incl and mpi_group_range_excl better test some corner cases
    - Correctly use loopback on fat-tree clusters
    - Asynchronous small messages shouldn't trigger deadlocks anymore
  * Energy/DVFS cleanup and improvement
@@ -805,7 +860,7 @@ SimGrid (3.12) stable; urgency=low
   * New functions
    - Add a xbt_heap_update function, to avoid costly xbt_heap_remove+xbt_heap_insert use
    - Add a xbt wrapper for simcall_mutex_trylock (asked in [#17878])
-   - Add two new log appenders : rollfile and splitfile. Patch by Fabien Chaix.
+   - Add two new log appenders: rollfile and splitfile. Patch by Fabien Chaix.
    - xbt_dirname and xbt_basename for non-POSIX systems
  MC
   * The model checker now runs as a separate process.
@@ -906,18 +961,18 @@ SimGrid (3.11) stable; urgency=low
    one node.
  * Collective communication algorithms should not crash if used with
    improper number of nodes and report the error.
- * SMPI now partially supports MPI_Topologies : MPI_Cart_create, MPI_Cart_shift,
+ * SMPI now partially supports MPI_Topologies: MPI_Cart_create, MPI_Cart_shift,
    MPI_Cart_rank, MPI_Cart_get, MPI_Cart_coords, MPI_Cartdim_get,
    MPI_Dims_create, MPI_Cart_sub are supported.
  * New interface to use SMPI programmatically (still depends on MSG for
-   some parts, see examples/smpi/smpi_msg_masterslave) :
+   some parts, see examples/smpi/smpi_msg_masterslave):
    - SMPI_app_instance_register(const char *name, xbt_main_func_t code,
         int num_processes)
    - SMPI_init()
    - SMPI_finalize();
  * Global variables privatization in MPI executables is now performed at runtime
    with the option smpi/privatize_global_variables (default:no).
-   Limitations : Linux/BSD only, with mmap enabled. Global variables inside
+   Limitations: Linux/BSD only, with mmap enabled. Global variables inside
    dynamic libraries loaded by the application are not privatized (static
    linking with these libraries is advised in this case)
 
@@ -992,7 +1047,7 @@ SimGrid (3.10) stable; urgency=low
    - allows to select one in particular with --cfg=smpi/coll_name:algorithm
    - allows to use the decision logic of OpenMPI(1.7) or MPICH(3.0.4) by setting
      --cfg=smpi/coll_selector:(mpich/ompi)
- * Support for new functions : MPI_Issend, MPI_Ssend, Commutative operations in
+ * Support for new functions: MPI_Issend, MPI_Ssend, Commutative operations in
    Reduce
  * Add a --cfg:tracing/smpi/internals option, to trace internal communications
    happening inside a collective SMPI call.
@@ -1203,7 +1258,7 @@ SimGrid (3.8) stable; urgency=low
    by a SD_TASK_COMM_E2E typed task. This rate depends on both the nominal
    bandwidth on the route onto which the task is  scheduled and the amount of
    data to transfer.
-   To divide the nominal bandwidth by 2, the rate then has to be :
+   To divide the nominal bandwidth by 2, the rate then has to be:
                      rate = bandwidth/(2*amount)
  * Compute tasks that have failed can now be rescheduled and executed again
    (from their beginning)
@@ -2279,7 +2334,7 @@ SimGrid (3.3.2) stable; urgency=low
       action_free ~> action_unref
       action_change_state ~> action_state_set
       action_get_state    ~> action_state_get
-    - Change model methods into functions :
+    - Change model methods into functions:
       (model)->common_public->action_use  ~> surf_action_ref
 
   * Implement a generic resource; use it as ancestor to specific ones
@@ -2710,7 +2765,7 @@ SimGrid (3.1) stable; urgency=high
   * After a (long ?) discussion on simgrid-devel, we have decided that the
     convention we had on units was stupid. That is why it has been decided
     to move from (MBits, MFlops, seconds) to (Bits, Flops, seconds).
-    WARNING : This means that all previous platform files will not work as
+    WARNING: This means that all previous platform files will not work as
     such with this version! A warning is issued to ask users to update
     their files. [AL]
     A conversion script can be found in the contrib module of the CVS, under
@@ -3171,7 +3226,7 @@ SimGrid (2.90) unstable; urgency=low
   * REVOLUTION 1: The SimGrid project has merged with the GRAS project
     lead by Martin Quinson. As a consequence SimGrid gains a lot in
     portability, speed, and a lot more but you'll figure it out later.
-    SimGrid now comprises 3 different projects : MSG, GRAS and SMPI.
+    SimGrid now comprises 3 different projects: MSG, GRAS and SMPI.
     I wanted to release the new MSG as soon as possible and I have
     broken GRAS, which is the reason why, for now, only MSG is fully
     functional. A laconic description of these projects is available
@@ -3186,7 +3241,7 @@ SimGrid (2.90) unstable; urgency=low
 
   * REVOLUTION 3: I have tried to change a little as possible the API of
     MSG but a few things really had to disappear. The main differences
-    with the previous version are :
+    with the previous version are:
        1) no more m_links_t and the corresponding functions. Platforms are
          directly read from a XML description and cannot be hard-coded
          anymore. The same format is used for application deployment
index dd035e2..ad4792e 100644 (file)
 cmake_minimum_required(VERSION 2.8)
 
 find_path(SimGrid_INCLUDE_DIR
-  NAMES simgrid_config.h
+  NAMES simgrid/config.h
   PATHS ${SimGrid_PATH}/include /opt/simgrid/include
 )
+if (NOT SimGrid_INCLUDE_DIR)
+  # search under the old name
+  find_path(SimGrid_INCLUDE_DIR
+    NAMES simgrid_config.h
+    PATHS ${SimGrid_PATH}/include /opt/simgrid/include
+  )
+endif()    
 find_library(SimGrid_LIBRARY
   NAMES simgrid
   PATHS ${SimGrid_PATH}/lib /opt/simgrid/lib
@@ -68,7 +75,11 @@ mark_as_advanced(SimGrid_LIBRARY)
 
 if (SimGrid_INCLUDE_DIR)
   set(SimGrid_VERSION_REGEX "^#define SIMGRID_VERSION_(MAJOR|MINOR|PATCH) ([0-9]+)$")
-  file(STRINGS "${SimGrid_INCLUDE_DIR}/simgrid_config.h" SimGrid_VERSION_STRING REGEX ${SimGrid_VERSION_REGEX})
+  if (EXISTS "${SimGrid_INCLUDE_DIR}/simgrid/config.h")
+    file(STRINGS "${SimGrid_INCLUDE_DIR}/simgrid/config.h" SimGrid_VERSION_STRING REGEX ${SimGrid_VERSION_REGEX})
+  else()
+    file(STRINGS "${SimGrid_INCLUDE_DIR}/simgrid_config.h" SimGrid_VERSION_STRING REGEX ${SimGrid_VERSION_REGEX})
+  endif()
   set(SimGrid_VERSION "")
 
   # Concat the matches to MAJOR.MINOR.PATCH assuming they appear in this order
diff --git a/NEWS b/NEWS
index dc27034..c04c3f9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,24 @@
+                    _               _____  ____  _
+__   _____ _ __ ___(_) ___  _ __   |___ / |___ \/ |
+\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   __) | |
+ \ V /  __/ |  \__ \ | (_) | | | |  ___) | / __/| |
+  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)_____|_|
+               (not released)
+
+
                     _               _____  ____   ___
 __   _____ _ __ ___(_) ___  _ __   |___ / |___ \ / _ \
 \ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   __) | | | |
  \ V /  __/ |  \__ \ | (_) | | | |  ___) | / __/| |_| |
   \_/ \___|_|  |___/_|\___/|_| |_| |____(_)_____|\___/
-               (NOT RELEASED)
+               June 24. 2018
+
+The proxy snake_case() release.
+
+ * Sanitize the public API. Compatibility wrappers in place for one year.
+ * More CI: ~45 Proxy Apps + BigDFT + StarPU now tested nightly
+ * MPI: Port the trace replay engine to C++, fix visualization
+ * (+ the classical bug fixes and doc improvement)
 
                     _               _____  _  ___   _
 __   _____ _ __ ___(_) ___  _ __   |___ / / |/ _ \ / |
index ad666ce..7656083 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,5 +1,6 @@
 [![Travis Status](https://travis-ci.org/simgrid/simgrid.svg?branch=master)](https://travis-ci.org/simgrid/simgrid)
 [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/gvcssh340fwtoc35?svg=true)](https://ci.appveyor.com/project/mquinson/simgrid)
+[![SonarCloud Status](https://sonarcloud.io/api/project_badges/measure?project=simgrid&metric=alert_status)](https://sonarcloud.io/dashboard/?id=simgrid)
 [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bf1bdba50440485fbda2ac19f462ccc7)](https://www.codacy.com/app/mquinson/simgrid?utm_source=github.com&amp)
 [![Doc](https://readthedocs.org/projects/pip/badge/?version=stable)](http://simgrid.gforge.inria.fr/simgrid/latest/doc/)
 [![License: LGPL v3][license-badge]](COPYING)
index 4f86868..1be4cec 100644 (file)
@@ -1461,9 +1461,9 @@ PREDEFINED             = XBT_PUBLIC= \
                          XBT_PUBLIC_DATA=extern \
                          XBT_INLINE= \
                         XBT_PRIVATE= \
-                         XBT_ATTRIB_DEPRECATED_v321(m)= \
                          XBT_ATTRIB_DEPRECATED_v322(m)= \
-                         XBT_ATTRIB_DEPRECATED_v323(m)=
+                         XBT_ATTRIB_DEPRECATED_v323(m)= \
+                         XBT_ATTRIB_DEPRECATED_v324(m)=
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
 # this tag can be used to specify a list of macro names that should be expanded.
index e13c61c..a1f1286 100644 (file)
@@ -201,7 +201,7 @@ If there is no blocking and no mutation involved (getters), you might consider
 avoiding switching to Maestro and reading directly the data you're interested
 in.
 
-For simcalls which might block, `kernelSync()` can be used. It takes a
+For simcalls which might block, `kernel_sync()` can be used. It takes a
 C++ callback and executes it immediately in maestro. This C++ callback is
 expected to return a `simgrid::kernel::Future<T>` reprensenting the operation
 in the kernal. When the operations completes, the user process is waken up
@@ -209,25 +209,25 @@ with the result:
 
 ~~~
 try {
-  std::vector<char> result = simgrid::simix::kernelSync([&] {
+  std::vector<char> result = simgrid::simix::kernel_sync([&] {
     // Fictional example, simgrid::kernel::readFile does not exist.
     simgrid::kernel::Future<std::vector<char>> result = simgrid::kernel::readFile(file);
     return result;
   });
   XBT_DEBUG("Finished reading file %s: length %zu", file, result.size());
 }
-// If the operation failed, kernelSync() throws an exception:
+// If the operation failed, kernel_sync() throws an exception:
 catch (std::runtime_error& e) {
   XBT_ERROR("Could not read file %s", file);
 }
 ~~~
 
-Asynchronous blocks can be implemented with `kernelAsync()`. It works
-like `kernelSync()` but does not block. Instead, it returns a
+Asynchronous blocks can be implemented with `kernel_async()`. It works
+like `kernel_sync()` but does not block. Instead, it returns a
 `simgrid::simix::Future` representing the operation in the process:
 
 ~~~
-simgrid::simix::Future<std:vector<char>> result = simgrid::simix::kernelSync([&] {
+simgrid::simix::Future<std:vector<char>> result = simgrid::simix::kernel_sync([&] {
   // Fictional example, simgrid::kernel::readFile does not exist.
   simgrid::kernek::Future<std::vector<char>> result = simgrid::kernel::readFile(file);
   return result;
@@ -249,7 +249,7 @@ catch (std::runtime_error& e) {
 }
 ~~~
 
-<b>Note:</b> `kernelSync(f)` could be implemented as `kernelAsync(f).get()`.
+<b>Note:</b> `kernel_sync(f)` could be implemented as `kernel_async(f).get()`.
 
 \section simgrid_dev_guide_tag What is How to add a new tag for xml files?
 
index 7422e9e..2417373 100644 (file)
@@ -53,11 +53,11 @@ cmake . && make dist
 Get the jarfiles for several OSes on the CI slaves. Use Save under to
 give a separate name to each of them.
 
-- On Jenkins: Mac OSX, Linux 64 and Linux 32 (without boost-context), FreeBSD
-- On AppVeyor: Windows 
-
-For Linux, it is safer to rebuild them in a chroot (to avoid
-boost-context and all other optional dependencies):
+- Mac OSX, FreeBSD: on Jenkins
+- Windows: on AppVeyor
+- Linux: it is safer to rebuild them in a chroot (to avoid
+  boost-context and all other optional dependencies):
+  
 \verbatim
 mkdir /tmp/build-amd64
 cp SimGrid-3.*.tar.gz /tmp/build-amd64
@@ -65,11 +65,11 @@ sudo debootstrap --arch amd64 --variant=buildd testing /tmp/build-amd64 http://d
 sudo chroot /tmp/build-amd64
 echo "proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0" >> /tmp/fstab
 mount proc /proc -t proc
-apt-get install -y cmake default-jdk libboost-dev python3 
+apt-get install -y cmake default-jdk libboost-dev python3 doxygen
 cd tmp
 tar xfz ../SimGrid*tar.gz && cd SimGrid-*
-cmake . -Denable_documentation=off -Denable_java=ON
-make -j4 && ctest -R java
+cmake . -Denable_documentation=ON -Denable_java=ON
+make -j4 && LC_ALL=C ctest -R java
 \endverbatim
 
 Once all jarfiles are in a separate directory, run the following to
@@ -77,7 +77,7 @@ merge them:
 \verbatim
 mkdir content ; cd content
 
-for j in  ../simgrid-linux64.jar ../*.jar ; do unzip -n $j ; done
+for j in  ../simgrid-linux64.jar ../simgrid*.jar ; do unzip -n $j ; done
 # The content of all jar should be the same, but I prefer using the Linux64 version by default
 #  => unpack it first, and unpack the others with -n (never overwrite)
 
@@ -120,7 +120,7 @@ the settings icon of the release you want to change.
  - Also mail some other lists (G5K users), with only the NEWS chunk
    and the link to the download section
 - Release the debian package
-  - make -C debian/rules get-orig-source
+  - make -f debian/rules get-orig-source
   - gbp import ../simgrid_XXX+dfsg.orig.tar.xz
   - dch -i "New upstream release" # + copy the NEWS into debian/changelog
   - git mv debian/libsimgrid3.XX.install debian/libsimgrid3.XY.install
@@ -129,6 +129,7 @@ the settings icon of the release you want to change.
     - libsimgrid3.XY conflicts with libsimgrid3.XX because of smpimain
 - Update the simgrid/package.py for spack: https://gitlab.inria.fr/solverstack/spack-repo
 - Create the template for the next release in ChangeLog and NEWS files
+  Release Target date: https://en.wikipedia.org/wiki/Equinox
 - Change the release number to 3.X.90 in CMakeLists.txt and sonar-project.properties
 - Deal with deprecations:
   - Introduce the XBT_ATTRIB_DEPRECATED_v??? macro for the next release.
index cf8aca9..ede94c1 100644 (file)
@@ -166,7 +166,7 @@ Most of these are best described in <a href="http://www.cs.arizona.edu/~dkl/rese
  - 2dmesh: organizes the nodes as a two dimensional mesh, and perform allgather 
    along the dimensions
  - 3dmesh: adds a third dimension to the previous algorithm
- - rdb: recursive doubling : extends the mesh to a nth dimension, each one 
+ - rdb: recursive doubling: extends the mesh to a nth dimension, each one 
    containing two nodes
  - pair: pairwise exchange, only works for power of 2 procs, size-1 steps,
    each process sends and receives from the same process at each step
index c91fa55..91950b9 100644 (file)
@@ -42,7 +42,7 @@ cmake . -Denable_ns3=ON -DNS3_HINT=/opt/ns3 # or change the path if needed
 \endverbatim
 
 By the end of the configuration, cmake reports whether ns-3 was found,
-and this information is also available in <tt>include/simgrid_config.h</tt>
+and this information is also available in <tt>include/simgrid/config.h</tt>
 If your local copy defines the variable \c SIMGRID_HAVE_NS3 to 1, then ns-3
 was correctly detected. If it's defined to 0, then something went
 wrong. Explore <tt>CMakeFiles/CMakeOutput.log</tt> and
index c643c23..9d08d71 100644 (file)
@@ -156,6 +156,7 @@ int main(int argc, char *argv[]) {
 - \c smpi/os: \ref options_model_smpi_os
 - \c smpi/papi-events: \ref options_smpi_papi_events
 - \c smpi/privatization: \ref options_smpi_privatization
+- \c smpi/privatize-libs: \ref options_smpi_privatize_libs
 - \c smpi/send-is-detached-thresh: \ref options_model_smpi_detached
 - \c smpi/shared-malloc: \ref options_model_smpi_shared_malloc
 - \c smpi/shared-malloc-hugepage: \ref options_model_smpi_shared_malloc
@@ -1037,6 +1038,24 @@ to choose between them.
 \warning
   This configuration option cannot be set in your platform file. You can only
   pass it as an argument to smpirun.
+  
+\subsection options_smpi_privatize_libs smpi/privatize-libs: Automatic privatization of
+ global variables inside external libraries
+
+Linux/BSD only: When using dlopen (default) privatization, privatize specific 
+shared libraries with internal global variables, if they can't be linked statically. 
+For example libgfortran is usually used for Fortran I/O and indexes in files 
+can be mixed up.
+
+\warning
+  This configuration option can only use either full paths to libraries, or full names.
+  Check with ldd the name of the library you want to use.
+  Example:
+  ldd allpairf90 
+    libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007fbb4d91b000)
+  Then you can use --cfg=smpi/privatize-libs:"libgfortran.so.3" or --cfg=smpi/privatize-libs:"/usr/lib/x86_64-linux-gnu/libgfortran.so.3", but not "libgfortran" or "libgfortran.so".
+  Multiple libraries can be given, semicolon separated.
+
 
 \subsection options_model_smpi_detached Simulating MPI detached send
 
index 85ee6d9..94e1194 100644 (file)
@@ -403,7 +403,7 @@ several other tags that are available only in certain contexts.
 \subsubsection pf_router &lt;router/&gt;
 
 As said before, <b>router</b> is used only to give some information
-for routing algorithms. So, it does not have any attributes except :
+for routing algorithms. So, it does not have any attributes except:
 
 #### Attributes ####
 
@@ -1001,7 +1001,7 @@ routing model (the path is given relative to SimGrid's source directory)
 
 \verbinclude example_filelist_routing_dijkstra
 
-Dijkstra example :
+Dijkstra example:
 \verbatim
  <zone id="zone_2" routing="Dijkstra">
      <host id="zone_2_host1" speed="1000000000"/>
@@ -1051,7 +1051,7 @@ if there are no example files listed here, this is likely to be correct.
 \anchor pf_routing_model_full
 ### Full ###
 
-Full example :
+Full example:
 \verbatim
 <zone  id="zone0"  routing="Full">
    <host id="host1" speed="1000000000"/>
@@ -1297,7 +1297,7 @@ to bypass some routes defined in lower level zone at an upper stage:
 <b>bypasszoneroute</b> is the tag you're looking for. It allows to
 bypass routes defined between already defined between zone (if you want
 to bypass route for a specific host, you should just use byPassRoute).
-The principle is the same as zoneroute : <b>bypasszoneroute</b> contains
+The principle is the same as zoneroute: <b>bypasszoneroute</b> contains
 list of links that are in the path between src and dst.
 
 #### Attributes ####
@@ -1330,10 +1330,10 @@ attribute was not given, this route is presumed to be symmetrical.
 As said before, once you choose
 a model, it (most likely; the constant network model, for example, doesn't) calculates routes for you. But maybe you want to
 define some of your routes, which will be specific. You may also want
-to bypass some routes defined in lower level zone at an upper stage :
+to bypass some routes defined in lower level zone at an upper stage:
 <b>bypassRoute</b> is the tag you're looking for. It allows to bypass
 routes defined between <b>host/router</b>. The principle is the same
-as route : <b>bypassRoute</b> contains list of links references of
+as route: <b>bypassRoute</b> contains list of links references of
 links that are in the path between src and dst.
 
 #### Attributes ####
@@ -1373,7 +1373,7 @@ and zone_2. If you want to make a host (h1) from zone_1 with another one
     defined inside zone_Big. If you choose some shortest-path model,
     this route will be computed automatically.
 
-As said before, there are mainly 2 tags for routing :
+As said before, there are mainly 2 tags for routing:
 \li <b>zoneroute</b>: to define routes between two  <b>zone</b>
 \li <b>route</b>: to define routes between two <b>host/router</b>
 
@@ -1387,7 +1387,7 @@ say that zone_1 contains full routes, and zone_2 contains some Floyd
 routing (as we don't want to bother with defining all routes). As
 we're using some shortest path algorithms to route into zone_2, we'll
 then have to define some <b>route</b> to gives some topological
-information to SimGrid. Here is a file doing it all :
+information to SimGrid. Here is a file doing it all:
 
 \verbatim
 <zone  id="zone_Big"  routing="Dijkstra">
@@ -1610,7 +1610,7 @@ platforms.
 
 \subsection pf_exit_zone Exit Zone: why and how
 Users that have looked at some of our platforms may have notice a
-non-intuitive schema ... Something like that :
+non-intuitive schema ... Something like that:
 
 
 \verbatim
@@ -1715,7 +1715,7 @@ You may have noted that conveniently, a peer named FOO defines an zone named FOO
 Choosing wisely the routing model to use can significantly fasten your
 simulation/save your time when writing the platform/save tremendous
 disk space. Here is the list of available model and their
-characteristics (lookup : time to resolve a route):
+characteristics (lookup: time to resolve a route):
 
 \li <b>Full</b>: Full routing data (fast, large memory requirements,
     fully expressive)
index 684eacb..7247341 100644 (file)
@@ -200,7 +200,7 @@ The crux of `future.then()` is:
 @code{cpp}
 template<class T>
 template<class F>
-auto simgrid::kernel::Future<T>::thenNoUnwrap(F continuation)
+auto simgrid::kernel::Future<T>::then_no_unwrap(F continuation)
 -> Future<decltype(continuation(std::move(*this)))>
 {
   typedef decltype(continuation(std::move(*this))) R;
@@ -468,14 +468,14 @@ kernel which will wake up the actor (with
 `simgrid::simix::unblock(actor)`) when the operation is completed.
 
 This is wrapped in a higher-level primitive as well. The
-`kernelSync()` function expects a function-object which is executed
+`kernel_sync()` function expects a function-object which is executed
 immediately in the simulation kernel and returns a `Future<T>`.  The
 simulator blocks the actor and resumes it when the `Future<T>` becomes
 ready with its result:
 
 @code{cpp}
 template<class F>
-auto kernelSync(F code) -> decltype(code().get())
+auto kernel_sync(F code) -> decltype(code().get())
 {
   typedef decltype(code().get()) T;
   if (SIMIX_is_maestro())
@@ -510,7 +510,7 @@ auto kernelSync(F code) -> decltype(code().get())
 A contrived example of this would be:
 
 @code{cpp}
-int res = simgrid::simix::kernelSync([&] {
+int res = simgrid::simix::kernel_sync([&] {
   return kernel_wait_until(30).then(
     [](simgrid::kernel::Future<void> future) {
       return 42;
@@ -521,7 +521,7 @@ int res = simgrid::simix::kernelSync([&] {
 
 ### Asynchronous operations {#uhood_switch_v2_async}
 
-We can write the related `kernelAsync()` which wakes up the actor immediately
+We can write the related `kernel_async()` which wakes up the actor immediately
 and returns a future to the actor. As this future is used in the actor context,
 it is a different future
 (`simgrid::simix::Future` instead of `simgrid::kernel::Future`)
@@ -572,12 +572,12 @@ T simgrid::simix::Future<T>::get()
 }
 @endcode
 
-`kernelAsync()` simply :wink: calls `kernelImmediate()` and wraps the
+`kernel_async()` simply :wink: calls `kernelImmediate()` and wraps the
 `simgrid::kernel::Future` into a `simgrid::simix::Future`:
 
 @code{cpp}
 template<class F>
-auto kernelAsync(F code)
+auto kernel_async(F code)
   -> Future<decltype(code().get())>
 {
   typedef decltype(code().get()) T;
@@ -594,7 +594,7 @@ auto kernelAsync(F code)
 A contrived example of this would be:
 
 @code{cpp}
-simgrid::simix::Future<int> future = simgrid::simix::kernelSync([&] {
+simgrid::simix::Future<int> future = simgrid::simix::kernel_sync([&] {
   return kernel_wait_until(30).then(
     [](simgrid::kernel::Future<void> future) {
       return 42;
@@ -605,18 +605,18 @@ do_some_stuff();
 int res = future.get();
 @endcode
 
-`kernelSync()` could be rewritten as:
+`kernel_sync()` could be rewritten as:
 
 @code{cpp}
 template<class F>
-auto kernelSync(F code) -> decltype(code().get())
+auto kernel_sync(F code) -> decltype(code().get())
 {
-  return kernelAsync(std::move(code)).get();
+  return kernel_async(std::move(code)).get();
 }
 @endcode
 
 The semantic is equivalent but this form would require two simcalls
-instead of one to do the same job (one in `kernelAsync()` and one in
+instead of one to do the same job (one in `kernel_async()` and one in
 `.get()`).
 
 ## Mutexes and condition variables
@@ -769,7 +769,7 @@ We wrote two future implementations based on the `std::future` API:
 * the second one is a wait-based (`future.get()`) future used in the actors
   which waits using a simcall.
 
-These futures are used to implement `kernelSync()` and `kernelAsync()` which
+These futures are used to implement `kernel_sync()` and `kernel_async()` which
 expose asynchronous operations in the simulation kernel to the actors.
 
 In addition, we wrote variations of some other C++ standard library
index d6fb4c5..788bf0f 100644 (file)
@@ -23,7 +23,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor_migration, "Messages specific for this s4
 
 static void worker(simgrid::s4u::Host* first, simgrid::s4u::Host* second)
 {
-  double flopAmount = first->getSpeed() * 5 + second->getSpeed() * 5;
+  double flopAmount = first->get_speed() * 5 + second->get_speed() * 5;
 
   XBT_INFO("Let's move to %s to execute %.2f Mflops (5sec on %s and 5sec on %s)", first->get_cname(), flopAmount / 1e6,
            first->get_cname(), second->get_cname());
index 8d3872d..fbdef2a 100644 (file)
@@ -41,7 +41,7 @@ static void worker_busy_loop(const char* name, double speed)
     if (speed > 0) {
       double new_bound = (speed / 10) * i;
       XBT_INFO("set bound of VM1 to %f", new_bound);
-      static_cast<simgrid::s4u::VirtualMachine*>(simgrid::s4u::this_actor::get_host())->setBound(new_bound);
+      static_cast<simgrid::s4u::VirtualMachine*>(simgrid::s4u::this_actor::get_host())->set_bound(new_bound);
     }
     simgrid::s4u::this_actor::sleep_for(100);
     double exec_remain_now = exec->get_remaining();
@@ -63,7 +63,7 @@ static void test_dynamic_change()
   vm1->start();
 
   simgrid::s4u::Actor::create("worker0", vm0, worker_busy_loop, "Task0", -1);
-  simgrid::s4u::Actor::create("worker1", vm1, worker_busy_loop, "Task1", pm0->getSpeed());
+  simgrid::s4u::Actor::create("worker1", vm1, worker_busy_loop, "Task1", pm0->get_speed());
 
   simgrid::s4u::this_actor::sleep_for(3000); // let the tasks end
   vm0->destroy();
@@ -72,10 +72,10 @@ static void test_dynamic_change()
 
 static void test_one_task(simgrid::s4u::Host* host)
 {
-  const double cpu_speed          = host->getSpeed();
+  const double cpu_speed          = host->get_speed();
   const double computation_amount = cpu_speed * 10;
 
-  XBT_INFO("### Test: with/without MSG_task_set_bound");
+  XBT_INFO("### Test: with/without task set_bound");
 
   XBT_INFO("### Test: no bound for Task1@%s", host->get_cname());
   simgrid::s4u::Actor::create("worker0", host, worker, computation_amount, false, 0);
@@ -105,8 +105,8 @@ static void test_one_task(simgrid::s4u::Host* host)
 
 static void test_two_tasks(simgrid::s4u::Host* hostA, simgrid::s4u::Host* hostB)
 {
-  const double cpu_speed = hostA->getSpeed();
-  xbt_assert(cpu_speed == hostB->getSpeed());
+  const double cpu_speed = hostA->get_speed();
+  xbt_assert(cpu_speed == hostB->get_speed());
   const double computation_amount = cpu_speed * 10;
   const char* hostA_name          = hostA->get_cname();
   const char* hostB_name          = hostB->get_cname();
@@ -189,7 +189,7 @@ static void master_main()
   vm0->destroy();
 
   vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
-  vm0->setBound(pm0->getSpeed() / 10);
+  vm0->set_bound(pm0->get_speed() / 10);
   vm0->start();
 
   XBT_INFO("# 7. Put a single task on the VM capped by 10%%.");
@@ -207,10 +207,10 @@ static void master_main()
   vm0->destroy();
 
   vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
-  vm0->setRamsize(1e9); // 1GB
+  vm0->set_ramsize(1e9); // 1GB
   vm0->start();
 
-  double cpu_speed = pm0->getSpeed();
+  double cpu_speed = pm0->get_speed();
 
   XBT_INFO("# 10. Test migration");
   const double computation_amount = cpu_speed * 10;
@@ -221,7 +221,7 @@ static void master_main()
   XBT_INFO(" ");
 
   XBT_INFO("# 10. (b) set 10%% bound to the VM, and then put a task on the VM.");
-  vm0->setBound(cpu_speed / 10);
+  vm0->set_bound(cpu_speed / 10);
   simgrid::s4u::Actor::create("worker0", vm0, worker, computation_amount, false, 0);
   simgrid::s4u::this_actor::sleep_for(1000);
   XBT_INFO(" ");
index e3eb60f..0911d20 100644 (file)
@@ -1,7 +1,7 @@
 ! output sort
 $ $SG_TEST_EXENV ${bindir:=.}/s4u-cloud-capping ${platfdir}/small_platform.xml --log=no_loc "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (1:master_@Fafard) # 1. Put a single task on a PM. 
-> [  0.000000] (1:master_@Fafard) ### Test: with/without MSG_task_set_bound
+> [  0.000000] (1:master_@Fafard) ### Test: with/without task set_bound
 > [  0.000000] (1:master_@Fafard) ### Test: no bound for Task1@Fafard
 > [ 10.000000] (2:worker0@Fafard) not bound => duration 10.000000 (76296000.000000 flops/s)
 > [1000.000000] (1:master_@Fafard) ### Test: 50% for Task1@Fafard
@@ -40,7 +40,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/s4u-cloud-capping ${platfdir}/small_platform.xml -
 > [11040.000000] (20:worker1@Fafard) bound to 19074000.000000 => duration 40.000000 (19074000.000000 flops/s)
 > [12000.000000] (1:master_@Fafard)  
 > [12000.000000] (1:master_@Fafard) # 3. Put a single task on a VM. 
-> [12000.000000] (1:master_@Fafard) ### Test: with/without MSG_task_set_bound
+> [12000.000000] (1:master_@Fafard) ### Test: with/without task set_bound
 > [12000.000000] (1:master_@Fafard) ### Test: no bound for Task1@VM0
 > [12010.000000] (21:worker0@VM0) not bound => duration 10.000000 (76296000.000000 flops/s)
 > [13000.000000] (1:master_@Fafard) ### Test: 50% for Task1@VM0
@@ -104,7 +104,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/s4u-cloud-capping ${platfdir}/small_platform.xml -
 > [30040.000000] (53:worker1@VM0) bound to 19074000.000000 => duration 40.000000 (19074000.000000 flops/s)
 > [31000.000000] (1:master_@Fafard)  
 > [31000.000000] (1:master_@Fafard) # 7. Put a single task on the VM capped by 10%.
-> [31000.000000] (1:master_@Fafard) ### Test: with/without MSG_task_set_bound
+> [31000.000000] (1:master_@Fafard) ### Test: with/without task set_bound
 > [31000.000000] (1:master_@Fafard) ### Test: no bound for Task1@VM0
 > [31100.000000] (54:worker0@VM0) not bound => duration 100.000000 (7629600.000000 flops/s)
 > [32000.000000] (1:master_@Fafard) ### Test: 50% for Task1@VM0
index 46c1156..e53e714 100644 (file)
@@ -11,7 +11,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_cloud_migration, "Messages specific for this ex
 
 static void vm_migrate(simgrid::s4u::VirtualMachine* vm, simgrid::s4u::Host* dst_pm)
 {
-  simgrid::s4u::Host* src_pm = vm->getPm();
+  simgrid::s4u::Host* src_pm = vm->get_pm();
   double mig_sta             = simgrid::s4u::Engine::get_clock();
   sg_vm_migrate(vm, dst_pm);
   double mig_end = simgrid::s4u::Engine::get_clock();
@@ -31,19 +31,19 @@ static void master_main()
   simgrid::s4u::Host* pm2 = simgrid::s4u::Host::by_name("Bourassa");
 
   simgrid::s4u::VirtualMachine* vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
-  vm0->setRamsize(1e9); // 1Gbytes
+  vm0->set_ramsize(1e9); // 1Gbytes
   vm0->start();
 
-  XBT_INFO("Test: Migrate a VM with %zu Mbytes RAM", vm0->getRamsize() / 1000 / 1000);
+  XBT_INFO("Test: Migrate a VM with %zu Mbytes RAM", vm0->get_ramsize() / 1000 / 1000);
   vm_migrate(vm0, pm1);
 
   vm0->destroy();
 
   vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
-  vm0->setRamsize(1e8); // 100Mbytes
+  vm0->set_ramsize(1e8); // 100Mbytes
   vm0->start();
 
-  XBT_INFO("Test: Migrate a VM with %zu Mbytes RAM", vm0->getRamsize() / 1000 / 1000);
+  XBT_INFO("Test: Migrate a VM with %zu Mbytes RAM", vm0->get_ramsize() / 1000 / 1000);
   vm_migrate(vm0, pm1);
 
   vm0->destroy();
@@ -51,8 +51,8 @@ static void master_main()
   vm0                               = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
   simgrid::s4u::VirtualMachine* vm1 = new simgrid::s4u::VirtualMachine("VM1", pm0, 1);
 
-  vm0->setRamsize(1e9); // 1Gbytes
-  vm1->setRamsize(1e9); // 1Gbytes
+  vm0->set_ramsize(1e9); // 1Gbytes
+  vm1->set_ramsize(1e9); // 1Gbytes
   vm0->start();
   vm1->start();
 
@@ -67,8 +67,8 @@ static void master_main()
   vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
   vm1 = new simgrid::s4u::VirtualMachine("VM1", pm0, 1);
 
-  vm0->setRamsize(1e9); // 1Gbytes
-  vm1->setRamsize(1e9); // 1Gbytes
+  vm0->set_ramsize(1e9); // 1Gbytes
+  vm1->set_ramsize(1e9); // 1Gbytes
   vm0->start();
   vm1->start();
 
index e8cd04a..1d47869 100644 (file)
@@ -193,7 +193,7 @@ static void master_main()
            " network one");
   XBT_INFO("### Relocate VM0 between PM0 and PM1");
   vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
-  vm0->setRamsize(1L * 1024 * 1024 * 1024); // 1GiB
+  vm0->set_ramsize(1L * 1024 * 1024 * 1024); // 1GiB
 
   vm0->start();
   launch_communication_worker(vm0, pm2);
index 10f9ce6..8f4168b 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-p Testing the Chord implementation with MSG
+p Testing the Chord implementation with S4U
 
 ! output sort 19
 $ $SG_TEST_EXENV ${bindir:=.}/s4u-dht-chord$EXEEXT -nb_bits=3 ${platfdir}/cluster.xml s4u-dht-chord_d.xml --log=s4u_chord.thres:verbose "--log=root.fmt:[%10.5r]%e(%P@%h)%e%m%n"
index b720e41..e17c478 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-p Testing the Kademlia implementation with MSG
+p Testing the Kademlia implementation with S4U
 
 ! output sort 19
 $ $SG_TEST_EXENV ${bindir:=.}/s4u-dht-kademlia ${platfdir}/cluster.xml ${srcdir:=.}/s4u-dht-kademlia_d.xml "--log=root.fmt:[%10.6r]%e(%02i:%P@%h)%e%m%n"
index 1a30be2..62d0f6c 100644 (file)
@@ -14,14 +14,14 @@ static void dvfs()
   simgrid::s4u::Host* host2 = simgrid::s4u::Host::by_name("MyHost2");
 
   XBT_INFO("Energetic profile: %s", host1->get_property("watt_per_state"));
-  XBT_INFO("Initial peak speed=%.0E flop/s; Energy dissipated =%.0E J", host1->getSpeed(),
+  XBT_INFO("Initial peak speed=%.0E flop/s; Energy dissipated =%.0E J", host1->get_speed(),
            sg_host_get_consumed_energy(host1));
 
   double start = simgrid::s4u::Engine::get_clock();
   XBT_INFO("Sleep for 10 seconds");
   simgrid::s4u::this_actor::sleep_for(10);
   XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E; Energy dissipated=%.2f J",
-           simgrid::s4u::Engine::get_clock() - start, host1->getSpeed(), sg_host_get_consumed_energy(host1));
+           simgrid::s4u::Engine::get_clock() - start, host1->get_speed(), sg_host_get_consumed_energy(host1));
 
   // Execute something
   start             = simgrid::s4u::Engine::get_clock();
@@ -30,7 +30,7 @@ static void dvfs()
   simgrid::s4u::this_actor::execute(flopAmount);
   XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Current consumption: from %.0fW to %.0fW"
            " depending on load; Energy dissipated=%.0f J",
-           simgrid::s4u::Engine::get_clock() - start, host1->getSpeed(),
+           simgrid::s4u::Engine::get_clock() - start, host1->get_speed(),
            sg_host_get_wattmin_at(host1, host1->get_pstate()), sg_host_get_wattmax_at(host1, host1->get_pstate()),
            sg_host_get_consumed_energy(host1));
 
@@ -38,20 +38,20 @@ static void dvfs()
   int pstate = 2;
   host1->set_pstate(pstate);
   XBT_INFO("========= Requesting pstate %d (speed should be of %.0E flop/s and is of %.0E flop/s)", pstate,
-           host1->getPstateSpeed(pstate), host1->getSpeed());
+           host1->get_pstate_speed(pstate), host1->get_speed());
 
   // Run another task
   start = simgrid::s4u::Engine::get_clock();
   XBT_INFO("Run a task of %.0E flops", flopAmount);
   simgrid::s4u::this_actor::execute(flopAmount);
   XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
-           simgrid::s4u::Engine::get_clock() - start, host1->getSpeed(), sg_host_get_consumed_energy(host1));
+           simgrid::s4u::Engine::get_clock() - start, host1->get_speed(), sg_host_get_consumed_energy(host1));
 
   start = simgrid::s4u::Engine::get_clock();
   XBT_INFO("Sleep for 4 seconds");
   simgrid::s4u::this_actor::sleep_for(4);
   XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
-           simgrid::s4u::Engine::get_clock() - start, host1->getSpeed(), sg_host_get_consumed_energy(host1));
+           simgrid::s4u::Engine::get_clock() - start, host1->get_speed(), sg_host_get_consumed_energy(host1));
 
   // =========== Turn the other host off ==========
   XBT_INFO("Turning MyHost2 off, and sleeping another 10 seconds. MyHost2 dissipated %.0f J so far.",
@@ -60,7 +60,7 @@ static void dvfs()
   start = simgrid::s4u::Engine::get_clock();
   simgrid::s4u::this_actor::sleep_for(10);
   XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
-           simgrid::s4u::Engine::get_clock() - start, host1->getSpeed(), sg_host_get_consumed_energy(host1));
+           simgrid::s4u::Engine::get_clock() - start, host1->get_speed(), sg_host_get_consumed_energy(host1));
 }
 
 int main(int argc, char* argv[])
index c3e0e7e..acc9391 100644 (file)
@@ -21,7 +21,7 @@ namespace filter {
 /* First example of thing that we can use as a filtering criteria: a simple boolean function */
 static bool filter_speed_more_than_50Mf(simgrid::s4u::Host* host)
 {
-  return host->getSpeed() > 50E6;
+  return host->get_speed() > 50E6;
 }
 
 /* Second kind of thing that we can use as a filtering criteria: a functor (=function object).
@@ -80,7 +80,8 @@ int main(int argc, char* argv[])
   list = e.get_filtered_hosts(filter);
 
   for (auto& host : list)
-    XBT_INFO("The following hosts changed their frequency: %s (from %.1ff to %.1ff)", host->get_cname(), host->getPstateSpeed(filter.get_old_speed(host)), host->getSpeed());
+    XBT_INFO("The following hosts changed their frequency: %s (from %.1ff to %.1ff)", host->get_cname(),
+             host->get_pstate_speed(filter.get_old_speed(host)), host->get_speed());
 
   /* You can also just use any regular function (namespaced on need) to filter  */
   list = e.get_filtered_hosts(filter::filter_speed_more_than_50Mf);
index 81abcf6..32ef5dd 100644 (file)
@@ -15,7 +15,7 @@ static int dvfs()
   int nb = host->get_pstate_count();
   XBT_INFO("Count of Processor states=%d", nb);
 
-  XBT_INFO("Current power peak=%f", host->getSpeed());
+  XBT_INFO("Current power peak=%f", host->get_speed());
 
   // Run a task
   simgrid::s4u::this_actor::execute(workload);
@@ -26,11 +26,11 @@ static int dvfs()
   // Change power peak
   int new_pstate = 2;
 
-  XBT_INFO("Changing power peak value to %f (at index %d)", host->getPstateSpeed(new_pstate), new_pstate);
+  XBT_INFO("Changing power peak value to %f (at index %d)", host->get_pstate_speed(new_pstate), new_pstate);
 
   host->set_pstate(new_pstate);
 
-  XBT_INFO("Current power peak=%f", host->getSpeed());
+  XBT_INFO("Current power peak=%f", host->get_speed());
 
   // Run a second task
   simgrid::s4u::this_actor::execute(workload);
@@ -42,7 +42,7 @@ static int dvfs()
   host = simgrid::s4u::Host::by_name_or_null("MyHost2");
   XBT_INFO("Count of Processor states=%d", host->get_pstate_count());
 
-  XBT_INFO("Current power peak=%f", host->getSpeed());
+  XBT_INFO("Current power peak=%f", host->get_speed());
   return 0;
 }
 
index 8044e17..a119a8d 100644 (file)
@@ -20,8 +20,8 @@ static void wizard()
   XBT_INFO("It started. Running 48.492Mf takes exactly one second on Ginette (but not on Fafard).");
 
   simgrid::s4u::this_actor::sleep_for(0.1);
-  XBT_INFO("Loads in flops/s: Boivin=%.0f; Fafard=%.0f; Ginette=%.0f",
-      boivin->getLoad(), fafard->getLoad(), ginette->getLoad());
+  XBT_INFO("Loads in flops/s: Boivin=%.0f; Fafard=%.0f; Ginette=%.0f", boivin->get_load(), fafard->get_load(),
+           ginette->get_load());
 
   exec->wait();
 
@@ -31,14 +31,14 @@ static void wizard()
   exec->start();
 
   simgrid::s4u::this_actor::sleep_for(0.5);
-  XBT_INFO("Loads before the move: Boivin=%.0f; Fafard=%.0f; Ginette=%.0f",
-      boivin->getLoad(), fafard->getLoad(), ginette->getLoad());
+  XBT_INFO("Loads before the move: Boivin=%.0f; Fafard=%.0f; Ginette=%.0f", boivin->get_load(), fafard->get_load(),
+           ginette->get_load());
 
   exec->set_host(boivin);
 
   simgrid::s4u::this_actor::sleep_for(0.1);
-  XBT_INFO("Loads after the move: Boivin=%.0f; Fafard=%.0f; Ginette=%.0f",
-      boivin->getLoad(), fafard->getLoad(), ginette->getLoad());
+  XBT_INFO("Loads after the move: Boivin=%.0f; Fafard=%.0f; Ginette=%.0f", boivin->get_load(), fafard->get_load(),
+           ginette->get_load());
 
   exec->wait();
   XBT_INFO("Done!");
index 2c34333..bce3113 100644 (file)
@@ -30,7 +30,7 @@ public:
   void operator()()
   {
     std::unordered_map<std::string, simgrid::s4u::Storage*> const& mounts =
-        simgrid::s4u::Host::current()->getMountedStorages();
+        simgrid::s4u::Host::current()->get_mounted_storages();
 
     show_info(mounts);
 
index e594a1e..feaba5e 100644 (file)
@@ -16,7 +16,7 @@ static void host()
 
   /* - Retrieve all mount points of current host */
   std::unordered_map<std::string, simgrid::s4u::Storage*> const& storage_list =
-      simgrid::s4u::Host::current()->getMountedStorages();
+      simgrid::s4u::Host::current()->get_mounted_storages();
 
   /* - For each disk mounted on host, display disk name and mount point */
   for (auto const& kv : storage_list)
index d3dd4f4..ae2ca42 100644 (file)
@@ -44,7 +44,7 @@ static void workerLockGuard(simgrid::s4u::MutexPtr mutex, int& result)
 static void master()
 {
   int result = 0;
-  simgrid::s4u::MutexPtr mutex = simgrid::s4u::Mutex::createMutex();
+  simgrid::s4u::MutexPtr mutex = simgrid::s4u::Mutex::create();
 
   for (int i = 0; i < NB_ACTOR * 2 ; i++) {
     // To create a worker use the static method simgrid::s4u::Actor.
index f125e9d..d35bf9f 100644 (file)
@@ -114,7 +114,7 @@ int main(int argc, char* argv[])
   XBT_INFO("There are %zu hosts in the environment", totalHosts);
   std::vector<simgrid::s4u::Host*> hosts = e.get_all_hosts();
   for (unsigned int i = 0; i < hosts.size(); i++)
-    XBT_INFO("Host '%s' runs at %.0f flops/s", hosts[i]->get_cname(), hosts[i]->getSpeed());
+    XBT_INFO("Host '%s' runs at %.0f flops/s", hosts[i]->get_cname(), hosts[i]->get_speed());
 
   e.load_deployment(argv[2]);
   e.run();
index ac8962a..6ac50d8 100644 (file)
@@ -12,37 +12,39 @@ static void execute_load_test()
 {
   s4u_Host* host = simgrid::s4u::Host::by_name("MyHost1");
 
-  XBT_INFO("Initial peak speed: %.0E flop/s; number of flops computed so far: %.0E (should be 0) and current average load: %.5f (should be 0)", host->getSpeed(),
-           sg_host_get_computed_flops(host), sg_host_get_avg_load(host));
+  XBT_INFO("Initial peak speed: %.0E flop/s; number of flops computed so far: %.0E (should be 0) and current average "
+           "load: %.5f (should be 0)",
+           host->get_speed(), sg_host_get_computed_flops(host), sg_host_get_avg_load(host));
 
   double start = simgrid::s4u::Engine::get_clock();
   XBT_INFO("Sleep for 10 seconds");
   simgrid::s4u::this_actor::sleep_for(10);
 
-  double speed = host->getSpeed();
+  double speed = host->get_speed();
   XBT_INFO("Done sleeping %.2fs; peak speed: %.0E flop/s; number of flops computed so far: %.0E (nothing should have "
            "changed)",
-           simgrid::s4u::Engine::get_clock() - start, host->getSpeed(), sg_host_get_computed_flops(host));
+           simgrid::s4u::Engine::get_clock() - start, host->get_speed(), sg_host_get_computed_flops(host));
 
   // Run a task
   start = simgrid::s4u::Engine::get_clock();
-  XBT_INFO("Run a task of %.0E flops at current speed of %.0E flop/s", 200E6, host->getSpeed());
+  XBT_INFO("Run a task of %.0E flops at current speed of %.0E flop/s", 200E6, host->get_speed());
   simgrid::s4u::this_actor::execute(200E6);
 
   XBT_INFO("Done working on my task; this took %.2fs; current peak speed: %.0E flop/s (when I started the computation, "
            "the speed was set to %.0E flop/s); number of flops computed so "
            "far: %.2E, average load as reported by the HostLoad plugin: %.5f (should be %.5f)",
-           simgrid::s4u::Engine::get_clock() - start, host->getSpeed(), speed, sg_host_get_computed_flops(host),
+           simgrid::s4u::Engine::get_clock() - start, host->get_speed(), speed, sg_host_get_computed_flops(host),
            sg_host_get_avg_load(host),
            static_cast<double>(200E6) /
                (10.5 * speed * host->get_core_count() +
-                (simgrid::s4u::Engine::get_clock() - start - 0.5) * host->getSpeed() * host->get_core_count()));
+                (simgrid::s4u::Engine::get_clock() - start - 0.5) * host->get_speed() * host->get_core_count()));
 
   // ========= Change power peak =========
   int pstate = 1;
   host->set_pstate(pstate);
-  XBT_INFO("========= Requesting pstate %d (speed should be of %.0E flop/s and is of %.0E flop/s, average load is %.5f)", pstate,
-           host->getPstateSpeed(pstate), host->getSpeed(), sg_host_get_avg_load(host));
+  XBT_INFO(
+      "========= Requesting pstate %d (speed should be of %.0E flop/s and is of %.0E flop/s, average load is %.5f)",
+      pstate, host->get_pstate_speed(pstate), host->get_speed(), sg_host_get_avg_load(host));
 
   // Run a second task
   start = simgrid::s4u::Engine::get_clock();
@@ -50,7 +52,7 @@ static void execute_load_test()
   simgrid::s4u::this_actor::execute(100E6);
   XBT_INFO("Done working on my task; this took %.2fs; current peak speed: %.0E flop/s; number of flops computed so "
            "far: %.2E",
-           simgrid::s4u::Engine::get_clock() - start, host->getSpeed(), sg_host_get_computed_flops(host));
+           simgrid::s4u::Engine::get_clock() - start, host->get_speed(), sg_host_get_computed_flops(host));
 
   start = simgrid::s4u::Engine::get_clock();
   XBT_INFO("========= Requesting a reset of the computation and load counters");
@@ -59,7 +61,7 @@ static void execute_load_test()
   XBT_INFO("Sleep for 4 seconds");
   simgrid::s4u::this_actor::sleep_for(4);
   XBT_INFO("Done sleeping %.2f s; peak speed: %.0E flop/s; number of flops computed so far: %.0E",
-           simgrid::s4u::Engine::get_clock() - start, host->getSpeed(), sg_host_get_computed_flops(host));
+           simgrid::s4u::Engine::get_clock() - start, host->get_speed(), sg_host_get_computed_flops(host));
 
   // =========== Turn the other host off ==========
   s4u_Host* host2 = simgrid::s4u::Host::by_name("MyHost2");
@@ -69,7 +71,7 @@ static void execute_load_test()
   start = simgrid::s4u::Engine::get_clock();
   simgrid::s4u::this_actor::sleep_for(10);
   XBT_INFO("Done sleeping %.2f s; peak speed: %.0E flop/s; number of flops computed so far: %.0E",
-           simgrid::s4u::Engine::get_clock() - start, host->getSpeed(), sg_host_get_computed_flops(host));
+           simgrid::s4u::Engine::get_clock() - start, host->get_speed(), sg_host_get_computed_flops(host));
 }
 
 static void change_speed()
index 35ce7c0..3e5822b 100644 (file)
@@ -33,8 +33,8 @@ int main(int argc, char **argv)
   double comp_amount2 = 1000000;
   double comm_amount12 = 2000000;
   double comm_amount21 = 3000000;
-  XBT_INFO("Computation time for %f flops on %s: %f", comp_amount1, h1->get_cname(), comp_amount1 / h1->getSpeed());
-  XBT_INFO("Computation time for %f flops on %s: %f", comp_amount2, h2->get_cname(), comp_amount2 / h2->getSpeed());
+  XBT_INFO("Computation time for %f flops on %s: %f", comp_amount1, h1->get_cname(), comp_amount1 / h1->get_speed());
+  XBT_INFO("Computation time for %f flops on %s: %f", comp_amount2, h2->get_cname(), comp_amount2 / h2->get_speed());
 
   XBT_INFO("Route between %s and %s:", h1->get_cname(), h2->get_cname());
   std::vector<sg_link_t> route;
index 07861d3..5d7a96b 100644 (file)
@@ -5,18 +5,11 @@ if(enable_smpi)
 
   file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mc/")
 
-  foreach(x replay)
-    add_executable       (smpi_${x} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
+  foreach(x replay
+            trace trace_simple trace_call_location energy)
+    add_executable       (smpi_${x} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x})
     target_link_libraries(smpi_${x} simgrid)
     set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
-    set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
-  endforeach()
-
-  foreach(x trace trace_simple trace_call_location energy)
-    add_executable       (smpi_${x} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
-    target_link_libraries(smpi_${x} simgrid)
-    set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
-    set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
   endforeach()
 
   set_target_properties(smpi_trace_call_location PROPERTIES COMPILE_FLAGS "-trace-call-location")
@@ -28,10 +21,20 @@ if(enable_smpi)
       target_link_libraries(smpi_${x} simgrid)
       set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mc)
     endif()
-    set(examples_src  ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/mc/${x}.c)
   endforeach()
 endif()
 
+foreach(x replay)
+  set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
+endforeach()
+foreach(x trace trace_simple trace_call_location energy)
+  set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
+endforeach()
+foreach(x bugged1 bugged2 bugged1_liveness only_send_deterministic mutual_exclusion non_termination1
+    non_termination2 non_termination3 non_termination4)
+  set(examples_src  ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/mc/${x}.c)
+endforeach()
+
 set(examples_src  ${examples_src}                                                                          PARENT_SCOPE)
 set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/energy/energy.tesh
                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace/trace.tesh
@@ -49,7 +52,7 @@ set(bin_files     ${bin_files}     ${CMAKE_CURRENT_SOURCE_DIR}/hostfile
                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_non_termination                 PARENT_SCOPE)
 set(txt_files     ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions0.txt
                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions1.txt
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_allReduce.txt
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_allreduce.txt
                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_allgatherv.txt
                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_alltoall.txt
                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_alltoallv.txt
index 9e34cc4..aa6ac77 100644 (file)
@@ -1,7 +1,7 @@
 1 init
 1 recv 0 0 1e6
 1 compute 1e9
-1 Isend 0 1 1e6
-1 Irecv 0 2 1e6
+1 isend 0 1 1e6
+1 irecv 0 2 1e6
 1 wait 0 1 2
 1 finalize
index d5d4024..106678f 100644 (file)
@@ -3,10 +3,10 @@
 2 init
 3 init
 
-0 allGatherV 275427 275427 275427 275427 204020 0 0
-1 allGatherV 275427 275427 275427 275427 204020 0 0
-2 allGatherV 275427 275427 275427 275427 204020 0 0
-3 allGatherV 204020 275427 275427 275427 204020 0 0
+0 allgatherv 275427 275427 275427 275427 204020 0 0
+1 allgatherv 275427 275427 275427 275427 204020 0 0
+2 allgatherv 275427 275427 275427 275427 204020 0 0
+3 allgatherv 204020 275427 275427 275427 204020 0 0
 
 0 finalize
 1 finalize
similarity index 62%
rename from examples/smpi/replay/actions_allReduce.txt
rename to examples/smpi/replay/actions_allreduce.txt
index 5ebcc62..18d12ee 100644 (file)
@@ -2,9 +2,9 @@
 1 init
 2 init
 
-0 allReduce 5e4 5e8
-1 allReduce 5e4 5e8
-2 allReduce 5e4 5e8
+0 allreduce 5e4 5e8
+1 allreduce 5e4 5e8
+2 allreduce 5e4 5e8
 
 0 compute 5e8
 1 compute 5e8
index 7660765..74883f8 100644 (file)
@@ -2,9 +2,9 @@
 1 init
 2 init
 
-0 allToAll 500 500
-1 allToAll 500 500
-2 allToAll 500 500
+0 alltoall 500 500
+1 alltoall 500 500
+2 alltoall 500 500
 
 
 0 finalize
index a96f7b7..db45ec9 100644 (file)
@@ -2,9 +2,9 @@
 1 init
 2 init
 
-0 allToAllV 100 1 40 30 1000 1 80 100
-1 allToAllV 1000 80 1 40 1000 40 1 30
-2 allToAllV 1000 100 30 1 1000 30 40 1
+0 alltoallv 100 1 40 30 1000 1 80 100
+1 alltoallv 1000 80 1 40 1000 40 1 30
+2 alltoallv 1000 100 30 1 1000 30 40 1
 
 0 finalize
 1 finalize
index ac91f0f..692183a 100644 (file)
@@ -3,10 +3,10 @@
 2 init
 3 init
 
-0 reduceScatter 275427 275427 275427 204020 11349173 0
-1 reduceScatter 275427 275427 275427 204020 12396024 0
-2 reduceScatter 275427 275427 275427 204020 12501522 0
-3 reduceScatter 275427 275427 275427 204020 12403123 0
+0 reducescatter 275427 275427 275427 204020 11349173 0
+1 reducescatter 275427 275427 275427 204020 12396024 0
+2 reducescatter 275427 275427 275427 204020 12501522 0
+3 reducescatter 275427 275427 275427 204020 12403123 0
 
 0 finalize
 1 finalize
index 9f69b9e..5360e53 100644 (file)
@@ -2,17 +2,17 @@
 1 init
 2 init
 
-0 Irecv 1 0 2000
-1 Isend 0 0 2000
-2 Irecv 1 1 3000
+0 irecv 1 0 2000
+1 isend 0 0 2000
+2 irecv 1 1 3000
 
-0 Irecv 2 2 3000
-1 Isend 2 1 3000
-2 Isend 0 2 3000
+0 irecv 2 2 3000
+1 isend 2 1 3000
+2 isend 0 2 3000
 
-0 waitAll
-1 waitAll
-2 waitAll
+0 waitall
+1 waitall
+2 waitall
 
 0 finalize
 1 finalize
index 0a7922a..00f2c4a 100644 (file)
@@ -7,7 +7,7 @@
 0 compute 1e9
 0 recv 2 2 1e6
 
-1 Irecv 0 0 1e6
+1 irecv 0 0 1e6
 1 compute 5e8
 1 test 0 1 0
 1 compute 5e8
 1 send 2 1 1e6
 
 2 compute 2e9
-2 Irecv 1 1 1e6
+2 irecv 1 1 1e6
 2 compute 2.5e8
 2 test 1 2 1
 2 compute 2.5e8
 2 wait 1 2 1
-2 Isend 0 2 1e6
+2 isend 0 2 1e6
 2 compute 5e8
 
 0 finalize
index fc9a8aa..a5f2744 100644 (file)
@@ -218,8 +218,8 @@ $ ../../smpi_script/bin/smpirun -no-privatize -ext smpi_replay --log=smpi_replay
 > [Tremblay:0:(1) 0.167158] [smpi_replay/VERBOSE] 0 send 1 0 1e6 0.167158
 > [Jupiter:1:(2) 0.167158] [smpi_replay/VERBOSE] 1 recv 0 0 1e6 0.167158
 > [Jupiter:1:(2) 13.274005] [smpi_replay/VERBOSE] 1 compute 1e9 13.106847
-> [Jupiter:1:(2) 13.274005] [smpi_replay/VERBOSE] 1 Isend 0 1 1e6 0.000000
-> [Jupiter:1:(2) 13.274005] [smpi_replay/VERBOSE] 1 Irecv 0 2 1e6 0.000000
+> [Jupiter:1:(2) 13.274005] [smpi_replay/VERBOSE] 1 isend 0 1 1e6 0.000000
+> [Jupiter:1:(2) 13.274005] [smpi_replay/VERBOSE] 1 irecv 0 2 1e6 0.000000
 > [Tremblay:0:(1) 13.441162] [smpi_replay/VERBOSE] 0 recv 1 1 1e6 13.274005
 > [Jupiter:1:(2) 13.608320] [smpi_replay/VERBOSE] 1 wait 0 1 2 0.334315
 > [Tremblay:0:(1) 13.608320] [smpi_replay/VERBOSE] 0 send 1 2 1e6 0.167158
@@ -245,13 +245,13 @@ $ ../../smpi_script/bin/smpirun -no-privatize -ext smpi_replay --log=replay.thre
 
 $ rm -f replay/one_trace
 
-p Test of Isend replay with SMPI (one trace for all processes)
+p Test of isend replay with SMPI (one trace for all processes)
 
 < replay/actions_with_isend.txt
 $ mkfile replay/one_trace
 
 $ ../../smpi_script/bin/smpirun -no-privatize -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
-> [Jupiter:1:(2) 0.000000] [smpi_replay/VERBOSE] 1 Irecv 0 0 1e6 0.000000
+> [Jupiter:1:(2) 0.000000] [smpi_replay/VERBOSE] 1 irecv 0 0 1e6 0.000000
 > [Jupiter:1:(2) 6.553424] [smpi_replay/VERBOSE] 1 compute 5e8 6.553424
 > [Jupiter:1:(2) 6.553524] [smpi_replay/VERBOSE] 1 test 0 1 0 0.000100
 > [Tremblay:0:(1) 10.194200] [smpi_replay/VERBOSE] 0 compute 1e9 10.194200
@@ -260,13 +260,13 @@ $ ../../smpi_script/bin/smpirun -no-privatize -ext smpi_replay --log=replay.thre
 > [Jupiter:1:(2) 13.106947] [smpi_replay/VERBOSE] 1 wait 0 1 0 0.000000
 > [Tremblay:0:(1) 20.555557] [smpi_replay/VERBOSE] 0 compute 1e9 10.194200
 > [Fafard:2:(3) 26.213694] [smpi_replay/VERBOSE] 2 compute 2e9 26.213694
-> [Fafard:2:(3) 26.213694] [smpi_replay/VERBOSE] 2 Irecv 1 1 1e6 0.000000
+> [Fafard:2:(3) 26.213694] [smpi_replay/VERBOSE] 2 irecv 1 1 1e6 0.000000
 > [Jupiter:1:(2) 26.403860] [smpi_replay/VERBOSE] 1 send 2 1 1e6 13.296913
 > [Fafard:2:(3) 29.490406] [smpi_replay/VERBOSE] 2 compute 2.5e8 3.276712
 > [Fafard:2:(3) 29.490606] [smpi_replay/VERBOSE] 2 test 1 2 1 0.000200
 > [Fafard:2:(3) 32.767318] [smpi_replay/VERBOSE] 2 compute 2.5e8 3.276712
 > [Fafard:2:(3) 32.767318] [smpi_replay/VERBOSE] 2 wait 1 2 1 0.000000
-> [Fafard:2:(3) 32.767318] [smpi_replay/VERBOSE] 2 Isend 0 2 1e6 0.000000
+> [Fafard:2:(3) 32.767318] [smpi_replay/VERBOSE] 2 isend 0 2 1e6 0.000000
 > [Tremblay:0:(1) 32.923014] [smpi_replay/VERBOSE] 0 recv 2 2 1e6 12.367458
 > [Fafard:2:(3) 39.320741] [smpi_replay/VERBOSE] 2 compute 5e8 6.553424
 > [Fafard:2:(3) 39.320741] [smpi_replay/INFO] Simulation time 39.320741
@@ -275,13 +275,13 @@ $ rm -f replay/one_trace
 
 p Test of AllReduce replay with SMPI (one trace for all processes)
 
-< replay/actions_allReduce.txt
+< replay/actions_allreduce.txt
 $ mkfile replay/one_trace
 
 $ ../../smpi_script/bin/smpirun -no-privatize -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
-> [Tremblay:0:(1) 5.112775] [smpi_replay/VERBOSE] 0 allReduce 5e4 5e8 5.112775
-> [Jupiter:1:(2) 6.584135] [smpi_replay/VERBOSE] 1 allReduce 5e4 5e8 6.584135
-> [Fafard:2:(3) 6.584775] [smpi_replay/VERBOSE] 2 allReduce 5e4 5e8 6.584775
+> [Tremblay:0:(1) 5.112775] [smpi_replay/VERBOSE] 0 allreduce 5e4 5e8 5.112775
+> [Jupiter:1:(2) 6.584135] [smpi_replay/VERBOSE] 1 allreduce 5e4 5e8 6.584135
+> [Fafard:2:(3) 6.584775] [smpi_replay/VERBOSE] 2 allreduce 5e4 5e8 6.584775
 > [Tremblay:0:(1) 10.209875] [smpi_replay/VERBOSE] 0 compute 5e8 5.097100
 > [Jupiter:1:(2) 13.137559] [smpi_replay/VERBOSE] 1 compute 5e8 6.553424
 > [Fafard:2:(3) 13.138198] [smpi_replay/VERBOSE] 2 compute 5e8 6.553424
@@ -295,9 +295,9 @@ p Test of AllToAll replay with SMPI (one trace for all processes)
 $ mkfile replay/one_trace
 
 $ ../../smpi_script/bin/smpirun -no-privatize -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
-> [Tremblay:0:(1) 0.004041] [smpi_replay/VERBOSE] 0 allToAll 500 500 0.004041
-> [Fafard:2:(3) 0.006920] [smpi_replay/VERBOSE] 2 allToAll 500 500 0.006920
-> [Jupiter:1:(2) 0.006920] [smpi_replay/VERBOSE] 1 allToAll 500 500 0.006920
+> [Tremblay:0:(1) 0.004041] [smpi_replay/VERBOSE] 0 alltoall 500 500 0.004041
+> [Fafard:2:(3) 0.006920] [smpi_replay/VERBOSE] 2 alltoall 500 500 0.006920
+> [Jupiter:1:(2) 0.006920] [smpi_replay/VERBOSE] 1 alltoall 500 500 0.006920
 > [Jupiter:1:(2) 0.006920] [smpi_replay/INFO] Simulation time 0.006920
 
 
@@ -310,9 +310,9 @@ p Test of AllToAllv replay with SMPI (one trace for all processes)
 $ mkfile replay/one_trace
 
 $ ../../smpi_script/bin/smpirun -no-privatize -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
-> [Tremblay:0:(1) 0.004000] [smpi_replay/VERBOSE] 0 allToAllV 100 1 40 30 1000 1 80 100 0.004000
-> [Jupiter:1:(2) 0.006935] [smpi_replay/VERBOSE] 1 allToAllV 1000 80 1 40 1000 40 1 30 0.006935
-> [Fafard:2:(3) 0.006936] [smpi_replay/VERBOSE] 2 allToAllV 1000 100 30 1 1000 30 40 1 0.006936
+> [Tremblay:0:(1) 0.004000] [smpi_replay/VERBOSE] 0 alltoallv 100 1 40 30 1000 1 80 100 0.004000
+> [Jupiter:1:(2) 0.006935] [smpi_replay/VERBOSE] 1 alltoallv 1000 80 1 40 1000 40 1 30 0.006935
+> [Fafard:2:(3) 0.006936] [smpi_replay/VERBOSE] 2 alltoallv 1000 100 30 1 1000 30 40 1 0.006936
 > [Fafard:2:(3) 0.006936] [smpi_replay/INFO] Simulation time 0.006936
 
 $ rm -f replay/one_trace
@@ -323,10 +323,10 @@ p Test of AllGatherv replay with SMPI (one trace for all processes)
 $ mkfile replay/one_trace
 
 $ ../../smpi_script/bin/smpirun -no-privatize -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 4 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
-> [Tremblay:0:(1) 1.397261] [smpi_replay/VERBOSE] 0 allGatherV 275427 275427 275427 275427 204020 0 0 1.397261
-> [Ginette:3:(4) 1.760421] [smpi_replay/VERBOSE] 3 allGatherV 204020 275427 275427 275427 204020 0 0 1.760421
-> [Fafard:2:(3) 1.941986] [smpi_replay/VERBOSE] 2 allGatherV 275427 275427 275427 275427 204020 0 0 1.941986
-> [Jupiter:1:(2) 1.941986] [smpi_replay/VERBOSE] 1 allGatherV 275427 275427 275427 275427 204020 0 0 1.941986
+> [Tremblay:0:(1) 1.397261] [smpi_replay/VERBOSE] 0 allgatherv 275427 275427 275427 275427 204020 0 0 1.397261
+> [Ginette:3:(4) 1.760421] [smpi_replay/VERBOSE] 3 allgatherv 204020 275427 275427 275427 204020 0 0 1.760421
+> [Fafard:2:(3) 1.941986] [smpi_replay/VERBOSE] 2 allgatherv 275427 275427 275427 275427 204020 0 0 1.941986
+> [Jupiter:1:(2) 1.941986] [smpi_replay/VERBOSE] 1 allgatherv 275427 275427 275427 275427 204020 0 0 1.941986
 > [Jupiter:1:(2) 1.941986] [smpi_replay/INFO] Simulation time 1.941986
 
 $ rm -f replay/one_trace
@@ -338,15 +338,15 @@ $ mkfile replay/one_trace
 
 ! output sort 19
 $ ../../smpi_script/bin/smpirun -no-privatize -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
-> [Fafard:2:(3) 0.000000] [smpi_replay/VERBOSE] 2 Irecv 1 1 3000 0.000000
-> [Fafard:2:(3) 0.000000] [smpi_replay/VERBOSE] 2 Isend 0 2 3000 0.000000
-> [Jupiter:1:(2) 0.000000] [smpi_replay/VERBOSE] 1 Isend 0 0 2000 0.000000
-> [Jupiter:1:(2) 0.000000] [smpi_replay/VERBOSE] 1 Isend 2 1 3000 0.000000
-> [Jupiter:1:(2) 0.000000] [smpi_replay/VERBOSE] 1 waitAll 0.000000
-> [Tremblay:0:(1) 0.000000] [smpi_replay/VERBOSE] 0 Irecv 1 0 2000 0.000000
-> [Tremblay:0:(1) 0.000000] [smpi_replay/VERBOSE] 0 Irecv 2 2 3000 0.000000
-> [Tremblay:0:(1) 0.003787] [smpi_replay/VERBOSE] 0 waitAll 0.003787
-> [Fafard:2:(3) 0.006220] [smpi_replay/VERBOSE] 2 waitAll 0.006220
+> [Fafard:2:(3) 0.000000] [smpi_replay/VERBOSE] 2 irecv 1 1 3000 0.000000
+> [Fafard:2:(3) 0.000000] [smpi_replay/VERBOSE] 2 isend 0 2 3000 0.000000
+> [Jupiter:1:(2) 0.000000] [smpi_replay/VERBOSE] 1 isend 0 0 2000 0.000000
+> [Jupiter:1:(2) 0.000000] [smpi_replay/VERBOSE] 1 isend 2 1 3000 0.000000
+> [Jupiter:1:(2) 0.000000] [smpi_replay/VERBOSE] 1 waitall 0.000000
+> [Tremblay:0:(1) 0.000000] [smpi_replay/VERBOSE] 0 irecv 1 0 2000 0.000000
+> [Tremblay:0:(1) 0.000000] [smpi_replay/VERBOSE] 0 irecv 2 2 3000 0.000000
+> [Tremblay:0:(1) 0.003787] [smpi_replay/VERBOSE] 0 waitall 0.003787
+> [Fafard:2:(3) 0.006220] [smpi_replay/VERBOSE] 2 waitall 0.006220
 > [Fafard:2:(3) 0.006220] [smpi_replay/INFO] Simulation time 0.006220
 
 $ rm -f replay/one_trace
index 13ecf1c..6f5bad1 100644 (file)
 0 compute 131738
 0 gather 795 795 0 
 0 compute 302221294
-0 allToAll 1746 1746 
+0 alltoall 1746 1746 
 0 compute 276029
 0 barrier
 0 compute 409757278
 0 comm_size 32
-0 allReduce 32 12513009 1
+0 allreduce 32 12513009 1
 0 compute 3035449395
 0 compute 1525
-0 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+0 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 0 compute 1058645731
 0 barrier
 0 compute 7153
 0 compute 332
-0 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+0 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 0 compute 915153801
 0 barrier
 0 compute 1455003037
-0 allToAll 13824 13824 
+0 alltoall 13824 13824 
 0 compute 72649027
-0 allToAll 13824 13824 
+0 alltoall 13824 13824 
 0 compute 20523056
 0 comm_size 32
-0 allReduce 1 11040132
+0 allreduce 1 11040132
 0 compute 1383678084
 0 comm_size 32
-0 allReduce 795 56429098
+0 allreduce 795 56429098
 0 compute 1518182851
 0 comm_size 32
-0 allReduce 2 67666587
+0 allreduce 2 67666587
 0 compute 21668953
-0 allToAll 13824 13824 
+0 alltoall 13824 13824 
 0 compute 72648705
-0 allToAll 13824 13824 
+0 alltoall 13824 13824 
 0 compute 20522147
 0 comm_size 32
-0 allReduce 1 3081964
+0 allreduce 1 3081964
 0 compute 47498994
 0 comm_size 32
-0 allReduce 32 13171326 1
+0 allreduce 32 13171326 1
 0 compute 62566160216
 0 finalize
\ No newline at end of file
index d67c80d..f39897a 100644 (file)
 1 compute 124787
 1 gather 795 795 0 
 1 compute 228879934
-1 allToAll 1746 1746 
+1 alltoall 1746 1746 
 1 compute 276028
 1 barrier
 1 compute 409315679
 1 comm_size 32
-1 allReduce 32 21827181 1
+1 allreduce 32 21827181 1
 1 compute 3038127257
 1 compute 1525
-1 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+1 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 1 compute 1058645731
 1 barrier
 1 compute 7154
 1 compute 332
-1 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+1 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 1 compute 915153808
 1 barrier
 1 compute 1455231051
-1 allToAll 13824 13824 
+1 alltoall 13824 13824 
 1 compute 72647798
-1 allToAll 13824 13824 
+1 alltoall 13824 13824 
 1 compute 20518087
 1 comm_size 32
-1 allReduce 1 10444633
+1 allreduce 1 10444633
 1 compute 1384067914
 1 comm_size 32
-1 allReduce 795 58255749
+1 allreduce 795 58255749
 1 compute 1517885375
 1 comm_size 32
-1 allReduce 2 68351849
+1 allreduce 2 68351849
 1 compute 21530357
-1 allToAll 13824 13824 
+1 alltoall 13824 13824 
 1 compute 72647756
-1 allToAll 13824 13824 
+1 alltoall 13824 13824 
 1 compute 20517481
 1 comm_size 32
-1 allReduce 1 1808047
+1 allreduce 1 1808047
 1 compute 53953284
 1 comm_size 32
-1 allReduce 32 5776377 1
+1 allreduce 32 5776377 1
 1 compute 62566095398
 1 finalize
\ No newline at end of file
index 3efdb4f..0f63ab4 100644 (file)
 10 compute 123090
 10 gather 795 795 0 
 10 compute 237860371
-10 allToAll 1746 1746 
+10 alltoall 1746 1746 
 10 compute 276028
 10 barrier
 10 compute 409270211
 10 comm_size 32
-10 allReduce 32 21656181 1
+10 allreduce 32 21656181 1
 10 compute 3038108208
 10 compute 1525
-10 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+10 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 10 compute 1058646373
 10 barrier
 10 compute 7748
 10 compute 332
-10 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+10 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 10 compute 915154398
 10 barrier
 10 compute 1453147816
-10 allToAll 13824 13824 
+10 alltoall 13824 13824 
 10 compute 72649003
-10 allToAll 13824 13824 
+10 alltoall 13824 13824 
 10 compute 20518692
 10 comm_size 32
-10 allReduce 1 6543263
+10 allreduce 1 6543263
 10 compute 1382081052
 10 comm_size 32
-10 allReduce 795 58749470
+10 allreduce 795 58749470
 10 compute 1508885748
 10 comm_size 32
-10 allReduce 2 66543554
+10 allreduce 2 66543554
 10 compute 21530874
-10 allToAll 13824 13824 
+10 alltoall 13824 13824 
 10 compute 72648683
-10 allToAll 13824 13824 
+10 alltoall 13824 13824 
 10 compute 20517934
 10 comm_size 32
-10 allReduce 1 4179296
+10 allreduce 1 4179296
 10 compute 75547890
 10 comm_size 32
-10 allReduce 32 1690483 1
+10 allreduce 32 1690483 1
 10 compute 60481270200
 10 finalize
\ No newline at end of file
index 5983019..7a1e409 100644 (file)
 11 compute 123074
 11 gather 795 795 0 
 11 compute 237795802
-11 allToAll 1746 1746 
+11 alltoall 1746 1746 
 11 compute 276029
 11 barrier
 11 compute 409270454
 11 comm_size 32
-11 allReduce 32 21078260 1
+11 allreduce 32 21078260 1
 11 compute 3038108987
 11 compute 1525
-11 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+11 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 11 compute 1058646373
 11 barrier
 11 compute 7748
 11 compute 332
-11 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+11 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 11 compute 915154399
 11 barrier
 11 compute 1452184865
-11 allToAll 13824 13824 
+11 alltoall 13824 13824 
 11 compute 72648818
-11 allToAll 13824 13824 
+11 alltoall 13824 13824 
 11 compute 20518600
 11 comm_size 32
-11 allReduce 1 6623555
+11 allreduce 1 6623555
 11 compute 1381107033
 11 comm_size 32
-11 allReduce 795 59025436
+11 allreduce 795 59025436
 11 compute 1506911402
 11 comm_size 32
-11 allReduce 2 67305727
+11 allreduce 2 67305727
 11 compute 21530742
-11 allToAll 13824 13824 
+11 alltoall 13824 13824 
 11 compute 72648500
-11 allToAll 13824 13824 
+11 alltoall 13824 13824 
 11 compute 20517845
 11 comm_size 32
-11 allReduce 1 3273339
+11 allreduce 1 3273339
 11 compute 73026425
 11 comm_size 32
-11 allReduce 32 2103365 1
+11 allreduce 32 2103365 1
 11 compute 60481269681
 11 finalize
\ No newline at end of file
index 013ab6d..6e73f94 100644 (file)
 12 compute 123084
 12 gather 795 795 0 
 12 compute 238369956
-12 allToAll 1746 1746 
+12 alltoall 1746 1746 
 12 compute 276029
 12 barrier
 12 compute 409270143
 12 comm_size 32
-12 allReduce 32 25565173 1
+12 allreduce 32 25565173 1
 12 compute 3038107993
 12 compute 1525
-12 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+12 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 12 compute 1058646378
 12 barrier
 12 compute 7748
 12 compute 332
-12 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+12 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 12 compute 915154396
 12 barrier
 12 compute 1451516381
-12 allToAll 13824 13824 
+12 alltoall 13824 13824 
 12 compute 72647798
-12 allToAll 13824 13824 
+12 alltoall 13824 13824 
 12 compute 20518135
 12 comm_size 32
-12 allReduce 1 12073536
+12 allreduce 1 12073536
 12 compute 1380438209
 12 comm_size 32
-12 allReduce 795 67953607
+12 allreduce 795 67953607
 12 compute 1505264885
 12 comm_size 32
-12 allReduce 2 76015831
+12 allreduce 2 76015831
 12 compute 21530249
-12 allToAll 13824 13824 
+12 alltoall 13824 13824 
 12 compute 72647572
-12 allToAll 13824 13824 
+12 alltoall 13824 13824 
 12 compute 20517146
 12 comm_size 32
-12 allReduce 1 4487443
+12 allreduce 1 4487443
 12 compute 72922086
 12 comm_size 32
-12 allReduce 32 2563964 1
+12 allreduce 32 2563964 1
 12 compute 60481266895
 12 finalize
\ No newline at end of file
index 599d170..7ee3c2d 100644 (file)
 13 compute 123092
 13 gather 795 795 0 
 13 compute 240038222
-13 allToAll 1746 1746 
+13 alltoall 1746 1746 
 13 compute 276028
 13 barrier
 13 compute 409270018
 13 comm_size 32
-13 allReduce 32 7746985 1
+13 allreduce 32 7746985 1
 13 compute 3038107988
 13 compute 1525
-13 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+13 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 13 compute 1058646386
 13 barrier
 13 compute 7748
 13 compute 332
-13 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+13 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 13 compute 915154400
 13 barrier
 13 compute 1451801158
-13 allToAll 13824 13824 
+13 alltoall 13824 13824 
 13 compute 72647798
-13 allToAll 13824 13824 
+13 alltoall 13824 13824 
 13 compute 20518127
 13 comm_size 32
-13 allReduce 1 9105419
+13 allreduce 1 9105419
 13 compute 1380758960
 13 comm_size 32
-13 allReduce 795 14210244
+13 allreduce 795 14210244
 13 compute 1504573388
 13 comm_size 32
-13 allReduce 2 22024401
+13 allreduce 2 22024401
 13 compute 21530249
-13 allToAll 13824 13824 
+13 alltoall 13824 13824 
 13 compute 72647572
-13 allToAll 13824 13824 
+13 alltoall 13824 13824 
 13 compute 20517143
 13 comm_size 32
-13 allReduce 1 2831799
+13 allreduce 1 2831799
 13 compute 80870940
 13 comm_size 32
-13 allReduce 32 12028 1
+13 allreduce 32 12028 1
 13 compute 60481266716
 13 finalize
\ No newline at end of file
index 8a3b05a..cb4c027 100644 (file)
 14 compute 123086
 14 gather 795 795 0 
 14 compute 242344291
-14 allToAll 1746 1746 
+14 alltoall 1746 1746 
 14 compute 276030
 14 barrier
 14 compute 409270145
 14 comm_size 32
-14 allReduce 32 21679149 1
+14 allreduce 32 21679149 1
 14 compute 3038107618
 14 compute 1525
-14 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+14 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 14 compute 1058646389
 14 barrier
 14 compute 7748
 14 compute 332
-14 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+14 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 14 compute 915154403
 14 barrier
 14 compute 1450254991
-14 allToAll 13824 13824 
+14 alltoall 13824 13824 
 14 compute 72648708
-14 allToAll 13824 13824 
+14 alltoall 13824 13824 
 14 compute 20518595
 14 comm_size 32
-14 allReduce 1 9822
+14 allreduce 1 9822
 14 compute 1379180697
 14 comm_size 32
-14 allReduce 795 60372594
+14 allreduce 795 60372594
 14 compute 1501942786
 14 comm_size 32
-14 allReduce 2 64877886
+14 allreduce 2 64877886
 14 compute 21530677
-14 allToAll 13824 13824 
+14 alltoall 13824 13824 
 14 compute 72648532
-14 allToAll 13824 13824 
+14 alltoall 13824 13824 
 14 compute 20517895
 14 comm_size 32
-14 allReduce 1 3409934
+14 allreduce 1 3409934
 14 compute 73960084
 14 comm_size 32
-14 allReduce 32 2319543 1
+14 allreduce 32 2319543 1
 14 compute 60481266385
 14 finalize
\ No newline at end of file
index fb82026..02e19d5 100644 (file)
 15 compute 123090
 15 gather 795 795 0 
 15 compute 248083384
-15 allToAll 1746 1746 
+15 alltoall 1746 1746 
 15 compute 276028
 15 barrier
 15 compute 409270090
 15 comm_size 32
-15 allReduce 32 19421153 1
+15 allreduce 32 19421153 1
 15 compute 3038107647
 15 compute 1525
-15 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+15 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 15 compute 1058646397
 15 barrier
 15 compute 7748
 15 compute 332
-15 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+15 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 15 compute 915154396
 15 barrier
 15 compute 1449498615
-15 allToAll 13824 13824 
+15 alltoall 13824 13824 
 15 compute 72648698
-15 allToAll 13824 13824 
+15 alltoall 13824 13824 
 15 compute 20518595
 15 comm_size 32
-15 allReduce 1 5301084
+15 allreduce 1 5301084
 15 compute 1378420591
 15 comm_size 32
-15 allReduce 795 59634324
+15 allreduce 795 59634324
 15 compute 1500197233
 15 comm_size 32
-15 allReduce 2 64461369
+15 allreduce 2 64461369
 15 compute 21530676
-15 allToAll 13824 13824 
+15 alltoall 13824 13824 
 15 compute 72648532
-15 allToAll 13824 13824 
+15 alltoall 13824 13824 
 15 compute 20517894
 15 comm_size 32
-15 allReduce 1 2260549
+15 allreduce 1 2260549
 15 compute 73034913
 15 comm_size 32
-15 allReduce 32 2746349 1
+15 allreduce 32 2746349 1
 15 compute 60481266209
 15 finalize
\ No newline at end of file
index a185a79..cf4429d 100644 (file)
 16 compute 124216
 16 gather 795 795 0 
 16 compute 248019689
-16 allToAll 1746 1746 
+16 alltoall 1746 1746 
 16 compute 276028
 16 barrier
 16 compute 409314252
 16 comm_size 32
-16 allReduce 32 18101827 1
+16 allreduce 32 18101827 1
 16 compute 3038128476
 16 compute 1525
-16 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+16 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 16 compute 1058645807
 16 barrier
 16 compute 7155
 16 compute 332
-16 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+16 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 16 compute 915153808
 16 barrier
 16 compute 1449835669
-16 allToAll 13824 13824 
+16 alltoall 13824 13824 
 16 compute 72647803
-16 allToAll 13824 13824 
+16 alltoall 13824 13824 
 16 compute 20518093
 16 comm_size 32
-16 allReduce 1 5226292
+16 allreduce 1 5226292
 16 compute 1378796665
 16 comm_size 32
-16 allReduce 795 72159977
+16 allreduce 795 72159977
 16 compute 1499557201
 16 comm_size 32
-16 allReduce 2 63798502
+16 allreduce 2 63798502
 16 compute 21530343
-16 allToAll 13824 13824 
+16 alltoall 13824 13824 
 16 compute 72647758
-16 allToAll 13824 13824 
+16 alltoall 13824 13824 
 16 compute 20517492
 16 comm_size 32
-16 allReduce 1 3823764
+16 allreduce 1 3823764
 16 compute 81457367
 16 comm_size 32
-16 allReduce 32 1411377 1
+16 allreduce 32 1411377 1
 16 compute 60481274473
 16 finalize
\ No newline at end of file
index 83b0225..9783edf 100644 (file)
 17 compute 124783
 17 gather 795 795 0 
 17 compute 247125067
-17 allToAll 1746 1746 
+17 alltoall 1746 1746 
 17 compute 276029
 17 barrier
 17 compute 409314675
 17 comm_size 32
-17 allReduce 32 22370115 1
+17 allreduce 32 22370115 1
 17 compute 3038128753
 17 compute 1525
-17 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+17 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 17 compute 1058645810
 17 barrier
 17 compute 7155
 17 compute 332
-17 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+17 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 17 compute 915153803
 17 barrier
 17 compute 1448145232
-17 allToAll 13824 13824 
+17 alltoall 13824 13824 
 17 compute 72647798
-17 allToAll 13824 13824 
+17 alltoall 13824 13824 
 17 compute 20518070
 17 comm_size 32
-17 allReduce 1 11132375
+17 allreduce 1 11132375
 17 compute 1377069218
 17 comm_size 32
-17 allReduce 795 71401648
+17 allreduce 795 71401648
 17 compute 1496774529
 17 comm_size 32
-17 allReduce 2 78649106
+17 allreduce 2 78649106
 17 compute 21530303
-17 allToAll 13824 13824 
+17 alltoall 13824 13824 
 17 compute 72647756
-17 allToAll 13824 13824 
+17 alltoall 13824 13824 
 17 compute 20517446
 17 comm_size 32
-17 allReduce 1 4068354
+17 allreduce 1 4068354
 17 compute 73311170
 17 comm_size 32
-17 allReduce 32 4382080 1
+17 allreduce 32 4382080 1
 17 compute 60481274164
 17 finalize
\ No newline at end of file
index 5fc3d0d..ae92922 100644 (file)
 18 compute 124220
 18 gather 795 795 0 
 18 compute 245938721
-18 allToAll 1746 1746 
+18 alltoall 1746 1746 
 18 compute 276028
 18 barrier
 18 compute 409314088
 18 comm_size 32
-18 allReduce 32 25414757 1
+18 allreduce 32 25414757 1
 18 compute 3038128233
 18 compute 1525
-18 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+18 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 18 compute 1058646229
 18 barrier
 18 compute 7563
 18 compute 332
-18 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+18 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 18 compute 915154213
 18 barrier
 18 compute 1447518376
-18 allToAll 13824 13824 
+18 alltoall 13824 13824 
 18 compute 72648622
-18 allToAll 13824 13824 
+18 alltoall 13824 13824 
 18 compute 20518479
 18 comm_size 32
-18 allReduce 1 11692905
+18 allreduce 1 11692905
 18 compute 1376442859
 18 comm_size 32
-18 allReduce 795 70015898
+18 allreduce 795 70015898
 18 compute 1495165972
 18 comm_size 32
-18 allReduce 2 77379595
+18 allreduce 2 77379595
 18 compute 21530774
-18 allToAll 13824 13824 
+18 alltoall 13824 13824 
 18 compute 72648820
-18 allToAll 13824 13824 
+18 alltoall 13824 13824 
 18 compute 20517985
 18 comm_size 32
-18 allReduce 1 5117785
+18 allreduce 1 5117785
 18 compute 73632276
 18 comm_size 32
-18 allReduce 32 3373668 1
+18 allreduce 32 3373668 1
 18 compute 60481274381
 18 finalize
\ No newline at end of file
index b130b22..6499e3a 100644 (file)
 19 compute 124765
 19 gather 795 795 0 
 19 compute 245277367
-19 allToAll 1746 1746 
+19 alltoall 1746 1746 
 19 compute 276030
 19 barrier
 19 compute 409314528
 19 comm_size 32
-19 allReduce 32 21818681 1
+19 allreduce 32 21818681 1
 19 compute 3038130250
 19 compute 1525
-19 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+19 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 19 compute 1058646413
 19 barrier
 19 compute 7749
 19 compute 332
-19 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+19 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 19 compute 915154395
 19 barrier
 19 compute 1447127347
-19 allToAll 13824 13824 
+19 alltoall 13824 13824 
 19 compute 72648659
-19 allToAll 13824 13824 
+19 alltoall 13824 13824 
 19 compute 20518521
 19 comm_size 32
-19 allReduce 1 10938129
+19 allreduce 1 10938129
 19 compute 1376061784
 19 comm_size 32
-19 allReduce 795 71878923
+19 allreduce 795 71878923
 19 compute 1493790470
 19 comm_size 32
-19 allReduce 2 75179146
+19 allreduce 2 75179146
 19 compute 21530919
-19 allToAll 13824 13824 
+19 alltoall 13824 13824 
 19 compute 72648815
-19 allToAll 13824 13824 
+19 alltoall 13824 13824 
 19 compute 20518034
 19 comm_size 32
-19 allReduce 1 4342658
+19 allreduce 1 4342658
 19 compute 75851167
 19 comm_size 32
-19 allReduce 32 2469080 1
+19 allreduce 32 2469080 1
 19 compute 60481269761
 19 finalize
\ No newline at end of file
index 2af1619..77531da 100644 (file)
 2 compute 123092
 2 gather 795 795 0 
 2 compute 231016664
-2 allToAll 1746 1746 
+2 alltoall 1746 1746 
 2 compute 276030
 2 barrier
 2 compute 409271032
 2 comm_size 32
-2 allReduce 32 21600798 1
+2 allreduce 32 21600798 1
 2 compute 3038108638
 2 compute 1525
-2 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+2 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 2 compute 1058646336
 2 barrier
 2 compute 7748
 2 compute 332
-2 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+2 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 2 compute 915154403
 2 barrier
 2 compute 1453971872
-2 allToAll 13824 13824 
+2 alltoall 13824 13824 
 2 compute 72648604
-2 allToAll 13824 13824 
+2 alltoall 13824 13824 
 2 compute 20518491
 2 comm_size 32
-2 allReduce 1 9133457
+2 allreduce 1 9133457
 2 compute 1382778051
 2 comm_size 32
-2 allReduce 795 56590206
+2 allreduce 795 56590206
 2 compute 1515905980
 2 comm_size 32
-2 allReduce 2 68499832
+2 allreduce 2 68499832
 2 compute 21531910
-2 allToAll 13824 13824 
+2 alltoall 13824 13824 
 2 compute 72648598
-2 allToAll 13824 13824 
+2 alltoall 13824 13824 
 2 compute 20518490
 2 comm_size 32
-2 allReduce 1 2165903
+2 allreduce 1 2165903
 2 compute 47383939
 2 comm_size 32
-2 allReduce 32 7340509 1
+2 allreduce 32 7340509 1
 2 compute 62566097135
 2 finalize
\ No newline at end of file
index 9b1106c..5715463 100644 (file)
 20 compute 124204
 20 gather 795 795 0 
 20 compute 244616488
-20 allToAll 1746 1746 
+20 alltoall 1746 1746 
 20 compute 276028
 20 barrier
 20 compute 409313968
 20 comm_size 32
-20 allReduce 32 5510267 1
+20 allreduce 32 5510267 1
 20 compute 3038130868
 20 compute 1525
-20 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+20 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 20 compute 1058646421
 20 barrier
 20 compute 7748
 20 compute 332
-20 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+20 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 20 compute 915154401
 20 barrier
 20 compute 1445555133
-20 allToAll 13824 13824 
+20 alltoall 13824 13824 
 20 compute 72648538
-20 allToAll 13824 13824 
+20 alltoall 13824 13824 
 20 compute 20518471
 20 comm_size 32
-20 allReduce 1 9691440
+20 allreduce 1 9691440
 20 compute 1374455267
 20 comm_size 32
-20 allReduce 795 51860
+20 allreduce 795 51860
 20 compute 1491203354
 20 comm_size 32
-20 allReduce 2 3286786
+20 allreduce 2 3286786
 20 compute 21530547
-20 allToAll 13824 13824 
+20 alltoall 13824 13824 
 20 compute 72648392
-20 allToAll 13824 13824 
+20 alltoall 13824 13824 
 20 compute 20517562
 20 comm_size 32
-20 allReduce 1 2308549
+20 allreduce 1 2308549
 20 compute 68196979
 20 comm_size 32
-20 allReduce 32 6148766 1
+20 allreduce 32 6148766 1
 20 compute 60481269975
 20 finalize
\ No newline at end of file
index caf0c2a..a25c070 100644 (file)
 21 compute 124765
 21 gather 795 795 0 
 21 compute 244537166
-21 allToAll 1746 1746 
+21 alltoall 1746 1746 
 21 compute 276028
 21 barrier
 21 compute 409314436
 21 comm_size 32
-21 allReduce 32 7208831 1
+21 allreduce 32 7208831 1
 21 compute 3038131051
 21 compute 1525
-21 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+21 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 21 compute 1058646427
 21 barrier
 21 compute 7748
 21 compute 332
-21 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+21 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 21 compute 915154402
 21 barrier
 21 compute 1444252854
-21 allToAll 13824 13824 
+21 alltoall 13824 13824 
 21 compute 72648659
-21 allToAll 13824 13824 
+21 alltoall 13824 13824 
 21 compute 20518520
 21 comm_size 32
-21 allReduce 1 10479272
+21 allreduce 1 10479272
 21 compute 1373126126
 21 comm_size 32
-21 allReduce 795 3035528
+21 allreduce 795 3035528
 21 compute 1488989422
 21 comm_size 32
-21 allReduce 2 5357055
+21 allreduce 2 5357055
 21 compute 21530648
-21 allToAll 13824 13824 
+21 alltoall 13824 13824 
 21 compute 72648512
-21 allToAll 13824 13824 
+21 alltoall 13824 13824 
 21 compute 20517622
 21 comm_size 32
-21 allReduce 1 2161693
+21 allreduce 1 2161693
 21 compute 62152034
 21 comm_size 32
-21 allReduce 32 11552421 1
+21 allreduce 32 11552421 1
 21 compute 60481265726
 21 finalize
\ No newline at end of file
index 1662613..7b2b16a 100644 (file)
 22 compute 124196
 22 gather 795 795 0 
 22 compute 244528768
-22 allToAll 1746 1746 
+22 alltoall 1746 1746 
 22 compute 276028
 22 barrier
 22 compute 409313850
 22 comm_size 32
-22 allReduce 32 21210529 1
+22 allreduce 32 21210529 1
 22 compute 3038129064
 22 compute 1525
-22 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+22 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 22 compute 1058646432
 22 barrier
 22 compute 7748
 22 compute 332
-22 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+22 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 22 compute 915154399
 22 barrier
 22 compute 1444306844
-22 allToAll 13824 13824 
+22 alltoall 13824 13824 
 22 compute 72648999
-22 allToAll 13824 13824 
+22 alltoall 13824 13824 
 22 compute 20518738
 22 comm_size 32
-22 allReduce 1 8631733
+22 allreduce 1 8631733
 22 compute 1373203364
 22 comm_size 32
-22 allReduce 795 60367712
+22 allreduce 795 60367712
 22 compute 1488212129
 22 comm_size 32
-22 allReduce 2 63829458
+22 allreduce 2 63829458
 22 compute 21530897
-22 allToAll 13824 13824 
+22 alltoall 13824 13824 
 22 compute 72648612
-22 allToAll 13824 13824 
+22 alltoall 13824 13824 
 22 compute 20517980
 22 comm_size 32
-22 allReduce 1 1900324
+22 allreduce 1 1900324
 22 compute 67460267
 22 comm_size 32
-22 allReduce 32 4780370 1
+22 allreduce 32 4780370 1
 22 compute 60481266360
 22 finalize
\ No newline at end of file
index 64cb45a..b4cd61e 100644 (file)
 23 compute 124765
 23 gather 795 795 0 
 23 compute 244359495
-23 allToAll 1746 1746 
+23 alltoall 1746 1746 
 23 compute 276028
 23 barrier
 23 compute 409314315
 23 comm_size 32
-23 allReduce 32 8004854 1
+23 allreduce 32 8004854 1
 23 compute 3038128913
 23 compute 1525
-23 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+23 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 23 compute 1058646436
 23 barrier
 23 compute 7748
 23 compute 332
-23 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+23 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 23 compute 915154403
 23 barrier
 23 compute 1442892049
-23 allToAll 13824 13824 
+23 alltoall 13824 13824 
 23 compute 72649058
-23 allToAll 13824 13824 
+23 alltoall 13824 13824 
 23 compute 20518772
 23 comm_size 32
-23 allReduce 1 11366080
+23 allreduce 1 11366080
 23 compute 1371757234
 23 comm_size 32
-23 allReduce 795 19651581
+23 allreduce 795 19651581
 23 compute 1485895784
 23 comm_size 32
-23 allReduce 2 26240201
+23 allreduce 2 26240201
 23 compute 21530587
-23 allToAll 13824 13824 
+23 alltoall 13824 13824 
 23 compute 72648412
-23 allToAll 13824 13824 
+23 alltoall 13824 13824 
 23 compute 20517845
 23 comm_size 32
-23 allReduce 1 10247
+23 allreduce 1 10247
 23 compute 60435010
 23 comm_size 32
-23 allReduce 32 11206099 1
+23 allreduce 32 11206099 1
 23 compute 60481266309
 23 finalize
\ No newline at end of file
index 4bd8582..d2aec8f 100644 (file)
 24 compute 124220
 24 gather 795 795 0 
 24 compute 244917352
-24 allToAll 1746 1746 
+24 alltoall 1746 1746 
 24 compute 276028
 24 barrier
 24 compute 409313728
 24 comm_size 32
-24 allReduce 32 20511086 1
+24 allreduce 32 20511086 1
 24 compute 3038169943
 24 compute 1525
-24 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+24 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 24 compute 1058646440
 24 barrier
 24 compute 7748
 24 compute 332
-24 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+24 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 24 compute 915154401
 24 barrier
 24 compute 1441883451
-24 allToAll 13824 13824 
+24 alltoall 13824 13824 
 24 compute 72648998
-24 allToAll 13824 13824 
+24 alltoall 13824 13824 
 24 compute 20518690
 24 comm_size 32
-24 allReduce 1 10902682
+24 allreduce 1 10902682
 24 compute 1370730665
 24 comm_size 32
-24 allReduce 795 61540948
+24 allreduce 795 61540948
 24 compute 1484080041
 24 comm_size 32
-24 allReduce 2 60816736
+24 allreduce 2 60816736
 24 compute 21532130
-24 allToAll 13824 13824 
+24 alltoall 13824 13824 
 24 compute 72648997
-24 allToAll 13824 13824 
+24 alltoall 13824 13824 
 24 compute 20518693
 24 comm_size 32
-24 allReduce 1 2120822
+24 allreduce 1 2120822
 24 compute 56435059
 24 comm_size 32
-24 allReduce 32 5105979 1
+24 allreduce 32 5105979 1
 24 compute 60481270241
 24 finalize
\ No newline at end of file
index 84294c2..5134be0 100644 (file)
 25 compute 124196
 25 gather 795 795 0 
 25 compute 246170355
-25 allToAll 1746 1746 
+25 alltoall 1746 1746 
 25 compute 276028
 25 barrier
 25 compute 409313755
 25 comm_size 32
-25 allReduce 32 5669119 1
+25 allreduce 32 5669119 1
 25 compute 2984230246
 25 compute 1525
-25 allToAllV 12378660 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+25 alltoallv 12378660 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 25 compute 1058646447
 25 barrier
 25 compute 7748
 25 compute 332
-25 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  12378660  386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820 
+25 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  12378660  386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820 
 25 compute 854144618
 25 barrier
 25 compute 1441635387
-25 allToAll 13824 13824 
+25 alltoall 13824 13824 
 25 compute 72649040
-25 allToAll 13824 13824 
+25 alltoall 13824 13824 
 25 compute 20518716
 25 comm_size 32
-25 allReduce 1 12261945
+25 allreduce 1 12261945
 25 compute 1370492323
 25 comm_size 32
-25 allReduce 795 21773495
+25 allreduce 795 21773495
 25 compute 1483078560
 25 comm_size 32
-25 allReduce 2 154705
+25 allreduce 2 154705
 25 compute 21532187
-25 allToAll 13824 13824 
+25 alltoall 13824 13824 
 25 compute 72649043
-25 allToAll 13824 13824 
+25 alltoall 13824 13824 
 25 compute 20518717
 25 comm_size 32
-25 allReduce 1 3265650
+25 allreduce 1 3265650
 25 compute 58721452
 25 comm_size 32
-25 allReduce 32 10423698 1
+25 allreduce 32 10423698 1
 25 compute 60481270126
 25 finalize
\ No newline at end of file
index 74b8787..690166c 100644 (file)
 26 compute 124198
 26 gather 795 795 0 
 26 compute 247190645
-26 allToAll 1746 1746 
+26 alltoall 1746 1746 
 26 compute 276028
 26 barrier
 26 compute 409313648
 26 comm_size 32
-26 allReduce 32 2008745 1
+26 allreduce 32 2008745 1
 26 compute 2984229928
 26 compute 1525
-26 allToAllV 12378660 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+26 alltoallv 12378660 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 26 compute 1058646452
 26 barrier
 26 compute 7748
 26 compute 332
-26 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  12378660  386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820 
+26 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  12378660  386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820 
 26 compute 854144617
 26 barrier
 26 compute 1439789686
-26 allToAll 13824 13824 
+26 alltoall 13824 13824 
 26 compute 60542846
-26 allToAll 13824 13824 
+26 alltoall 13824 13824 
 26 compute 20518690
 26 comm_size 32
-26 allReduce 1 13508570
+26 allreduce 1 13508570
 26 compute 1368595739
 26 comm_size 32
-26 allReduce 795 21460724
+26 allreduce 795 21460724
 26 compute 1480450203
 26 comm_size 32
-26 allReduce 2 175917
+26 allreduce 2 175917
 26 compute 21532129
-26 allToAll 13824 13824 
+26 alltoall 13824 13824 
 26 compute 60542843
-26 allToAll 13824 13824 
+26 alltoall 13824 13824 
 26 compute 20518690
 26 comm_size 32
-26 allReduce 1 2415378
+26 allreduce 1 2415378
 26 compute 47321791
 26 comm_size 32
-26 allReduce 32 18752319 1
+26 allreduce 32 18752319 1
 26 compute 60481270254
 26 finalize
\ No newline at end of file
index 79f54b2..34e5612 100644 (file)
 27 compute 124781
 27 gather 795 795 0 
 27 compute 249045970
-27 allToAll 1746 1746 
+27 alltoall 1746 1746 
 27 compute 276028
 27 barrier
 27 compute 409314179
 27 comm_size 32
-27 allReduce 32 20892423 1
+27 allreduce 32 20892423 1
 27 compute 2984229524
 27 compute 1525
-27 allToAllV 12378660 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+27 alltoallv 12378660 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 27 compute 1058646456
 27 barrier
 27 compute 7748
 27 compute 332
-27 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  12378660  386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820 
+27 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  12378660  386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820 
 27 compute 854144616
 27 barrier
 27 compute 1439369571
-27 allToAll 13824 13824 
+27 alltoall 13824 13824 
 27 compute 11627
-27 allToAll 13824 13824 
+27 alltoall 13824 13824 
 27 compute 20518472
 27 comm_size 32
-27 allReduce 1 11959015
+27 allreduce 1 11959015
 27 compute 1368175777
 27 comm_size 32
-27 allReduce 795 64450365
+27 allreduce 795 64450365
 27 compute 1479400301
 27 comm_size 32
-27 allReduce 2 73325118
+27 allreduce 2 73325118
 27 compute 21531861
-27 allToAll 13824 13824 
+27 alltoall 13824 13824 
 27 compute 11627
-27 allToAll 13824 13824 
+27 alltoall 13824 13824 
 27 compute 20518471
 27 comm_size 32
-27 allReduce 1 2864414
+27 allreduce 1 2864414
 27 compute 47255321
 27 comm_size 32
-27 allReduce 32 8761373 1
+27 allreduce 32 8761373 1
 27 compute 60481269758
 27 finalize
\ No newline at end of file
index 1ba5b2d..9949843 100644 (file)
 28 compute 124218
 28 gather 795 795 0 
 28 compute 251211915
-28 allToAll 1746 1746 
+28 alltoall 1746 1746 
 28 compute 276028
 28 barrier
 28 compute 409313589
 28 comm_size 32
-28 allReduce 32 23989 1
+28 allreduce 32 23989 1
 28 compute 2984190851
 28 compute 1525
-28 allToAllV 12378660 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+28 alltoallv 12378660 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 28 compute 1058646461
 28 barrier
 28 compute 7748
 28 compute 332
-28 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  12378660  386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820 
+28 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  12378660  386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820 
 28 compute 854144614
 28 barrier
 28 compute 1439729605
-28 allToAll 13824 13824 
+28 alltoall 13824 13824 
 28 compute 12007
-28 allToAll 13824 13824 
+28 alltoall 13824 13824 
 28 compute 20518662
 28 comm_size 32
-28 allReduce 1 10348621
+28 allreduce 1 10348621
 28 compute 1368565748
 28 comm_size 32
-28 allReduce 795 15729812
+28 allreduce 795 15729812
 28 compute 1479129984
 28 comm_size 32
-28 allReduce 2 4751179
+28 allreduce 2 4751179
 28 compute 21530860
-28 allToAll 13824 13824 
+28 alltoall 13824 13824 
 28 compute 11643
-28 allToAll 13824 13824 
+28 alltoall 13824 13824 
 28 compute 20517914
 28 comm_size 32
-28 allReduce 1 1949975
+28 allreduce 1 1949975
 28 compute 53951331
 28 comm_size 32
-28 allReduce 32 11843209 1
+28 allreduce 32 11843209 1
 28 compute 60481275100
 28 finalize
\ No newline at end of file
index 81809cc..68e09d1 100644 (file)
 29 compute 124771
 29 gather 795 795 0 
 29 compute 254905873
-29 allToAll 1746 1746 
+29 alltoall 1746 1746 
 29 compute 276028
 29 barrier
 29 compute 409314112
 29 comm_size 32
-29 allReduce 32 9721390 1
+29 allreduce 32 9721390 1
 29 compute 2984189170
 29 compute 1525
-29 allToAllV 12378660 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820  13096620  414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 386820 386820 386820 386820 386820 386820 386820 
+29 alltoallv 12378660 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820  13096620  414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 386820 386820 386820 386820 386820 386820 386820 
 29 compute 1058608153
 29 barrier
 29 compute 7748
 29 compute 332
-29 allToAllV 13096620 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 386820 386820 386820 386820 386820 386820 386820  12378660  386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820 
+29 alltoallv 13096620 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 386820 386820 386820 386820 386820 386820 386820  12378660  386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820 
 29 compute 854144616
 29 barrier
 29 compute 1438469865
-29 allToAll 13824 13824 
+29 alltoall 13824 13824 
 29 compute 12107
-29 allToAll 13824 13824 
+29 alltoall 13824 13824 
 29 compute 20518712
 29 comm_size 32
-29 allReduce 1 11245758
+29 allreduce 1 11245758
 29 compute 1367275873
 29 comm_size 32
-29 allReduce 795 5153979
+29 allreduce 795 5153979
 29 compute 1477150179
 29 comm_size 32
-29 allReduce 2 348477
+29 allreduce 2 348477
 29 compute 21530956
-29 allToAll 13824 13824 
+29 alltoall 13824 13824 
 29 compute 11743
-29 allToAll 13824 13824 
+29 alltoall 13824 13824 
 29 compute 20517964
 29 comm_size 32
-29 allReduce 1 1709170
+29 allreduce 1 1709170
 29 compute 47317512
 29 comm_size 32
-29 allReduce 32 18350318 1
+29 allreduce 32 18350318 1
 29 compute 60481274853
 29 finalize
\ No newline at end of file
index 387753f..5a189c3 100644 (file)
 3 compute 123084
 3 gather 795 795 0 
 3 compute 232272172
-3 allToAll 1746 1746 
+3 alltoall 1746 1746 
 3 compute 276028
 3 barrier
 3 compute 409340097
 3 comm_size 32
-3 allReduce 32 26788025 1
+3 allreduce 32 26788025 1
 3 compute 3038128971
 3 compute 1525
-3 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+3 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 3 compute 1058646334
 3 barrier
 3 compute 7748
 3 compute 332
-3 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+3 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 3 compute 915154397
 3 barrier
 3 compute 1453551932
-3 allToAll 13824 13824 
+3 alltoall 13824 13824 
 3 compute 72648918
-3 allToAll 13824 13824 
+3 alltoall 13824 13824 
 3 compute 20518658
 3 comm_size 32
-3 allReduce 1 10088694
+3 allreduce 1 10088694
 3 compute 1382358093
 3 comm_size 32
-3 allReduce 795 71440182
+3 allreduce 795 71440182
 3 compute 1514856084
 3 comm_size 32
-3 allReduce 2 82679426
+3 allreduce 2 82679426
 3 compute 21532011
-3 allToAll 13824 13824 
+3 alltoall 13824 13824 
 3 compute 72648918
-3 allToAll 13824 13824 
+3 alltoall 13824 13824 
 3 compute 20518650
 3 comm_size 32
-3 allReduce 1 2381618
+3 allreduce 1 2381618
 3 compute 47351593
 3 comm_size 32
-3 allReduce 32 8075911 1
+3 allreduce 32 8075911 1
 3 compute 62566098113
 3 finalize
\ No newline at end of file
index 85e847f..fef8f65 100644 (file)
 30 compute 124224
 30 gather 795 795 0 
 30 compute 87539379
-30 allToAll 1746 1746 
+30 alltoall 1746 1746 
 30 compute 276029
 30 barrier
 30 compute 409313447
 30 comm_size 32
-30 allReduce 32 18389809 1
+30 allreduce 32 18389809 1
 30 compute 2984187726
 30 compute 1525
-30 allToAllV 12378660 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820  13096620  414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 386820 386820 386820 386820 386820 386820 386820 
+30 alltoallv 12378660 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820  13096620  414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 386820 386820 386820 386820 386820 386820 386820 
 30 compute 1058608125
 30 barrier
 30 compute 7712
 30 compute 332
-30 allToAllV 13096620 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 386820 386820 386820 386820 386820 386820 386820  12378660  386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820 
+30 alltoallv 13096620 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 386820 386820 386820 386820 386820 386820 386820  12378660  386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820 
 30 compute 854144576
 30 barrier
 30 compute 866371
-30 allToAll 13824 13824 
+30 alltoall 13824 13824 
 30 compute 10867
-30 allToAll 13824 13824 
+30 alltoall 13824 13824 
 30 compute 26015
 30 comm_size 32
-30 allReduce 1 18926466
+30 allreduce 1 18926466
 30 compute 37317
 30 comm_size 32
-30 allReduce 795 794203941
+30 allreduce 795 794203941
 30 compute 40864
 30 comm_size 32
-30 allReduce 2 830615079
+30 allreduce 2 830615079
 30 compute 835216
-30 allToAll 13824 13824 
+30 alltoall 13824 13824 
 30 compute 10827
-30 allToAll 13824 13824 
+30 alltoall 13824 13824 
 30 compute 25978
 30 comm_size 32
-30 allReduce 1 10224036
+30 allreduce 1 10224036
 30 compute 415815
 30 comm_size 32
-30 allReduce 32 30205336 1
+30 allreduce 32 30205336 1
 30 compute 60481268189
 30 finalize
\ No newline at end of file
index 1ba49b5..9e78b03 100644 (file)
 31 compute 124781
 31 gather 795 795 0 
 31 compute 1572422
-31 allToAll 1746 1746 
+31 alltoall 1746 1746 
 31 compute 276028
 31 barrier
 31 compute 409314016
 31 comm_size 32
-31 allReduce 32 9196581 1
+31 allreduce 32 9196581 1
 31 compute 2984188007
 31 compute 1525
-31 allToAllV 12378660 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820  13096620  414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 386820 386820 386820 386820 386820 386820 386820 
+31 alltoallv 12378660 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820  13096620  414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 386820 386820 386820 386820 386820 386820 386820 
 31 compute 1058608127
 31 barrier
 31 compute 7712
 31 compute 332
-31 allToAllV 13096620 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 386820 386820 386820 386820 386820 386820 386820  12378660  386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820 
+31 alltoallv 13096620 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 414450 386820 386820 386820 386820 386820 386820 386820  12378660  386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386834 386820 386820 386820 
 31 compute 854144579
 31 barrier
 31 compute 866778
-31 allToAll 13824 13824 
+31 alltoall 13824 13824 
 31 compute 12127
-31 allToAll 13824 13824 
+31 alltoall 13824 13824 
 31 compute 26660
 31 comm_size 32
-31 allReduce 1 16408053
+31 allreduce 1 16408053
 31 compute 37317
 31 comm_size 32
-31 allReduce 795 790700995
+31 allreduce 795 790700995
 31 compute 40864
 31 comm_size 32
-31 allReduce 2 821059536
+31 allreduce 2 821059536
 31 compute 835351
-31 allToAll 13824 13824 
+31 alltoall 13824 13824 
 31 compute 11527
-31 allToAll 13824 13824 
+31 alltoall 13824 13824 
 31 compute 26358
 31 comm_size 32
-31 allReduce 1 8581230
+31 allreduce 1 8581230
 31 compute 415699
 31 comm_size 32
-31 allReduce 32 39149334 1
+31 allreduce 32 39149334 1
 31 compute 60481268000
 31 finalize
\ No newline at end of file
index 756bacc..a9cb014 100644 (file)
 4 compute 123084
 4 gather 795 795 0 
 4 compute 234577369
-4 allToAll 1746 1746 
+4 alltoall 1746 1746 
 4 compute 276028
 4 barrier
 4 compute 409270911
 4 comm_size 32
-4 allReduce 32 18332025 1
+4 allreduce 32 18332025 1
 4 compute 3038108202
 4 compute 1525
-4 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+4 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 4 compute 1058646339
 4 barrier
 4 compute 7748
 4 compute 332
-4 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+4 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 4 compute 915154399
 4 barrier
 4 compute 1454298529
-4 allToAll 13824 13824 
+4 alltoall 13824 13824 
 4 compute 72649038
-4 allToAll 13824 13824 
+4 alltoall 13824 13824 
 4 compute 20518710
 4 comm_size 32
-4 allReduce 1 8764901
+4 allreduce 1 8764901
 4 compute 1383149406
 4 comm_size 32
-4 allReduce 795 58555205
+4 allreduce 795 58555205
 4 compute 1514972225
 4 comm_size 32
-4 allReduce 2 69773224
+4 allreduce 2 69773224
 4 compute 21530912
-4 allToAll 13824 13824 
+4 alltoall 13824 13824 
 4 compute 72648716
-4 allToAll 13824 13824 
+4 alltoall 13824 13824 
 4 compute 20517953
 4 comm_size 32
-4 allReduce 1 1849838
+4 allreduce 1 1849838
 4 compute 57241690
 4 comm_size 32
-4 allReduce 32 5143014 1
+4 allreduce 32 5143014 1
 4 compute 62566104180
 4 finalize
\ No newline at end of file
index 5ff9b32..ecccf7d 100644 (file)
 5 compute 123092
 5 gather 795 795 0 
 5 compute 234047138
-5 allToAll 1746 1746 
+5 alltoall 1746 1746 
 5 compute 276029
 5 barrier
 5 compute 409270813
 5 comm_size 32
-5 allReduce 32 26075048 1
+5 allreduce 32 26075048 1
 5 compute 3038108674
 5 compute 1525
-5 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+5 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 5 compute 1058646347
 5 barrier
 5 compute 7748
 5 compute 332
-5 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+5 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 5 compute 915154397
 5 barrier
 5 compute 1453660307
-5 allToAll 13824 13824 
+5 alltoall 13824 13824 
 5 compute 72648498
-5 allToAll 13824 13824 
+5 alltoall 13824 13824 
 5 compute 20518451
 5 comm_size 32
-5 allReduce 1 9630351
+5 allreduce 1 9630351
 5 compute 1382506563
 5 comm_size 32
-5 allReduce 795 86398358
+5 allreduce 795 86398358
 5 compute 1513570165
 5 comm_size 32
-5 allReduce 2 82995562
+5 allreduce 2 82995562
 5 compute 21531740
-5 allToAll 13824 13824 
+5 alltoall 13824 13824 
 5 compute 72648502
-5 allToAll 13824 13824 
+5 alltoall 13824 13824 
 5 compute 20518455
 5 comm_size 32
-5 allReduce 1 5339502
+5 allreduce 1 5339502
 5 compute 56257081
 5 comm_size 32
-5 allReduce 32 5420716 1
+5 allreduce 32 5420716 1
 5 compute 62566097632
 5 finalize
\ No newline at end of file
index 4fa4cd5..9a59e10 100644 (file)
 6 compute 122556
 6 gather 795 795 0 
 6 compute 234561584
-6 allToAll 1746 1746 
+6 alltoall 1746 1746 
 6 compute 276028
 6 barrier
 6 compute 409318441
 6 comm_size 32
-6 allReduce 32 26071846 1
+6 allreduce 32 26071846 1
 6 compute 3038127610
 6 compute 1525
-6 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+6 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 6 compute 1058646353
 6 barrier
 6 compute 7748
 6 compute 332
-6 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+6 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 6 compute 915154402
 6 barrier
 6 compute 1453541410
-6 allToAll 13824 13824 
+6 alltoall 13824 13824 
 6 compute 72647797
-6 allToAll 13824 13824 
+6 alltoall 13824 13824 
 6 compute 20518134
 6 comm_size 32
-6 allReduce 1 10500073
+6 allreduce 1 10500073
 6 compute 1382402404
 6 comm_size 32
-6 allReduce 795 68340267
+6 allreduce 795 68340267
 6 compute 1512701245
 6 comm_size 32
-6 allReduce 2 78355589
+6 allreduce 2 78355589
 6 compute 21530601
-6 allToAll 13824 13824 
+6 alltoall 13824 13824 
 6 compute 72648538
-6 allToAll 13824 13824 
+6 alltoall 13824 13824 
 6 compute 20517863
 6 comm_size 32
-6 allReduce 1 4895476
+6 allreduce 1 4895476
 6 compute 59401613
 6 comm_size 32
-6 allReduce 32 5355812 1
+6 allreduce 32 5355812 1
 6 compute 60481271077
 6 finalize
\ No newline at end of file
index c334e99..11c2b8c 100644 (file)
 7 compute 122554
 7 gather 795 795 0 
 7 compute 237329701
-7 allToAll 1746 1746 
+7 alltoall 1746 1746 
 7 compute 276028
 7 barrier
 7 compute 409318380
 7 comm_size 32
-7 allReduce 32 26584387 1
+7 allreduce 32 26584387 1
 7 compute 3038128727
 7 compute 1525
-7 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+7 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 7 compute 1058646357
 7 barrier
 7 compute 7748
 7 compute 332
-7 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+7 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 7 compute 915154397
 7 barrier
 7 compute 1453990364
-7 allToAll 13824 13824 
+7 alltoall 13824 13824 
 7 compute 72648818
-7 allToAll 13824 13824 
+7 alltoall 13824 13824 
 7 compute 20518600
 7 comm_size 32
-7 allReduce 1 8126143
+7 allreduce 1 8126143
 7 compute 1382888665
 7 comm_size 32
-7 allReduce 795 69286550
+7 allreduce 795 69286550
 7 compute 1512356592
 7 comm_size 32
-7 allReduce 2 81727397
+7 allreduce 2 81727397
 7 compute 21532031
-7 allToAll 13824 13824 
+7 alltoall 13824 13824 
 7 compute 72648817
-7 allToAll 13824 13824 
+7 alltoall 13824 13824 
 7 compute 20518605
 7 comm_size 32
-7 allReduce 1 6044829
+7 allreduce 1 6044829
 7 compute 67755022
 7 comm_size 32
-7 allReduce 32 6756150 1
+7 allreduce 32 6756150 1
 7 compute 60481269682
 7 finalize
\ No newline at end of file
index 9d662f7..1d695be 100644 (file)
 8 compute 123092
 8 gather 795 795 0 
 8 compute 238954617
-8 allToAll 1746 1746 
+8 alltoall 1746 1746 
 8 compute 276028
 8 barrier
 8 compute 409270545
 8 comm_size 32
-8 allReduce 32 25745168 1
+8 allreduce 32 25745168 1
 8 compute 3038107710
 8 compute 1525
-8 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+8 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 8 compute 1058646360
 8 barrier
 8 compute 7748
 8 compute 332
-8 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+8 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 8 compute 915154395
 8 barrier
 8 compute 1452608369
-8 allToAll 13824 13824 
+8 alltoall 13824 13824 
 8 compute 72647804
-8 allToAll 13824 13824 
+8 alltoall 13824 13824 
 8 compute 20518145
 8 comm_size 32
-8 allReduce 1 8001472
+8 allreduce 1 8001472
 8 compute 1381477053
 8 comm_size 32
-8 allReduce 795 71042507
+8 allreduce 795 71042507
 8 compute 1510067990
 8 comm_size 32
-8 allReduce 2 81335041
+8 allreduce 2 81335041
 8 compute 21530405
-8 allToAll 13824 13824 
+8 alltoall 13824 13824 
 8 compute 72647763
-8 allToAll 13824 13824 
+8 alltoall 13824 13824 
 8 compute 20517454
 8 comm_size 32
-8 allReduce 1 6534793
+8 allreduce 1 6534793
 8 compute 61162725
 8 comm_size 32
-8 allReduce 32 5464575 1
+8 allreduce 32 5464575 1
 8 compute 60481271862
 8 finalize
\ No newline at end of file
index f2c5a79..343a0ec 100644 (file)
 9 compute 123078
 9 gather 795 795 0 
 9 compute 237815920
-9 allToAll 1746 1746 
+9 alltoall 1746 1746 
 9 compute 276028
 9 barrier
 9 compute 409270449
 9 comm_size 32
-9 allReduce 32 25455903 1
+9 allreduce 32 25455903 1
 9 compute 3038109146
 9 compute 1525
-9 allToAllV 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
+9 alltoallv 13262850 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450  13097094  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834 
 9 compute 1058646363
 9 barrier
 9 compute 7748
 9 compute 332
-9 allToAllV 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
+9 alltoallv 13097094 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 386834 386834 386834 386834 386834 386834 386834  13262850  414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414465 414450 414450 414450 
 9 compute 915154399
 9 barrier
 9 compute 1452824428
-9 allToAll 13824 13824 
+9 alltoall 13824 13824 
 9 compute 72648698
-9 allToAll 13824 13824 
+9 alltoall 13824 13824 
 9 compute 20518540
 9 comm_size 32
-9 allReduce 1 7592763
+9 allreduce 1 7592763
 9 compute 1381722154
 9 comm_size 32
-9 allReduce 795 70563282
+9 allreduce 795 70563282
 9 compute 1509467030
 9 comm_size 32
-9 allReduce 2 81813815
+9 allreduce 2 81813815
 9 compute 21530882
-9 allToAll 13824 13824 
+9 alltoall 13824 13824 
 9 compute 72648896
-9 allToAll 13824 13824 
+9 alltoall 13824 13824 
 9 compute 20518044
 9 comm_size 32
-9 allReduce 1 5855800
+9 allreduce 1 5855800
 9 compute 67632473
 9 comm_size 32
-9 allReduce 32 3946615 1
+9 allreduce 32 3946615 1
 9 compute 60481273037
 9 finalize
\ No newline at end of file
similarity index 96%
rename from include/simgrid_config.h.in
rename to include/simgrid/config.h.in
index 3b93712..72d6570 100644 (file)
@@ -1,4 +1,4 @@
-/* simgrid_config.h - Results of the configure made visible to user code.   */
+/* simgrid/config.h - Results of the configure made visible to user code.   */
 
 /* Copyright (c) 2009-2018. The SimGrid Team. All rights reserved.          */
 
index 3908e45..e355a9d 100644 (file)
@@ -12,6 +12,7 @@
 SG_BEGIN_DECL()
 XBT_PUBLIC void sg_engine_load_platform(const char* filename);
 XBT_PUBLIC void sg_engine_load_deployment(const char* filename);
+XBT_PUBLIC void sg_engine_run();
 XBT_PUBLIC void sg_engine_register_function(const char* name, int (*code)(int, char**));
 XBT_PUBLIC void sg_engine_register_default(int (*code)(int, char**));
 XBT_PUBLIC double sg_engine_get_clock();
index 5381697..8e2d804 100644 (file)
@@ -8,12 +8,9 @@
 
 #include <simgrid/jedule/jedule_events.hpp>
 #include <simgrid/jedule/jedule_platform.hpp>
-#include <simgrid_config.h>
 
 #include <cstdio>
 
-#if SIMGRID_HAVE_JEDULE
-
 namespace simgrid {
 namespace jedule{
 
@@ -21,18 +18,27 @@ class XBT_PUBLIC Jedule {
 public:
   Jedule()=default;
   ~Jedule();
-  std::vector<Event *> event_set;
-  Container* root_container = nullptr;
-  std::unordered_map<char*, char*> meta_info;
-  void addMetaInfo(char* key, char* value);
-  void cleanupOutput();
-  void writeOutput(FILE *file);
+  std::vector<Event*> event_set_;
+  Container* root_container_ = nullptr;
+  void add_meta_info(char* key, char* value);
+  void cleanup_output();
+  void write_output(FILE* file);
+
+  // deprecated
+  XBT_ATTRIB_DEPRECATED_v323("Please use Jedule::add_meta_info()") void addMetaInfo(char* key, char* value)
+  {
+    add_meta_info(key, value);
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use Jedule::cleanup_output()") void cleanupOutput() { cleanup_output(); }
+  XBT_ATTRIB_DEPRECATED_v323("Please use Jedule::write_output()") void writeOutput(FILE* file) { write_output(file); }
+
+private:
+  std::unordered_map<char*, char*> meta_info_;
 };
 
 }
 }
 
 typedef simgrid::jedule::Jedule *jedule_t;
-#endif
 
 #endif /* JEDULE_HPP_ */
index 5ab0f8f..3c853e3 100644 (file)
@@ -9,13 +9,11 @@
 #include <simgrid/jedule/jedule_platform.hpp>
 
 #include <simgrid/forward.h>
-#include <simgrid_config.h>
 
 #include <vector>
 #include <string>
 #include <unordered_map>
 
-#if SIMGRID_HAVE_JEDULE
 namespace simgrid {
 namespace jedule{
 
@@ -23,24 +21,38 @@ class XBT_PUBLIC Event {
 public:
   Event(std::string name, double start_time, double end_time, std::string type);
   ~Event();
-  void addCharacteristic(char* characteristic);
-  void addResources(std::vector<sg_host_t>* host_selection);
-  void addInfo(char* key, char* value);
+  void add_characteristic(char* characteristic);
+  void add_resources(std::vector<sg_host_t>* host_selection);
+  void add_info(char* key, char* value);
   void print(FILE* file);
 
+  // deprecated
+  XBT_ATTRIB_DEPRECATED_v323("Please use Event::add_characteristic()") void addCharacteristic(char* characteristic)
+  {
+    add_characteristic(characteristic);
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use Event::add_resources()") void addResources(
+      std::vector<sg_host_t>* host_selection)
+  {
+    add_resources(host_selection);
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use Event::add_info()") void addInfo(char* key, char* value)
+  {
+    add_info(key, value);
+  }
+
 private:
-  std::string name;
-  double start_time;
-  double end_time;
-  std::string type;
-  std::vector<jed_subset_t>* resource_subsets;
-  std::vector<char*> characteristics_list;   /* just a list of names (strings) */
-  std::unordered_map<char*, char*> info_map; /* key/value pairs */
+  std::string name_;
+  double start_time_;
+  double end_time_;
+  std::string type_;
+  std::vector<jed_subset_t>* resource_subsets_;
+  std::vector<char*> characteristics_list_;   /* just a list of names */
+  std::unordered_map<char*, char*> info_map_; /* key/value pairs */
 };
 }
 }
 
 typedef simgrid::jedule::Event* jed_event_t;
-#endif
 
 #endif /* JEDULE_EVENTS_H_ */
index e076f29..d291109 100644 (file)
@@ -7,15 +7,12 @@
 #define JED_SIMGRID_PLATFORM_H_
 
 #include <simgrid/forward.h>
-#include <simgrid_config.h>
 #include <xbt/dynar.h>
 
 #include <unordered_map>
 #include <vector>
 #include <string>
 
-#if SIMGRID_HAVE_JEDULE
-
 namespace simgrid {
 namespace jedule{
 class XBT_PUBLIC Container {
@@ -23,21 +20,45 @@ public:
   explicit Container(std::string name);
   virtual ~Container();
 private:
-  int last_id;
-  int is_lowest = 0;
+  int last_id_;
+  int is_lowest_ = 0;
+
 public:
   std::string name;
   std::unordered_map<const char*, unsigned int> name2id;
   Container *parent = nullptr;
   std::vector<Container*> children;
   std::vector<sg_host_t> resource_list;
-  void addChild(Container* child);
-  void addResources(std::vector<sg_host_t> hosts);
-  void createHierarchy(sg_netzone_t from_as);
-  std::vector<int> getHierarchy();
-  std::string getHierarchyAsString();
+  void add_child(Container* child);
+  void add_resources(std::vector<sg_host_t> hosts);
+  void create_hierarchy(sg_netzone_t from_as);
+  std::vector<int> get_hierarchy();
+  std::string get_hierarchy_as_string();
   void print(FILE *file);
-  void printResources(FILE *file);
+  void print_resources(FILE* file);
+
+  // deprecated
+  XBT_ATTRIB_DEPRECATED_v323("Please use Container::add_child()") void addChild(Container* child) { add_child(child); }
+  XBT_ATTRIB_DEPRECATED_v323("Please use Container::add_resources()") void addResources(std::vector<sg_host_t> hosts)
+  {
+    add_resources(hosts);
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use Container::create_hierarchy()") void createHierarchy(sg_netzone_t from_as)
+  {
+    create_hierarchy(from_as);
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use Container::get_hierarchy()") std::vector<int> getHierarchy()
+  {
+    return get_hierarchy();
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use Container::get_hierarchy_as_string()") std::string getHierarchyAsString()
+  {
+    return get_hierarchy_as_string();
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use Container::print_resources()") void printResources(FILE* file)
+  {
+    print_resources(file);
+  }
 };
 
 class XBT_PUBLIC Subset {
@@ -55,6 +76,4 @@ typedef simgrid::jedule::Container * jed_container_t;
 typedef simgrid::jedule::Subset * jed_subset_t;
 void get_resource_selection_by_hosts(std::vector<jed_subset_t>* subset_list, std::vector<sg_host_t> *host_list);
 
-#endif
-
 #endif /* JED_SIMGRID_PLATFORM_H_ */
index 5f5ab68..95a009d 100644 (file)
@@ -7,15 +7,12 @@
 #define JEDULE_SD_BINDING_H_
 
 #include <simgrid/simdag.h>
-#include <simgrid_config.h>
 
-#if SIMGRID_HAVE_JEDULE
 SG_BEGIN_DECL()
 XBT_PUBLIC void jedule_log_sd_event(SD_task_t task);
 XBT_PUBLIC void jedule_sd_init(void);
 XBT_PUBLIC void jedule_sd_exit(void);
 XBT_PUBLIC void jedule_sd_dump(const char* filename);
 SG_END_DECL()
-#endif
 
 #endif /* JEDULE_SD_BINDING_H_ */
index e779c0a..7662939 100644 (file)
@@ -204,23 +204,31 @@ public:
   }
 };
 
-template<class T>
-void bindPromise(Promise<T> promise, Future<T> future)
+template <class T> void bind_promise(Promise<T> promise, Future<T> future)
 {
   class PromiseBinder {
   public:
     explicit PromiseBinder(Promise<T> promise) : promise_(std::move(promise)) {}
-    void operator()(Future<T> future)
-    {
-      simgrid::xbt::setPromise(promise_, future);
-    }
+    void operator()(Future<T> future) { simgrid::xbt::set_promise(promise_, future); }
+
   private:
     Promise<T> promise_;
   };
   future.then_(PromiseBinder(std::move(promise)));
 }
 
-template<class T> Future<T> unwrapFuture(Future<Future<T>> future);
+template <class T> Future<T> unwrap_future(Future<Future<T>> future);
+
+template <class T>
+XBT_ATTRIB_DEPRECATED_v323("Please use bind_promise") void bindPromise(Promise<T> promise, Future<T> future)
+{
+  bind_promise(promise, future);
+}
+template <class T>
+XBT_ATTRIB_DEPRECATED_v323("Please use unwrap_future") Future<T> unwrapFuture(Future<Future<T>> future)
+{
+  unwrap_future(future);
+}
 
 /** Result of some (probably) asynchronous operation in the SimGrid kernel
  *
@@ -327,17 +335,14 @@ public:
       throw std::future_error(std::future_errc::no_state);
     // Give shared-ownership to the continuation:
     auto state = std::move(state_);
-    state->set_continuation(simgrid::xbt::makeTask(
-      std::move(continuation), state));
+    state->set_continuation(simgrid::xbt::make_task(std::move(continuation), state));
   }
 
   /** Attach a continuation to this future
    *
    *  This version never does future unwrapping.
    */
-  template<class F>
-  auto thenNoUnwrap(F continuation)
-  -> Future<decltype(continuation(std::move(*this)))>
+  template <class F> auto then_no_unwrap(F continuation) -> Future<decltype(continuation(std::move(*this)))>
   {
     typedef decltype(continuation(std::move(*this))) R;
     if (state_ == nullptr)
@@ -347,18 +352,23 @@ public:
     Promise<R> promise;
     Future<R> future = promise.get_future();
     // ...and when the current future is ready...
-    state->set_continuation(simgrid::xbt::makeTask(
-      [](Promise<R> promise, std::shared_ptr<FutureState<T>> state, F continuation) {
-        // ...set the new future value by running the continuation.
-        Future<T> future(std::move(state));
-        simgrid::xbt::fulfillPromise(promise,[&]{
-          return continuation(std::move(future));
-        });
-      },
-      std::move(promise), state, std::move(continuation)));
+    state->set_continuation(simgrid::xbt::make_task(
+        [](Promise<R> promise, std::shared_ptr<FutureState<T>> state, F continuation) {
+          // ...set the new future value by running the continuation.
+          Future<T> future(std::move(state));
+          simgrid::xbt::fulfill_promise(promise, [&] { return continuation(std::move(future)); });
+        },
+        std::move(promise), state, std::move(continuation)));
     return std::move(future);
   }
 
+  template <class F>
+  XBT_ATTRIB_DEPRECATED_v323("Please use then_no_unwrap") auto thenNoUnwrap(F continuation)
+      -> Future<decltype(continuation(std::move(*this)))>
+  {
+    then_no_unwrap(continuation);
+  }
+
   /** Attach a continuation to this future
    *
    *  The future must be valid in order to make this call.
@@ -373,7 +383,7 @@ public:
   auto then(F continuation) -> typename std::enable_if<not is_future<decltype(continuation(std::move(*this)))>::value,
                                                        Future<decltype(continuation(std::move(*this)))>>::type
   {
-    return this->thenNoUnwrap(std::move(continuation));
+    return this->then_no_unwrap(std::move(continuation));
   }
 
   /** Attach a continuation to this future (future chaining) */
@@ -384,7 +394,7 @@ public:
        decltype(continuation(std::move(*this)))
      >::type
   {
-    return unwrapFuture(this->thenNoUnwap(std::move(continuation)));
+    return unwrap_future(this->then_no_unwrap(std::move(continuation)));
   }
 
   /** Get the value from the future
@@ -410,12 +420,11 @@ private:
   std::shared_ptr<FutureState<T>> state_;
 };
 
-template<class T>
-Future<T> unwrapFuture(Future<Future<T>> future)
+template <class T> Future<T> unwrap_future(Future<Future<T>> future)
 {
   Promise<T> promise;
   Future<T> result = promise.get_future();
-  bindPromise(std::move(promise), std::move(future));
+  bind_promise(std::move(promise), std::move(future));
   return std::move(result);
 }
 
index 44212a9..c3135dc 100644 (file)
@@ -67,7 +67,7 @@ namespace routing {
 
 class ClusterZone : public NetZoneImpl {
 public:
-  explicit ClusterZone(NetZone* father, std::string name);
+  explicit ClusterZone(NetZoneImpl* father, std::string name);
 
   void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
   void get_graph(xbt_graph_t graph, std::map<std::string, xbt_node_t>* nodes,
@@ -80,7 +80,7 @@ public:
   }
 
   /* We use a map instead of a std::vector here because that's a sparse vector. Some values may not exist */
-  /* The pair is {linkUp, linkDown} */
+  /* The pair is {link_up, link_down} */
   std::unordered_map<unsigned int, std::pair<kernel::resource::LinkImpl*, kernel::resource::LinkImpl*>> private_links_;
 
   unsigned int node_pos(int id) { return id * num_links_per_node_; }
index b3a5322..c435463 100644 (file)
@@ -33,13 +33,17 @@ namespace routing {
  */
 class XBT_PRIVATE DijkstraZone : public RoutedZone {
 public:
-  DijkstraZone(NetZone* father, std::string name, bool cached);
+  DijkstraZone(NetZoneImpl* father, std::string name, bool cached);
   void seal() override;
 
   ~DijkstraZone() override;
-  xbt_node_t routeGraphNewNode(int id, int graph_id);
-  xbt_node_t nodeMapSearch(int id);
-  void newRoute(int src_id, int dst_id, RouteCreationArgs* e_route);
+
+private:
+  xbt_node_t route_graph_new_node(int id, int graph_id);
+  xbt_node_t node_map_search(int id);
+  void new_route(int src_id, int dst_id, RouteCreationArgs* e_route);
+
+public:
   /* For each vertex (node) already in the graph,
    * make sure it also has a loopback link; this loopback
    * can potentially already be in the graph, and in that
index d1efcd1..c300f7a 100644 (file)
@@ -61,19 +61,20 @@ public:
  */
 class XBT_PUBLIC DragonflyZone : public ClusterZone {
 public:
-  explicit DragonflyZone(NetZone* father, std::string name);
+  explicit DragonflyZone(NetZoneImpl* father, std::string name);
   ~DragonflyZone() override;
   //      void create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int rank, int position) override;
   void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
   void parse_specific_arguments(ClusterCreationArgs* cluster) override;
   void seal() override;
-  void generateRouters();
-  void generateLinks();
-  void createLink(const std::string& id, int numlinks, resource::LinkImpl** linkup, resource::LinkImpl** linkdown);
 
-  void rankId_to_coords(int rankId, unsigned int coords[4]);
+  void rankId_to_coords(int rank_id, unsigned int coords[4]);
 
 private:
+  void generate_routers();
+  void generate_links();
+  void create_link(const std::string& id, int numlinks, resource::LinkImpl** linkup, resource::LinkImpl** linkdown);
+
   simgrid::s4u::Link::SharingPolicy sharing_policy_;
   double bw_  = 0;
   double lat_ = 0;
index 421e552..b015de0 100644 (file)
@@ -21,7 +21,7 @@ namespace routing {
 
 class XBT_PRIVATE EmptyZone : public NetZoneImpl {
 public:
-  explicit EmptyZone(NetZone* father, std::string name);
+  explicit EmptyZone(NetZoneImpl* father, std::string name);
   ~EmptyZone() override;
 
   void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override
index b7023dc..e39ef33 100644 (file)
@@ -98,7 +98,7 @@ public:
  */
 class XBT_PRIVATE FatTreeZone : public ClusterZone {
 public:
-  explicit FatTreeZone(NetZone* father, std::string name);
+  explicit FatTreeZone(NetZoneImpl* father, std::string name);
   ~FatTreeZone() override;
   void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
 
@@ -115,7 +115,7 @@ public:
    */
   void parse_specific_arguments(ClusterCreationArgs* cluster) override;
   void add_processing_node(int id);
-  void generate_dot_file(const std::string& filename = "fatTree.dot") const;
+  void generate_dot_file(const std::string& filename = "fat_tree.dot") const;
 
 private:
   // description of a PGFT (TODO : better doc)
@@ -132,12 +132,12 @@ private:
   ClusterCreationArgs* cluster_ = nullptr;
 
   void add_link(FatTreeNode* parent, unsigned int parent_port, FatTreeNode* child, unsigned int child_port);
-  int getLevelPosition(const unsigned int level);
-  void generateLabels();
-  void generateSwitches();
-  int connectNodeToParents(FatTreeNode* node);
-  bool areRelated(FatTreeNode* parent, FatTreeNode* child);
-  bool isInSubTree(FatTreeNode* root, FatTreeNode* node);
+  int get_level_position(const unsigned int level);
+  void generate_labels();
+  void generate_switches();
+  int connect_node_to_parents(FatTreeNode* node);
+  bool are_related(FatTreeNode* parent, FatTreeNode* child);
+  bool is_in_sub_tree(FatTreeNode* root, FatTreeNode* node);
 };
 } // namespace routing
 } // namespace kernel
index 92fe57f..172c694 100644 (file)
@@ -23,7 +23,7 @@ namespace routing {
  */
 class XBT_PRIVATE FloydZone : public RoutedZone {
 public:
-  explicit FloydZone(NetZone* father, std::string name);
+  explicit FloydZone(NetZoneImpl* father, std::string name);
   ~FloydZone() override;
 
   void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
index 99722a1..bbf16f6 100644 (file)
@@ -20,7 +20,7 @@ namespace routing {
  */
 class XBT_PRIVATE FullZone : public RoutedZone {
 public:
-  explicit FullZone(NetZone* father, std::string name);
+  explicit FullZone(NetZoneImpl* father, std::string name);
   void seal() override;
   ~FullZone() override;
 
index 94c0dd3..046cd45 100644 (file)
@@ -26,7 +26,7 @@ class NetPoint : public simgrid::xbt::Extendable<NetPoint> {
 public:
   enum class Type { Host, Router, NetZone };
 
-  NetPoint(std::string name, NetPoint::Type componentType, NetZoneImpl* netzone_p);
+  NetPoint(std::string name, NetPoint::Type component_type, NetZoneImpl* netzone_p);
   ~NetPoint() = default;
 
   // Our rank in the vertices_ array of the netzone that contains us.
@@ -40,7 +40,7 @@ public:
   bool is_host() { return component_type_ == Type::Host; }
   bool is_router() { return component_type_ == Type::Router; }
 
-  static simgrid::xbt::signal<void(NetPoint*)> onCreation;
+  static simgrid::xbt::signal<void(NetPoint*)> on_creation;
 
   bool operator<(const NetPoint& rhs) const { return name_ < rhs.name_; }
 
index ba1d690..9e80905 100644 (file)
@@ -11,6 +11,7 @@
 #include <xbt/graph.h>
 
 #include <map>
+#include <vector>
 
 namespace simgrid {
 namespace kernel {
@@ -46,20 +47,29 @@ class BypassRoute;
  * called Autonomous Systems in this article).
  *
  */
-class XBT_PUBLIC NetZoneImpl : public s4u::NetZone {
+class XBT_PUBLIC NetZoneImpl {
   friend simgrid::kernel::EngineImpl; // it destroys netRoot_
 
 protected:
-  explicit NetZoneImpl(NetZone* father, std::string name);
+  explicit NetZoneImpl(NetZoneImpl* father, std::string name);
   virtual ~NetZoneImpl();
 
 public:
+  s4u::NetZone* get_iface() { return &piface_; }
+
   /** @brief Make an host within that NetZone */
-  simgrid::s4u::Host* create_host(const char* name, std::vector<double>* speedPerPstate, int coreAmount,
+  simgrid::s4u::Host* create_host(const char* name, std::vector<double>* speed_per_pstate, int core_count,
                                   std::map<std::string, std::string>* props);
   /** @brief Creates a new route in this NetZone */
-  void add_bypass_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
-                        std::vector<resource::LinkImpl*>& link_list, bool symmetrical) override;
+  virtual void add_bypass_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
+                                std::vector<resource::LinkImpl*>& link_list, bool symmetrical);
+
+  /** @brief Seal your netzone once you're done adding content, and before routing stuff through it */
+  virtual void seal();
+  virtual int add_component(kernel::routing::NetPoint* elm); /* A host, a router or a netzone, whatever */
+  virtual void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
+                         kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
+                         std::vector<kernel::resource::LinkImpl*>& link_list, bool symmetrical);
 
 protected:
   /**
@@ -76,7 +86,37 @@ protected:
   bool get_bypass_route(routing::NetPoint* src, routing::NetPoint* dst,
                         /* OUT */ std::vector<resource::LinkImpl*>& links, double* latency);
 
+private:
+  s4u::NetZone piface_;
+
+  // our content, as known to our graph routing algorithm (maps vertex_id -> vertex)
+  std::vector<kernel::routing::NetPoint*> vertices_;
+
+  NetZoneImpl* father_ = nullptr;
+
+  std::vector<NetZoneImpl*> children_; // sub-netzones
+
 public:
+  unsigned int get_table_size() { return vertices_.size(); }
+  std::vector<kernel::routing::NetPoint*> get_vertices() { return vertices_; }
+
+  NetZoneImpl* get_father();
+
+  std::vector<NetZoneImpl*>* get_children(); // Sub netzones
+
+private:
+  std::string name_;
+  bool sealed_ = false; // We cannot add more content when sealed
+
+public:
+  /** @brief Retrieves the name of that netzone as a C++ string */
+  const std::string& get_name() const { return name_; }
+  /** @brief Retrieves the name of that netzone as a C string */
+  const char* get_cname() const;
+
+  std::vector<s4u::Host*> get_all_hosts();
+  int get_host_count();
+
   /* @brief get the route between two nodes in the full platform
    *
    * @param src where from
index 443cd4e..0d19377 100644 (file)
@@ -50,18 +50,37 @@ namespace routing {
 
 class XBT_PRIVATE RoutedZone : public NetZoneImpl {
 public:
-  explicit RoutedZone(NetZone* father, std::string name);
+  explicit RoutedZone(NetZoneImpl* father, std::string name);
 
   void get_graph(xbt_graph_t graph, std::map<std::string, xbt_node_t>* nodes,
                  std::map<std::string, xbt_edge_t>* edges) override;
-  virtual RouteCreationArgs* newExtendedRoute(RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src,
-                                              NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
-                                              bool symmetrical, bool change_order);
 
 protected:
-  void getRouteCheckParams(NetPoint* src, NetPoint* dst);
-  void addRouteCheckParams(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
-                           std::vector<resource::LinkImpl*>& link_list, bool symmetrical);
+  virtual RouteCreationArgs* new_extended_route(RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src,
+                                                NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
+                                                bool symmetrical, bool change_order);
+  void get_route_check_params(NetPoint* src, NetPoint* dst);
+  void add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
+                              std::vector<resource::LinkImpl*>& link_list, bool symmetrical);
+
+  // deprecated
+  XBT_ATTRIB_DEPRECATED_v323("Please use RoutedZone::new_extended_route()") virtual RouteCreationArgs* newExtendedRoute(
+      RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
+      std::vector<resource::LinkImpl*>& link_list, bool symmetrical, bool change_order)
+  {
+    return new_extended_route(hierarchy, src, dst, gw_src, gw_dst, link_list, symmetrical, change_order);
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use RoutedZone::get_route_check_params()") void getRouteCheckParams(NetPoint* src,
+                                                                                                         NetPoint* dst)
+  {
+    get_route_check_params(src, dst);
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use RoutedZone::add_route_check_params()") void addRouteCheckParams(
+      NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
+      bool symmetrical)
+  {
+    add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
+  }
 };
 } // namespace routing
 } // namespace kernel
index 22a172e..29e9855 100644 (file)
@@ -21,7 +21,7 @@ namespace routing {
 
 class XBT_PRIVATE TorusZone : public ClusterZone {
 public:
-  explicit TorusZone(NetZone* father, std::string name);
+  explicit TorusZone(NetZoneImpl* father, std::string name);
   void create_links_for_node(ClusterCreationArgs* cluster, int id, int rank, unsigned int position) override;
   void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
   void parse_specific_arguments(ClusterCreationArgs* cluster) override;
index a5e1bc6..873eddd 100644 (file)
@@ -46,10 +46,18 @@ namespace routing {
 
 class XBT_PRIVATE VivaldiZone : public ClusterZone {
 public:
-  explicit VivaldiZone(NetZone* father, std::string name);
+  explicit VivaldiZone(NetZoneImpl* father, std::string name);
 
-  void setPeerLink(NetPoint* netpoint, double bw_in, double bw_out, std::string coord);
+  void set_peer_link(NetPoint* netpoint, double bw_in, double bw_out, std::string coord);
   void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
+
+  // deprecated
+  XBT_ATTRIB_DEPRECATED_v323("Please use VivaldiZone::set_peer_link()") void setPeerLink(NetPoint* netpoint,
+                                                                                         double bw_in, double bw_out,
+                                                                                         std::string coord)
+  {
+    set_peer_link(netpoint, bw_in, bw_out, coord);
+  }
 };
 
 namespace vivaldi {
diff --git a/include/simgrid/mailbox.h b/include/simgrid/mailbox.h
new file mode 100644 (file)
index 0000000..774fe6c
--- /dev/null
@@ -0,0 +1,20 @@
+/* Copyright (c) 2018. 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. */
+
+#ifndef INCLUDE_SIMGRID_MAILBOX_H_
+#define INCLUDE_SIMGRID_MAILBOX_H_
+
+#include <simgrid/forward.h>
+#include <xbt/base.h>
+
+/* C interface */
+SG_BEGIN_DECL()
+
+XBT_PUBLIC void sg_mailbox_set_receiver(const char* alias);
+XBT_PUBLIC int sg_mailbox_listen(const char* alias);
+
+SG_END_DECL()
+
+#endif /* INCLUDE_SIMGRID_MAILBOX_H_ */
index 547f9fd..f071a26 100644 (file)
 #ifndef SIMGRID_MODELCHECKER_H
 #define SIMGRID_MODELCHECKER_H
 
-#include <stddef.h> /* size_t */
-
-#include <simgrid_config.h> /* SIMGRID_HAVE_MC ? */
-
+#include <simgrid/config.h> /* SIMGRID_HAVE_MC ? */
 #include <xbt/base.h>
 
+#include <stddef.h> /* size_t */
+
 SG_BEGIN_DECL()
 
 XBT_PUBLIC int MC_random(int min, int max);
index c22f433..b562b47 100644 (file)
@@ -11,6 +11,7 @@
 #include <simgrid/forward.h>
 #include <simgrid/host.h>
 #include <simgrid/instr.h>
+#include <simgrid/mailbox.h>
 #include <simgrid/plugins/live_migration.h>
 #include <simgrid/storage.h>
 #include <simgrid/vm.h>
index 0d7e857..8e83cab 100644 (file)
@@ -1 +1,10 @@
+/* Copyright (c) 2009-2018. 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. */
+#ifndef SIMGRID_PLUGINS_LOAD_BALANCER_H_
+#define SIMGRID_PLUGINS_LOAD_BALANCER_H_
+
 void sg_load_balancer_plugin_init();
+
+#endif
index bbe2e73..46e268b 100644 (file)
@@ -132,8 +132,7 @@ class XBT_PUBLIC Actor : public simgrid::xbt::Extendable<Actor> {
   static std::function<void()> wrap_task(F f, Args... args)
   {
     typedef decltype(f(std::move(args)...)) R;
-    auto task = std::make_shared<simgrid::xbt::Task<R()>>(
-      simgrid::xbt::makeTask(std::move(f), std::move(args)...));
+    auto task = std::make_shared<simgrid::xbt::Task<R()>>(simgrid::xbt::make_task(std::move(f), std::move(args)...));
     return [task] { (*task)(); };
   }
 
@@ -283,25 +282,25 @@ public:
   const char* get_property(const char* key);
   void set_property(const char* key, const char* value);
 
-  XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr
-      createActor(const char* name, s4u::Host* host, std::function<void()> code)
+  XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr createActor(
+      const char* name, s4u::Host* host, std::function<void()> code)
   {
     return create(name, host, code);
   }
-  XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr
-      createActor(const char* name, s4u::Host* host, std::function<void(std::vector<std::string>*)> code,
-                  std::vector<std::string>* args)
+  XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr createActor(
+      const char* name, s4u::Host* host, std::function<void(std::vector<std::string>*)> code,
+      std::vector<std::string>* args)
   {
     return create(name, host, code, args);
   }
   template <class F, class... Args, typename = typename std::result_of<F(Args...)>::type>
-  XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr
-      createActor(const char* name, s4u::Host* host, F code, Args... args)
+  XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr createActor(
+      const char* name, s4u::Host* host, F code, Args... args)
   {
     return create(name, host, code, std::move(args)...);
   }
-  XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr
-      createActor(const char* name, s4u::Host* host, const char* function, std::vector<std::string> args)
+  XBT_ATTRIB_DEPRECATED_v323("Please use Actor::create()") static ActorPtr createActor(
+      const char* name, s4u::Host* host, const char* function, std::vector<std::string> args)
   {
     return create(name, host, function, args);
   }
@@ -329,7 +328,8 @@ public:
   XBT_ATTRIB_DEPRECATED_v323("Please use Actor::get_kill_time()") double getKillTime() { return get_kill_time(); }
   XBT_ATTRIB_DEPRECATED_v323("Please use Actor::by_pid()") static ActorPtr byPid(aid_t pid) { return by_pid(pid); }
   XBT_ATTRIB_DEPRECATED_v323("Please use Actor::kill_all()") static void killAll() { kill_all(); }
-  XBT_ATTRIB_DEPRECATED_v323("Please use Actor::kill_all() with no parameter") static void killAll(int resetPid)
+  XBT_ATTRIB_DEPRECATED_v323("Please use Actor::kill_all() with no parameter") static void killAll(
+      int XBT_ATTRIB_UNUSED resetPid)
   {
     kill_all();
   }
@@ -431,8 +431,7 @@ XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_pid()") XBT_PUBLIC aid_t
 XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_ppid()") XBT_PUBLIC aid_t getPpid();
 XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_host()") XBT_PUBLIC Host* getHost();
 XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::is_suspended()") XBT_PUBLIC bool isSuspended();
-XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::on_exit()") XBT_PUBLIC
-    void onExit(int_f_pvoid_pvoid_t fun, void* data);
+XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::on_exit()") XBT_PUBLIC void onExit(int_f_pvoid_pvoid_t fun, void* data);
 }
 
 /** @} */
index be8ccf3..f5c4401 100644 (file)
@@ -45,9 +45,9 @@ public:
   /** Start the comm, and ignore its result. It can be completely forgotten after that. */
   Activity* detach();
   /** Start the comm, and ignore its result. It can be completely forgotten after that. */
-  Activity* detach(void (*cleanFunction)(void*))
+  Activity* detach(void (*clean_function)(void*))
   {
-    clean_fun_ = cleanFunction;
+    clean_fun_ = clean_function;
     return detach();
   }
 
index a0f10cf..d30bc2f 100644 (file)
@@ -132,6 +132,8 @@ public:
   /** @brief Retrieves all netzones of the type indicated by the template argument */
   template <class T> std::vector<T*> get_filtered_netzones()
   {
+    static_assert(std::is_base_of<kernel::routing::NetZoneImpl, T>::value,
+                  "Filtering netzones is only possible for subclasses of kernel::routing::NetZoneImpl");
     std::vector<T*> res;
     get_filtered_netzones_recursive(get_netzone_root(), &res);
     return res;
@@ -204,15 +206,13 @@ public:
   }
 
   XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_host_count()") size_t getHostCount() { return get_host_count(); }
-  XBT_ATTRIB_DEPRECATED_v322("Engine::getHostList() is deprecated in favor of Engine::get_all_hosts(). Please switch "
-                             "before v3.22") void getHostList(std::vector<Host*>* whereTo);
+  XBT_ATTRIB_DEPRECATED_v322("Please use Engine::get_all_hosts()") void getHostList(std::vector<Host*>* whereTo);
   XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_all_hosts()") std::vector<Host*> getAllHosts()
   {
     return get_all_hosts();
   }
   XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_link_count()") size_t getLinkCount() { return get_link_count(); }
-  XBT_ATTRIB_DEPRECATED_v322("Engine::getLinkList() is deprecated in favor of Engine::get_all_links(). Please "
-                             "switch before v3.22") void getLinkList(std::vector<Link*>* list);
+  XBT_ATTRIB_DEPRECATED_v322("Please use Engine::get_all_links()") void getLinkList(std::vector<Link*>* list);
   XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_link_list()") std::vector<Link*> getAllLinks()
   {
     return get_all_links();
@@ -224,8 +224,7 @@ public:
   XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_clock()") static double getClock() { return get_clock(); }
   XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_all_netpoints()") void getNetpointList(
       std::vector<simgrid::kernel::routing::NetPoint*>* list);
-  XBT_ATTRIB_DEPRECATED_v323("Please use Engine::netpoint_by_name_or_null()")
-      simgrid::kernel::routing::NetPoint* getNetpointByNameOrNull(std::string name)
+  XBT_ATTRIB_DEPRECATED_v323("Please use Engine::netpoint_by_name_or_null()") simgrid::kernel::routing::NetPoint* getNetpointByNameOrNull(std::string name)
   {
     return netpoint_by_name_or_null(name);
   }
@@ -233,8 +232,7 @@ public:
   {
     return get_netzone_root();
   }
-  XBT_ATTRIB_DEPRECATED_v323(
-      "Please use Engine::netzone_by_name_or_null()") simgrid::s4u::NetZone* getNetzoneByNameOrNull(const char* name)
+  XBT_ATTRIB_DEPRECATED_v323("Please use Engine::netzone_by_name_or_null()") simgrid::s4u::NetZone* getNetzoneByNameOrNull(const char* name)
   {
     return netzone_by_name_or_null(name);
   }
@@ -270,15 +268,17 @@ extern XBT_PUBLIC xbt::signal<void()> on_simulation_end;
 /** Callback fired when the time jumps into the future */
 extern XBT_PUBLIC xbt::signal<void(double)> on_time_advance;
 
-/** Callback fired when the time cannot jump because of inter-actors deadlock */
+/** Callback fired when the time cannot advance because of inter-actors deadlock */
 extern XBT_PUBLIC xbt::signal<void(void)> on_deadlock;
 
 template <class T> XBT_PRIVATE void get_filtered_netzones_recursive(s4u::NetZone* current, std::vector<T*>* whereto)
 {
-  for (auto const& elem : *(current->get_children())) {
+  static_assert(std::is_base_of<kernel::routing::NetZoneImpl, T>::value,
+                "Filtering netzones is only possible for subclasses of kernel::routing::NetZoneImpl");
+  for (auto const& elem : current->get_children()) {
     get_filtered_netzones_recursive(elem, whereto);
-    if (elem == dynamic_cast<T*>(elem))
-      whereto->push_back(dynamic_cast<T*>(elem));
+    if (elem->get_impl() == dynamic_cast<T*>(elem->get_impl()))
+      whereto->push_back(dynamic_cast<T*>(elem->get_impl()));
   }
 }
 }
index 4d9f607..477bb22 100644 (file)
@@ -108,15 +108,22 @@ public:
     return res;
   }
 
-  double getSpeed();
+  double get_speed();
   double get_available_speed();
   int get_core_count();
+  double get_load();
 
-  double getPstateSpeed(int pstate_index);
+  double get_pstate_speed(int pstate_index);
   int get_pstate_count() const;
   void set_pstate(int pstate_index);
   int get_pstate();
 
+  XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_speed() instead.") double getSpeed() { return get_speed(); }
+  XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_pstate_speed() instead.") double getPstateSpeed(int pstate_index)
+  {
+    return get_pstate_speed(pstate_index);
+  }
+
   std::vector<const char*> get_attached_storages();
   XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_attached_storages() instead.") void getAttachedStorages(
       std::vector<const char*>* storages);
@@ -125,7 +132,11 @@ public:
    *
    *  This is defined in the platform file, and cannot be modified programatically (yet).
    */
-  std::unordered_map<std::string, Storage*> const& getMountedStorages();
+  std::unordered_map<std::string, Storage*> const& get_mounted_storages();
+  XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_mounted_storages() instead.") std::unordered_map<std::string, Storage*> const& getMountedStorages()
+  {
+    return get_mounted_storages();
+  }
 
   void route_to(Host* dest, std::vector<Link*>& links, double* latency);
   void route_to(Host* dest, std::vector<kernel::resource::LinkImpl*>& links, double* latency);
@@ -139,13 +150,6 @@ public:
   /** Block the calling actor on an execution located on the called host (with explicit priority) */
   void execute(double flops, double priority);
 
-  /** @brief Returns the current computation load (in flops per second)
-   * The external load (coming from an availability trace) is not taken in account.
-   *
-   * @return      The number of activities currently running on a host (an activity at priority 2 is counted twice).
-   */
-  double getLoad();
-
   // Deprecated functions
   XBT_ATTRIB_DEPRECATED_v323("Please use Host::get_name()") simgrid::xbt::string const& getName() const
   {
index fd39b35..e1832a8 100644 (file)
@@ -94,7 +94,6 @@ public:
   static simgrid::xbt::signal<void(kernel::resource::NetworkAction*)> on_communication_state_change;
 
   // Deprecated methods
-  XBT_ATTRIB_DEPRECATED_v321("Use get_cname(): v3.21 will turn this warning into an error.") const char* name();
   XBT_ATTRIB_DEPRECATED_v323("Please use Link::by_name()") static Link* byName(const char* name) { return by_name(name); }
   XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_name()") const std::string& getName() const { return get_name(); }
   XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_cname()") const char* getCname() const { return get_cname(); }
index 4230a98..b30de03 100644 (file)
@@ -48,11 +48,14 @@ public:
   Mutex& operator=(Mutex const&) = delete;
 
   /** Constructs a new mutex */
-  static Ptr createMutex();
+  static Ptr create();
 
   void lock();
   void unlock();
   bool try_lock();
+
+  // deprecated
+  XBT_ATTRIB_DEPRECATED_v323("Please use Mutex::create()") static Ptr createMutex() { return create(); }
 };
 
 using MutexPtr = Mutex::Ptr;
index 8eb0e8c..e4d56e0 100644 (file)
@@ -27,42 +27,44 @@ class XBT_PUBLIC NetZone {
 protected:
   friend simgrid::kernel::routing::NetZoneImpl;
 
-  explicit NetZone(NetZone * father, std::string name);
-  virtual ~NetZone();
+  explicit NetZone(kernel::routing::NetZoneImpl* impl);
+  ~NetZone();
 
 public:
-  /** @brief Seal your netzone once you're done adding content, and before routing stuff through it */
-  virtual void seal();
   /** @brief Retrieves the name of that netzone as a C++ string */
-  const std::string& get_name() const { return name_; }
+  const std::string& get_name() const;
   /** @brief Retrieves the name of that netzone as a C string */
   const char* get_cname() const;
 
   NetZone* get_father();
-  std::vector<NetZone*>* get_children(); // Sub netzones
 
   std::vector<Host*> get_all_hosts();
   int get_host_count();
 
+  kernel::routing::NetZoneImpl* get_impl() { return pimpl_; }
+
 private:
+  kernel::routing::NetZoneImpl* pimpl_;
   std::unordered_map<std::string, std::string> properties_;
 
 public:
   /** Get the properties assigned to a netzone */
   std::unordered_map<std::string, std::string>* get_properties();
 
+  std::vector<NetZone*> get_children();
+
   /** Retrieve the property value (or nullptr if not set) */
   const char* get_property(const char* key);
   void set_property(const char* key, const char* value);
 
   /* Add content to the netzone, at parsing time. It should be sealed afterward. */
-  virtual int add_component(kernel::routing::NetPoint* elm); /* A host, a router or a netzone, whatever */
-  virtual void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
-                         kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                         std::vector<kernel::resource::LinkImpl*>& link_list, bool symmetrical);
-  virtual void add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
-                                kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                                std::vector<kernel::resource::LinkImpl*>& link_list, bool symmetrical) = 0;
+  int add_component(kernel::routing::NetPoint* elm); /* A host, a router or a netzone, whatever */
+  void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,
+                 kernel::routing::NetPoint* gw_dst, std::vector<kernel::resource::LinkImpl*>& link_list,
+                 bool symmetrical);
+  void add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
+                        kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
+                        std::vector<kernel::resource::LinkImpl*>& link_list, bool symmetrical);
 
   /*** Called on each newly created regular route (not on bypass routes) */
   static simgrid::xbt::signal<void(bool symmetrical, kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
@@ -72,23 +74,7 @@ public:
   static simgrid::xbt::signal<void(NetZone&)> on_creation;
   static simgrid::xbt::signal<void(NetZone&)> on_seal;
 
-private:
-  // our content, as known to our graph routing algorithm (maps vertexId -> vertex)
-  std::vector<kernel::routing::NetPoint*> vertices_;
-
-protected:
-  unsigned int get_table_size() { return vertices_.size(); }
-  std::vector<kernel::routing::NetPoint*> get_vertices() { return vertices_; }
-
-private:
-  NetZone* father_ = nullptr;
-  std::string name_;
-
-  bool sealed_ = false; // We cannot add more content when sealed
-
-  std::vector<NetZone*>* children_ = nullptr; // sub-netzones
-
-public: // Deprecation wrappers
+  // Deprecation wrappers
   XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_father()") NetZone* getFather() { return get_father(); }
   XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_name()") const std::string& getName() const { return get_name(); }
   XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_cname()") const char* getCname() const { return get_cname(); }
@@ -104,8 +90,7 @@ public: // Deprecation wrappers
   {
     add_bypass_route(src, dst, gw_src, gw_dst, link_list, symmetrical);
   }
-  XBT_ATTRIB_DEPRECATED_v323(
-      "Please use NetZone::get_properties()") std::unordered_map<std::string, std::string>* getProperties()
+  XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_properties()") std::unordered_map<std::string, std::string>* getProperties()
   {
     return get_properties();
   }
@@ -117,21 +102,20 @@ public: // Deprecation wrappers
   {
     set_property(key, value);
   }
-  XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::add_component()") virtual int addComponent(
-      kernel::routing::NetPoint* elm)
+  XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::add_component()") int addComponent(kernel::routing::NetPoint* elm)
   {
     return add_component(elm);
   }
-  XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_vertices()") std::vector<kernel::routing::NetPoint*> getVertices()
-  {
-    return get_vertices();
-  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_vertices()") std::vector<kernel::routing::NetPoint*> getVertices();
   XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_host_count()") int getHostCount() { return get_host_count(); }
   XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_all_hosts()") void getHosts(
       std::vector<s4u::Host*>* whereto); // retrieve my content as a vector of hosts
   XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_children()") std::vector<NetZone*>* getChildren()
   {
-    return get_children();
+    std::vector<NetZone*>* res = new std::vector<NetZone*>();
+    for (auto child : get_children())
+      res->push_back(child);
+    return res;
   }
 };
 }
index bd86099..3893123 100644 (file)
@@ -20,9 +20,7 @@ extern template class XBT_PUBLIC Extendable<simgrid::s4u::Storage>;
 }
 namespace s4u {
 
-XBT_ATTRIB_DEPRECATED_v322(
-    "simgrid::s4u::getStorageList() is deprecated in favor of Engine::get_all_storages(). Please switch before v3.22")
-    XBT_PUBLIC void getStorageList(std::map<std::string, Storage*>* whereTo);
+XBT_ATTRIB_DEPRECATED_v322("Please use Engine::get_all_storages()") XBT_PUBLIC void getStorageList(std::map<std::string, Storage*>* whereTo);
 
 class XBT_PUBLIC Storage : public simgrid::xbt::Extendable<Storage> {
   friend s4u::Engine;
index 0419fc0..baafbcf 100644 (file)
@@ -8,13 +8,6 @@
 
 #include <simgrid/s4u/Host.hpp>
 
-enum e_surf_vm_state_t {
-  SURF_VM_STATE_CREATED, /**< created, but not yet started */
-  SURF_VM_STATE_RUNNING,
-  SURF_VM_STATE_SUSPENDED, /**< Suspend/resume does not involve disk I/O, so we assume there is no transition states. */
-  SURF_VM_STATE_DESTROYED
-};
-
 namespace simgrid {
 namespace s4u {
 
@@ -38,25 +31,50 @@ public:
   VirtualMachine(VirtualMachine const&) = delete;
   VirtualMachine& operator=(VirtualMachine const&) = delete;
 
-  simgrid::vm::VirtualMachineImpl* getImpl() { return pimpl_vm_; }
+  enum class state {
+    CREATED, /**< created, but not yet started */
+    RUNNING,
+    SUSPENDED, /**< Suspend/resume does not involve disk I/O, so we assume there is no transition states. */
+    DESTROYED
+  };
+
+  simgrid::vm::VirtualMachineImpl* get_impl() { return pimpl_vm_; }
   void start();
   void suspend();
   void resume();
   void shutdown();
   void destroy();
 
-  simgrid::s4u::Host* getPm();
-  void setPm(simgrid::s4u::Host * pm);
-  size_t getRamsize();
-  void setRamsize(size_t ramsize);
-  void setBound(double bound);
+  simgrid::s4u::Host* get_pm();
+  void set_pm(simgrid::s4u::Host* pm);
+  size_t get_ramsize();
+  void set_ramsize(size_t ramsize);
+  void set_bound(double bound);
 
-  e_surf_vm_state_t getState();
+  VirtualMachine::state get_state();
   static simgrid::xbt::signal<void(VirtualMachine&)> on_start;
   static simgrid::xbt::signal<void(VirtualMachine&)> on_started;
   static simgrid::xbt::signal<void(VirtualMachine&)> on_shutdown;
   static simgrid::xbt::signal<void(VirtualMachine&)> on_suspend;
   static simgrid::xbt::signal<void(VirtualMachine&)> on_resume;
+
+  // Deprecated methods
+  XBT_ATTRIB_DEPRECATED_v323("Please use VirtualMachine::get_state()") VirtualMachine::state getState()
+  {
+    return get_state();
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use VirtualMachine::get_impl()") simgrid::vm::VirtualMachineImpl* getImpl()
+  {
+    return pimpl_vm_;
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use VirtualMachine::get_pm()") simgrid::s4u::Host* getPm() { return get_pm(); }
+  XBT_ATTRIB_DEPRECATED_v323("Please use VirtualMachine::set_pm()") void setPm(simgrid::s4u::Host* pm) { set_pm(pm); }
+  XBT_ATTRIB_DEPRECATED_v323("Please use VirtualMachine::get_ramsize()") size_t getRamsize() { return get_ramsize(); }
+  XBT_ATTRIB_DEPRECATED_v323("Please use VirtualMachine::set_ramsize()") void setRamsize(size_t ramsize)
+  {
+    set_ramsize(ramsize);
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use VirtualMachine::set_bound()") void setBound(double bound) { set_bound(bound); }
 };
 }
 } // namespace simgrid::s4u
index 9943239..06a9e30 100644 (file)
@@ -61,9 +61,7 @@ template <class F> typename std::result_of<F()>::type simcall(F&& code)
   // conveniently handles the success/failure value for us.
   typedef typename std::result_of<F()>::type R;
   simgrid::xbt::Result<R> result;
-  simcall_run_kernel([&]{
-    simgrid::xbt::fulfillPromise(result, std::forward<F>(code));
-  });
+  simcall_run_kernel([&] { simgrid::xbt::fulfill_promise(result, std::forward<F>(code)); });
   return result.get();
 }
 
@@ -77,11 +75,6 @@ typedef std::function<ActorCode(std::vector<std::string> args)> ActorCodeFactory
 
 XBT_PUBLIC void register_function(const char* name, ActorCodeFactory factory);
 
-/** These functions will be called when we detect a deadlock: any remaining process is locked on an action
- *
- * If these functions manage to unlock some of the processes, then the deadlock will be avoided.
- */
-XBT_PUBLIC_DATA simgrid::xbt::signal<void()> onDeadlock;
 }
 }
 
index dcc7b1d..d2c87da 100644 (file)
@@ -46,8 +46,7 @@ XBT_PUBLIC void unblock(smx_actor_t process);
  * @return         Value of the kernel future
  * @exception      Exception from the kernel future
  */
-template<class F>
-auto kernelSync(F code) -> decltype(code().get())
+template <class F> auto kernel_sync(F code) -> decltype(code().get())
 {
   typedef decltype(code().get()) T;
   if (SIMIX_is_maestro())
@@ -60,7 +59,7 @@ auto kernelSync(F code) -> decltype(code().get())
     try {
       auto future = code();
       future.then_([&result, self](std::shared_ptr<simgrid::kernel::FutureState<T>>&& value) {
-        simgrid::xbt::setPromise(result, simgrid::kernel::Future<T>(value));
+        simgrid::xbt::set_promise(result, simgrid::kernel::Future<T>(value));
         simgrid::simix::unblock(self);
       });
     }
@@ -71,6 +70,11 @@ auto kernelSync(F code) -> decltype(code().get())
   });
   return result.get();
 }
+template <class F>
+XBT_ATTRIB_DEPRECATED_v323("Please use simix::kernel_sync()") auto kernelSync(F code) -> decltype(code().get())
+{
+  return kernel_sync(code);
+}
 
 /** A blocking (`wait()`-based) future for SIMIX processes */
 // TODO, .wait_for()
@@ -96,7 +100,7 @@ public:
         // When the kernel future is ready...
         this->future_.then_([&result, self](std::shared_ptr<simgrid::kernel::FutureState<T>>&& value) {
           // ... wake up the process with the result of the kernel future.
-          simgrid::xbt::setPromise(result, simgrid::kernel::Future<T>(value));
+          simgrid::xbt::set_promise(result, simgrid::kernel::Future<T>(value));
           simgrid::simix::unblock(self);
         });
       }
@@ -146,9 +150,7 @@ private:
  *  @param code SimGrid kernel code which returns a simgrid::kernel::Future
  *  @return     Actor future
  */
-template<class F>
-auto kernelAsync(F code)
-  -> Future<decltype(code().get())>
+template <class F> auto kernel_async(F code) -> Future<decltype(code().get())>
 {
   typedef decltype(code().get()) T;
 
@@ -158,7 +160,11 @@ auto kernelAsync(F code)
   // Wrap the kernel future in a actor future:
   return simgrid::simix::Future<T>(std::move(future));
 }
-
+template <class F>
+XBT_ATTRIB_DEPRECATED_v323("Please use simix::kernel_sync()") auto kernelAsync(F code) -> Future<decltype(code().get())>
+{
+  return kernel_async(code);
+}
 }
 }
 
index 3269015..d116608 100644 (file)
@@ -2,9 +2,15 @@
 
 /* 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 "private.hpp"
+#ifndef SMPI_REPLAY_HPP_
+#define SMPI_REPLAY_HPP_
+
+#include <boost/algorithm/string/join.hpp>
+#include <src/smpi/include/smpi_process.hpp>
 #include <xbt/replay.hpp>
+#include <xbt/ex.h>
 
+#include <memory>
 #include <sstream>
 
 #define CHECK_ACTION_PARAMS(action, mandatory, optional)                                                             \
   }                                                                                                                  \
 }
 
+XBT_PRIVATE void* smpi_get_tmp_sendbuffer(int size);
+XBT_PRIVATE void* smpi_get_tmp_recvbuffer(int size);
+XBT_PRIVATE void smpi_free_tmp_buffer(void* buf);
+XBT_PRIVATE void smpi_free_replay_tmp_buffers();
+
+XBT_PRIVATE void log_timed_action(simgrid::xbt::ReplayAction& action, double clock);
+
 namespace simgrid {
 namespace smpi {
 namespace replay {
@@ -151,7 +164,7 @@ public:
 /**
  * Base class for all ReplayActions.
  * Note that this class actually implements the behavior of each action
- * while the parsing of the replay arguments is done in the ActionArgParser class.
+ * while the parsing of the replay arguments is done in the @ActionArgParser class.
  * In other words: The logic goes here, the setup is done by the ActionArgParser.
  */
 template <class T> class ReplayAction {
@@ -164,7 +177,16 @@ public:
   explicit ReplayAction(std::string name) : name(name), my_proc_id(simgrid::s4u::this_actor::get_pid()) {}
   virtual ~ReplayAction() = default;
 
-  virtual void execute(simgrid::xbt::ReplayAction& action);
+  void execute(simgrid::xbt::ReplayAction& action)
+  {
+    // Needs to be re-initialized for every action, hence here
+    double start_time = smpi_process()->simulated_elapsed();
+    args.parse(action, name);
+    kernel(action);
+    if (name != "Init")
+      log_timed_action(action, start_time);
+  }
+
   virtual void kernel(simgrid::xbt::ReplayAction& action) = 0;
   void* send_buffer(int size) { return smpi_get_tmp_sendbuffer(size); }
   void* recv_buffer(int size) { return smpi_get_tmp_recvbuffer(size); }
@@ -229,7 +251,7 @@ private:
   RequestStorage& req_storage;
 
 public:
-  explicit WaitAllAction(RequestStorage& storage) : ReplayAction("waitAll"), req_storage(storage) {}
+  explicit WaitAllAction(RequestStorage& storage) : ReplayAction("waitall"), req_storage(storage) {}
   void kernel(simgrid::xbt::ReplayAction& action) override;
 };
 
@@ -253,13 +275,13 @@ public:
 
 class AllReduceAction : public ReplayAction<AllReduceArgParser> {
 public:
-  explicit AllReduceAction() : ReplayAction("allReduce") {}
+  explicit AllReduceAction() : ReplayAction("allreduce") {}
   void kernel(simgrid::xbt::ReplayAction& action) override;
 };
 
 class AllToAllAction : public ReplayAction<AllToAllArgParser> {
 public:
-  explicit AllToAllAction() : ReplayAction("allToAll") {}
+  explicit AllToAllAction() : ReplayAction("alltoall") {}
   void kernel(simgrid::xbt::ReplayAction& action) override;
 };
 
@@ -283,21 +305,23 @@ public:
 
 class ScatterVAction : public ReplayAction<ScatterVArgParser> {
 public:
-  explicit ScatterVAction() : ReplayAction("scatterV") {}
+  explicit ScatterVAction() : ReplayAction("scatterv") {}
   void kernel(simgrid::xbt::ReplayAction& action) override;
 };
 
 class ReduceScatterAction : public ReplayAction<ReduceScatterArgParser> {
 public:
-  explicit ReduceScatterAction() : ReplayAction("reduceScatter") {}
+  explicit ReduceScatterAction() : ReplayAction("reducescatter") {}
   void kernel(simgrid::xbt::ReplayAction& action) override;
 };
 
 class AllToAllVAction : public ReplayAction<AllToAllVArgParser> {
 public:
-  explicit AllToAllVAction() : ReplayAction("allToAllV") {}
+  explicit AllToAllVAction() : ReplayAction("alltoallv") {}
   void kernel(simgrid::xbt::ReplayAction& action) override;
 };
 }
 }
 }
+
+#endif
diff --git a/include/simgrid_config.h b/include/simgrid_config.h
new file mode 100644 (file)
index 0000000..7d2de9f
--- /dev/null
@@ -0,0 +1,9 @@
+/* simgrid_config.h - backward-compatibility wrapper. Stop using it         */
+
+/* Copyright (c) 2018. 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. */
+
+#warning simgrid_config.h is now deprecated. Please use simgrid/config.h instead
+#include <simgrid/config.h>
index c710705..1d92e4a 100644 (file)
@@ -1,27 +1,16 @@
-#ifndef MPI_HELPERS_H
-#define MPI_HELPERS_H
+/* Copyright (c) 2018. The SimGrid Team.  All rights reserved.              */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
+/* 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 <unistd.h>
-#include <sys/time.h> /* Load it before the define next line to not mess with the system headers */
-#if _POSIX_TIMERS
-#include <time.h>
-#endif
+#ifndef SMPI_HELPERS_H
+#define SMPI_HELPERS_H
 
-int smpi_usleep(useconds_t usecs);
-#if _POSIX_TIMERS > 0
-int smpi_nanosleep(const struct timespec* tp, struct timespec* t);
-int smpi_clock_gettime(clockid_t clk_id, struct timespec* tp);
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
 #endif
-unsigned int smpi_sleep(unsigned int secs);
-int smpi_gettimeofday(struct timeval* tv, struct timezone* tz);
 
-struct option;
-int smpi_getopt_long (int argc,  char *const *argv,  const char *options,  const struct option *long_options, int *opt_index);
-int smpi_getopt (int argc,  char *const *argv,  const char *options);
+#include <smpi/smpi_helpers_internal.h>
 
 #define sleep(x) smpi_sleep(x)
 #define usleep(x) smpi_usleep(x)
@@ -33,5 +22,6 @@ int smpi_getopt (int argc,  char *const *argv,  const char *options);
 
 #define getopt(x,y,z) smpi_getopt(x,y,z)
 #define getopt_long(x,y,z,a,b) smpi_getopt_long(x,y,z,a,b)
+#define getopt_long_only(x,y,z,a,b) smpi_getopt_long_only(x,y,z,a,b)
 
 #endif
diff --git a/include/smpi/smpi_helpers_internal.h b/include/smpi/smpi_helpers_internal.h
new file mode 100644 (file)
index 0000000..0c78541
--- /dev/null
@@ -0,0 +1,38 @@
+/* Copyright (c) 2018. 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. */
+
+#ifndef SMPI_HELPERS_INTERNAL_H
+#define SMPI_HELPERS_INTERNAL_H
+
+#include <unistd.h>
+
+#include <sys/time.h>
+#if _POSIX_TIMERS
+#include <time.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int smpi_usleep(useconds_t usecs);
+#if _POSIX_TIMERS > 0
+int smpi_nanosleep(const struct timespec* tp, struct timespec* t);
+int smpi_clock_gettime(clockid_t clk_id, struct timespec* tp);
+#endif
+unsigned int smpi_sleep(unsigned int secs);
+int smpi_gettimeofday(struct timeval* tv, struct timezone* tz);
+
+struct option;
+int smpi_getopt_long_only(int argc, char* const* argv, const char* options, const struct option* long_options,
+                          int* opt_index);
+int smpi_getopt_long(int argc, char* const* argv, const char* options, const struct option* long_options,
+                     int* opt_index);
+int smpi_getopt(int argc, char* const* argv, const char* options);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+#endif
index f76712c..0b935ed 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2011-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2011-2018. 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. */
@@ -8,10 +7,6 @@
 #define XBT_AUTOMATON_H
 
 #include <xbt/dynar.h>
-#include <xbt/sysdep.h>
-#include <xbt/graph.h>
-#include <stdlib.h>
-#include <string.h>
 
 SG_BEGIN_DECL()
 
index 754bd5f..ae378b7 100644 (file)
@@ -29,7 +29,8 @@ XBT_PUBLIC std::vector<xbt_backtrace_location_t> backtrace();
  *
  *  Try ro resolve symbols and source code location.
  */
-XBT_PUBLIC std::vector<std::string> resolveBacktrace(xbt_backtrace_location_t const* loc, std::size_t count);
+XBT_PUBLIC std::vector<std::string> resolve_backtrace(xbt_backtrace_location_t const* loc, std::size_t count);
+XBT_ATTRIB_DEPRECATED_v323("Please use xbt::resolve_backtrace()") XBT_PUBLIC std::vector<std::string> resolveBacktrace(xbt_backtrace_location_t const* loc, std::size_t count);
 }
 }
 
index 34e588f..d283304 100644 (file)
 #define XBT_ATTRIB_DEPRECATED(mesg) __attribute__((deprecated(mesg)))
 #endif
 
-#define XBT_ATTRIB_DEPRECATED_v321(mesg) XBT_ATTRIB_DEPRECATED(mesg) /* Will be dropped in v3.21 */
 #define XBT_ATTRIB_DEPRECATED_v322(mesg) XBT_ATTRIB_DEPRECATED(mesg) /* Will be dropped in v3.22 */
 #define XBT_ATTRIB_DEPRECATED_v323(mesg)                                                                               \
   XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped in v3.23)") /* Will be dropped in v3.23 */
+#define XBT_ATTRIB_DEPRECATED_v324(mesg)                                                                               \
+  XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped in v3.24)") /* Will be dropped in v3.24 */
 
 #if !defined(__APPLE__)
 #  define XBT_ATTRIB_CONSTRUCTOR(prio) __attribute__((__constructor__(prio)))
index 10cdc39..c8888e6 100644 (file)
@@ -162,11 +162,11 @@ bind_flag(T& value, const char* name, const char* description, std::map<T, std::
                      found = true;
                  }
                  if (not found || std::string(val) == "help") {
-                   std::string mesg;
+                   std::string mesg = std::string("\n");
                    if (std::string(val) == "help")
-                     mesg = std::string("\nPossible values for option ") + name + ":\n";
+                     mesg += std::string("Possible values for option ") + name + ":\n";
                    else
-                     mesg = std::string("\nInvalid value '") + val + "' for option " + name + ". Possible values:\n";
+                     mesg += std::string("Invalid value '") + val + "' for option " + name + ". Possible values:\n";
                    for (auto kv : valid_values)
                      mesg += "  - '" + std::string(kv.first) + "': " + kv.second +
                              (kv.first == value ? "  <=== DEFAULT" : "") + "\n";
index a4623bf..3eeca4d 100644 (file)
@@ -73,19 +73,13 @@ XBT_PUBLIC void xbt_dict_set(xbt_dict_t dict, const char* key, void* data, void_
 XBT_PUBLIC void* xbt_dict_get(xbt_dict_t dict, const char* key);
 XBT_PUBLIC void* xbt_dict_get_or_null(xbt_dict_t dict, const char* key);
 XBT_PUBLIC char* xbt_dict_get_key(xbt_dict_t dict, const void* data);
-XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC
-    char* xbt_dict_get_elm_key(xbt_dictelm_t elem);
 XBT_PUBLIC xbt_dictelm_t xbt_dict_get_elm(xbt_dict_t dict, const char* key);
 XBT_PUBLIC xbt_dictelm_t xbt_dict_get_elm_or_null(xbt_dict_t dict, const char* key);
 
 XBT_PUBLIC void xbt_dict_remove(xbt_dict_t dict, const char* key);
 XBT_PUBLIC void xbt_dict_reset(xbt_dict_t dict);
 XBT_PUBLIC int xbt_dict_length(xbt_dict_t dict);
-XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC
-    void xbt_dict_dump_output_string(void* s);
 XBT_PUBLIC void xbt_dict_dump(xbt_dict_t dict, void (*output)(void*));
-XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC
-    void xbt_dict_dump_sizes(xbt_dict_t dict);
 XBT_PUBLIC int xbt_dict_is_empty(xbt_dict_t dict);
 
 /** @} */
@@ -143,8 +137,6 @@ XBT_PUBLIC void xbt_dict_cursor_rewind(xbt_dict_cursor_t cursor);
 
 XBT_PUBLIC char* xbt_dict_cursor_get_key(xbt_dict_cursor_t cursor);
 XBT_PUBLIC void* xbt_dict_cursor_get_data(xbt_dict_cursor_t cursor);
-XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC
-    void xbt_dict_cursor_set_data(xbt_dict_cursor_t cursor, void* data, void_f_pvoid_t free_ctn);
 
 XBT_PUBLIC void xbt_dict_cursor_first(const xbt_dict_t dict, xbt_dict_cursor_t* cursor);
 XBT_PUBLIC void xbt_dict_cursor_step(xbt_dict_cursor_t cursor);
index 8fa032d..544f6ae 100644 (file)
@@ -83,8 +83,19 @@ public:
     return backtrace_;
   }
   int pid() const { return pid_; }
-  std::string const& processName() const { return procname_; }
-  ThrowPoint& throwPoint() { return throwpoint_; }
+  std::string const& process_name() const { return procname_; }
+  ThrowPoint& throw_point() { return throwpoint_; }
+
+  // deprecated
+  XBT_ATTRIB_DEPRECATED_v323("Please use WithContextException::process_name()") std::string const& processName() const
+  {
+    return process_name();
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use WithContextException::throw_point()") ThrowPoint& throwPoint()
+  {
+    return throw_point();
+  }
+
 private:
   Backtrace backtrace_;
   std::string procname_; /**< Name of the process who thrown this */
index 1c6983a..4b5f0af 100644 (file)
@@ -52,14 +52,26 @@ public:
   }
 };
 
-template<class F> inline
-std::function<void()> wrapMain(F code, std::vector<std::string> args)
+template <class F>
+inline XBT_ATTRIB_DEPRECATED_v323("Please use wrap_main()") std::function<void()> wrapMain(
+    F code, std::vector<std::string> args)
 {
   return MainFunction<F>(std::move(code), std::move(args));
 }
 
-template<class F> inline
-std::function<void()> wrapMain(F code, int argc, const char*const argv[])
+template <class F> inline std::function<void()> wrap_main(F code, std::vector<std::string> args)
+{
+  return MainFunction<F>(std::move(code), std::move(args));
+}
+
+template <class F>
+inline XBT_ATTRIB_DEPRECATED_v323("Please use wrap_main()") std::function<void()> wrapMain(F code, int argc,
+                                                                                           const char* const argv[])
+{
+  std::vector<std::string> args(argv, argv + argc);
+  return MainFunction<F>(std::move(code), std::move(args));
+}
+template <class F> inline std::function<void()> wrap_main(F code, int argc, const char* const argv[])
 {
   std::vector<std::string> args(argv, argv + argc);
   return MainFunction<F>(std::move(code), std::move(args));
@@ -288,14 +300,19 @@ public:
   }
 };
 
-template<class F, class... Args>
-auto makeTask(F code, Args... args)
--> Task< decltype(code(std::move(args)...))() >
+template <class F, class... Args>
+XBT_ATTRIB_DEPRECATED_v323("Please use make_task()") auto makeTask(F code, Args... args)
+    -> Task<decltype(code(std::move(args)...))()>
 {
   TaskImpl<F, Args...> task(std::move(code), std::make_tuple(std::move(args)...));
   return Task<decltype(code(std::move(args)...))()>(std::move(task));
 }
 
+template <class F, class... Args> auto make_task(F code, Args... args) -> Task<decltype(code(std::move(args)...))()>
+{
+  TaskImpl<F, Args...> task(std::move(code), std::make_tuple(std::move(args)...));
+  return Task<decltype(code(std::move(args)...))()>(std::move(task));
+}
 }
 }
 
index 3c1f761..be488ed 100644 (file)
@@ -199,9 +199,17 @@ public:
  *  @param    code  What we want to do
  *  @param  promise Where to want to store the result
  */
-template<class R, class F>
-auto fulfillPromise(R& promise, F&& code)
--> decltype(promise.set_value(code()))
+template <class R, class F> auto fulfill_promise(R& promise, F&& code) -> decltype(promise.set_value(code()))
+{
+  try {
+    promise.set_value(std::forward<F>(code)());
+  } catch (...) {
+    promise.set_exception(std::current_exception());
+  }
+}
+template <class R, class F>
+XBT_ATTRIB_DEPRECATED_v323("Please use xbt::fulfill_promise()") auto fulfillPromise(R& promise, F&& code)
+    -> decltype(promise.set_value(code()))
 {
   try {
     promise.set_value(std::forward<F>(code)());
@@ -211,9 +219,18 @@ auto fulfillPromise(R& promise, F&& code)
   }
 }
 
-template<class P, class F>
-auto fulfillPromise(P& promise, F&& code)
--> decltype(promise.set_value())
+template <class P, class F> auto fulfill_promise(P& promise, F&& code) -> decltype(promise.set_value())
+{
+  try {
+    std::forward<F>(code)();
+    promise.set_value();
+  } catch (...) {
+    promise.set_exception(std::current_exception());
+  }
+}
+template <class P, class F>
+XBT_ATTRIB_DEPRECATED_v323("Please use xbt::fulfill_promise()") auto fulfillPromise(P& promise, F&& code)
+    -> decltype(promise.set_value())
 {
   try {
     std::forward<F>(code)();
@@ -238,10 +255,14 @@ auto fulfillPromise(P& promise, F&& code)
  *  @param promise output (a valid future or a result)
  *  @param future  input (a ready/waitable future or a valid result)
  */
-template<class P, class F> inline
-void setPromise(P& promise, F&& future)
+template <class P, class F> inline void set_promise(P& promise, F&& future)
+{
+  fulfill_promise(promise, [&] { return std::forward<F>(future).get(); });
+}
+template <class P, class F>
+inline XBT_ATTRIB_DEPRECATED_v323("Please use xbt::set_promise()") void setPromise(P& promise, F&& future)
 {
-  fulfillPromise(promise, [&]{ return std::forward<F>(future).get(); });
+  fulfill_promise(promise, [&] { return std::forward<F>(future).get(); });
 }
 
 }
index d2503b9..083ce2d 100644 (file)
@@ -16,8 +16,12 @@ namespace xbt {
  *
  *  @ingroup XBT_ex
  */
-XBT_PUBLIC void logException(e_xbt_log_priority_t priority, const char* context, std::exception const& exception);
+XBT_PUBLIC void log_exception(e_xbt_log_priority_t priority, const char* context, std::exception const& exception);
 
-XBT_PUBLIC void installExceptionHandler();
+XBT_PUBLIC void install_exception_handler();
+
+// deprecated
+XBT_ATTRIB_DEPRECATED_v323("xbt::log_exception()") XBT_PUBLIC void logException(e_xbt_log_priority_t priority, const char* context, std::exception const& exception);
+XBT_ATTRIB_DEPRECATED_v323("xbt::install_exception_handler()") XBT_PUBLIC void installExceptionHandler();
 }
 }
index c04f208..7af1415 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef XBT_MISC_H
 #define XBT_MISC_H
 
-#include <simgrid_config.h>
+#include <simgrid/config.h>
 #include <xbt/base.h>
 #include <xbt/dynar.h>
 
index 1cd6e06..4c1d46d 100644 (file)
@@ -37,8 +37,11 @@ namespace xbt {
       for (auto const& handler : handlers_)
         handler(args...);
     }
-    void disconnectSlots() { handlers_.clear(); }
-    int getSlotsAmount() { return handlers_.size(); }
+    void disconnect_slots() { handlers_.clear(); }
+    int get_slot_count() { return handlers_.size(); }
+    // deprecated
+    XBT_ATTRIB_DEPRECATED_v323("Please use xbt::disconnect_slots)") void disconnectSlots() { disconnect_slots(); }
+    XBT_ATTRIB_DEPRECATED_v323("Please use xbt::get_slot_count)") int getSlotsAmount() { return get_slot_count(); }
   };
 
 }
index 7af6d33..9400d3d 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef SIMGRID_XBT_STRING_HPP
 #define SIMGRID_XBT_STRING_HPP
 
-#include <simgrid_config.h>
+#include <simgrid/config.h>
 
 #include <cstdarg>
 #include <cstdlib>
index 44ef89a..7bcc04b 100644 (file)
@@ -14,7 +14,7 @@
 #include <xbt/log.h>
 #include <xbt/misc.h>
 
-#include <simgrid_config.h>
+#include <simgrid/config.h>
 
 #include <string.h>
 #include <stdlib.h>
index 39e7274..680725f 100644 (file)
@@ -3,7 +3,7 @@
 
 sonar.projectKey=simgrid
 sonar.projectName=SimGrid
-sonar.projectVersion=3.19.90
+sonar.projectVersion=3.20.90
 
 sonar.links.homepage=http://simgrid.org
 sonar.links.issue=https://github.com/simgrid/simgrid/issues
index 2e08d3b..0d4d89f 100644 (file)
@@ -69,14 +69,14 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_As_getSons(JNIEnv * env, job
   if (not cls)
     return nullptr;
 
-  jtable = env->NewObjectArray(static_cast<jsize>(self_as->get_children()->size()), cls, nullptr);
+  jtable = env->NewObjectArray(static_cast<jsize>(self_as->get_children().size()), cls, nullptr);
 
   if (not jtable) {
     jxbt_throw_jni(env, "Hosts table allocation failed");
     return nullptr;
   }
 
-  for (auto const& tmp_as : *self_as->get_children()) {
+  for (auto const& tmp_as : self_as->get_children()) {
     jobject tmp_jas = jnetzone_new_instance(env);
     if (not tmp_jas) {
       jxbt_throw_jni(env, "java As instantiation failed");
index 166b570..32c513f 100644 (file)
@@ -236,7 +236,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Host_getMountedStorage(JNIEn
 
   int index = 0;
   jobjectArray jtable;
-  std::unordered_map<std::string, msg_storage_t> mounted_storages = host->getMountedStorages();
+  std::unordered_map<std::string, msg_storage_t> mounted_storages = host->get_mounted_storages();
   int count  = mounted_storages.size();
   jclass cls = env->FindClass("org/simgrid/msg/Storage");
 
@@ -326,7 +326,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Host_all(JNIEnv * env, jclas
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Host_setAsyncMailbox(JNIEnv * env, jclass cls_arg, jobject jname)
 {
   const char *name = env->GetStringUTFChars((jstring) jname, 0);
-  MSG_mailbox_set_async(name);
+  sg_mailbox_set_receiver(name);
   env->ReleaseStringUTFChars((jstring) jname, name);
 }
 
index f855359..6bdf53e 100644 (file)
@@ -90,7 +90,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_VM_all(JNIEnv* env, jclass c
   msg_host_t h;
   xbt_dynar_foreach (hosts, it, h) {
     simgrid::s4u::VirtualMachine* vm = dynamic_cast<simgrid::s4u::VirtualMachine*>(h);
-    if (vm != nullptr && vm->getState() != SURF_VM_STATE_DESTROYED) {
+    if (vm != nullptr && vm->get_state() != simgrid::s4u::VirtualMachine::state::DESTROYED) {
       jobject jvm = static_cast<jobject>(vm->extension(JAVA_HOST_LEVEL));
       vms.push_back(jvm);
     }
index 660158a..da9801d 100644 (file)
@@ -142,11 +142,11 @@ public final class NativeLib {
                else if ("x86_64".equalsIgnoreCase(arch) || "AMD64".equalsIgnoreCase(arch))
                        arch = "amd64";
 
-               if (os.toLowerCase().startsWith("win")){
+               if (os.toLowerCase().startsWith("win")) {
                        os = "Windows";
-               } else if (os.contains("OS X"))
+               } else if (os.contains("OS X")) {
                        os = "Darwin";
-
+               }
                os = os.replace(' ', '_');
                arch = arch.replace(' ', '_');
 
index dac0399..1b8431d 100644 (file)
@@ -476,12 +476,12 @@ int console_AS_open(lua_State *L) {
  simgrid::kernel::routing::ZoneCreationArgs AS;
  AS.id = id;
  AS.routing = mode_int;
- simgrid::s4u::NetZone* new_as = sg_platf_new_Zone_begin(&AS);
+ simgrid::kernel::routing::NetZoneImpl* new_as = sg_platf_new_Zone_begin(&AS);
 
  /* Build a Lua representation of the new AS on the stack */
  lua_newtable(L);
- simgrid::s4u::NetZone** lua_as =
-     (simgrid::s4u::NetZone**)lua_newuserdata(L, sizeof(simgrid::s4u::NetZone*)); /* table userdatum */
+ simgrid::kernel::routing::NetZoneImpl** lua_as = (simgrid::kernel::routing::NetZoneImpl**)lua_newuserdata(
+     L, sizeof(simgrid::kernel::routing::NetZoneImpl*)); /* table userdatum */
  *lua_as = new_as;
  luaL_getmetatable(L, PLATF_MODULE_NAME); /* table userdatum metatable */
  lua_setmetatable(L, -2);                 /* table userdatum */
index 54cbd19..fd20910 100644 (file)
@@ -10,7 +10,6 @@
 #define SIMGRID_MMALLOC_H 1
 
 #include "src/internal_config.h"
-#if HAVE_MMALLOC
 
 #include <stdio.h>     /* for NULL */
 #include <sys/types.h> /* for size_t */
@@ -29,6 +28,7 @@ SG_BEGIN_DECL()
 typedef struct mdesc s_xbt_mheap_t;
 typedef s_xbt_mheap_t* xbt_mheap_t;
 
+#if HAVE_MMALLOC
 /* Allocate SIZE bytes of memory (and memset it to 0).  */
 XBT_PUBLIC void* mmalloc(xbt_mheap_t md, size_t size);
 
@@ -63,7 +63,7 @@ ssize_t mmalloc_get_busy_size(xbt_mheap_t, void* ptr);
 
 void* malloc_no_memset(size_t n);
 
+#endif
 SG_END_DECL()
 
-#endif
 #endif /* SIMGRID_MMALLOC_H */
index 4b9c0f1..67cd930 100644 (file)
@@ -4,7 +4,6 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "simgrid/kernel/routing/NetPoint.hpp"
-#include "simgrid_config.h"
 #include "src/instr/instr_private.hpp"
 #include "src/surf/network_interface.hpp"
 #include "src/surf/surf_private.hpp"
index db2ff43..27ce68d 100644 (file)
@@ -66,8 +66,8 @@ public:
 
 class StateEvent : public PajeEvent {
   EntityValue* value;
-  std::string filename = "(null)";
 #if HAVE_SMPI
+  std::string filename = "(null)";
   int linenumber       = -1;
 #endif
   TIData* extra_;
index 0184c25..7a6c2b0 100644 (file)
@@ -127,9 +127,9 @@ static void recursiveGraphExtraction(simgrid::s4u::NetZone* netzone, container_t
     return;
   }
   XBT_DEBUG("Graph extraction for NetZone = %s", netzone->get_cname());
-  if (not netzone->get_children()->empty()) {
+  if (not netzone->get_children().empty()) {
     // bottom-up recursion
-    for (auto const& nz_son : *netzone->get_children()) {
+    for (auto const& nz_son : netzone->get_children()) {
       container_t child_container = container->children_.at(nz_son->get_cname());
       recursiveGraphExtraction(nz_son, child_container, filter);
     }
@@ -139,7 +139,7 @@ static void recursiveGraphExtraction(simgrid::s4u::NetZone* netzone, container_t
   std::map<std::string, xbt_node_t>* nodes = new std::map<std::string, xbt_node_t>;
   std::map<std::string, xbt_edge_t>* edges = new std::map<std::string, xbt_edge_t>;
 
-  static_cast<simgrid::kernel::routing::NetZoneImpl*>(netzone)->get_graph(graph, nodes, edges);
+  netzone->get_impl()->get_graph(graph, nodes, edges);
   for (auto elm : *edges) {
     xbt_edge_t edge = elm.second;
     linkContainers(simgrid::instr::Container::by_name(static_cast<const char*>(edge->src->data)),
@@ -210,7 +210,7 @@ static void instr_host_on_creation(simgrid::s4u::Host& host)
   if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_speed())) {
     simgrid::instr::VariableType* power = container->type_->by_name_or_create("power", "");
     power->set_calling_container(container);
-    power->set_event(0, host.getSpeed());
+    power->set_event(0, host.get_speed());
   }
 
   if (TRACE_uncategorized())
@@ -232,7 +232,8 @@ static void instr_host_on_speed_change(simgrid::s4u::Host& host)
       ->set_event(surf_get_clock(), host.get_core_count() * host.get_available_speed());
 }
 
-static void instr_cpu_action_on_state_change(simgrid::surf::CpuAction* action)
+static void instr_cpu_action_on_state_change(simgrid::surf::CpuAction* action,
+                                             simgrid::kernel::resource::Action::State /* previous */)
 {
   simgrid::surf::Cpu* cpu = static_cast<simgrid::surf::Cpu*>(action->get_variable()->get_constraint(0)->get_id());
   TRACE_surf_resource_set_utilization("HOST", "power_used", cpu->get_cname(), action->get_category(),
@@ -352,7 +353,7 @@ void instr_define_callbacks()
     simgrid::s4u::Link::on_creation.connect(instr_link_on_creation);
     simgrid::s4u::Link::on_bandwidth_change.connect(instr_link_on_bandwidth_change);
     simgrid::s4u::NetZone::on_seal.connect([](simgrid::s4u::NetZone& /*netzone*/) { currentContainer.pop_back(); });
-    simgrid::kernel::routing::NetPoint::onCreation.connect(instr_netpoint_on_creation);
+    simgrid::kernel::routing::NetPoint::on_creation.connect(instr_netpoint_on_creation);
   }
   simgrid::s4u::NetZone::on_creation.connect(instr_netzone_on_creation);
 
@@ -466,15 +467,15 @@ static void recursiveXBTGraphExtraction(xbt_graph_t graph, std::map<std::string,
                                         std::map<std::string, xbt_edge_t>* edges, sg_netzone_t netzone,
                                         container_t container)
 {
-  if (not netzone->get_children()->empty()) {
+  if (not netzone->get_children().empty()) {
     // bottom-up recursion
-    for (auto const& netzone_child : *netzone->get_children()) {
+    for (auto const& netzone_child : netzone->get_children()) {
       container_t child_container = container->children_.at(netzone_child->get_cname());
       recursiveXBTGraphExtraction(graph, nodes, edges, netzone_child, child_container);
     }
   }
 
-  static_cast<simgrid::kernel::routing::NetZoneImpl*>(netzone)->get_graph(graph, nodes, edges);
+  netzone->get_impl()->get_graph(graph, nodes, edges);
 }
 
 xbt_graph_t instr_routing_platform_graph()
index 52c6aaa..4bdfd3e 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "simgrid/instr.h"
 #include "simgrid/s4u/Actor.hpp"
-#include "simgrid_config.h"
 #include "src/instr/instr_paje_containers.hpp"
 #include "src/instr/instr_paje_events.hpp"
 #include "src/instr/instr_paje_types.hpp"
@@ -62,12 +61,12 @@ public:
 
   // NoOpTI: init, finalize, test, wait, barrier
   explicit TIData(std::string name) : name_(name){};
-  // CPuTI: compute, sleep (+ waitAny and waitAll out of laziness)
+  // CPuTI: compute, sleep (+ waitAny and waitall out of laziness)
   explicit TIData(std::string name, double amount) : name_(name), amount_(amount){};
   // Pt2PtTI: send, isend, sssend, issend, recv, irecv
   explicit TIData(std::string name, int endpoint, int size, std::string datatype)
       : name_(name), endpoint(endpoint), send_size(size), send_type(datatype){};
-  // CollTI: bcast, reduce, allReduce, gather, scatter, allGather, allToAll
+  // CollTI: bcast, reduce, allreduce, gather, scatter, allgather, alltoall
   explicit TIData(std::string name, int root, double amount, int send_size, int recv_size, std::string send_type,
                   std::string recv_type)
       : name_(name)
@@ -77,7 +76,7 @@ public:
       , recv_size(recv_size)
       , send_type(send_type)
       , recv_type(recv_type){};
-  // VarCollTI: gatherV, scatterV, allGatherV, allToAllV (+ reduceScatter out of laziness)
+  // VarCollTI: gatherv, scatterv, allgatherv, alltoallv (+ reducescatter out of laziness)
   explicit TIData(std::string name, int root, int send_size, std::vector<int>* sendcounts, int recv_size,
                   std::vector<int>* recvcounts, std::string send_type, std::string recv_type)
       : TIData(name, root, send_size, std::shared_ptr<std::vector<int>>(sendcounts), recv_size,
@@ -197,6 +196,29 @@ public:
   }
   std::string display_size() override { return std::to_string(send_size > 0 ? send_size : recv_size); }
 };
+
+/**
+ * If we want to wait for a request of asynchronous communication, we need to be able
+ * to identify this request. We do this by searching for a request identified by (src, dest, tag).
+ */
+class WaitTIData : public TIData {
+  int src;
+  int dest;
+  int tag;
+
+public:
+  explicit WaitTIData(int src, int dest, int tag) : TIData("wait"), src(src), dest(dest), tag(tag){};
+
+  std::string print() override
+  {
+    std::stringstream stream;
+    stream << getName() << " " << src << " " << dest << " " << tag;
+
+    return stream.str();
+  }
+
+  std::string display_size() override { return ""; }
+};
 }
 }
 
index 475b615..3200459 100644 (file)
@@ -13,36 +13,38 @@ namespace simgrid{
 namespace jedule {
 
 Jedule::~Jedule() {
-  delete this->root_container;
-  for (auto const& evt : this->event_set)
+  delete this->root_container_;
+  for (auto const& evt : this->event_set_)
     delete evt;
-  this->event_set.clear();
+  this->event_set_.clear();
 }
 
-void Jedule::addMetaInfo(char *key, char *value) {
+void Jedule::add_meta_info(char* key, char* value)
+{
   xbt_assert(key != nullptr);
   xbt_assert(value != nullptr);
 
-  this->meta_info.insert({key, value});
+  this->meta_info_.insert({key, value});
 }
 
-void Jedule::writeOutput(FILE *file) {
-  if (not this->event_set.empty()) {
+void Jedule::write_output(FILE* file)
+{
+  if (not this->event_set_.empty()) {
     fprintf(file, "<jedule>\n");
 
-    if (not this->meta_info.empty()) {
+    if (not this->meta_info_.empty()) {
       fprintf(file, "  <jedule_meta>\n");
-      for (auto const& elm : this->meta_info)
+      for (auto const& elm : this->meta_info_)
         fprintf(file, "        <prop key=\"%s\" value=\"%s\" />\n",elm.first,elm.second);
       fprintf(file, "  </jedule_meta>\n");
     }
 
     fprintf(file, "  <platform>\n");
-    this->root_container->print(file);
+    this->root_container_->print(file);
     fprintf(file, "  </platform>\n");
 
     fprintf(file, "  <events>\n");
-    for (auto const& event : this->event_set)
+    for (auto const& event : this->event_set_)
       event->print(file);
     fprintf(file, "  </events>\n");
 
index 5789db9..b03a59d 100644 (file)
@@ -13,64 +13,65 @@ namespace simgrid{
 namespace jedule{
 
 Event::Event(std::string name, double start_time, double end_time, std::string type)
-  : name(name), start_time(start_time), end_time(end_time), type(type)
+    : name_(name), start_time_(start_time), end_time_(end_time), type_(type)
 {
-  this->resource_subsets = new std::vector<jed_subset_t>();
+  this->resource_subsets_ = new std::vector<jed_subset_t>();
 }
 
 Event::~Event()
 {
-  if (not this->resource_subsets->empty()) {
-    for (auto const& subset : *this->resource_subsets)
+  if (not this->resource_subsets_->empty()) {
+    for (auto const& subset : *this->resource_subsets_)
       delete subset;
-    delete this->resource_subsets;
+    delete this->resource_subsets_;
   }
 }
 
-void Event::addResources(std::vector<sg_host_t> *host_selection)
+void Event::add_resources(std::vector<sg_host_t>* host_selection)
 {
-  get_resource_selection_by_hosts(this->resource_subsets, host_selection);
+  get_resource_selection_by_hosts(this->resource_subsets_, host_selection);
 }
 
-void Event::addCharacteristic(char *characteristic)
+void Event::add_characteristic(char* characteristic)
 {
   xbt_assert( characteristic != nullptr );
-  this->characteristics_list.push_back(characteristic);
+  this->characteristics_list_.push_back(characteristic);
 }
 
-void Event::addInfo(char* key, char *value) {
+void Event::add_info(char* key, char* value)
+{
   xbt_assert((key != nullptr) && value != nullptr);
-  this->info_map.insert({key, value});
+  this->info_map_.insert({key, value});
 }
 
 void Event::print(FILE *jed_file)
 {
   fprintf(jed_file, "    <event>\n");
-  fprintf(jed_file, "      <prop key=\"name\" value=\"%s\" />\n", this->name.c_str());
-  fprintf(jed_file, "      <prop key=\"start\" value=\"%g\" />\n", this->start_time);
-  fprintf(jed_file, "      <prop key=\"end\" value=\"%g\" />\n", this->end_time);
-  fprintf(jed_file, "      <prop key=\"type\" value=\"%s\" />\n", this->type.c_str());
+  fprintf(jed_file, "      <prop key=\"name\" value=\"%s\" />\n", this->name_.c_str());
+  fprintf(jed_file, "      <prop key=\"start\" value=\"%g\" />\n", this->start_time_);
+  fprintf(jed_file, "      <prop key=\"end\" value=\"%g\" />\n", this->end_time_);
+  fprintf(jed_file, "      <prop key=\"type\" value=\"%s\" />\n", this->type_.c_str());
 
-  xbt_assert(not this->resource_subsets->empty());
+  xbt_assert(not this->resource_subsets_->empty());
   fprintf(jed_file, "      <res_util>\n");
-  for (auto const& subset : *this->resource_subsets) {
+  for (auto const& subset : *this->resource_subsets_) {
     fprintf(jed_file, "        <select resources=\"");
-    fprintf(jed_file, "%s", subset->parent->getHierarchyAsString().c_str());
+    fprintf(jed_file, "%s", subset->parent->get_hierarchy_as_string().c_str());
     fprintf(jed_file, ".[%d-%d]", subset->start_idx, subset->start_idx + subset->nres-1);
     fprintf(jed_file, "\" />\n");
   }
   fprintf(jed_file, "      </res_util>\n");
 
-  if (not this->characteristics_list.empty()) {
+  if (not this->characteristics_list_.empty()) {
     fprintf(jed_file, "      <characteristics>\n");
-    for (auto const& ch : this->characteristics_list)
+    for (auto const& ch : this->characteristics_list_)
       fprintf(jed_file, "          <characteristic name=\"%s\" />\n", ch);
     fprintf(jed_file, "      </characteristics>\n");
   }
 
-  if (not this->info_map.empty()) {
+  if (not this->info_map_.empty()) {
     fprintf(jed_file, "      <info>\n");
-    for (auto const& elm : this->info_map)
+    for (auto const& elm : this->info_map_)
       fprintf(jed_file, "        <prop key=\"%s\" value=\"%s\" />\n",elm.first,elm.second);
     fprintf(jed_file, "      </info>\n");
   }
index c0060d5..9a02ccb 100644 (file)
@@ -37,54 +37,54 @@ Container::~Container()
       delete child;
 }
 
-void Container::addChild(jed_container_t child)
+void Container::add_child(jed_container_t child)
 {
   xbt_assert(child != nullptr);
   this->children.push_back(child);
   child->parent = this;
 }
 
-void Container::addResources(std::vector<sg_host_t> hosts)
+void Container::add_resources(std::vector<sg_host_t> hosts)
 {
-  this->is_lowest = 1;
+  this->is_lowest_ = 1;
   this->children.clear();
-  this->last_id = 0;
+  this->last_id_ = 0;
 
   //FIXME do we need to sort?: xbt_dynar_sort_strings(host_names);
 
   for (auto const& host : hosts) {
     const char *host_name = sg_host_get_name(host);
-    this->name2id.insert({host_name, this->last_id});
-    (this->last_id)++;
+    this->name2id.insert({host_name, this->last_id_});
+    (this->last_id_)++;
     host2_simgrid_parent_container.insert({host_name, this});
     this->resource_list.push_back(host);
   }
 }
 
-void Container::createHierarchy(sg_netzone_t from_as)
+void Container::create_hierarchy(sg_netzone_t from_as)
 {
 
-  if (from_as->get_children()->empty()) {
+  if (from_as->get_children().empty()) {
     // I am no AS
     // add hosts to jedule platform
     std::vector<sg_host_t> table = from_as->get_all_hosts();
-    this->addResources(table);
+    this->add_resources(table);
   } else {
-    for (auto const& nz : *from_as->get_children()) {
+    for (auto const& nz : from_as->get_children()) {
       jed_container_t child_container = new simgrid::jedule::Container(std::string(nz->get_cname()));
-      this->addChild(child_container);
-      child_container->createHierarchy(nz);
+      this->add_child(child_container);
+      child_container->create_hierarchy(nz);
     }
   }
 }
 
-std::vector<int> Container::getHierarchy()
+std::vector<int> Container::get_hierarchy()
 {
   if(this->parent != nullptr ) {
 
     if (not this->parent->children.empty()) {
       // we are in the last level
-      return this->parent->getHierarchy();
+      return this->parent->get_hierarchy();
     } else {
       unsigned int i =0;
       int child_nb = -1;
@@ -98,7 +98,7 @@ std::vector<int> Container::getHierarchy()
       }
 
       xbt_assert( child_nb > - 1);
-      std::vector<int> heir_list = this->parent->getHierarchy();
+      std::vector<int> heir_list = this->parent->get_hierarchy();
       heir_list.insert(heir_list.begin(), child_nb);
       return heir_list;
     }
@@ -109,11 +109,11 @@ std::vector<int> Container::getHierarchy()
   }
 }
 
-std::string Container::getHierarchyAsString()
+std::string Container::get_hierarchy_as_string()
 {
   std::string output("");
 
-  std::vector<int> heir_list = this->getHierarchy();
+  std::vector<int> heir_list = this->get_hierarchy();
 
   unsigned int length = heir_list.size();
   unsigned int i = 0;
@@ -127,13 +127,13 @@ std::string Container::getHierarchyAsString()
   return output;
 }
 
-void Container::printResources(FILE * jed_file)
+void Container::print_resources(FILE* jed_file)
 {
   unsigned int i=0;
   xbt_assert(not this->resource_list.empty());
 
   unsigned int res_nb = this->resource_list.size();
-  std::string resid = this->getHierarchyAsString();
+  std::string resid   = this->get_hierarchy_as_string();
 
   fprintf(jed_file, "      <rset id=\"%s\" nb=\"%u\" names=\"", resid.c_str(), res_nb);
   for (auto const& res : this->resource_list) {
@@ -155,7 +155,7 @@ void Container::print(FILE* jed_file)
       child->print(jed_file);
     }
   } else {
-    this->printResources(jed_file);
+    this->print_resources(jed_file);
   }
   fprintf(jed_file, "    </res>\n");
 }
index 70292bc..769ca21 100644 (file)
@@ -22,8 +22,8 @@ void jedule_log_sd_event(SD_task_t task)
 
   jed_event_t event = new simgrid::jedule::Event(std::string(SD_task_get_name(task)),
                                                  SD_task_get_start_time(task), SD_task_get_finish_time(task), "SD");
-  event->addResources(task->allocation);
-  my_jedule->event_set.push_back(event);
+  event->add_resources(task->allocation);
+  my_jedule->event_set_.push_back(event);
 }
 
 void jedule_sd_init()
@@ -34,8 +34,8 @@ void jedule_sd_init()
   my_jedule = new simgrid::jedule::Jedule();
 
   jed_container_t root_container = new simgrid::jedule::Container(std::string(root_comp->get_cname()));
-  root_container->createHierarchy(root_comp);
-  my_jedule->root_container = root_container;
+  root_container->create_hierarchy(root_comp);
+  my_jedule->root_container_ = root_container;
 }
 
 void jedule_sd_exit()
@@ -55,7 +55,7 @@ void jedule_sd_dump(const char * filename)
 
     FILE *fh = fopen(fname, "w");
 
-    my_jedule->writeOutput(fh);
+    my_jedule->write_output(fh);
 
     fclose(fh);
     xbt_free(fname);
index 5060a2d..6eab5be 100644 (file)
@@ -932,11 +932,11 @@ void System::remove_all_modified_set()
 /**
  * Returns resource load (in flop per second, or byte per second, or similar)
  *
- * If the resource is shared (the default case), the load is sum of resource usage made by every variables located on
- * this resource.
+ * If the resource is shared (the default case), the load is sum of resource usage made by
+ * every variables located on this resource.
  *
- * If the resource is not shared (ie in FATPIPE mode), then the load is the max (not the sum) of all resource usages
- * located on this resource.
+ * If the resource is not shared (ie in FATPIPE mode), then the load is the max (not the sum)
+ * of all resource usages located on this resource.
  */
 double Constraint::get_usage() const
 {
index 3013d78..500a1d1 100644 (file)
@@ -17,9 +17,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster, surf, "Routing part of surf"
 namespace simgrid {
 namespace kernel {
 namespace routing {
-ClusterZone::ClusterZone(NetZone* father, std::string name) : NetZoneImpl(father, name)
-{
-}
+ClusterZone::ClusterZone(NetZoneImpl* father, std::string name) : NetZoneImpl(father, name) {}
 
 void ClusterZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
 {
index 14a37d5..1ce64e2 100644 (file)
@@ -72,7 +72,7 @@ void DijkstraZone::seal()
   }
 }
 
-xbt_node_t DijkstraZone::routeGraphNewNode(int id, int graph_id)
+xbt_node_t DijkstraZone::route_graph_new_node(int id, int graph_id)
 {
   graph_node_data_t data = new s_graph_node_data_t;
   data->id       = id;
@@ -84,7 +84,7 @@ xbt_node_t DijkstraZone::routeGraphNewNode(int id, int graph_id)
   return node;
 }
 
-xbt_node_t DijkstraZone::nodeMapSearch(int id)
+xbt_node_t DijkstraZone::node_map_search(int id)
 {
   auto ret = graph_node_map_.find(id);
   return ret == graph_node_map_.end() ? nullptr : ret->second;
@@ -92,14 +92,14 @@ xbt_node_t DijkstraZone::nodeMapSearch(int id)
 
 /* Parsing */
 
-void DijkstraZone::newRoute(int src_id, int dst_id, simgrid::kernel::routing::RouteCreationArgs* e_route)
+void DijkstraZone::new_route(int src_id, int dst_id, simgrid::kernel::routing::RouteCreationArgs* e_route)
 {
   XBT_DEBUG("Load Route from \"%d\" to \"%d\"", src_id, dst_id);
   xbt_node_t src = nullptr;
   xbt_node_t dst = nullptr;
 
-  xbt_node_t src_elm = nodeMapSearch(src_id);
-  xbt_node_t dst_elm = nodeMapSearch(dst_id);
+  xbt_node_t src_elm = node_map_search(src_id);
+  xbt_node_t dst_elm = node_map_search(dst_id);
 
   if (src_elm)
     src = src_elm;
@@ -109,14 +109,14 @@ void DijkstraZone::newRoute(int src_id, int dst_id, simgrid::kernel::routing::Ro
 
   /* add nodes if they don't exist in the graph */
   if (src_id == dst_id && src == nullptr && dst == nullptr) {
-    src = this->routeGraphNewNode(src_id, -1);
+    src = this->route_graph_new_node(src_id, -1);
     dst = src;
   } else {
     if (src == nullptr) {
-      src = this->routeGraphNewNode(src_id, -1);
+      src = this->route_graph_new_node(src_id, -1);
     }
     if (dst == nullptr) {
-      dst = this->routeGraphNewNode(dst_id, -1);
+      dst = this->route_graph_new_node(dst_id, -1);
     }
   }
 
@@ -126,15 +126,15 @@ void DijkstraZone::newRoute(int src_id, int dst_id, simgrid::kernel::routing::Ro
 
 void DijkstraZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
 {
-  getRouteCheckParams(src, dst);
+  get_route_check_params(src, dst);
   int src_id = src->id();
   int dst_id = dst->id();
 
   xbt_dynar_t nodes = xbt_graph_get_nodes(route_graph_);
 
   /* Use the graph_node id mapping set to quickly find the nodes */
-  xbt_node_t src_elm = nodeMapSearch(src_id);
-  xbt_node_t dst_elm = nodeMapSearch(dst_id);
+  xbt_node_t src_elm = node_map_search(src_id);
+  xbt_node_t dst_elm = node_map_search(dst_id);
 
   int src_node_id = static_cast<graph_node_data_t>(xbt_graph_node_get_data(src_elm))->graph_id;
   int dst_node_id = static_cast<graph_node_data_t>(xbt_graph_node_get_data(dst_elm))->graph_id;
@@ -266,7 +266,8 @@ DijkstraZone::~DijkstraZone()
 
 /* Creation routing model functions */
 
-DijkstraZone::DijkstraZone(NetZone* father, std::string name, bool cached) : RoutedZone(father, name), cached_(cached)
+DijkstraZone::DijkstraZone(NetZoneImpl* father, std::string name, bool cached)
+    : RoutedZone(father, name), cached_(cached)
 {
 }
 
@@ -276,7 +277,7 @@ void DijkstraZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, Net
   const char* srcName = src->get_cname();
   const char* dstName = dst->get_cname();
 
-  addRouteCheckParams(src, dst, gw_src, gw_dst, link_list, symmetrical);
+  add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
 
   /* Create the topology graph */
   if (not route_graph_)
@@ -286,8 +287,8 @@ void DijkstraZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, Net
    * nodes */
 
   /* Add the route to the base */
-  RouteCreationArgs* e_route = newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 1);
-  newRoute(src->id(), dst->id(), e_route);
+  RouteCreationArgs* e_route = new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 1);
+  new_route(src->id(), dst->id(), e_route);
 
   // Symmetrical YES
   if (symmetrical == true) {
@@ -314,8 +315,8 @@ void DijkstraZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, Net
       gw_dst           = gw_tmp;
     }
     RouteCreationArgs* link_route_back =
-        newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 0);
-    newRoute(dst->id(), src->id(), link_route_back);
+        new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 0);
+    new_route(dst->id(), src->id(), link_route_back);
   }
 }
 }
index 7ea76e9..a5a268d 100644 (file)
@@ -18,9 +18,7 @@ namespace simgrid {
 namespace kernel {
 namespace routing {
 
-DragonflyZone::DragonflyZone(NetZone* father, std::string name) : ClusterZone(father, name)
-{
-}
+DragonflyZone::DragonflyZone(NetZoneImpl* father, std::string name) : ClusterZone(father, name) {}
 
 DragonflyZone::~DragonflyZone()
 {
@@ -127,8 +125,8 @@ void DragonflyZone::seal()
     return;
   }
 
-  this->generateRouters();
-  this->generateLinks();
+  this->generate_routers();
+  this->generate_links();
 }
 
 DragonflyRouter::DragonflyRouter(int group, int chassis, int blade) : group_(group), chassis_(chassis), blade_(blade)
@@ -143,7 +141,7 @@ DragonflyRouter::~DragonflyRouter()
   delete blue_links_;
 }
 
-void DragonflyZone::generateRouters()
+void DragonflyZone::generate_routers()
 {
   this->routers_ =
       new DragonflyRouter*[this->num_groups_ * this->num_chassis_per_group_ * this->num_blades_per_chassis_];
@@ -159,8 +157,8 @@ void DragonflyZone::generateRouters()
   }
 }
 
-void DragonflyZone::createLink(const std::string& id, int numlinks, resource::LinkImpl** linkup,
-                               resource::LinkImpl** linkdown)
+void DragonflyZone::create_link(const std::string& id, int numlinks, resource::LinkImpl** linkup,
+                                resource::LinkImpl** linkdown)
 {
   *linkup   = nullptr;
   *linkdown = nullptr;
@@ -182,7 +180,7 @@ void DragonflyZone::createLink(const std::string& id, int numlinks, resource::Li
   }
 }
 
-void DragonflyZone::generateLinks()
+void DragonflyZone::generate_links()
 {
   static int uniqueId = 0;
   resource::LinkImpl* linkup;
@@ -200,7 +198,7 @@ void DragonflyZone::generateLinks()
     for (unsigned int j = 0; j < num_links_per_link_ * this->num_nodes_per_blade_; j += num_links_per_link_) {
       std::string id = "local_link_from_router_" + std::to_string(i) + "_to_node_" +
                        std::to_string(j / num_links_per_link_) + "_" + std::to_string(uniqueId);
-      this->createLink(id, 1, &linkup, &linkdown);
+      this->create_link(id, 1, &linkup, &linkdown);
 
       this->routers_[i]->my_nodes_[j] = linkup;
       if (this->sharing_policy_ == s4u::Link::SharingPolicy::SPLITDUPLEX)
@@ -216,7 +214,7 @@ void DragonflyZone::generateLinks()
       for (unsigned int k = j + 1; k < this->num_blades_per_chassis_; k++) {
         std::string id = "green_link_in_chassis_" + std::to_string(i % num_chassis_per_group_) + "_between_routers_" +
                          std::to_string(j) + "_and_" + std::to_string(k) + "_" + std::to_string(uniqueId);
-        this->createLink(id, this->num_links_green_, &linkup, &linkdown);
+        this->create_link(id, this->num_links_green_, &linkup, &linkdown);
 
         this->routers_[i * num_blades_per_chassis_ + j]->green_links_[k] = linkup;
         this->routers_[i * num_blades_per_chassis_ + k]->green_links_[j] = linkdown;
@@ -232,7 +230,7 @@ void DragonflyZone::generateLinks()
         for (unsigned int l = 0; l < this->num_blades_per_chassis_; l++) {
           std::string id = "black_link_in_group_" + std::to_string(i) + "_between_chassis_" + std::to_string(j) +
               "_and_" + std::to_string(k) +"_blade_" + std::to_string(l) + "_" + std::to_string(uniqueId);
-          this->createLink(id, this->num_links_black_, &linkup, &linkdown);
+          this->create_link(id, this->num_links_black_, &linkup, &linkdown);
 
           this->routers_[i * num_blades_per_chassis_ * num_chassis_per_group_ + j * num_blades_per_chassis_ + l]
               ->black_links_[k] = linkup;
@@ -255,7 +253,7 @@ void DragonflyZone::generateLinks()
       this->routers_[routernumj]->blue_links_ = new resource::LinkImpl*;
       std::string id = "blue_link_between_group_"+ std::to_string(i) +"_and_" + std::to_string(j) +"_routers_" +
           std::to_string(routernumi) + "_and_" + std::to_string(routernumj) + "_" + std::to_string(uniqueId);
-      this->createLink(id, this->num_links_blue_, &linkup, &linkdown);
+      this->create_link(id, this->num_links_blue_, &linkup, &linkdown);
 
       this->routers_[routernumi]->blue_links_[0] = linkup;
       this->routers_[routernumj]->blue_links_[0] = linkdown;
index 78a1c67..a50a06c 100644 (file)
@@ -15,9 +15,7 @@ namespace simgrid {
 namespace kernel {
 namespace routing {
 
-EmptyZone::EmptyZone(NetZone* father, std::string name) : NetZoneImpl(father, name)
-{
-}
+EmptyZone::EmptyZone(NetZoneImpl* father, std::string name) : NetZoneImpl(father, name) {}
 
 EmptyZone::~EmptyZone() = default;
 
index c87e17f..917b40d 100644 (file)
@@ -22,7 +22,7 @@ namespace simgrid {
 namespace kernel {
 namespace routing {
 
-FatTreeZone::FatTreeZone(NetZone* father, std::string name) : ClusterZone(father, name)
+FatTreeZone::FatTreeZone(NetZoneImpl* father, std::string name) : ClusterZone(father, name)
 {
   XBT_DEBUG("Creating a new fat tree.");
 }
@@ -37,7 +37,7 @@ FatTreeZone::~FatTreeZone()
   }
 }
 
-bool FatTreeZone::isInSubTree(FatTreeNode* root, FatTreeNode* node)
+bool FatTreeZone::is_in_sub_tree(FatTreeNode* root, FatTreeNode* node)
 {
   XBT_DEBUG("Is %d(%u,%u) in the sub tree of %d(%u,%u) ?", node->id, node->level, node->position, root->id, root->level,
             root->position);
@@ -89,7 +89,7 @@ void FatTreeZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArg
   FatTreeNode* currentNode = source;
 
   // up part
-  while (not isInSubTree(currentNode, destination)) {
+  while (not is_in_sub_tree(currentNode, destination)) {
     int d = destination->position; // as in d-mod-k
 
     for (unsigned int i = 0; i < currentNode->level; i++)
@@ -135,7 +135,7 @@ void FatTreeZone::seal()
   if (this->levels_ == 0) {
     return;
   }
-  this->generateSwitches();
+  this->generate_switches();
 
   if (XBT_LOG_ISENABLED(surf_route_fat_tree, xbt_log_priority_debug)) {
     std::stringstream msgBuffer;
@@ -155,13 +155,13 @@ void FatTreeZone::seal()
     XBT_DEBUG("%s", msgBuffer.str().c_str());
   }
 
-  this->generateLabels();
+  this->generate_labels();
 
   unsigned int k = 0;
   // Nodes are totally ordered, by level and then by position, in this->nodes
   for (unsigned int i = 0; i < this->levels_; i++) {
     for (unsigned int j = 0; j < this->nodes_by_level_[i]; j++) {
-      this->connectNodeToParents(this->nodes_[k]);
+      this->connect_node_to_parents(this->nodes_[k]);
       k++;
     }
   }
@@ -176,15 +176,15 @@ void FatTreeZone::seal()
   }
 }
 
-int FatTreeZone::connectNodeToParents(FatTreeNode* node)
+int FatTreeZone::connect_node_to_parents(FatTreeNode* node)
 {
   std::vector<FatTreeNode*>::iterator currentParentNode = this->nodes_.begin();
   int connectionsNumber                                 = 0;
   const int level                                       = node->level;
   XBT_DEBUG("We are connecting node %d(%u,%u) to his parents.", node->id, node->level, node->position);
-  currentParentNode += this->getLevelPosition(level + 1);
+  currentParentNode += this->get_level_position(level + 1);
   for (unsigned int i = 0; i < this->nodes_by_level_[level + 1]; i++) {
-    if (this->areRelated(*currentParentNode, node)) {
+    if (this->are_related(*currentParentNode, node)) {
       XBT_DEBUG("%d(%u,%u) and %d(%u,%u) are related,"
                 " with %u links between them.",
                 node->id, node->level, node->position, (*currentParentNode)->id, (*currentParentNode)->level,
@@ -200,7 +200,7 @@ int FatTreeZone::connectNodeToParents(FatTreeNode* node)
   return connectionsNumber;
 }
 
-bool FatTreeZone::areRelated(FatTreeNode* parent, FatTreeNode* child)
+bool FatTreeZone::are_related(FatTreeNode* parent, FatTreeNode* child)
 {
   std::stringstream msgBuffer;
 
@@ -232,7 +232,7 @@ bool FatTreeZone::areRelated(FatTreeNode* parent, FatTreeNode* child)
   return true;
 }
 
-void FatTreeZone::generateSwitches()
+void FatTreeZone::generate_switches()
 {
   XBT_DEBUG("Generating switches.");
   this->nodes_by_level_.resize(this->levels_ + 1, 0);
@@ -277,7 +277,7 @@ void FatTreeZone::generateSwitches()
   }
 }
 
-void FatTreeZone::generateLabels()
+void FatTreeZone::generate_labels()
 {
   XBT_DEBUG("Generating labels.");
   // TODO : check if nodesByLevel and nodes are filled
@@ -323,7 +323,7 @@ void FatTreeZone::generateLabels()
   }
 }
 
-int FatTreeZone::getLevelPosition(const unsigned int level)
+int FatTreeZone::get_level_position(const unsigned int level)
 {
   xbt_assert(level <= this->levels_, "The impossible did happen. Yet again.");
   int tempPosition = 0;
index dd92bc8..57e7ffd 100644 (file)
@@ -22,7 +22,7 @@ namespace simgrid {
 namespace kernel {
 namespace routing {
 
-FloydZone::FloydZone(NetZone* father, std::string name) : RoutedZone(father, name)
+FloydZone::FloydZone(NetZoneImpl* father, std::string name) : RoutedZone(father, name)
 {
   predecessor_table_ = nullptr;
   cost_table_        = nullptr;
@@ -48,7 +48,7 @@ void FloydZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs*
 {
   unsigned int table_size = get_table_size();
 
-  getRouteCheckParams(src, dst);
+  get_route_check_params(src, dst);
 
   /* create a result route */
   std::vector<RouteCreationArgs*> route_stack;
@@ -91,7 +91,7 @@ void FloydZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoi
   /* set the size of table routing */
   unsigned int table_size = get_table_size();
 
-  addRouteCheckParams(src, dst, gw_src, gw_dst, link_list, symmetrical);
+  add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
 
   if (not link_table_) {
     /* Create Cost, Predecessor and Link tables */
@@ -119,7 +119,7 @@ void FloydZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoi
                dst->get_cname());
 
   TO_FLOYD_LINK(src->id(), dst->id()) =
-      newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 1);
+      new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 1);
   TO_FLOYD_PRED(src->id(), dst->id()) = src->id();
   TO_FLOYD_COST(src->id(), dst->id()) = (TO_FLOYD_LINK(src->id(), dst->id()))->link_list.size();
 
@@ -147,7 +147,7 @@ void FloydZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoi
                 src->get_cname(), gw_dst->get_cname());
 
     TO_FLOYD_LINK(dst->id(), src->id()) =
-        newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 0);
+        new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 0);
     TO_FLOYD_PRED(dst->id(), src->id()) = dst->id();
     TO_FLOYD_COST(dst->id(), src->id()) =
         (TO_FLOYD_LINK(dst->id(), src->id()))->link_list.size(); /* count of links, old model assume 1 */
index 16d3969..765e13e 100644 (file)
@@ -16,9 +16,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf");
 namespace simgrid {
 namespace kernel {
 namespace routing {
-FullZone::FullZone(NetZone* father, std::string name) : RoutedZone(father, name)
-{
-}
+FullZone::FullZone(NetZoneImpl* father, std::string name) : RoutedZone(father, name) {}
 
 void FullZone::seal()
 {
@@ -74,7 +72,7 @@ void FullZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs*
 void FullZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
                          std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
 {
-  addRouteCheckParams(src, dst, gw_src, gw_dst, link_list, symmetrical);
+  add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
 
   unsigned int table_size = get_table_size();
 
@@ -93,7 +91,7 @@ void FullZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoin
 
   /* Add the route to the base */
   TO_ROUTE_FULL(src->id(), dst->id()) =
-      newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, true);
+      new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, true);
 
   if (symmetrical == true && src != dst) {
     if (gw_dst && gw_src) {
@@ -112,7 +110,7 @@ void FullZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoin
                  dst->get_cname(), src->get_cname());
 
     TO_ROUTE_FULL(dst->id(), src->id()) =
-        newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, false);
+        new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, false);
   }
 }
 }
index 6326cf2..6a23274 100644 (file)
@@ -13,7 +13,7 @@ namespace simgrid {
 namespace kernel {
 namespace routing {
 
-simgrid::xbt::signal<void(NetPoint*)> NetPoint::onCreation;
+simgrid::xbt::signal<void(NetPoint*)> NetPoint::on_creation;
 
 NetPoint::NetPoint(std::string name, NetPoint::Type componentType, NetZoneImpl* netzone_p)
     : name_(name), component_type_(componentType), englobing_zone_(netzone_p)
@@ -23,7 +23,7 @@ NetPoint::NetPoint(std::string name, NetPoint::Type componentType, NetZoneImpl*
   else
     id_ = static_cast<decltype(id_)>(-1);
   simgrid::s4u::Engine::get_instance()->netpoint_register(this);
-  simgrid::kernel::routing::NetPoint::onCreation(this);
+  simgrid::kernel::routing::NetPoint::on_creation(this);
 }
 }
 }
index e19d3ce..9f5d38a 100644 (file)
@@ -26,22 +26,70 @@ public:
   std::vector<resource::LinkImpl*> links;
 };
 
-NetZoneImpl::NetZoneImpl(NetZone* father, std::string name) : NetZone(father, name)
+NetZoneImpl::NetZoneImpl(NetZoneImpl* father, std::string name) : piface_(this), father_(father), name_(name)
 {
   xbt_assert(nullptr == simgrid::s4u::Engine::get_instance()->netpoint_by_name_or_null(name.c_str()),
              "Refusing to create a second NetZone called '%s'.", name.c_str());
 
-  netpoint_ = new NetPoint(name, NetPoint::Type::NetZone, static_cast<NetZoneImpl*>(father));
+  netpoint_ = new NetPoint(name, NetPoint::Type::NetZone, father);
   XBT_DEBUG("NetZone '%s' created with the id '%u'", name.c_str(), netpoint_->id());
 }
 
 NetZoneImpl::~NetZoneImpl()
 {
+  for (auto const& nz : children_)
+    delete nz;
+
   for (auto const& kv : bypass_routes_)
     delete kv.second;
 
   simgrid::s4u::Engine::get_instance()->netpoint_unregister(netpoint_);
 }
+const char* NetZoneImpl::get_cname() const
+{
+  return name_.c_str();
+}
+NetZoneImpl* NetZoneImpl::get_father()
+{
+  return father_;
+}
+void NetZoneImpl::seal()
+{
+  sealed_ = true;
+}
+/** @brief Returns the list of direct children (no grand-children)
+ *
+ * This returns the internal data, no copy. Don't mess with it.
+ */
+std::vector<NetZoneImpl*>* NetZoneImpl::get_children()
+{
+  return &children_;
+}
+/** @brief Returns the list of the hosts found in this NetZone (not recursively)
+ *
+ * Only the hosts that are directly contained in this NetZone are retrieved,
+ * not the ones contained in sub-netzones.
+ */
+std::vector<s4u::Host*> NetZoneImpl::get_all_hosts()
+{
+  std::vector<s4u::Host*> res;
+  for (auto const& card : get_vertices()) {
+    s4u::Host* host = simgrid::s4u::Host::by_name_or_null(card->get_name());
+    if (host != nullptr)
+      res.push_back(host);
+  }
+  return res;
+}
+int NetZoneImpl::get_host_count()
+{
+  int count = 0;
+  for (auto const& card : get_vertices()) {
+    s4u::Host* host = simgrid::s4u::Host::by_name_or_null(card->get_name());
+    if (host != nullptr)
+      count++;
+  }
+  return count;
+}
 
 simgrid::s4u::Host* NetZoneImpl::create_host(const char* name, std::vector<double>* speedPerPstate, int coreAmount,
                                              std::map<std::string, std::string>* props)
@@ -64,6 +112,18 @@ simgrid::s4u::Host* NetZoneImpl::create_host(const char* name, std::vector<doubl
   return res;
 }
 
+int NetZoneImpl::add_component(kernel::routing::NetPoint* elm)
+{
+  vertices_.push_back(elm);
+  return vertices_.size() - 1; // The rank of the newly created object
+}
+void NetZoneImpl::add_route(kernel::routing::NetPoint* /*src*/, kernel::routing::NetPoint* /*dst*/,
+                            kernel::routing::NetPoint* /*gw_src*/, kernel::routing::NetPoint* /*gw_dst*/,
+                            std::vector<kernel::resource::LinkImpl*>& /*link_list*/, bool /*symmetrical*/)
+{
+  xbt_die("NetZone '%s' does not accept new routes (wrong class).", name_.c_str());
+}
+
 void NetZoneImpl::add_bypass_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
                                    std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
 {
@@ -230,7 +290,7 @@ bool NetZoneImpl::get_bypass_route(routing::NetPoint* src, routing::NetPoint* ds
 
   /* (1) find the path to the root routing component */
   std::vector<NetZoneImpl*> path_src;
-  NetZone* current = src->get_englobing_zone();
+  NetZoneImpl* current = src->get_englobing_zone();
   while (current != nullptr) {
     path_src.push_back(static_cast<NetZoneImpl*>(current));
     current = current->father_;
index 2de68c1..db0fb9a 100644 (file)
@@ -59,9 +59,7 @@ namespace simgrid {
 namespace kernel {
 namespace routing {
 
-RoutedZone::RoutedZone(NetZone* father, std::string name) : NetZoneImpl(father, name)
-{
-}
+RoutedZone::RoutedZone(NetZoneImpl* father, std::string name) : NetZoneImpl(father, name) {}
 
 void RoutedZone::get_graph(xbt_graph_t graph, std::map<std::string, xbt_node_t>* nodes,
                            std::map<std::string, xbt_edge_t>* edges)
@@ -120,9 +118,9 @@ void RoutedZone::get_graph(xbt_graph_t graph, std::map<std::string, xbt_node_t>*
 /* ************************************************************************** */
 /* ************************* GENERIC AUX FUNCTIONS ************************** */
 /* change a route containing link names into a route containing link entities */
-RouteCreationArgs* RoutedZone::newExtendedRoute(RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src,
-                                                NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
-                                                bool symmetrical, bool change_order)
+RouteCreationArgs* RoutedZone::new_extended_route(RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src,
+                                                  NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
+                                                  bool symmetrical, bool change_order)
 {
   RouteCreationArgs* result = new RouteCreationArgs();
 
@@ -147,13 +145,13 @@ RouteCreationArgs* RoutedZone::newExtendedRoute(RoutingMode hierarchy, NetPoint*
   return result;
 }
 
-void RoutedZone::getRouteCheckParams(NetPoint* src, NetPoint* dst)
+void RoutedZone::get_route_check_params(NetPoint* src, NetPoint* dst)
 {
   xbt_assert(src, "Cannot find a route from nullptr to %s", dst->get_cname());
   xbt_assert(dst, "Cannot find a route from %s to nullptr", src->get_cname());
 
-  NetZone* src_as = src->get_englobing_zone();
-  NetZone* dst_as = dst->get_englobing_zone();
+  NetZoneImpl* src_as = src->get_englobing_zone();
+  NetZoneImpl* dst_as = dst->get_englobing_zone();
 
   xbt_assert(src_as == dst_as,
              "Internal error: %s@%s and %s@%s are not in the same netzone as expected. Please report that bug.",
@@ -164,8 +162,8 @@ void RoutedZone::getRouteCheckParams(NetPoint* src, NetPoint* dst)
              "%s@%s). Please report that bug.",
              src->get_cname(), dst->get_cname(), src_as->get_cname(), dst_as->get_cname(), get_cname());
 }
-void RoutedZone::addRouteCheckParams(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
-                                     std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
+void RoutedZone::add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
+                                        std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
 {
   const char* srcName = src->get_cname();
   const char* dstName = dst->get_cname();
@@ -201,7 +199,7 @@ void RoutedZone::addRouteCheckParams(NetPoint* src, NetPoint* dst, NetPoint* gw_
                dstName, gw_dst->get_cname());
   }
 
-  on_route_creation(symmetrical, src, dst, gw_src, gw_dst, link_list);
+  get_iface()->on_route_creation(symmetrical, src, dst, gw_src, gw_dst, link_list);
 }
 }
 }
index 56896c6..7955bd1 100644 (file)
@@ -29,9 +29,7 @@ inline void rankId_to_coords(int rankId, std::vector<unsigned int> dimensions, u
 namespace simgrid {
 namespace kernel {
 namespace routing {
-TorusZone::TorusZone(NetZone* father, std::string name) : ClusterZone(father, name)
-{
-}
+TorusZone::TorusZone(NetZoneImpl* father, std::string name) : ClusterZone(father, name) {}
 
 void TorusZone::create_links_for_node(ClusterCreationArgs* cluster, int id, int rank, unsigned int position)
 {
index 4c70072..cac8eb5 100644 (file)
@@ -51,7 +51,7 @@ static inline double euclidean_dist_comp(int index, std::vector<double>* src, st
   return (src_coord - dst_coord) * (src_coord - dst_coord);
 }
 
-static std::vector<double>* getCoordsFromNetpoint(NetPoint* np)
+static std::vector<double>* netpoint_get_coords(NetPoint* np)
 {
   simgrid::kernel::routing::vivaldi::Coords* coords = np->extension<simgrid::kernel::routing::vivaldi::Coords>();
   xbt_assert(coords, "Please specify the Vivaldi coordinates of %s %s (%p)",
@@ -59,11 +59,9 @@ static std::vector<double>* getCoordsFromNetpoint(NetPoint* np)
   return &coords->coords;
 }
 
-VivaldiZone::VivaldiZone(NetZone* father, std::string name) : ClusterZone(father, name)
-{
-}
+VivaldiZone::VivaldiZone(NetZoneImpl* father, std::string name) : ClusterZone(father, name) {}
 
-void VivaldiZone::setPeerLink(NetPoint* netpoint, double bw_in, double bw_out, std::string coord)
+void VivaldiZone::set_peer_link(NetPoint* netpoint, double bw_in, double bw_out, std::string coord)
 {
   xbt_assert(netpoint->get_englobing_zone() == this,
              "Cannot add a peer link to a netpoint that is not in this netzone");
@@ -115,8 +113,8 @@ void VivaldiZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArg
 
   /* Compute the extra latency due to the euclidean distance if needed */
   if (lat) {
-    std::vector<double>* srcCoords = getCoordsFromNetpoint(src);
-    std::vector<double>* dstCoords = getCoordsFromNetpoint(dst);
+    std::vector<double>* srcCoords = netpoint_get_coords(src);
+    std::vector<double>* dstCoords = netpoint_get_coords(dst);
 
     double euclidean_dist =
         sqrt(euclidean_dist_comp(0, srcCoords, dstCoords) + euclidean_dist_comp(1, srcCoords, dstCoords)) +
index e06c61e..76396c1 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2008-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2008-2018. 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. */
@@ -7,15 +6,6 @@
 #ifndef SIMGRID_MC_ADDRESS_SPACE_H
 #define SIMGRID_MC_ADDRESS_SPACE_H
 
-#include <cassert>
-#include <cstddef>
-#include <cstdint>
-#include <cstring>
-#include <type_traits>
-
-#include <string>
-#include <vector>
-
 #include "src/mc/mc_forward.hpp"
 #include "src/mc/remote/RemotePtr.hpp"
 
index 4f13379..8c7885b 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2014-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2014-2018. 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. */
@@ -7,10 +6,6 @@
 #include <cstddef>
 #include <cstdint>
 
-#include <dwarf.h>
-#include <elfutils/libdw.h>
-#include <libunwind.h>
-
 #include "src/mc/AddressSpace.hpp"
 #include "src/mc/DwarfExpression.hpp"
 #include "src/mc/Frame.hpp"
index 35227bc..2266e1c 100644 (file)
 #include <vector>
 
 #include <elfutils/libdw.h>
+#include <libunwind.h>
 
-#include "src/mc/mc_forward.hpp"
 #include "src/mc/AddressSpace.hpp"
+#include "src/mc/mc_dwarf.hpp"
+#include "src/mc/mc_forward.hpp"
 
 /** @file DwarfExpression.hpp
  *
index dc9e797..9eec0b1 100644 (file)
@@ -6,14 +6,6 @@
 #ifndef SIMGRID_MC_OBJECT_LOCATION_H
 #define SIMGRID_MC_OBJECT_LOCATION_H
 
-#include <cstdint>
-
-#include <vector>
-
-#include <libunwind.h>
-#include <dwarf.h>
-#include <elfutils/libdw.h>
-
 #include "xbt/base.h"
 #include "xbt/range.hpp"
 
@@ -21,6 +13,9 @@
 #include "src/mc/mc_forward.hpp"
 #include "src/mc/DwarfExpression.hpp"
 
+#include <cstdint>
+#include <vector>
+
 namespace simgrid {
 namespace dwarf {
 
index 3ca696b..10bee5d 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "simgrid/sg_config.hpp"
 
-#include "src/mc/ModelChecker.hpp"
 #include "src/mc/ModelChecker.hpp"
 #include "src/mc/PageStore.hpp"
 #include "src/mc/Transition.hpp"
@@ -29,6 +28,7 @@
 #include "src/mc/mc_exit.hpp"
 #include "src/mc/mc_private.hpp"
 #include "src/mc/mc_record.hpp"
+#include "src/mc/remote/RemoteClient.hpp"
 #include "src/mc/remote/mc_protocol.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_ModelChecker, mc, "ModelChecker");
index 65ad9ad..1296853 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2007-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2007-2018. 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 <event2/event.h>
 
-#include "xbt/base.h"
 #include <sys/types.h>
 
 #include "src/mc/PageStore.hpp"
-#include "src/mc/Transition.hpp"
 #include "src/mc/mc_forward.hpp"
-#include "src/mc/remote/RemoteClient.hpp"
 #include "src/mc/remote/mc_protocol.h"
 
 namespace simgrid {
index 1c3bf93..d8566a2 100644 (file)
@@ -18,7 +18,8 @@ namespace mc {
  *  in things like waitany and for associating a given value of MC_random()
  *  calls.
  */
-struct Transition {
+class Transition {
+public:
   int pid = 0;
 
   /* Which transition was executed for this simcall
index 3140c43..f94c5ba 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2007-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2007-2018. 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. */
@@ -15,8 +14,6 @@
 #include "xbt/asserts.h"
 #include "xbt/base.h"
 
-#include <dwarf.h>
-
 #include "src/mc/mc_forward.hpp"
 #include "src/mc/LocationList.hpp"
 
index 68836c6..0d1aa71 100644 (file)
@@ -9,7 +9,6 @@
 #include <xbt/log.h>
 #include <xbt/sysdep.h>
 
-#include "src/mc/Transition.hpp"
 #include "src/mc/VisitedState.hpp"
 #include "src/mc/checker/CommunicationDeterminismChecker.hpp"
 #include "src/mc/mc_exit.hpp"
index 090b301..fdab4b4 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "src/mc/checker/Checker.hpp"
 #include "src/mc/mc_state.hpp"
-#include <simgrid_config.h>
+#include <simgrid/config.h>
 #include <xbt/automaton.h>
 #include <xbt/base.h>
 
index 384283f..b525f40 100644 (file)
@@ -3,11 +3,12 @@
 /* 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 <simgrid_config.h>
+#include <simgrid/config.h>
 
 #include "mc/mc.h"
 #include "src/mc/mc_base.h"
 #include "src/mc/mc_config.hpp"
+#include "src/mc/mc_forward.hpp"
 #include "src/mc/mc_replay.hpp"
 #include "src/simix/smx_private.hpp"
 
@@ -15,6 +16,7 @@
 
 #if SIMGRID_HAVE_MC
 #include "src/mc/ModelChecker.hpp"
+#include "src/mc/remote/RemoteClient.hpp"
 
 using simgrid::mc::remote;
 #endif
index 580b8f5..26b5954 100644 (file)
@@ -14,8 +14,6 @@
 
 #include <fcntl.h>
 #include <cstdlib>
-#define DW_LANG_Objc DW_LANG_ObjC       /* fix spelling error in older dwarf.h */
-#include <dwarf.h>
 #include <elfutils/libdw.h>
 
 #include <boost/algorithm/string/predicate.hpp>
@@ -24,7 +22,7 @@
 #include "xbt/log.h"
 #include "xbt/string.hpp"
 #include "xbt/sysdep.h"
-#include <simgrid_config.h>
+#include <simgrid/config.h>
 
 #include "src/mc/mc_dwarf.hpp"
 #include "src/mc/mc_private.hpp"
index ed94bf9..6ab3a4b 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2007-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2007-2018. 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. */
@@ -25,6 +24,7 @@ class ObjectInformation;
 class Member;
 class Type;
 class Variable;
+class Transition;
 class Frame;
 class ActorInformation;
 
index 34ecd20..244bb20 100644 (file)
@@ -17,8 +17,8 @@
 #ifndef SIMGRID_MC_RECORD_HPP
 #define SIMGRID_MC_RECORD_HPP
 
-#include "src/mc/Transition.hpp"
 #include "src/mc/mc_config.hpp"
+#include "src/mc/mc_forward.hpp"
 #include "xbt/base.h"
 
 #include <vector>
index eb50e3f..ad36981 100644 (file)
@@ -6,9 +6,6 @@
 #ifndef SIMGRID_MC_REPLAY_H
 #define SIMGRID_MC_REPLAY_H
 
-#include "xbt/base.h"
-#include <string>
-
 #include "src/mc/mc_config.hpp"
 
 /** Replay path (if any) in string representation
index 62a18fe..d9c9107 100644 (file)
@@ -6,15 +6,10 @@
 #ifndef SIMGRID_MC_SNAPSHOT_HPP
 #define SIMGRID_MC_SNAPSHOT_HPP
 
-#include <memory>
-#include <set>
-#include <string>
-#include <vector>
-
 #include "src/mc/ModelChecker.hpp"
 #include "src/mc/RegionSnapshot.hpp"
-#include "src/mc/mc_forward.hpp"
 #include "src/mc/mc_unw.hpp"
+#include "src/mc/remote/RemoteClient.hpp"
 
 // ***** Snapshot region
 
index 39364ac..92aff1f 100644 (file)
@@ -10,7 +10,6 @@
 #include "xbt/log.h"
 #include "xbt/sysdep.h"
 
-#include "src/mc/Transition.hpp"
 #include "src/mc/mc_comm_pattern.hpp"
 #include "src/mc/mc_private.hpp"
 #include "src/mc/mc_request.hpp"
index 11dcca6..ed4ce9a 100644 (file)
@@ -9,10 +9,11 @@
 #include <list>
 #include <memory>
 
-#include "src/mc/Transition.hpp"
 #include "src/mc/mc_record.hpp"
 #include "src/mc/mc_snapshot.hpp"
 
+#include "src/mc/Transition.hpp"
+
 namespace simgrid {
 namespace mc {
 
index 62edf66..69a58c0 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2015-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2015-2018. 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. */
@@ -7,12 +6,10 @@
 #ifndef SIMGRID_MC_CHANNEL_HPP
 #define SIMGRID_MC_CHANNEL_HPP
 
-#include <unistd.h>
+#include "src/mc/remote/mc_protocol.h"
 
 #include <type_traits>
 
-#include "src/mc/remote/mc_protocol.h"
-
 namespace simgrid {
 namespace mc {
 
index 1d4cd21..7e9c6dd 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2015-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2015-2018. 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. */
@@ -7,18 +6,10 @@
 #ifndef SIMGRID_MC_CLIENT_H
 #define SIMGRID_MC_CLIENT_H
 
-#include "src/internal_config.h"
+#include "src/mc/remote/Channel.hpp"
 
-#include <cstddef>
 #include <memory>
 
-#include <xbt/base.h>
-
-#include <simgrid/simix.h>
-
-#include "src/mc/remote/Channel.hpp"
-#include "src/mc/remote/mc_protocol.h"
-
 namespace simgrid {
 namespace mc {
 
index f53bb04..5d66c58 100644 (file)
@@ -6,37 +6,11 @@
 #ifndef SIMGRID_MC_PROCESS_H
 #define SIMGRID_MC_PROCESS_H
 
-#include <cstddef>
-#include <cstdint>
-
-#include <memory>
-#include <string>
-#include <type_traits>
-#include <vector>
-
-#include <sys/types.h>
-
-#include <simgrid_config.h>
-
-#include "xbt/base.h"
-#include <xbt/mmalloc.h>
-
 #include "src/xbt/mmalloc/mmprivate.h"
-
 #include "src/mc/remote/Channel.hpp"
-#include "src/mc/remote/RemotePtr.hpp"
-
-#include "src/simix/popping_private.hpp"
-#include "src/simix/smx_private.hpp"
-#include <simgrid/simix.h>
-
-#include "src/xbt/memory_map.hpp"
-
-#include "src/mc/AddressSpace.hpp"
 #include "src/mc/ObjectInformation.hpp"
-#include "src/mc/mc_base.h"
-#include "src/mc/mc_forward.hpp"
-#include "src/mc/remote/mc_protocol.h"
+
+#include <vector>
 
 namespace simgrid {
 namespace mc {
index 6288fd5..bd58e1b 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2008-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2008-2018. 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. */
@@ -7,12 +6,7 @@
 #ifndef SIMGRID_MC_REMOTE_PTR_HPP
 #define SIMGRID_MC_REMOTE_PTR_HPP
 
-#include <cstddef>
-#include <cstdint>
-#include <cstring>
-
-#include <stdexcept>
-#include <type_traits>
+#include "src/simix/smx_private.hpp"
 
 namespace simgrid {
 namespace mc {
index 44f61c9..d6924f1 100644 (file)
@@ -6,10 +6,6 @@
 #ifndef SIMGRID_MC_PROTOCOL_H
 #define SIMGRID_MC_PROTOCOL_H
 
-#include <stdint.h>
-
-#include <xbt/base.h>
-
 #include "mc/datatypes.h"
 #include "simgrid/forward.h"
 
index cab13d9..e6dd156 100644 (file)
@@ -55,23 +55,6 @@ void MSG_init_nocheck(int *argc, char **argv) {
     atexit(MSG_exit);
 }
 
-/** \ingroup msg_simulation
- * \brief Launch the MSG simulation
- */
-msg_error_t MSG_main()
-{
-  /* Clean IO before the run */
-  fflush(stdout);
-  fflush(stderr);
-
-  if (MC_is_active()) {
-    MC_run();
-  } else {
-    SIMIX_run();
-  }
-  return MSG_OK;
-}
-
 /** \ingroup msg_simulation
  * \brief set a configuration variable
  *
index dfc6ca9..e9f5b1c 100644 (file)
@@ -849,19 +849,6 @@ msg_error_t MSG_task_send_with_timeout_bounded(msg_task_t task, const char *alia
   return MSG_task_send_with_timeout(task, alias, timeout);
 }
 
-/** \ingroup msg_task_usage
- * \brief Check if there is a communication going on in a mailbox.
- *
- * \param alias the name of the mailbox to be considered
- *
- * \return Returns 1 if there is a communication, 0 otherwise
- */
-int MSG_task_listen(const char *alias)
-{
-  simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::by_name(alias);
-  return mbox->listen() ? 1 : 0;
-}
-
 /** \ingroup msg_task_usage
  * \brief Look if there is a communication on a mailbox and return the PID of the sender process.
  *
index 43ac177..bb1148f 100644 (file)
@@ -17,6 +17,11 @@ void MSG_launch_application(const char* filename)
 {
   sg_engine_load_deployment(filename);
 }
+msg_error_t MSG_main()
+{
+  sg_engine_run();
+  return MSG_OK;
+}
 void MSG_function_register(const char* name, xbt_main_func_t code)
 {
   sg_engine_register_function(name, code);
@@ -29,6 +34,17 @@ double MSG_get_clock()
 {
   return sg_engine_get_clock();
 }
+
+/* ************************** Mailboxes ************************ */
+void MSG_mailbox_set_async(const char* alias)
+{
+  sg_mailbox_set_receiver(alias);
+}
+int MSG_task_listen(const char* alias)
+{
+  return sg_mailbox_listen(alias);
+}
+
 /* ************************** Actors *************************** */
 int MSG_process_get_PID(sg_actor_t actor)
 {
diff --git a/src/msg/msg_mailbox.cpp b/src/msg/msg_mailbox.cpp
deleted file mode 100644 (file)
index 12bb632..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Mailboxes in MSG */
-
-/* Copyright (c) 2008-2018. 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 "simgrid/s4u/Mailbox.hpp"
-#include "src/msg/msg_private.hpp"
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_mailbox, msg, "Logging specific to MSG (mailbox)");
-
-/** \ingroup msg_mailbox_management
- * \brief Set the mailbox to receive in asynchronous mode
- *
- * All messages sent to this mailbox will be transferred to the receiver without waiting for the receive call.
- * The receive call will still be necessary to use the received data.
- * If there is a need to receive some messages asynchronously, and some not, two different mailboxes should be used.
- *
- * \param alias The name of the mailbox
- */
-void MSG_mailbox_set_async(const char *alias){
-  simgrid::s4u::Mailbox::by_name(alias)->set_receiver(simgrid::s4u::Actor::self());
-  XBT_VERB("%s mailbox set to receive eagerly for myself\n",alias);
-}
index 51ea774..521170a 100644 (file)
@@ -129,7 +129,7 @@ msg_process_t MSG_process_create_with_environment(const char *name, xbt_main_fun
 {
   std::function<void()> function;
   if (code)
-    function = simgrid::xbt::wrapMain(code, argc, static_cast<const char* const*>(argv));
+    function = simgrid::xbt::wrap_main(code, argc, static_cast<const char* const*>(argv));
 
   std::unordered_map<std::string, std::string> props;
   xbt_dict_cursor_t cursor = nullptr;
index 904b52f..e655b2c 100644 (file)
@@ -8,83 +8,83 @@
 
 namespace simgrid {
 namespace vm {
-class VmDirtyPageTrackingExt {
-  bool dp_tracking = false;
-  std::map<kernel::activity::ExecImplPtr, double> dp_objs;
-  double dp_updated_by_deleted_tasks = 0.0;
+class DirtyPageTrackingExt {
+  bool dp_tracking_ = false;
+  std::map<kernel::activity::ExecImplPtr, double> dp_objs_;
+  double dp_updated_by_deleted_tasks_ = 0.0;
   // Percentage of pages that get dirty compared to netspeed [0;1] bytes per 1 flop execution
-  double dp_intensity          = 0.0;
-  sg_size_t working_set_memory = 0.0;
-  double max_downtime          = 0.03;
-  double mig_speed             = 0.0;
+  double dp_intensity_          = 0.0;
+  sg_size_t working_set_memory_ = 0.0;
+  double max_downtime_          = 0.03;
+  double mig_speed_             = 0.0;
 
 public:
   void start_tracking();
-  void stop_tracking() { dp_tracking = false; }
-  bool is_tracking() { return dp_tracking; }
-  void track(kernel::activity::ExecImplPtr exec, double amount) { dp_objs.insert({exec, amount}); }
-  void untrack(kernel::activity::ExecImplPtr exec) { dp_objs.erase(exec); }
-  double get_stored_remains(kernel::activity::ExecImplPtr exec) { return dp_objs.at(exec); }
-  void update_dirty_page_count(double delta) { dp_updated_by_deleted_tasks += delta; }
+  void stop_tracking() { dp_tracking_ = false; }
+  bool is_tracking() { return dp_tracking_; }
+  void track(kernel::activity::ExecImplPtr exec, double amount) { dp_objs_.insert({exec, amount}); }
+  void untrack(kernel::activity::ExecImplPtr exec) { dp_objs_.erase(exec); }
+  double get_stored_remains(kernel::activity::ExecImplPtr exec) { return dp_objs_.at(exec); }
+  void update_dirty_page_count(double delta) { dp_updated_by_deleted_tasks_ += delta; }
   double computed_flops_lookup();
-  double get_intensity() { return dp_intensity; }
-  void set_intensity(double intensity) { dp_intensity = intensity; }
-  double get_working_set_memory() { return working_set_memory; }
-  void set_working_set_memory(sg_size_t size) { working_set_memory = size; }
-  void set_migration_speed(double speed) { mig_speed = speed; }
-  double get_migration_speed() { return mig_speed; }
-  double get_max_downtime() { return max_downtime; }
-
-  static simgrid::xbt::Extension<VirtualMachineImpl, VmDirtyPageTrackingExt> EXTENSION_ID;
-  virtual ~VmDirtyPageTrackingExt() = default;
-  VmDirtyPageTrackingExt()          = default;
+  double get_intensity() { return dp_intensity_; }
+  void set_intensity(double intensity) { dp_intensity_ = intensity; }
+  double get_working_set_memory() { return working_set_memory_; }
+  void set_working_set_memory(sg_size_t size) { working_set_memory_ = size; }
+  void set_migration_speed(double speed) { mig_speed_ = speed; }
+  double get_migration_speed() { return mig_speed_; }
+  double get_max_downtime() { return max_downtime_; }
+
+  static simgrid::xbt::Extension<VirtualMachineImpl, DirtyPageTrackingExt> EXTENSION_ID;
+  virtual ~DirtyPageTrackingExt() = default;
+  DirtyPageTrackingExt()          = default;
 };
 
-simgrid::xbt::Extension<VirtualMachineImpl, VmDirtyPageTrackingExt> VmDirtyPageTrackingExt::EXTENSION_ID;
+simgrid::xbt::Extension<VirtualMachineImpl, DirtyPageTrackingExt> DirtyPageTrackingExt::EXTENSION_ID;
 
-void VmDirtyPageTrackingExt::start_tracking()
+void DirtyPageTrackingExt::start_tracking()
 {
-  dp_tracking = true;
-  for (auto const& elm : dp_objs)
-    dp_objs[elm.first] = elm.first->get_remaining();
+  dp_tracking_ = true;
+  for (auto const& elm : dp_objs_)
+    dp_objs_[elm.first] = elm.first->get_remaining();
 }
 
-double VmDirtyPageTrackingExt::computed_flops_lookup()
+double DirtyPageTrackingExt::computed_flops_lookup()
 {
   double total = 0;
 
-  for (auto const& elm : dp_objs) {
+  for (auto const& elm : dp_objs_) {
     total += elm.second - elm.first->get_remaining();
-    dp_objs[elm.first] = elm.first->get_remaining();
+    dp_objs_[elm.first] = elm.first->get_remaining();
   }
-  total += dp_updated_by_deleted_tasks;
+  total += dp_updated_by_deleted_tasks_;
 
-  dp_updated_by_deleted_tasks = 0;
+  dp_updated_by_deleted_tasks_ = 0;
 
   return total;
 }
 } // namespace vm
 } // namespace simgrid
 
-static void onVirtualMachineCreation(simgrid::vm::VirtualMachineImpl* vm)
+static void on_virtual_machine_creation(simgrid::vm::VirtualMachineImpl* vm)
 {
-  vm->extension_set<simgrid::vm::VmDirtyPageTrackingExt>(new simgrid::vm::VmDirtyPageTrackingExt());
+  vm->extension_set<simgrid::vm::DirtyPageTrackingExt>(new simgrid::vm::DirtyPageTrackingExt());
 }
 
-static void onExecCreation(simgrid::kernel::activity::ExecImplPtr exec)
+static void on_exec_creation(simgrid::kernel::activity::ExecImplPtr exec)
 {
   simgrid::s4u::VirtualMachine* vm = dynamic_cast<simgrid::s4u::VirtualMachine*>(exec->host_);
   if (vm == nullptr)
     return;
 
-  if (vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->is_tracking()) {
-    vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->track(exec, exec->get_remaining());
+  if (vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->is_tracking()) {
+    vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->track(exec, exec->get_remaining());
   } else {
-    vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->track(exec, 0.0);
+    vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->track(exec, 0.0);
   }
 }
 
-static void onExecCompletion(simgrid::kernel::activity::ExecImplPtr exec)
+static void on_exec_completion(simgrid::kernel::activity::ExecImplPtr exec)
 {
   simgrid::s4u::VirtualMachine* vm = dynamic_cast<simgrid::s4u::VirtualMachine*>(exec->host_);
   if (vm == nullptr)
@@ -92,71 +92,71 @@ static void onExecCompletion(simgrid::kernel::activity::ExecImplPtr exec)
 
   /* If we are in the middle of dirty page tracking, we record how much computation has been done until now, and keep
    * the information for the lookup_() function that will called soon. */
-  if (vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->is_tracking()) {
-    double delta = vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->get_stored_remains(exec) -
+  if (vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->is_tracking()) {
+    double delta = vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->get_stored_remains(exec) -
                    exec->get_remaining();
-    vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->update_dirty_page_count(delta);
+    vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->update_dirty_page_count(delta);
   }
-  vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->untrack(exec);
+  vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->untrack(exec);
 }
 
 void sg_vm_dirty_page_tracking_init()
 {
-  if (not simgrid::vm::VmDirtyPageTrackingExt::EXTENSION_ID.valid()) {
-    simgrid::vm::VmDirtyPageTrackingExt::EXTENSION_ID =
-        simgrid::vm::VirtualMachineImpl::extension_create<simgrid::vm::VmDirtyPageTrackingExt>();
-    simgrid::vm::VirtualMachineImpl::on_creation.connect(&onVirtualMachineCreation);
-    simgrid::kernel::activity::ExecImpl::onCreation.connect(&onExecCreation);
-    simgrid::kernel::activity::ExecImpl::onCompletion.connect(&onExecCompletion);
+  if (not simgrid::vm::DirtyPageTrackingExt::EXTENSION_ID.valid()) {
+    simgrid::vm::DirtyPageTrackingExt::EXTENSION_ID =
+        simgrid::vm::VirtualMachineImpl::extension_create<simgrid::vm::DirtyPageTrackingExt>();
+    simgrid::vm::VirtualMachineImpl::on_creation.connect(&on_virtual_machine_creation);
+    simgrid::kernel::activity::ExecImpl::onCreation.connect(&on_exec_creation);
+    simgrid::kernel::activity::ExecImpl::onCompletion.connect(&on_exec_completion);
   }
 }
 
 void sg_vm_start_dirty_page_tracking(sg_vm_t vm)
 {
-  vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->start_tracking();
+  vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->start_tracking();
 }
 
 void sg_vm_stop_dirty_page_tracking(sg_vm_t vm)
 {
-  vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->stop_tracking();
+  vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->stop_tracking();
 }
 
 double sg_vm_lookup_computed_flops(sg_vm_t vm)
 {
-  return vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->computed_flops_lookup();
+  return vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->computed_flops_lookup();
 }
 
 void sg_vm_set_dirty_page_intensity(sg_vm_t vm, double intensity)
 {
-  vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->set_intensity(intensity);
+  vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->set_intensity(intensity);
 }
 
 double sg_vm_get_dirty_page_intensity(sg_vm_t vm)
 {
-  return vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->get_intensity();
+  return vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->get_intensity();
 }
 
 void sg_vm_set_working_set_memory(sg_vm_t vm, sg_size_t size)
 {
-  vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->set_working_set_memory(size);
+  vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->set_working_set_memory(size);
 }
 
 sg_size_t sg_vm_get_working_set_memory(sg_vm_t vm)
 {
-  return vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->get_working_set_memory();
+  return vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->get_working_set_memory();
 }
 
 void sg_vm_set_migration_speed(sg_vm_t vm, double speed)
 {
-  vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->set_migration_speed(speed);
+  vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->set_migration_speed(speed);
 }
 
 double sg_vm_get_migration_speed(sg_vm_t vm)
 {
-  return vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->get_migration_speed();
+  return vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->get_migration_speed();
 }
 
 double sg_vm_get_max_downtime(sg_vm_t vm)
 {
-  return vm->getImpl()->extension<simgrid::vm::VmDirtyPageTrackingExt>()->get_max_downtime();
+  return vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->get_max_downtime();
 }
index 0dd3287..70a7a3b 100644 (file)
@@ -32,7 +32,7 @@ File::File(std::string fullpath, sg_host_t host, void* userdata) : fullpath_(ful
   size_t longest_prefix_length = 0;
   XBT_DEBUG("Search for storage name for '%s' on '%s'", fullpath.c_str(), host->get_cname());
 
-  for (auto const& mnt : host->getMountedStorages()) {
+  for (auto const& mnt : host->get_mounted_storages()) {
     XBT_DEBUG("See '%s'", mnt.first.c_str());
     mount_point_ = fullpath.substr(0, mnt.first.length());
 
@@ -246,7 +246,7 @@ int File::remote_copy(sg_host_t host, const char* fullpath)
   Host* dst_host;
   size_t longest_prefix_length = 0;
 
-  for (auto const& elm : host->getMountedStorages()) {
+  for (auto const& elm : host->get_mounted_storages()) {
     std::string mount_point = std::string(fullpath).substr(0, elm.first.size());
     if (mount_point == elm.first && elm.first.length() > longest_prefix_length) {
       /* The current mount name is found in the full path and is bigger than the previous*/
@@ -492,7 +492,7 @@ xbt_dict_t sg_host_get_storage_content(sg_host_t host)
 {
   xbt_assert((host != nullptr), "Invalid parameters");
   xbt_dict_t contents = xbt_dict_new_homogeneous(nullptr);
-  for (auto const& elm : host->getMountedStorages())
+  for (auto const& elm : host->get_mounted_storages())
     xbt_dict_set(contents, elm.first.c_str(), sg_storage_get_content(elm.second), nullptr);
 
   return contents;
index 3aeef42..b99df53 100644 (file)
@@ -29,30 +29,30 @@ class Governor {
 
 private:
   simgrid::s4u::Host* const host_;
+  double sampling_rate_;
 
 protected:
   simgrid::s4u::Host* get_host() const { return host_; }
 
 public:
-  double sampling_rate;
 
   explicit Governor(simgrid::s4u::Host* ptr) : host_(ptr) { init(); }
   virtual ~Governor() = default;
+  virtual std::string get_name() = 0;
 
   void init()
   {
     const char* local_sampling_rate_config = host_->get_property(property_sampling_rate);
     double global_sampling_rate_config     = simgrid::config::get_value<double>(property_sampling_rate);
     if (local_sampling_rate_config != nullptr) {
-      sampling_rate = std::stod(local_sampling_rate_config);
+      sampling_rate_ = std::stod(local_sampling_rate_config);
     } else {
-      sampling_rate = global_sampling_rate_config;
+      sampling_rate_ = global_sampling_rate_config;
     }
   }
 
   virtual void update()         = 0;
-  virtual std::string getName() = 0;
-  double samplingRate() { return sampling_rate; }
+  double get_sampling_rate() { return sampling_rate_; }
 };
 
 /**
@@ -68,9 +68,9 @@ public:
 class Performance : public Governor {
 public:
   explicit Performance(simgrid::s4u::Host* ptr) : Governor(ptr) {}
+  std::string get_name() override { return "Performance"; }
 
   void update() override { get_host()->set_pstate(0); }
-  std::string getName() override { return "Performance"; }
 };
 
 /**
@@ -86,9 +86,9 @@ public:
 class Powersave : public Governor {
 public:
   explicit Powersave(simgrid::s4u::Host* ptr) : Governor(ptr) {}
+  std::string get_name() override { return "Powersave"; }
 
   void update() override { get_host()->set_pstate(get_host()->get_pstate_count() - 1); }
-  std::string getName() override { return "Powersave"; }
 };
 
 /**
@@ -105,20 +105,20 @@ class OnDemand : public Governor {
    * See https://elixir.bootlin.com/linux/v4.15.4/source/drivers/cpufreq/cpufreq_ondemand.c
    * DEF_FREQUENCY_UP_THRESHOLD and od_update()
    */
-  double freq_up_threshold = 0.80;
+  double freq_up_threshold_ = 0.80;
 
 public:
   explicit OnDemand(simgrid::s4u::Host* ptr) : Governor(ptr) {}
+  std::string get_name() override { return "OnDemand"; }
 
-  std::string getName() override { return "OnDemand"; }
   void update() override
   {
     double load = get_host()->get_core_count() * sg_host_get_avg_load(get_host());
     sg_host_load_reset(get_host()); // Only consider the period between two calls to this method!
 
-    if (load > freq_up_threshold) {
+    if (load > freq_up_threshold_) {
       get_host()->set_pstate(0); /* Run at max. performance! */
-      XBT_INFO("Load: %f > threshold: %f --> changed to pstate %i", load, freq_up_threshold, 0);
+      XBT_INFO("Load: %f > threshold: %f --> changed to pstate %i", load, freq_up_threshold_, 0);
     } else {
       /* The actual implementation uses a formula here: (See Kernel file cpufreq_ondemand.c:158)
        *
@@ -129,11 +129,11 @@ public:
        */
       int max_pstate = get_host()->get_pstate_count() - 1;
       // Load is now < freq_up_threshold; exclude pstate 0 (the fastest)
-      // because pstate 0 can only be selected if load > freq_up_threshold
+      // because pstate 0 can only be selected if load > freq_up_threshold_
       int new_pstate = max_pstate - load * (max_pstate + 1);
       get_host()->set_pstate(new_pstate);
 
-      XBT_DEBUG("Load: %f < threshold: %f --> changed to pstate %i", load, freq_up_threshold, new_pstate);
+      XBT_DEBUG("Load: %f < threshold: %f --> changed to pstate %i", load, freq_up_threshold_, new_pstate);
     }
   }
 };
@@ -151,36 +151,36 @@ public:
  * > environment.
  */
 class Conservative : public Governor {
-  double freq_up_threshold   = .8;
-  double freq_down_threshold = .2;
+  double freq_up_threshold_   = .8;
+  double freq_down_threshold_ = .2;
 
 public:
   explicit Conservative(simgrid::s4u::Host* ptr) : Governor(ptr) {}
+  virtual std::string get_name() override { return "Conservative"; }
 
-  virtual std::string getName() override { return "Conservative"; }
   virtual void update() override
   {
     double load = get_host()->get_core_count() * sg_host_get_avg_load(get_host());
     int pstate  = get_host()->get_pstate();
     sg_host_load_reset(get_host()); // Only consider the period between two calls to this method!
 
-    if (load > freq_up_threshold) {
+    if (load > freq_up_threshold_) {
       if (pstate != 0) {
         get_host()->set_pstate(pstate - 1);
-        XBT_INFO("Load: %f > threshold: %f -> increasing performance to pstate %d", load, freq_up_threshold,
+        XBT_INFO("Load: %f > threshold: %f -> increasing performance to pstate %d", load, freq_up_threshold_,
                  pstate - 1);
       } else {
         XBT_DEBUG("Load: %f > threshold: %f -> but cannot speed up even more, already in highest pstate %d", load,
-                  freq_up_threshold, pstate);
+                  freq_up_threshold_, pstate);
       }
-    } else if (load < freq_down_threshold) {
+    } else if (load < freq_down_threshold_) {
       int max_pstate = get_host()->get_pstate_count() - 1;
       if (pstate != max_pstate) { // Are we in the slowest pstate already?
         get_host()->set_pstate(pstate + 1);
-        XBT_INFO("Load: %f < threshold: %f -> slowing down to pstate %d", load, freq_down_threshold, pstate + 1);
+        XBT_INFO("Load: %f < threshold: %f -> slowing down to pstate %d", load, freq_down_threshold_, pstate + 1);
       } else {
         XBT_DEBUG("Load: %f < threshold: %f -> cannot slow down even more, already in slowest pstate %d", load,
-                  freq_down_threshold, pstate);
+                  freq_down_threshold_, pstate);
       }
     }
   }
@@ -208,15 +208,12 @@ class HostDvfs {
 public:
   static simgrid::xbt::Extension<simgrid::s4u::Host, HostDvfs> EXTENSION_ID;
 
-  explicit HostDvfs(simgrid::s4u::Host*);
-  ~HostDvfs();
+  explicit HostDvfs(simgrid::s4u::Host*){};
+  ~HostDvfs() = default;
 };
 
 simgrid::xbt::Extension<simgrid::s4u::Host, HostDvfs> HostDvfs::EXTENSION_ID;
 
-HostDvfs::HostDvfs(simgrid::s4u::Host* ptr) {}
-
-HostDvfs::~HostDvfs() = default;
 } // namespace dvfs
 } // namespace plugin
 } // namespace simgrid
@@ -275,16 +272,16 @@ static void on_host_added(simgrid::s4u::Host& host)
       // Sleep *before* updating; important for startup (i.e., t = 0).
       // In the beginning, we want to go with the pstates specified in the platform file
       // (so we sleep first)
-      simgrid::s4u::this_actor::sleep_for(governor->samplingRate());
+      simgrid::s4u::this_actor::sleep_for(governor->get_sampling_rate());
       governor->update();
-      XBT_DEBUG("Governor (%s) just updated!", governor->getName().c_str());
+      XBT_DEBUG("Governor (%s) just updated!", governor->get_name().c_str());
     }
 
     XBT_WARN("I should have never reached this point: daemons should be killed when all regular processes are done");
     return 0;
   });
 
-  // This call must be placed in this function. Otherweise, the daemonize() call comes too late and
+  // This call must be placed in this function. Otherwise, the daemonize() call comes too late and
   // SMPI will take this process as an MPI process!
   daemon->daemonize();
 }
index c5d0f67..4fdc423 100644 (file)
@@ -110,11 +110,11 @@ namespace plugin {
 
 class PowerRange {
 public:
-  double idle;
-  double min;
-  double max;
+  double idle_;
+  double min_;
+  double max_;
 
-  PowerRange(double idle, double min, double max) : idle(idle), min(min), max(max) {}
+  PowerRange(double idle, double min, double max) : idle_(idle), min_(min), max_(max) {}
 };
 
 class HostEnergy {
@@ -124,29 +124,29 @@ public:
   explicit HostEnergy(simgrid::s4u::Host* ptr);
   ~HostEnergy();
 
-  double getCurrentWattsValue();
-  double getCurrentWattsValue(double cpu_load);
-  double getConsumedEnergy();
-  double getWattMinAt(int pstate);
-  double getWattMaxAt(int pstate);
+  double get_current_watts_value();
+  double get_current_watts_value(double cpu_load);
+  double get_consumed_energy();
+  double get_watt_min_at(int pstate);
+  double get_watt_max_at(int pstate);
   void update();
 
 private:
-  void initWattsRangeList();
-  simgrid::s4u::Host* host = nullptr;
-  std::vector<PowerRange>
-      power_range_watts_list; /*< List of (min_power,max_power) pairs corresponding to each cpu pstate */
+  void init_watts_range_list();
+  simgrid::s4u::Host* host_ = nullptr;
+  /*< List of (min_power,max_power) pairs corresponding to each cpu pstate */
+  std::vector<PowerRange> power_range_watts_list_;
 
   /* We need to keep track of what pstate has been used, as we will sometimes be notified only *after* a pstate has been
    * used (but we need to update the energy consumption with the old pstate!)
    */
-  int pstate           = 0;
-  const int pstate_off = -1;
+  int pstate_           = 0;
+  const int pstate_off_ = -1;
 
 public:
-  double watts_off    = 0.0; /*< Consumption when the machine is turned off (shutdown) */
-  double total_energy = 0.0; /*< Total energy consumed by the host */
-  double last_updated;       /*< Timestamp of the last energy update event*/
+  double watts_off_    = 0.0; /*< Consumption when the machine is turned off (shutdown) */
+  double total_energy_ = 0.0; /*< Total energy consumed by the host */
+  double last_updated_;       /*< Timestamp of the last energy update event*/
 };
 
 simgrid::xbt::Extension<simgrid::s4u::Host, HostEnergy> HostEnergy::EXTENSION_ID;
@@ -154,41 +154,41 @@ simgrid::xbt::Extension<simgrid::s4u::Host, HostEnergy> HostEnergy::EXTENSION_ID
 /* Computes the consumption so far. Called lazily on need. */
 void HostEnergy::update()
 {
-  double start_time  = this->last_updated;
+  double start_time  = this->last_updated_;
   double finish_time = surf_get_clock();
 
   if (start_time < finish_time) {
-    double previous_energy = this->total_energy;
+    double previous_energy = this->total_energy_;
 
-    double instantaneous_consumption = this->getCurrentWattsValue();
+    double instantaneous_consumption = this->get_current_watts_value();
 
     double energy_this_step = instantaneous_consumption * (finish_time - start_time);
 
     // TODO Trace: Trace energy_this_step from start_time to finish_time in host->getName()
 
-    this->total_energy = previous_energy + energy_this_step;
-    this->last_updated = finish_time;
+    this->total_energy_ = previous_energy + energy_this_step;
+    this->last_updated_ = finish_time;
 
     XBT_DEBUG("[update_energy of %s] period=[%.2f-%.2f]; current power peak=%.0E flop/s; consumption change: %.2f J -> "
               "%.2f J",
-              host->get_cname(), start_time, finish_time, host->pimpl_cpu->get_speed(1.0), previous_energy,
+              host_->get_cname(), start_time, finish_time, host_->pimpl_cpu->get_speed(1.0), previous_energy,
               energy_this_step);
   }
 
   /* Save data for the upcoming time interval: whether it's on/off and the pstate if it's on */
-  this->pstate = host->is_on() ? host->get_pstate() : pstate_off;
+  this->pstate_ = host_->is_on() ? host_->get_pstate() : pstate_off_;
 }
 
-HostEnergy::HostEnergy(simgrid::s4u::Host* ptr) : host(ptr), last_updated(surf_get_clock())
+HostEnergy::HostEnergy(simgrid::s4u::Host* ptr) : host_(ptr), last_updated_(surf_get_clock())
 {
-  initWattsRangeList();
+  init_watts_range_list();
 
-  const char* off_power_str = host->get_property("watt_off");
+  const char* off_power_str = host_->get_property("watt_off");
   if (off_power_str != nullptr) {
     try {
-      this->watts_off = std::stod(std::string(off_power_str));
+      this->watts_off_ = std::stod(std::string(off_power_str));
     } catch (std::invalid_argument& ia) {
-      throw std::invalid_argument(std::string("Invalid value for property watt_off of host ") + host->get_cname() +
+      throw std::invalid_argument(std::string("Invalid value for property watt_off of host ") + host_->get_cname() +
                                   ": " + off_power_str);
     }
   }
@@ -197,28 +197,30 @@ HostEnergy::HostEnergy(simgrid::s4u::Host* ptr) : host(ptr), last_updated(surf_g
 
 HostEnergy::~HostEnergy() = default;
 
-double HostEnergy::getWattMinAt(int pstate)
+double HostEnergy::get_watt_min_at(int pstate)
 {
-  xbt_assert(not power_range_watts_list.empty(), "No power range properties specified for host %s", host->get_cname());
-  return power_range_watts_list[pstate].min;
+  xbt_assert(not power_range_watts_list_.empty(), "No power range properties specified for host %s",
+             host_->get_cname());
+  return power_range_watts_list_[pstate].min_;
 }
 
-double HostEnergy::getWattMaxAt(int pstate)
+double HostEnergy::get_watt_max_at(int pstate)
 {
-  xbt_assert(not power_range_watts_list.empty(), "No power range properties specified for host %s", host->get_cname());
-  return power_range_watts_list[pstate].max;
+  xbt_assert(not power_range_watts_list_.empty(), "No power range properties specified for host %s",
+             host_->get_cname());
+  return power_range_watts_list_[pstate].max_;
 }
 
 /** @brief Computes the power consumed by the host according to the current situation
  *
  * - If the host is off, that's the watts_off value
  * - if it's on, take the current pstate and the current processor load into account */
-double HostEnergy::getCurrentWattsValue()
+double HostEnergy::get_current_watts_value()
 {
-  if (this->pstate == pstate_off) // The host is off (or was off at the beginning of this time interval)
-    return this->watts_off;
+  if (this->pstate_ == pstate_off_) // The host is off (or was off at the beginning of this time interval)
+    return this->watts_off_;
 
-  double current_speed = host->getSpeed();
+  double current_speed = host_->get_speed();
 
   double cpu_load;
   // We may have start == finish if the past consumption was updated since the simcall was started
@@ -232,10 +234,10 @@ double HostEnergy::getCurrentWattsValue()
     // We consider that the machine is then fully loaded. That's arbitrary but it avoids a NaN
     cpu_load = 1;
   else
-    cpu_load = host->pimpl_cpu->get_constraint()->get_usage() / current_speed;
+    cpu_load = host_->pimpl_cpu->get_constraint()->get_usage() / current_speed;
 
   /** Divide by the number of cores here **/
-  cpu_load /= host->pimpl_cpu->get_core_count();
+  cpu_load /= host_->pimpl_cpu->get_core_count();
 
   if (cpu_load > 1) // A machine with a load > 1 consumes as much as a fully loaded machine, not more
     cpu_load = 1;
@@ -247,33 +249,34 @@ double HostEnergy::getCurrentWattsValue()
    *
    * where X is the amount of idling cores, and Y the amount of computing cores.
    */
-  return getCurrentWattsValue(cpu_load);
+  return get_current_watts_value(cpu_load);
 }
 
 /** @brief Computes the power that the host would consume at the provided processor load
  *
  * Whether the host is ON or OFF is not taken into account.
  */
-double HostEnergy::getCurrentWattsValue(double cpu_load)
+double HostEnergy::get_current_watts_value(double cpu_load)
 {
-  xbt_assert(not power_range_watts_list.empty(), "No power range properties specified for host %s", host->get_cname());
+  xbt_assert(not power_range_watts_list_.empty(), "No power range properties specified for host %s",
+             host_->get_cname());
 
   /* Return watts_off if pstate == pstate_off (ie, if the host is off) */
-  if (this->pstate == pstate_off) {
-    return watts_off;
+  if (this->pstate_ == pstate_off_) {
+    return watts_off_;
   }
 
   /* min_power corresponds to the power consumed when only one core is active */
   /* max_power is the power consumed at 100% cpu load       */
-  auto range           = power_range_watts_list.at(this->pstate);
+  auto range           = power_range_watts_list_.at(this->pstate_);
   double current_power = 0;
   double min_power     = 0;
   double max_power     = 0;
   double power_slope   = 0;
 
   if (cpu_load > 0) { /* Something is going on, the machine is not idle */
-    double min_power = range.min;
-    double max_power = range.max;
+    double min_power = range.min_;
+    double max_power = range.max_;
 
     /**
      * The min_power states how much we consume when only one single
@@ -286,7 +289,7 @@ double HostEnergy::getCurrentWattsValue(double cpu_load)
      * (maxCpuLoad is by definition 1)
      */
     double power_slope;
-    int coreCount         = host->get_core_count();
+    int coreCount         = host_->get_core_count();
     double coreReciprocal = static_cast<double>(1) / static_cast<double>(coreCount);
     if (coreCount > 1)
       power_slope = (max_power - min_power) / (1 - coreReciprocal);
@@ -295,7 +298,7 @@ double HostEnergy::getCurrentWattsValue(double cpu_load)
 
     current_power = min_power + (cpu_load - coreReciprocal) * power_slope;
   } else { /* Our machine is idle, take the dedicated value! */
-    current_power = range.idle;
+    current_power = range.idle_;
   }
 
   XBT_DEBUG("[get_current_watts] min_power=%f, max_power=%f, slope=%f", min_power, max_power, power_slope);
@@ -304,34 +307,34 @@ double HostEnergy::getCurrentWattsValue(double cpu_load)
   return current_power;
 }
 
-double HostEnergy::getConsumedEnergy()
+double HostEnergy::get_consumed_energy()
 {
-  if (last_updated < surf_get_clock()) // We need to simcall this as it modifies the environment
+  if (last_updated_ < surf_get_clock()) // We need to simcall this as it modifies the environment
     simgrid::simix::simcall(std::bind(&HostEnergy::update, this));
 
-  return total_energy;
+  return total_energy_;
 }
 
-void HostEnergy::initWattsRangeList()
+void HostEnergy::init_watts_range_list()
 {
-  const char* all_power_values_str = host->get_property("watt_per_state");
+  const char* all_power_values_str = host_->get_property("watt_per_state");
   if (all_power_values_str == nullptr)
     return;
 
   std::vector<std::string> all_power_values;
   boost::split(all_power_values, all_power_values_str, boost::is_any_of(","));
-  XBT_DEBUG("%s: profile: %s, cores: %d", host->get_cname(), all_power_values_str, host->get_core_count());
+  XBT_DEBUG("%s: profile: %s, cores: %d", host_->get_cname(), all_power_values_str, host_->get_core_count());
 
   int i = 0;
   for (auto const& current_power_values_str : all_power_values) {
     /* retrieve the power values associated with the current pstate */
     std::vector<std::string> current_power_values;
     boost::split(current_power_values, current_power_values_str, boost::is_any_of(":"));
-    if (host->get_core_count() == 1) {
+    if (host_->get_core_count() == 1) {
       xbt_assert(current_power_values.size() == 2 || current_power_values.size() == 3,
                  "Power properties incorrectly defined for host %s."
                  "It should be 'Idle:FullSpeed' power values because you have one core only.",
-                 host->get_cname());
+                 host_->get_cname());
       if (current_power_values.size() == 2) {
         // In this case, 1core == AllCores
         current_power_values.push_back(current_power_values.at(1));
@@ -341,24 +344,24 @@ void HostEnergy::initWattsRangeList()
                    "The energy profile of mono-cores should be formatted as 'Idle:FullSpeed' only.\n"
                    "If you go for a 'Idle:OneCore:AllCores' power profile on mono-cores, then OneCore and AllCores "
                    "must be equal.",
-                   host->get_cname());
+                   host_->get_cname());
       }
     } else {
       xbt_assert(current_power_values.size() == 3,
                  "Power properties incorrectly defined for host %s."
                  "It should be 'Idle:OneCore:AllCores' power values because you have more than one core.",
-                 host->get_cname());
+                 host_->get_cname());
     }
 
     /* min_power corresponds to the idle power (cpu load = 0) */
     /* max_power is the power consumed at 100% cpu load       */
-    char* msg_idle = bprintf("Invalid idle value for pstate %d on host %s: %%s", i, host->get_cname());
-    char* msg_min  = bprintf("Invalid OneCore value for pstate %d on host %s: %%s", i, host->get_cname());
-    char* msg_max  = bprintf("Invalid AllCores value for pstate %d on host %s: %%s", i, host->get_cname());
+    char* msg_idle = bprintf("Invalid idle value for pstate %d on host %s: %%s", i, host_->get_cname());
+    char* msg_min  = bprintf("Invalid OneCore value for pstate %d on host %s: %%s", i, host_->get_cname());
+    char* msg_max  = bprintf("Invalid AllCores value for pstate %d on host %s: %%s", i, host_->get_cname());
     PowerRange range(xbt_str_parse_double((current_power_values.at(0)).c_str(), msg_idle),
                      xbt_str_parse_double((current_power_values.at(1)).c_str(), msg_min),
                      xbt_str_parse_double((current_power_values.at(2)).c_str(), msg_max));
-    power_range_watts_list.push_back(range);
+    power_range_watts_list_.push_back(range);
     xbt_free(msg_idle);
     xbt_free(msg_min);
     xbt_free(msg_max);
@@ -371,7 +374,7 @@ void HostEnergy::initWattsRangeList()
 using simgrid::plugin::HostEnergy;
 
 /* **************************** events  callback *************************** */
-static void onCreation(simgrid::s4u::Host& host)
+static void on_creation(simgrid::s4u::Host& host)
 {
   if (dynamic_cast<simgrid::s4u::VirtualMachine*>(&host)) // Ignore virtual machines
     return;
@@ -381,7 +384,8 @@ static void onCreation(simgrid::s4u::Host& host)
   host.extension_set(new HostEnergy(&host));
 }
 
-static void onActionStateChange(simgrid::surf::CpuAction* action)
+static void on_action_state_change(simgrid::surf::CpuAction* action,
+                                   simgrid::kernel::resource::Action::State /*previous*/)
 {
   for (simgrid::surf::Cpu* const& cpu : action->cpus()) {
     simgrid::s4u::Host* host = cpu->get_host();
@@ -390,12 +394,12 @@ static void onActionStateChange(simgrid::surf::CpuAction* action)
       // If it's a VM, take the corresponding PM
       simgrid::s4u::VirtualMachine* vm = dynamic_cast<simgrid::s4u::VirtualMachine*>(host);
       if (vm) // If it's a VM, take the corresponding PM
-        host = vm->getPm();
+        host = vm->get_pm();
 
       // Get the host_energy extension for the relevant host
       HostEnergy* host_energy = host->extension<HostEnergy>();
 
-      if (host_energy->last_updated < surf_get_clock())
+      if (host_energy->last_updated_ < surf_get_clock())
         host_energy->update();
     }
   }
@@ -403,7 +407,7 @@ static void onActionStateChange(simgrid::surf::CpuAction* action)
 
 /* This callback is fired either when the host changes its state (on/off) ("onStateChange") or its speed
  * (because the user changed the pstate, or because of external trace events) ("onSpeedChange") */
-static void onHostChange(simgrid::s4u::Host& host)
+static void on_host_change(simgrid::s4u::Host& host)
 {
   if (dynamic_cast<simgrid::s4u::VirtualMachine*>(&host)) // Ignore virtual machines
     return;
@@ -413,16 +417,16 @@ static void onHostChange(simgrid::s4u::Host& host)
   host_energy->update();
 }
 
-static void onHostDestruction(simgrid::s4u::Host& host)
+static void on_host_destruction(simgrid::s4u::Host& host)
 {
   if (dynamic_cast<simgrid::s4u::VirtualMachine*>(&host)) // Ignore virtual machines
     return;
 
   XBT_INFO("Energy consumption of host %s: %f Joules", host.get_cname(),
-           host.extension<HostEnergy>()->getConsumedEnergy());
+           host.extension<HostEnergy>()->get_consumed_energy());
 }
 
-static void onSimulationEnd()
+static void on_simulation_end()
 {
   std::vector<simgrid::s4u::Host*> hosts = simgrid::s4u::Engine::get_instance()->get_all_hosts();
 
@@ -432,7 +436,7 @@ static void onSimulationEnd()
     if (dynamic_cast<simgrid::s4u::VirtualMachine*>(hosts[i]) == nullptr) { // Ignore virtual machines
 
       bool host_was_used = (sg_host_get_computed_flops(hosts[i]) != 0);
-      double energy      = hosts[i]->extension<HostEnergy>()->getConsumedEnergy();
+      double energy      = hosts[i]->extension<HostEnergy>()->get_consumed_energy();
       total_energy += energy;
       if (host_was_used)
         used_hosts_energy += energy;
@@ -457,12 +461,12 @@ void sg_host_energy_plugin_init()
 
   HostEnergy::EXTENSION_ID = simgrid::s4u::Host::extension_create<HostEnergy>();
 
-  simgrid::s4u::Host::on_creation.connect(&onCreation);
-  simgrid::s4u::Host::on_state_change.connect(&onHostChange);
-  simgrid::s4u::Host::on_speed_change.connect(&onHostChange);
-  simgrid::s4u::Host::on_destruction.connect(&onHostDestruction);
-  simgrid::s4u::on_simulation_end.connect(&onSimulationEnd);
-  simgrid::surf::CpuAction::on_state_change.connect(&onActionStateChange);
+  simgrid::s4u::Host::on_creation.connect(&on_creation);
+  simgrid::s4u::Host::on_state_change.connect(&on_host_change);
+  simgrid::s4u::Host::on_speed_change.connect(&on_host_change);
+  simgrid::s4u::Host::on_destruction.connect(&on_host_destruction);
+  simgrid::s4u::on_simulation_end.connect(&on_simulation_end);
+  simgrid::surf::CpuAction::on_state_change.connect(&on_action_state_change);
 }
 
 /** @ingroup plugin_energy
@@ -492,7 +496,7 @@ double sg_host_get_consumed_energy(sg_host_t host)
 {
   xbt_assert(HostEnergy::EXTENSION_ID.valid(),
              "The Energy plugin is not active. Please call sg_host_energy_plugin_init() during initialization.");
-  return host->extension<HostEnergy>()->getConsumedEnergy();
+  return host->extension<HostEnergy>()->get_consumed_energy();
 }
 
 /** @ingroup plugin_energy
@@ -502,7 +506,7 @@ double sg_host_get_wattmin_at(sg_host_t host, int pstate)
 {
   xbt_assert(HostEnergy::EXTENSION_ID.valid(),
              "The Energy plugin is not active. Please call sg_host_energy_plugin_init() during initialization.");
-  return host->extension<HostEnergy>()->getWattMinAt(pstate);
+  return host->extension<HostEnergy>()->get_watt_min_at(pstate);
 }
 /** @ingroup plugin_energy
  *  @brief  Returns the amount of watt dissipated at the given pstate when the host burns CPU at 100%
@@ -511,7 +515,7 @@ double sg_host_get_wattmax_at(sg_host_t host, int pstate)
 {
   xbt_assert(HostEnergy::EXTENSION_ID.valid(),
              "The Energy plugin is not active. Please call sg_host_energy_plugin_init() during initialization.");
-  return host->extension<HostEnergy>()->getWattMaxAt(pstate);
+  return host->extension<HostEnergy>()->get_watt_max_at(pstate);
 }
 
 /** @ingroup plugin_energy
@@ -521,5 +525,5 @@ double sg_host_get_current_consumption(sg_host_t host)
 {
   xbt_assert(HostEnergy::EXTENSION_ID.valid(),
              "The Energy plugin is not active. Please call sg_host_energy_plugin_init() during initialization.");
-  return host->extension<HostEnergy>()->getCurrentWattsValue();
+  return host->extension<HostEnergy>()->get_current_watts_value();
 }
index 69e2a0d..86d6f1a 100644 (file)
@@ -3,6 +3,7 @@
 /* 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 <simgrid/s4u.hpp>
 #include "simgrid/plugins/load.h"
 #include "src/plugins/vm/VirtualMachineImpl.hpp"
 
@@ -21,101 +22,83 @@ class HostLoad {
 public:
   static simgrid::xbt::Extension<simgrid::s4u::Host, HostLoad> EXTENSION_ID;
 
-  explicit HostLoad(simgrid::s4u::Host* ptr);
-  ~HostLoad();
-
-  double getCurrentLoad();
-  double getComputedFlops();
-  double getAverageLoad();
-  double getIdleTime();
+  explicit HostLoad(simgrid::s4u::Host* ptr)
+      : host_(ptr)
+      , last_updated_(surf_get_clock())
+      , last_reset_(surf_get_clock())
+      , current_speed_(host_->get_speed())
+      , current_flops_(host_->pimpl_cpu->get_constraint()->get_usage())
+      , theor_max_flops_(0)
+      , was_prev_idle_(current_flops_ == 0)
+  {
+  }
+  ~HostLoad() = default;
+  HostLoad() = delete;
+  explicit HostLoad(simgrid::s4u::Host& ptr) = delete;
+  explicit HostLoad(simgrid::s4u::Host&& ptr) = delete;
+
+  double get_current_load();
+  double get_average_load() { return (theor_max_flops_ == 0) ? 0 : computed_flops_ / theor_max_flops_; };
+  double get_computed_flops() { return computed_flops_; }
+  double get_idle_time() { return idle_time_; } /** Return idle time since last reset */
   void update();
   void reset();
 
 private:
-  simgrid::s4u::Host* host = nullptr;
-  double last_updated      = 0;
-  double last_reset        = 0;
-  double current_speed     = 0;
-  double current_flops     = 0;
-  double computed_flops    = 0;
-  double idle_time         = 0;
-  double theor_max_flops   = 0;
-  bool was_prev_idle       = true; /* A host is idle at the beginning */
+  simgrid::s4u::Host* host_ = nullptr;
+  double last_updated_      = 0;
+  double last_reset_        = 0;
+  /**
+   * current_speed each core is running at right now
+   */
+  double current_speed_     = 0;
+  /**
+   * How many flops are currently used by all the processes running on this
+   * host?
+   */
+  double current_flops_     = 0;
+  double computed_flops_    = 0;
+  double idle_time_         = 0;
+  double theor_max_flops_   = 0;
+  bool was_prev_idle_       = true; /* A host is idle at the beginning */
 };
 
 simgrid::xbt::Extension<simgrid::s4u::Host, HostLoad> HostLoad::EXTENSION_ID;
 
-HostLoad::HostLoad(simgrid::s4u::Host* ptr)
-    : host(ptr)
-    , last_updated(surf_get_clock())
-    , last_reset(surf_get_clock())
-    , current_speed(host->getSpeed())
-    , current_flops(host->pimpl_cpu->get_constraint()->get_usage())
-    , theor_max_flops(0)
-    , was_prev_idle(current_flops == 0)
-{
-}
-
-HostLoad::~HostLoad() = default;
-
 void HostLoad::update()
 {
   double now = surf_get_clock();
 
   /* Current flop per second computed by the cpu; current_flops = k * pstate_speed_in_flops, k \in {0, 1, ..., cores}
    * number of active cores */
-  current_flops = host->pimpl_cpu->get_constraint()->get_usage();
+  current_flops_ = host_->pimpl_cpu->get_constraint()->get_usage();
 
   /* flops == pstate_speed * cores_being_currently_used */
-  computed_flops += (now - last_updated) * current_flops;
+  computed_flops_ += (now - last_updated_) * current_flops_;
 
-  if (was_prev_idle) {
-    idle_time += (now - last_updated);
+  if (was_prev_idle_) {
+    idle_time_ += (now - last_updated_);
   }
 
-  theor_max_flops += current_speed * host->get_core_count() * (now - last_updated);
-  current_speed = host->getSpeed();
-  last_updated  = now;
-  was_prev_idle = (current_flops == 0);
+  theor_max_flops_ += current_speed_ * host_->get_core_count() * (now - last_updated_);
+  current_speed_ = host_->get_speed();
+  last_updated_  = now;
+  was_prev_idle_ = (current_flops_ == 0);
 }
 
 /**
- * WARNING: This function does not guarantee that you have the real load at any time
- * imagine all actions on your CPU terminate at time t. Your load is then 0. Then
- * you query the load (still 0) and then another action starts (still at time t!).
- * This means that the load was never really 0 (because the time didn't advance) but
- * it will still be reported as 0.
+ * WARNING: This function does not guarantee that you have the real load at any time imagine all actions on your CPU
+ * terminate at time t. Your load is then 0. Then you query the load (still 0) and then another action starts (still at
+ * time t!). This means that the load was never really 0 (because the time didn't advance) but it will still be reported
+ * as 0.
  *
  * So, use at your own risk.
  */
-double HostLoad::getCurrentLoad()
+double HostLoad::get_current_load()
 {
-  // We don't need to call update() here because it is called everytime an
-  // action terminates or starts
+  // We don't need to call update() here because it is called every time an action terminates or starts
   // FIXME: Can this happen at the same time? stop -> call to getCurrentLoad, load = 0 -> next action starts?
-  return current_flops / static_cast<double>(host->getSpeed() * host->get_core_count());
-}
-
-/**
- * Return idle time since last reset
- */
-double HostLoad::getIdleTime()
-{
-  return idle_time;
-}
-
-double HostLoad::getAverageLoad()
-{
-  if (theor_max_flops == 0) { // Avoid division by 0
-    return 0;
-  }
-
-  return computed_flops / theor_max_flops;
-}
-
-double HostLoad::getComputedFlops()
-{
-  return computed_flops;
+  return current_flops_ / static_cast<double>(host_->get_speed() * host_->get_core_count());
 }
 
 /*
@@ -123,14 +106,14 @@ double HostLoad::getComputedFlops()
  */
 void HostLoad::reset()
 {
-  last_updated    = surf_get_clock();
-  last_reset      = surf_get_clock();
-  idle_time       = 0;
-  computed_flops  = 0;
-  theor_max_flops = 0;
-  current_flops   = host->pimpl_cpu->get_constraint()->get_usage();
-  current_speed   = host->getSpeed();
-  was_prev_idle   = (current_flops == 0);
+  last_updated_    = surf_get_clock();
+  last_reset_      = surf_get_clock();
+  idle_time_       = 0;
+  computed_flops_  = 0;
+  theor_max_flops_ = 0;
+  current_flops_   = host_->pimpl_cpu->get_constraint()->get_usage();
+  current_speed_   = host_->get_speed();
+  was_prev_idle_   = (current_flops_ == 0);
 }
 } // namespace plugin
 } // namespace simgrid
@@ -140,7 +123,7 @@ using simgrid::plugin::HostLoad;
 /* **************************** events  callback *************************** */
 /* This callback is fired either when the host changes its state (on/off) or its speed
  * (because the user changed the pstate, or because of external trace events) */
-static void onHostChange(simgrid::s4u::Host& host)
+static void on_host_change(simgrid::s4u::Host& host)
 {
   if (dynamic_cast<simgrid::s4u::VirtualMachine*>(&host)) // Ignore virtual machines
     return;
@@ -149,7 +132,7 @@ static void onHostChange(simgrid::s4u::Host& host)
 }
 
 /* This callback is called when an action (computation, idle, ...) terminates */
-static void onActionStateChange(simgrid::surf::CpuAction* action)
+static void on_action_state_change(simgrid::surf::CpuAction* action, simgrid::kernel::resource::Action::State /*previous*/)
 {
   for (simgrid::surf::Cpu* const& cpu : action->cpus()) {
     simgrid::s4u::Host* host = cpu->get_host();
@@ -176,6 +159,14 @@ void sg_host_load_plugin_init()
 
   HostLoad::EXTENSION_ID = simgrid::s4u::Host::extension_create<HostLoad>();
 
+  if (simgrid::s4u::Engine::is_initialized()) { // If not yet initialized, this would create a new instance
+                                                // which would cause seg faults...
+    simgrid::s4u::Engine* e = simgrid::s4u::Engine::get_instance();
+    for (auto& host : e->get_all_hosts()) {
+      host->extension_set(new HostLoad(host));
+    }
+  }
+
   /* When attaching a callback into a signal, you can use a lambda as follows, or a regular function as done below */
 
   simgrid::s4u::Host::on_creation.connect([](simgrid::s4u::Host& host) {
@@ -184,9 +175,9 @@ void sg_host_load_plugin_init()
     host.extension_set(new HostLoad(&host));
   });
 
-  simgrid::surf::CpuAction::on_state_change.connect(&onActionStateChange);
-  simgrid::s4u::Host::on_state_change.connect(&onHostChange);
-  simgrid::s4u::Host::on_speed_change.connect(&onHostChange);
+  simgrid::surf::CpuAction::on_state_change.connect(&on_action_state_change);
+  simgrid::s4u::Host::on_state_change.connect(&on_host_change);
+  simgrid::s4u::Host::on_speed_change.connect(&on_host_change);
 }
 
 /** @brief Returns the current load of the host passed as argument
@@ -198,7 +189,7 @@ double sg_host_get_current_load(sg_host_t host)
   xbt_assert(HostLoad::EXTENSION_ID.valid(),
              "The Load plugin is not active. Please call sg_host_load_plugin_init() during initialization.");
 
-  return host->extension<HostLoad>()->getCurrentLoad();
+  return host->extension<HostLoad>()->get_current_load();
 }
 
 /** @brief Returns the current load of the host passed as argument
@@ -210,7 +201,7 @@ double sg_host_get_avg_load(sg_host_t host)
   xbt_assert(HostLoad::EXTENSION_ID.valid(),
              "The Load plugin is not active. Please call sg_host_load_plugin_init() during initialization.");
 
-  return host->extension<HostLoad>()->getAverageLoad();
+  return host->extension<HostLoad>()->get_average_load();
 }
 
 /** @brief Returns the time this host was idle since the last reset
@@ -222,7 +213,7 @@ double sg_host_get_idle_time(sg_host_t host)
   xbt_assert(HostLoad::EXTENSION_ID.valid(),
              "The Load plugin is not active. Please call sg_host_load_plugin_init() during initialization.");
 
-  return host->extension<HostLoad>()->getIdleTime();
+  return host->extension<HostLoad>()->get_idle_time();
 }
 
 double sg_host_get_computed_flops(sg_host_t host)
@@ -230,7 +221,7 @@ double sg_host_get_computed_flops(sg_host_t host)
   xbt_assert(HostLoad::EXTENSION_ID.valid(),
              "The Load plugin is not active. Please call sg_host_load_plugin_init() during initialization.");
 
-  return host->extension<HostLoad>()->getComputedFlops();
+  return host->extension<HostLoad>()->get_computed_flops();
 }
 
 void sg_host_load_reset(sg_host_t host)
index 17aa277..2f42d3e 100644 (file)
@@ -45,15 +45,15 @@ class LinkEnergy {
 public:
   static simgrid::xbt::Extension<simgrid::s4u::Link, LinkEnergy> EXTENSION_ID;
 
-  explicit LinkEnergy(simgrid::s4u::Link* ptr);
-  ~LinkEnergy();
+  explicit LinkEnergy(simgrid::s4u::Link* ptr) : link_(ptr), last_updated_(surf_get_clock()) {}
+  ~LinkEnergy() = default;
 
-  void initWattsRangeList();
-  double getConsumedEnergy();
+  void init_watts_range_list();
+  double get_consumed_energy();
   void update();
 
 private:
-  double getPower();
+  double get_power();
 
   simgrid::s4u::Link* link_{};
 
@@ -61,25 +61,21 @@ private:
   double idle_{0.0};
   double busy_{0.0};
 
-  double totalEnergy_{0.0};
-  double lastUpdated_{0.0}; /*< Timestamp of the last energy update event*/
+  double total_energy_{0.0};
+  double last_updated_{0.0}; /*< Timestamp of the last energy update event*/
 };
 
 simgrid::xbt::Extension<simgrid::s4u::Link, LinkEnergy> LinkEnergy::EXTENSION_ID;
 
-LinkEnergy::LinkEnergy(simgrid::s4u::Link* ptr) : link_(ptr), lastUpdated_(surf_get_clock()) {}
-
-LinkEnergy::~LinkEnergy() = default;
-
 void LinkEnergy::update()
 {
-  double power = getPower();
+  double power = get_power();
   double now   = surf_get_clock();
-  totalEnergy_ += power * (now - lastUpdated_);
-  lastUpdated_ = now;
+  total_energy_ += power * (now - last_updated_);
+  last_updated_ = now;
 }
 
-void LinkEnergy::initWattsRangeList()
+void LinkEnergy::init_watts_range_list()
 {
 
   if (inited_)
@@ -116,7 +112,7 @@ void LinkEnergy::initWattsRangeList()
   }
 }
 
-double LinkEnergy::getPower()
+double LinkEnergy::get_power()
 {
 
   if (!inited_)
@@ -130,11 +126,11 @@ double LinkEnergy::getPower()
   return idle_ + dynamic_power;
 }
 
-double LinkEnergy::getConsumedEnergy()
+double LinkEnergy::get_consumed_energy()
 {
-  if (lastUpdated_ < surf_get_clock()) // We need to simcall this as it modifies the environment
+  if (last_updated_ < surf_get_clock()) // We need to simcall this as it modifies the environment
     simgrid::simix::simcall(std::bind(&LinkEnergy::update, this));
-  return this->totalEnergy_;
+  return this->total_energy_;
 }
 } // namespace plugin
 } // namespace simgrid
@@ -142,8 +138,7 @@ double LinkEnergy::getConsumedEnergy()
 using simgrid::plugin::LinkEnergy;
 
 /* **************************** events  callback *************************** */
-static void onCommunicate(simgrid::kernel::resource::NetworkAction* action, simgrid::s4u::Host* src,
-                          simgrid::s4u::Host* dst)
+static void on_communicate(simgrid::kernel::resource::NetworkAction* action, simgrid::s4u::Host*, simgrid::s4u::Host*)
 {
   XBT_DEBUG("onCommunicate is called");
   for (simgrid::kernel::resource::LinkImpl* link : action->links()) {
@@ -153,18 +148,18 @@ static void onCommunicate(simgrid::kernel::resource::NetworkAction* action, simg
 
     XBT_DEBUG("Update link %s", link->get_cname());
     LinkEnergy* link_energy = link->piface_.extension<LinkEnergy>();
-    link_energy->initWattsRangeList();
+    link_energy->init_watts_range_list();
     link_energy->update();
   }
 }
 
-static void onSimulationEnd()
+static void on_simulation_end()
 {
   std::vector<simgrid::s4u::Link*> links = simgrid::s4u::Engine::get_instance()->get_all_links();
 
   double total_energy = 0.0; // Total dissipated energy (whole platform)
   for (const auto link : links) {
-    double link_energy = link->extension<LinkEnergy>()->getConsumedEnergy();
+    double link_energy = link->extension<LinkEnergy>()->get_consumed_energy();
     total_energy += link_energy;
   }
 
@@ -197,7 +192,7 @@ void sg_link_energy_plugin_init()
   simgrid::s4u::Link::on_destruction.connect([](simgrid::s4u::Link& link) {
     if (strcmp(link.get_cname(), "__loopback__"))
       XBT_INFO("Energy consumption of link '%s': %f Joules", link.get_cname(),
-               link.extension<LinkEnergy>()->getConsumedEnergy());
+               link.extension<LinkEnergy>()->get_consumed_energy());
   });
 
   simgrid::s4u::Link::on_communication_state_change.connect([](simgrid::kernel::resource::NetworkAction* action) {
@@ -207,8 +202,8 @@ void sg_link_energy_plugin_init()
     }
   });
 
-  simgrid::s4u::Link::on_communicate.connect(&onCommunicate);
-  simgrid::s4u::on_simulation_end.connect(&onSimulationEnd);
+  simgrid::s4u::Link::on_communicate.connect(&on_communicate);
+  simgrid::s4u::on_simulation_end.connect(&on_simulation_end);
 }
 
 /** @ingroup plugin_energy
@@ -220,5 +215,5 @@ void sg_link_energy_plugin_init()
  */
 double sg_link_get_consumed_energy(sg_link_t link)
 {
-  return link->extension<LinkEnergy>()->getConsumedEnergy();
+  return link->extension<LinkEnergy>()->get_consumed_energy();
 }
index e57230a..19a7b8c 100644 (file)
@@ -47,7 +47,7 @@ static void hostStateChange(s4u::Host& host)
     std::vector<s4u::VirtualMachine*> trash;
     /* Find all VMs living on that host */
     for (s4u::VirtualMachine* const& vm : VirtualMachineImpl::allVms_)
-      if (vm->getPm() == &host)
+      if (vm->get_pm() == &host)
         trash.push_back(vm);
     for (s4u::VirtualMachine* vm : trash)
       vm->shutdown();
@@ -90,9 +90,9 @@ double VMModel::next_occuring_event(double now)
     surf::Cpu* cpu = ws_vm->pimpl_cpu;
 
     double solved_value =
-        ws_vm->getImpl()->action_->get_variable()->get_value(); // this is X1 in comment above, what
-                                                                // this VM got in the sharing on the PM
-    XBT_DEBUG("assign %f to vm %s @ pm %s", solved_value, ws_vm->get_cname(), ws_vm->getPm()->get_cname());
+        ws_vm->get_impl()->action_->get_variable()->get_value(); // this is X1 in comment above, what
+                                                                 // this VM got in the sharing on the PM
+    XBT_DEBUG("assign %f to vm %s @ pm %s", solved_value, ws_vm->get_cname(), ws_vm->get_pm()->get_cname());
 
     xbt_assert(cpu->get_model() == surf_cpu_model_vm);
     kernel::lmm::System* vcpu_system = cpu->get_model()->get_maxmin_system();
@@ -141,7 +141,7 @@ VirtualMachineImpl::~VirtualMachineImpl()
 
 void VirtualMachineImpl::suspend(smx_actor_t issuer)
 {
-  if (get_state() != SURF_VM_STATE_RUNNING)
+  if (get_state() != s4u::VirtualMachine::state::RUNNING)
     THROWF(vm_error, 0, "Cannot suspend VM %s: it is not running.", piface_->get_cname());
   if (issuer->host == piface_)
     THROWF(vm_error, 0, "Actor %s cannot suspend the VM %s in which it runs", issuer->get_cname(),
@@ -159,12 +159,12 @@ void VirtualMachineImpl::suspend(smx_actor_t issuer)
 
   XBT_DEBUG("suspend all processes on the VM done done");
 
-  vm_state_ = SURF_VM_STATE_SUSPENDED;
+  vm_state_ = s4u::VirtualMachine::state::SUSPENDED;
 }
 
 void VirtualMachineImpl::resume()
 {
-  if (get_state() != SURF_VM_STATE_SUSPENDED)
+  if (get_state() != s4u::VirtualMachine::state::SUSPENDED)
     THROWF(vm_error, 0, "Cannot resume VM %s: it was not suspended", piface_->get_cname());
 
   auto& process_list = piface_->extension<simgrid::simix::Host>()->process_list;
@@ -177,7 +177,7 @@ void VirtualMachineImpl::resume()
     smx_process.resume();
   }
 
-  vm_state_ = SURF_VM_STATE_RUNNING;
+  vm_state_ = s4u::VirtualMachine::state::RUNNING;
 }
 
 /** @brief Power off a VM.
@@ -189,16 +189,16 @@ void VirtualMachineImpl::resume()
  */
 void VirtualMachineImpl::shutdown(smx_actor_t issuer)
 {
-  if (get_state() != SURF_VM_STATE_RUNNING) {
+  if (get_state() != s4u::VirtualMachine::state::RUNNING) {
     const char* stateName = "(unknown state)";
     switch (get_state()) {
-      case SURF_VM_STATE_CREATED:
+      case s4u::VirtualMachine::state::CREATED:
         stateName = "created, but not yet started";
         break;
-      case SURF_VM_STATE_SUSPENDED:
+      case s4u::VirtualMachine::state::SUSPENDED:
         stateName = "suspended";
         break;
-      case SURF_VM_STATE_DESTROYED:
+      case s4u::VirtualMachine::state::DESTROYED:
         stateName = "destroyed";
         break;
       default: /* SURF_VM_STATE_RUNNING or unexpected values */
@@ -217,7 +217,7 @@ void VirtualMachineImpl::shutdown(smx_actor_t issuer)
     SIMIX_process_kill(&smx_process, issuer);
   }
 
-  set_state(SURF_VM_STATE_DESTROYED);
+  set_state(s4u::VirtualMachine::state::DESTROYED);
 
   /* FIXME: we may have to do something at the surf layer, e.g., vcpu action */
 }
index 3db713d..903b787 100644 (file)
@@ -53,8 +53,8 @@ public:
   sg_size_t get_ramsize() { return ramsize_; }
   void set_ramsize(sg_size_t ramsize) { ramsize_ = ramsize; }
 
-  e_surf_vm_state_t get_state() { return vm_state_; }
-  void set_state(e_surf_vm_state_t state) { vm_state_ = state; }
+  s4u::VirtualMachine::state get_state() { return vm_state_; }
+  void set_state(s4u::VirtualMachine::state state) { vm_state_ = state; }
 
   int get_core_amount() { return core_amount_; }
 
@@ -69,7 +69,7 @@ private:
   s4u::Host* physical_host_;
   int core_amount_;
   size_t ramsize_            = 0;
-  e_surf_vm_state_t vm_state_ = SURF_VM_STATE_CREATED;
+  s4u::VirtualMachine::state vm_state_ = s4u::VirtualMachine::state::CREATED;
 };
 
 /*********
index bd1f00d..38741de 100644 (file)
@@ -43,14 +43,14 @@ void MigrationRx::operator()()
 
   /* Update the vm location */
   /* precopy migration makes the VM temporally paused */
-  xbt_assert(vm_->getState() == SURF_VM_STATE_SUSPENDED);
+  xbt_assert(vm_->get_state() == s4u::VirtualMachine::state::SUSPENDED);
 
   /* Update the vm location and resume it */
-  vm_->setPm(dst_pm_);
+  vm_->set_pm(dst_pm_);
   vm_->resume();
 
   // Now the VM is running on the new host (the migration is completed) (even if the SRC crash)
-  vm_->getImpl()->is_migrating_ = false;
+  vm_->get_impl()->is_migrating_ = false;
   XBT_DEBUG("VM(%s) moved from PM(%s) to PM(%s)", vm_->get_cname(), src_pm_->get_cname(), dst_pm_->get_cname());
 
   if (TRACE_vm_is_enabled()) {
@@ -134,8 +134,8 @@ void MigrationTx::operator()()
 {
   XBT_DEBUG("mig: tx_start");
 
-  double host_speed = vm_->getPm()->getSpeed();
-  const sg_size_t ramsize = vm_->getRamsize();
+  double host_speed       = vm_->get_pm()->get_speed();
+  const sg_size_t ramsize = vm_->get_ramsize();
   const double dp_rate =
       host_speed ? (sg_vm_get_migration_speed(vm_) * sg_vm_get_dirty_page_intensity(vm_)) / host_speed : 1;
   const sg_size_t dp_cap = sg_vm_get_working_set_memory(vm_);
@@ -285,11 +285,11 @@ void MigrationTx::operator()()
 
 static void onVirtualMachineShutdown(simgrid::s4u::VirtualMachine& vm)
 {
-  if (vm.getImpl()->is_migrating_) {
+  if (vm.get_impl()->is_migrating_) {
     vm.extension<simgrid::vm::VmMigrationExt>()->rx_->kill();
     vm.extension<simgrid::vm::VmMigrationExt>()->tx_->kill();
     vm.extension<simgrid::vm::VmMigrationExt>()->issuer_->kill();
-    vm.getImpl()->is_migrating_ = false;
+    vm.get_impl()->is_migrating_ = false;
   }
 }
 
@@ -316,7 +316,7 @@ simgrid::s4u::VirtualMachine* sg_vm_create_migratable(simgrid::s4u::Host* pm, co
 
   sg_vm_t vm = new simgrid::s4u::VirtualMachine(name, pm, coreAmount, static_cast<sg_size_t>(ramsize) * 1024 * 1024);
   sg_vm_set_dirty_page_intensity(vm, dp_intensity / 100.0);
-  sg_vm_set_working_set_memory(vm, vm->getRamsize() * 0.9); // assume working set memory is 90% of ramsize
+  sg_vm_set_working_set_memory(vm, vm->get_ramsize() * 0.9); // assume working set memory is 90% of ramsize
   sg_vm_set_migration_speed(vm, mig_netspeed * 1024 * 1024.0);
 
   XBT_DEBUG("migspeed : %f intensity mem : %d", mig_netspeed * 1024 * 1024.0, dp_intensity);
@@ -326,24 +326,24 @@ simgrid::s4u::VirtualMachine* sg_vm_create_migratable(simgrid::s4u::Host* pm, co
 
 int sg_vm_is_migrating(simgrid::s4u::VirtualMachine* vm)
 {
-  return vm->getImpl()->is_migrating_;
+  return vm->get_impl()->is_migrating_;
 }
 
 void sg_vm_migrate(simgrid::s4u::VirtualMachine* vm, simgrid::s4u::Host* dst_pm)
 {
-  simgrid::s4u::Host* src_pm = vm->getPm();
+  simgrid::s4u::Host* src_pm = vm->get_pm();
 
   if (src_pm->is_off())
     THROWF(vm_error, 0, "Cannot migrate VM '%s' from host '%s', which is offline.", vm->get_cname(),
            src_pm->get_cname());
   if (dst_pm->is_off())
     THROWF(vm_error, 0, "Cannot migrate VM '%s' to host '%s', which is offline.", vm->get_cname(), dst_pm->get_cname());
-  if (vm->getState() != SURF_VM_STATE_RUNNING)
+  if (vm->get_state() != simgrid::s4u::VirtualMachine::state::RUNNING)
     THROWF(vm_error, 0, "Cannot migrate VM '%s' that is not running yet.", vm->get_cname());
-  if (vm->getImpl()->is_migrating_)
+  if (vm->get_impl()->is_migrating_)
     THROWF(vm_error, 0, "Cannot migrate VM '%s' that is already migrating.", vm->get_cname());
 
-  vm->getImpl()->is_migrating_ = true;
+  vm->get_impl()->is_migrating_ = true;
 
   std::string rx_name =
       std::string("__pr_mig_rx:") + vm->get_cname() + "(" + src_pm->get_cname() + "-" + dst_pm->get_cname() + ")";
@@ -365,5 +365,5 @@ void sg_vm_migrate(simgrid::s4u::VirtualMachine* vm, simgrid::s4u::Host* dst_pm)
   tx->join();
   rx->join();
 
-  vm->getImpl()->is_migrating_ = false;
+  vm->get_impl()->is_migrating_ = false;
 }
index f942710..911f927 100644 (file)
@@ -38,7 +38,7 @@ class MigrationRx {
 public:
   explicit MigrationRx(s4u::VirtualMachine* vm, s4u::Host* dst_pm) : vm_(vm), dst_pm_(dst_pm)
   {
-    src_pm_ = vm_->getPm();
+    src_pm_ = vm_->get_pm();
 
     mbox_ctl = s4u::Mailbox::by_name(std::string("__mbox_mig_ctl:") + vm_->get_cname() + "(" + src_pm_->get_cname() +
                                      "-" + dst_pm_->get_cname() + ")");
@@ -58,7 +58,7 @@ class MigrationTx {
 public:
   explicit MigrationTx(s4u::VirtualMachine* vm, s4u::Host* dst_pm) : vm_(vm), dst_pm_(dst_pm)
   {
-    src_pm_ = vm_->getPm();
+    src_pm_ = vm_->get_pm();
     mbox    = s4u::Mailbox::by_name(std::string("__mbox_mig_src_dst:") + vm_->get_cname() + "(" + src_pm_->get_cname() +
                                  "-" + dst_pm_->get_cname() + ")");
   }
index 5ba43bd..b727465 100644 (file)
@@ -37,7 +37,7 @@ VirtualMachine::VirtualMachine(const char* name, s4u::Host* physical_host, int c
   // Create a VCPU for this VM
   std::vector<double> speeds;
   for (int i = 0; i < physical_host->get_pstate_count(); i++)
-    speeds.push_back(physical_host->getPstateSpeed(i));
+    speeds.push_back(physical_host->get_pstate_speed(i));
 
   surf_cpu_model_vm->create_cpu(this, &speeds, physical_host->get_core_count());
   if (physical_host->get_pstate() != 0)
@@ -78,14 +78,14 @@ void VirtualMachine::start()
 
     long pm_ramsize   = pm->extension<simgrid::vm::VmHostExt>()->ramsize;
     int pm_overcommit = pm->extension<simgrid::vm::VmHostExt>()->overcommit;
-    long vm_ramsize   = this->getRamsize();
+    long vm_ramsize   = this->get_ramsize();
 
     if (pm_ramsize && not pm_overcommit) { /* Only verify that we don't overcommit on need */
       /* Retrieve the memory occupied by the VMs on that host. Yep, we have to traverse all VMs of all hosts for that */
       long total_ramsize_of_vms = 0;
       for (simgrid::s4u::VirtualMachine* const& ws_vm : simgrid::vm::VirtualMachineImpl::allVms_)
-        if (pm == ws_vm->getPm())
-          total_ramsize_of_vms += ws_vm->getRamsize();
+        if (pm == ws_vm->get_pm())
+          total_ramsize_of_vms += ws_vm->get_ramsize();
 
       if (vm_ramsize > pm_ramsize - total_ramsize_of_vms) {
         XBT_WARN("cannot start %s@%s due to memory shortage: vm_ramsize %ld, free %ld, pm_ramsize %ld (bytes).",
@@ -95,7 +95,7 @@ void VirtualMachine::start()
       }
     }
 
-    this->pimpl_vm_->set_state(SURF_VM_STATE_RUNNING);
+    this->pimpl_vm_->set_state(VirtualMachine::state::RUNNING);
   });
 
   on_started(*this);
@@ -130,27 +130,27 @@ void VirtualMachine::destroy()
   Host::destroy();
 }
 
-simgrid::s4u::Host* VirtualMachine::getPm()
+simgrid::s4u::Host* VirtualMachine::get_pm()
 {
   return pimpl_vm_->get_physical_host();
 }
 
-void VirtualMachine::setPm(simgrid::s4u::Host* pm)
+void VirtualMachine::set_pm(simgrid::s4u::Host* pm)
 {
   simgrid::simix::simcall([this, pm]() { pimpl_vm_->set_physical_host(pm); });
 }
 
-e_surf_vm_state_t VirtualMachine::getState()
+VirtualMachine::state VirtualMachine::get_state()
 {
   return simgrid::simix::simcall([this]() { return pimpl_vm_->get_state(); });
 }
 
-size_t VirtualMachine::getRamsize()
+size_t VirtualMachine::get_ramsize()
 {
   return pimpl_vm_->get_ramsize();
 }
 
-void VirtualMachine::setRamsize(size_t ramsize)
+void VirtualMachine::set_ramsize(size_t ramsize)
 {
   pimpl_vm_->set_ramsize(ramsize);
 }
@@ -180,7 +180,7 @@ void VirtualMachine::setRamsize(size_t ramsize)
  * 2. Note that bound == 0 means no bound (i.e., unlimited). But, if a host has multiple CPU cores, the CPU share of a
  *    computation task (or a VM) never exceeds the capacity of a CPU core.
  */
-void VirtualMachine::setBound(double bound)
+void VirtualMachine::set_bound(double bound)
 {
   simgrid::simix::simcall([this, bound]() { pimpl_vm_->set_bound(bound); });
 }
@@ -216,40 +216,40 @@ const char* sg_vm_get_name(sg_vm_t vm)
 /** @brief Get the physical host of a given VM. */
 sg_host_t sg_vm_get_pm(sg_vm_t vm)
 {
-  return vm->getPm();
+  return vm->get_pm();
 }
 
 void sg_vm_set_ramsize(sg_vm_t vm, size_t size)
 {
-  vm->setRamsize(size);
+  vm->set_ramsize(size);
 }
 
 size_t sg_vm_get_ramsize(sg_vm_t vm)
 {
-  return vm->getRamsize();
+  return vm->get_ramsize();
 }
 
 void sg_vm_set_bound(sg_vm_t vm, double bound)
 {
-  vm->setBound(bound);
+  vm->set_bound(bound);
 }
 
 /** @brief Returns whether the given VM has just created, not running. */
 int sg_vm_is_created(sg_vm_t vm)
 {
-  return vm->getState() == SURF_VM_STATE_CREATED;
+  return vm->get_state() == simgrid::s4u::VirtualMachine::state::CREATED;
 }
 
 /** @brief Returns whether the given VM is currently running */
 int sg_vm_is_running(sg_vm_t vm)
 {
-  return vm->getState() == SURF_VM_STATE_RUNNING;
+  return vm->get_state() == simgrid::s4u::VirtualMachine::state::RUNNING;
 }
 
 /** @brief Returns whether the given VM is currently suspended, not running. */
 int sg_vm_is_suspended(sg_vm_t vm)
 {
-  return vm->getState() == SURF_VM_STATE_SUSPENDED;
+  return vm->get_state() == simgrid::s4u::VirtualMachine::state::SUSPENDED;
 }
 
 /** @brief Start a vm (i.e., boot the guest operating system)
index ac01c07..e437212 100644 (file)
@@ -249,6 +249,10 @@ std::vector<ActorPtr> Engine::get_filtered_actors(std::function<bool(ActorPtr)>
 
 void Engine::run()
 {
+  /* Clean IO before the run */
+  fflush(stdout);
+  fflush(stderr);
+
   if (MC_is_active()) {
     MC_run();
   } else {
@@ -259,13 +263,13 @@ void Engine::run()
 /** @brief Retrieve the root netzone, containing all others */
 s4u::NetZone* Engine::get_netzone_root()
 {
-  return pimpl->netzone_root_;
+  return pimpl->netzone_root_->get_iface();
 }
 /** @brief Set the root netzone, containing all others. Once set, it cannot be changed. */
 void Engine::set_netzone_root(s4u::NetZone* netzone)
 {
   xbt_assert(pimpl->netzone_root_ == nullptr, "The root NetZone cannot be changed once set");
-  pimpl->netzone_root_ = static_cast<kernel::routing::NetZoneImpl*>(netzone);
+  pimpl->netzone_root_ = netzone->get_impl();
 }
 
 static s4u::NetZone* netzone_by_name_recursive(s4u::NetZone* current, const char* name)
@@ -273,7 +277,7 @@ static s4u::NetZone* netzone_by_name_recursive(s4u::NetZone* current, const char
   if (not strcmp(current->get_cname(), name))
     return current;
 
-  for (auto const& elem : *(current->get_children())) {
+  for (auto const& elem : current->get_children()) {
     simgrid::s4u::NetZone* tmp = netzone_by_name_recursive(elem, name);
     if (tmp != nullptr) {
       return tmp;
@@ -346,7 +350,10 @@ void sg_engine_load_deployment(const char* file)
 {
   simgrid::s4u::Engine::get_instance()->load_deployment(file);
 }
-
+void sg_engine_run()
+{
+  simgrid::s4u::Engine::get_instance()->run();
+}
 void sg_engine_register_function(const char* name, int (*code)(int, char**))
 {
   simgrid::s4u::Engine::get_instance()->register_function(name, code);
index af81dcb..e321de2 100644 (file)
@@ -221,19 +221,36 @@ void Host::set_property(std::string key, std::string value)
 }
 
 /** @brief Get the peak processor speed (in flops/s), at the specified pstate  */
-double Host::getPstateSpeed(int pstate_index)
+double Host::get_pstate_speed(int pstate_index)
 {
   return simgrid::simix::simcall([this, pstate_index] { return this->pimpl_cpu->get_pstate_peak_speed(pstate_index); });
 }
 
-/** @brief Get the peak processor speed in flops/s, (under full load (=1.0), at the current pstate)
+/** @brief Get the peak computing speed in flops/s at the current pstate, taking the external load into account.
  *
- *  The result also takes the external load into account.
+ *  The amount of flops per second available for computing depends on several things:
+ *    - The current pstate determines the maximal peak computing speed (use @ref get_pstate_speed() to retrieve the
+ *      computing speed you would get at another pstate)
+ *    - If you declared an external load, then this reduces the available computing speed (see @ref set_speed_trace())
+ *
+ *  The remaining speed is then shared between the executions located on this host.
+ *  You can retrieve the amount of tasks currently running on this host with @ref get_load().
+ *
+ *  The host may have multiple cores, and your executions may be able to use more than a single core.
+ *
+ *  Finally, executions of priority 2 get twice the amount of flops than executions of priority 1.
  */
-double Host::getSpeed()
+double Host::get_speed()
 {
   return this->pimpl_cpu->get_speed(1.0);
 }
+/** @brief Returns the current computation load (in flops per second)
+ * The external load (coming from an availability trace) is not taken in account.
+ */
+double Host::get_load()
+{
+  return this->pimpl_cpu->get_load();
+}
 /** @brief Get the available speed ratio, between 0 and 1.
  *
  * This accounts for external load (see @ref set_speed_trace()).
@@ -278,7 +295,7 @@ void Host::getAttachedStorages(std::vector<const char*>* storages)
     storages->push_back(elm);
 }
 
-std::unordered_map<std::string, Storage*> const& Host::getMountedStorages()
+std::unordered_map<std::string, Storage*> const& Host::get_mounted_storages()
 {
   if (mounts_ == nullptr) {
     mounts_ = new std::unordered_map<std::string, Storage*>();
@@ -299,11 +316,6 @@ void Host::execute(double flops, double priority)
   simcall_execution_wait(s);
 }
 
-double Host::getLoad()
-{
-  return this->pimpl_cpu->get_load();
-}
-
 } // namespace s4u
 } // namespace simgrid
 
@@ -394,7 +406,7 @@ xbt_dict_t sg_host_get_mounted_storage_list(sg_host_t host)
 {
   xbt_assert((host != nullptr), "Invalid parameters");
   xbt_dict_t res = xbt_dict_new_homogeneous(nullptr);
-  for (auto const& elm : host->getMountedStorages()) {
+  for (auto const& elm : host->get_mounted_storages()) {
     const char* mount_name = elm.first.c_str();
     sg_storage_t storage   = elm.second;
     xbt_dict_set(res, mount_name, (void*)storage->get_cname(), nullptr);
@@ -417,7 +429,7 @@ xbt_dynar_t sg_host_get_attached_storage_list(sg_host_t host)
 /** @brief Returns the total speed of a host */
 double sg_host_speed(sg_host_t host)
 {
-  return host->getSpeed();
+  return host->get_speed();
 }
 
 /** \brief Return the speed of the processor (in flop/s) at a given pstate. See also @ref plugin_energy.
@@ -428,7 +440,7 @@ double sg_host_speed(sg_host_t host)
  */
 double sg_host_get_pstate_speed(sg_host_t host, int pstate_index)
 {
-  return host->getPstateSpeed(pstate_index);
+  return host->get_pstate_speed(pstate_index);
 }
 
 /** \ingroup m_host_management
@@ -603,7 +615,7 @@ double sg_host_route_bandwidth(sg_host_t from, sg_host_t to)
 void sg_host_dump(sg_host_t host)
 {
   XBT_INFO("Displaying host %s", host->get_cname());
-  XBT_INFO("  - speed: %.0f", host->getSpeed());
+  XBT_INFO("  - speed: %.0f", host->get_speed());
   XBT_INFO("  - available speed: %.2f", sg_host_get_available_speed(host));
   std::unordered_map<std::string, std::string>* props = host->get_properties();
 
index bf07bfd..a49d92d 100644 (file)
@@ -43,10 +43,6 @@ const char* Link::get_cname() const
 {
   return this->pimpl_->get_cname();
 }
-const char* Link::name()
-{
-  return get_cname();
-}
 bool Link::is_used()
 {
   return this->pimpl_->is_used();
index a294219..7c3841e 100644 (file)
@@ -145,3 +145,28 @@ void* Mailbox::get(double timeout)
 }
 } // namespace s4u
 } // namespace simgrid
+
+/* **************************** Public C interface *************************** */
+/** \brief Set the mailbox to receive in asynchronous mode
+ *
+ * All messages sent to this mailbox will be transferred to the receiver without waiting for the receive call.
+ * The receive call will still be necessary to use the received data.
+ * If there is a need to receive some messages asynchronously, and some not, two different mailboxes should be used.
+ *
+ * \param alias The name of the mailbox
+ */
+void sg_mailbox_set_receiver(const char* alias)
+{
+  simgrid::s4u::Mailbox::by_name(alias)->set_receiver(simgrid::s4u::Actor::self());
+  XBT_VERB("%s mailbox set to receive eagerly for myself\n", alias);
+}
+
+/** \brief Check if there is a communication going on in a mailbox.
+ *
+ * \param alias the name of the mailbox to be considered
+ * \return Returns 1 if there is a communication, 0 otherwise
+ */
+int sg_mailbox_listen(const char* alias)
+{
+  return simgrid::s4u::Mailbox::by_name(alias)->listen() ? 1 : 0;
+}
index f9bc892..f8ecb27 100644 (file)
@@ -34,7 +34,7 @@ bool Mutex::try_lock()
  *
  * See @ref s4u_raii.
  */
-MutexPtr Mutex::createMutex()
+MutexPtr Mutex::create()
 {
   smx_mutex_t mutex = simcall_mutex_init();
   return MutexPtr(&mutex->mutex(), false);
index d361ce0..c9dc1bd 100644 (file)
@@ -21,21 +21,10 @@ simgrid::xbt::signal<void(bool symmetrical, kernel::routing::NetPoint* src, kern
 simgrid::xbt::signal<void(NetZone&)> NetZone::on_creation;
 simgrid::xbt::signal<void(NetZone&)> NetZone::on_seal;
 
-NetZone::NetZone(NetZone* father, std::string name) : father_(father), name_(name)
-{
-  children_ = new std::vector<NetZone*>();
-}
-
-void NetZone::seal()
-{
-  sealed_ = true;
-}
+NetZone::NetZone(kernel::routing::NetZoneImpl* impl) : pimpl_(impl) {}
 
 NetZone::~NetZone()
 {
-  for (auto const& nz : *children_)
-    delete nz;
-  delete children_;
 }
 
 std::unordered_map<std::string, std::string>* NetZone::get_properties()
@@ -53,22 +42,26 @@ void NetZone::set_property(const char* key, const char* value)
   simgrid::simix::simcall([this, key, value] { properties_[key] = value; });
 }
 
-/** @brief Returns the list of direct children (no grand-children)
- *
- * This function returns the internal copy of the children, not a copy. Don't mess with it!
- */
-std::vector<NetZone*>* NetZone::get_children()
+/** @brief Returns the list of direct children (no grand-children) */
+std::vector<NetZone*> NetZone::get_children()
 {
-  return children_;
+  std::vector<NetZone*> res;
+  for (auto child : *(pimpl_->get_children()))
+    res.push_back(child->get_iface());
+  return res;
 }
 
+const std::string& NetZone::get_name() const
+{
+  return pimpl_->get_name();
+}
 const char* NetZone::get_cname() const
 {
-  return name_.c_str();
+  return pimpl_->get_cname();
 }
 NetZone* NetZone::get_father()
 {
-  return father_;
+  return pimpl_->get_father()->get_iface();
 }
 
 /** @brief Returns the list of the hosts found in this NetZone (not recursively)
@@ -78,18 +71,12 @@ NetZone* NetZone::get_father()
  */
 std::vector<Host*> NetZone::get_all_hosts()
 {
-  std::vector<Host*> res;
-  for (auto const& card : vertices_) {
-    s4u::Host* host = simgrid::s4u::Host::by_name_or_null(card->get_name());
-    if (host != nullptr)
-      res.push_back(host);
-  }
-  return res;
+  return pimpl_->get_all_hosts();
 }
 
 void NetZone::getHosts(std::vector<s4u::Host*>* whereto)
 {
-  for (auto const& card : vertices_) {
+  for (auto const& card : pimpl_->get_vertices()) {
     s4u::Host* host = simgrid::s4u::Host::by_name_or_null(card->get_name());
     if (host != nullptr)
       whereto->push_back(host);
@@ -98,28 +85,30 @@ void NetZone::getHosts(std::vector<s4u::Host*>* whereto)
 
 int NetZone::get_host_count()
 {
-  int count = 0;
-  for (auto const& card : vertices_) {
-    s4u::Host* host = simgrid::s4u::Host::by_name_or_null(card->get_name());
-    if (host != nullptr)
-      count++;
-  }
-  return count;
+  return pimpl_->get_host_count();
 }
 
 int NetZone::add_component(kernel::routing::NetPoint* elm)
 {
-  vertices_.push_back(elm);
-  return vertices_.size() - 1; // The rank of the newly created object
+  return pimpl_->add_component(elm);
 }
 
-void NetZone::add_route(kernel::routing::NetPoint* /*src*/, kernel::routing::NetPoint* /*dst*/,
-                        kernel::routing::NetPoint* /*gw_src*/, kernel::routing::NetPoint* /*gw_dst*/,
-                        std::vector<kernel::resource::LinkImpl*>& /*link_list*/, bool /*symmetrical*/)
+void NetZone::add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
+                        kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
+                        std::vector<kernel::resource::LinkImpl*>& link_list, bool symmetrical)
 {
-  xbt_die("NetZone '%s' does not accept new routes (wrong class).", name_.c_str());
+  pimpl_->add_route(src, dst, gw_src, gw_dst, link_list, symmetrical);
+}
+void NetZone::add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
+                               kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
+                               std::vector<kernel::resource::LinkImpl*>& link_list, bool symmetrical)
+{
+  pimpl_->add_bypass_route(src, dst, gw_src, gw_dst, link_list, symmetrical);
+}
+std::vector<kernel::routing::NetPoint*> NetZone::getVertices()
+{
+  return pimpl_->get_vertices();
 }
-
 } // namespace s4u
 } // namespace simgrid
 
@@ -142,7 +131,7 @@ sg_netzone_t sg_zone_get_by_name(const char* name)
 
 void sg_zone_get_sons(sg_netzone_t netzone, xbt_dict_t whereto)
 {
-  for (auto const& elem : *netzone->get_children()) {
+  for (auto const& elem : netzone->get_children()) {
     xbt_dict_set(whereto, elem->get_cname(), static_cast<void*>(elem), nullptr);
   }
 }
index 7fd697e..2894ffa 100644 (file)
@@ -683,7 +683,7 @@ double SD_task_get_execution_time(SD_task_t /*task*/, int host_count, const sg_h
   for (int i = 0; i < host_count; i++) {
     double time = 0.0;
     if (flops_amount != nullptr)
-      time = flops_amount[i] / host_list[i]->getSpeed();
+      time = flops_amount[i] / host_list[i]->get_speed();
 
     if (bytes_amount != nullptr)
       for (int j = 0; j < host_count; j++)
index af10da4..c026309 100644 (file)
@@ -405,6 +405,9 @@ void sg_config_init(int *argc, char **argv)
       default_privatization);
   simgrid::config::alias("smpi/privatization", {"smpi/privatize_global_variables", "smpi/privatize-global-variables"});
 
+  simgrid::config::declare_flag<std::string>(
+      "smpi/privatize-libs", "Add libraries (; separated) to privatize (libgfortran for example). You need to provide the full names of the files (libgfortran.so.4), or its full path", "");
+
   simgrid::config::declare_flag<bool>("smpi/grow-injected-times",
                                       "Whether we want to make the injected time in MPI_Iprobe and MPI_Test grow, to "
                                       "allow faster simulation. This can make simulation less precise, though.",
index b2603b8..e45266f 100644 (file)
@@ -802,7 +802,7 @@ smx_actor_t simcall_process_create(const char* name, xbt_main_func_t code, void*
 {
   if (name == nullptr)
     name = "";
-  auto wrapped_code = simgrid::xbt::wrapMain(code, argc, argv);
+  auto wrapped_code = simgrid::xbt::wrap_main(code, argc, argv);
   for (int i = 0; i != argc; ++i)
     xbt_free(argv[i]);
   xbt_free(argv);
index 8e11f4a..79a4993 100644 (file)
@@ -58,9 +58,7 @@ void SIMIX_launch_application(const char *file)
 // Wrap a main() function into a ActorCodeFactory:
 static simgrid::simix::ActorCodeFactory toActorCodeFactory(xbt_main_func_t code)
 {
-  return [code](std::vector<std::string> args) {
-    return simgrid::xbt::wrapMain(code, std::move(args));
-  };
+  return [code](std::vector<std::string> args) { return simgrid::xbt::wrap_main(code, std::move(args)); };
 }
 
 /**
index 4f05ede..1291451 100644 (file)
@@ -158,8 +158,6 @@ static void kill_process(smx_actor_t process)
 namespace simgrid {
 namespace simix {
 
-simgrid::xbt::signal<void()> onDeadlock;
-
 simgrid::config::Flag<double> breakpoint{"simix/breakpoint",
                                          "When non-negative, raise a SIGTRAP after given (simulated) time", -1.0};
 }
@@ -531,9 +529,6 @@ void SIMIX_run()
     XBT_DEBUG("### time %f, #processes %zu, #to_run %zu", time, simix_global->process_list.size(),
               simix_global->process_to_run.size());
 
-    if (simix_global->process_to_run.empty() && not simix_global->process_list.empty())
-      simgrid::simix::onDeadlock();
-
   } while (time > -1.0 || not simix_global->process_to_run.empty());
 
   if (not simix_global->process_list.empty()) {
@@ -562,7 +557,7 @@ void SIMIX_run()
  */
 smx_timer_t SIMIX_timer_set(double date, void (*callback)(void*), void *arg)
 {
-  smx_timer_t timer = new s_smx_timer_t(date, simgrid::xbt::makeTask([callback, arg]() { callback(arg); }));
+  smx_timer_t timer = new s_smx_timer_t(date, simgrid::xbt::make_task([callback, arg]() { callback(arg); }));
   timer->handle_    = simix_timers.emplace(std::make_pair(date, timer));
   return timer;
 }
index 2593fa3..586f9b7 100644 (file)
@@ -144,7 +144,7 @@ int PMPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recv
 
     TRACE_smpi_comm_in(rank, __func__,
                        new simgrid::instr::VarCollTIData(
-                           "gatherV", root,
+                           "gatherv", root,
                            sendtmptype->is_replayable() ? sendtmpcount : sendtmpcount * sendtmptype->size(), nullptr,
                            dt_size_recv, trace_recvcounts, simgrid::smpi::Datatype::encode(sendtmptype),
                            simgrid::smpi::Datatype::encode(recvtype)));
@@ -182,7 +182,7 @@ int PMPI_Allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
 
     TRACE_smpi_comm_in(rank, __func__,
                        new simgrid::instr::CollTIData(
-                           "allGather", -1, -1.0, sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(),
+                           "allgather", -1, -1.0, sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(),
                            recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(),
                            simgrid::smpi::Datatype::encode(sendtype), simgrid::smpi::Datatype::encode(recvtype)));
 
@@ -224,7 +224,7 @@ int PMPI_Allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
 
     TRACE_smpi_comm_in(rank, __func__,
                        new simgrid::instr::VarCollTIData(
-                           "allGatherV", -1, sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(),
+                           "allgatherv", -1, sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(),
                            nullptr, dt_size_recv, trace_recvcounts, simgrid::smpi::Datatype::encode(sendtype),
                            simgrid::smpi::Datatype::encode(recvtype)));
 
@@ -307,7 +307,7 @@ int PMPI_Scatterv(void *sendbuf, int *sendcounts, int *displs,
 
     TRACE_smpi_comm_in(rank, __func__,
                        new simgrid::instr::VarCollTIData(
-                           "scatterV", root, dt_size_send, trace_sendcounts,
+                           "scatterv", root, dt_size_send, trace_sendcounts,
                            recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(), nullptr,
                            simgrid::smpi::Datatype::encode(sendtype), simgrid::smpi::Datatype::encode(recvtype)));
 
@@ -384,7 +384,7 @@ int PMPI_Allreduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp
     int rank = simgrid::s4u::this_actor::get_pid();
 
     TRACE_smpi_comm_in(rank, __func__,
-                       new simgrid::instr::CollTIData("allReduce", -1, 0,
+                       new simgrid::instr::CollTIData("allreduce", -1, 0,
                                                       datatype->is_replayable() ? count : count * datatype->size(), -1,
                                                       simgrid::smpi::Datatype::encode(datatype), ""));
 
@@ -500,7 +500,7 @@ int PMPI_Reduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts, MPI_Datat
     }
 
     TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::VarCollTIData(
-                                           "reduceScatter", -1, dt_send_size, nullptr, -1, trace_recvcounts,
+                                           "reducescatter", -1, dt_send_size, nullptr, -1, trace_recvcounts,
                                            simgrid::smpi::Datatype::encode(datatype), ""));
 
     simgrid::smpi::Colls::reduce_scatter(sendtmpbuf, recvbuf, recvcounts, datatype, op, comm);
@@ -543,7 +543,7 @@ int PMPI_Reduce_scatter_block(void *sendbuf, void *recvbuf, int recvcount,
     }
 
     TRACE_smpi_comm_in(rank, __func__,
-                       new simgrid::instr::VarCollTIData("reduceScatter", -1, 0, nullptr, -1, trace_recvcounts,
+                       new simgrid::instr::VarCollTIData("reducescatter", -1, 0, nullptr, -1, trace_recvcounts,
                                                          simgrid::smpi::Datatype::encode(datatype), ""));
 
     int* recvcounts = new int[count];
@@ -587,7 +587,7 @@ int PMPI_Alltoall(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* rec
 
     TRACE_smpi_comm_in(rank, __func__,
                        new simgrid::instr::CollTIData(
-                           "allToAll", -1, -1.0,
+                           "alltoall", -1, -1.0,
                            sendtmptype->is_replayable() ? sendtmpcount : sendtmpcount * sendtmptype->size(),
                            recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(),
                            simgrid::smpi::Datatype::encode(sendtmptype), simgrid::smpi::Datatype::encode(recvtype)));
@@ -657,7 +657,7 @@ int PMPI_Alltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype
     }
 
     TRACE_smpi_comm_in(rank, __func__,
-                       new simgrid::instr::VarCollTIData("allToAllV", -1, send_size, trace_sendcounts, recv_size,
+                       new simgrid::instr::VarCollTIData("alltoallv", -1, send_size, trace_sendcounts, recv_size,
                                                          trace_recvcounts, simgrid::smpi::Datatype::encode(sendtype),
                                                          simgrid::smpi::Datatype::encode(recvtype)));
 
index e1a2e34..ffc1b05 100644 (file)
@@ -203,7 +203,7 @@ int PMPI_Irecv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MP
     int my_proc_id = simgrid::s4u::this_actor::get_pid();
 
     TRACE_smpi_comm_in(my_proc_id, __func__,
-                       new simgrid::instr::Pt2PtTIData("Irecv", src,
+                       new simgrid::instr::Pt2PtTIData("irecv", src,
                                                        datatype->is_replayable() ? count : count * datatype->size(),
                                                        tag, simgrid::smpi::Datatype::encode(datatype)));
 
@@ -244,7 +244,7 @@ int PMPI_Isend(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MP
     int my_proc_id = simgrid::s4u::this_actor::get_pid();
     int trace_dst = getPid(comm, dst);
     TRACE_smpi_comm_in(my_proc_id, __func__,
-                       new simgrid::instr::Pt2PtTIData("Isend", dst,
+                       new simgrid::instr::Pt2PtTIData("isend", dst,
                                                        datatype->is_replayable() ? count : count * datatype->size(),
                                                        tag, simgrid::smpi::Datatype::encode(datatype)));
 
@@ -670,7 +670,8 @@ int PMPI_Wait(MPI_Request * request, MPI_Status * status)
     int my_proc_id = (*request)->comm() != MPI_COMM_NULL
                          ? simgrid::s4u::this_actor::get_pid()
                          : -1; // TODO: cheinrich: Check if this correct or if it should be MPI_UNDEFINED
-    TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("wait"));
+    TRACE_smpi_comm_in(my_proc_id, __func__,
+                       new simgrid::instr::WaitTIData((*request)->src(), (*request)->dst(), (*request)->tag()));
 
     simgrid::smpi::Request::wait(request, status);
     retval = MPI_SUCCESS;
@@ -736,7 +737,7 @@ int PMPI_Waitall(int count, MPI_Request requests[], MPI_Status status[])
   }
 
   int rank_traced = simgrid::s4u::this_actor::get_pid(); // FIXME: In PMPI_Wait, we check if the comm is null?
-  TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("waitAll", static_cast<double>(count)));
+  TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("waitall", static_cast<double>(count)));
 
   int retval = simgrid::smpi::Request::waitall(count, requests, status);
 
index 358fda0..2556f4c 100644 (file)
@@ -8,14 +8,11 @@
 
 #include "simgrid/msg.h" // msg_bar_t
 #include "smpi/smpi.h"
+#include "smpi/smpi_helpers_internal.h"
 #include "src/instr/instr_smpi.hpp"
 #include "src/internal_config.h"
 #include <unordered_map>
 #include <vector>
-#include <sys/time.h>
-#if _POSIX_TIMERS
-#include <time.h>
-#endif
 
 #define MPI_REQ_PERSISTENT 0x1
 #define MPI_REQ_NON_PERSISTENT 0x2
@@ -408,20 +405,6 @@ void mpi_file_set_view_(int* fh, long long int* offset, int* etype, int* filetyp
 void mpi_file_read_(int* fh, void* buf, int* count, int* datatype, MPI_Status* status, int* ierr);
 void mpi_file_write_(int* fh, void* buf, int* count, int* datatype, MPI_Status* status, int* ierr);
 
-
-XBT_PUBLIC int smpi_usleep(useconds_t usecs);
-#if _POSIX_TIMERS > 0
-XBT_PUBLIC int smpi_nanosleep(const struct timespec* tp, struct timespec* t);
-XBT_PUBLIC int smpi_clock_gettime(clockid_t clk_id, struct timespec* tp);
-#endif
-XBT_PUBLIC unsigned int smpi_sleep(unsigned int secs);
-XBT_PUBLIC int smpi_gettimeofday(struct timeval* tv, struct timezone* tz);
-
-
-struct option;
-XBT_PUBLIC int smpi_getopt_long (int argc,  char *const *argv,  const char *options,  const struct option *long_options, int *opt_index);
-XBT_PUBLIC int smpi_getopt (int argc,  char *const *argv,  const char *options);
-
 } // extern "C"
 
 struct s_smpi_privatization_region_t {
index 3c55ae4..eb56ba4 100644 (file)
@@ -24,7 +24,6 @@ class Group : public F2C{
      */
     std::vector<simgrid::s4u::ActorPtr> rank_to_actor_map_;
     std::map<simgrid::s4u::ActorPtr, int> actor_to_rank_map_;
-    std::vector<int> rank_to_index_map_;
     std::vector<int> index_to_rank_map_;
 
     int refcount_;
index 281d79f..56b211e 100644 (file)
@@ -443,6 +443,17 @@ void smpi_bench_destroy()
   samples.clear();
 }
 
+int smpi_getopt_long_only (int argc,  char *const *argv,  const char *options,
+                      const struct option * long_options, int *opt_index)
+{
+  if (smpi_process())
+    optind = smpi_process()->get_optind();
+  int ret = getopt_long_only (argc,  argv,  options, long_options, opt_index);
+  if (smpi_process())
+    smpi_process()->set_optind(optind);
+  return ret;
+}
+
 int smpi_getopt_long (int argc,  char *const *argv,  const char *options,
                       const struct option * long_options, int *opt_index)
 {
index 8fe3b4e..a328d2c 100644 (file)
@@ -24,7 +24,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_dvfs, smpi, "Logging specific to SMPI (expe
  */
 double smpi_get_host_power_peak_at(int pstate_index)
 {
-  return sg_host_self()->getPstateSpeed(pstate_index);
+  return sg_host_self()->get_pstate_speed(pstate_index);
 }
 
 /**
@@ -34,7 +34,7 @@ double smpi_get_host_power_peak_at(int pstate_index)
  */
 double smpi_get_host_current_power_peak()
 {
-  return sg_host_self()->getSpeed();
+  return sg_host_self()->get_speed();
 }
 
 /**
index fc23cde..a2bdbe1 100644 (file)
@@ -15,6 +15,9 @@
 #include <cfloat> /* DBL_MAX */
 #include <dlfcn.h>
 #include <fcntl.h>
+#if not defined(__APPLE__)
+#include <link.h>
+#endif
 #include <fstream>
 
 #if HAVE_SENDFILE
@@ -53,6 +56,7 @@ static int smpi_exit_status = 0;
 int smpi_universe_size = 0;
 extern double smpi_total_benched_time;
 xbt_os_timer_t global_timer;
+static std::vector<std::string> privatize_libs_paths;
 /**
  * Setting MPI_COMM_WORLD to MPI_COMM_UNINITIALIZED (it's a variable)
  * is important because the implementation of MPI_Comm checks
@@ -130,13 +134,6 @@ void smpi_comm_set_copy_data_callback(void (*callback) (smx_activity_t, void*, s
   smpi_comm_copy_data_callback = callback;
 }
 
-static void print(std::vector<std::pair<size_t, size_t>> vec) {
-  std::fprintf(stderr, "{");
-  for (auto const& elt : vec) {
-    std::fprintf(stderr, "(0x%zx, 0x%zx),", elt.first, elt.second);
-  }
-  std::fprintf(stderr, "}\n");
-}
 static void memcpy_private(void* dest, const void* src, std::vector<std::pair<size_t, size_t>>& private_blocks)
 {
   for (auto const& block : private_blocks)
@@ -424,6 +421,7 @@ static int smpi_run_entry_point(smpi_entry_point_type entry_point, std::vector<s
   return 0;
 }
 
+
 // TODO, remove the number of functions involved here
 static smpi_entry_point_type smpi_resolve_function(void* handle)
 {
@@ -444,7 +442,172 @@ static smpi_entry_point_type smpi_resolve_function(void* handle)
   return smpi_entry_point_type();
 }
 
-int smpi_main(const char* executable, int argc, char *argv[])
+static void smpi_copy_file(std::string src, std::string target, off_t fdin_size)
+{
+  int fdin = open(src.c_str(), O_RDONLY);
+  xbt_assert(fdin >= 0, "Cannot read from %s. Please make sure that the file exists and is executable.", src.c_str());
+  int fdout = open(target.c_str(), O_CREAT | O_RDWR, S_IRWXU);
+  xbt_assert(fdout >= 0, "Cannot write into %s", target.c_str());
+
+  XBT_DEBUG("Copy %ld bytes into %s", static_cast<long>(fdin_size), target.c_str());
+#if HAVE_SENDFILE
+  ssize_t sent_size = sendfile(fdout, fdin, NULL, fdin_size);
+  xbt_assert(sent_size == fdin_size, "Error while copying %s: only %zd bytes copied instead of %ld (errno: %d -- %s)",
+             target.c_str(), sent_size, fdin_size, errno, strerror(errno));
+#else
+  const int bufsize = 1024 * 1024 * 4;
+  char buf[bufsize];
+  while (int got = read(fdin, buf, bufsize)) {
+    if (got == -1) {
+      xbt_assert(errno == EINTR, "Cannot read from %s", src.c_str());
+    } else {
+      char* p  = buf;
+      int todo = got;
+      while (int done = write(fdout, p, todo)) {
+        if (done == -1) {
+          xbt_assert(errno == EINTR, "Cannot write into %s", target.c_str());
+        } else {
+          p += done;
+          todo -= done;
+        }
+      }
+    }
+  }
+#endif
+  close(fdin);
+  close(fdout);
+}
+
+#if not defined(__APPLE__)
+static int visit_libs(struct dl_phdr_info* info, size_t, void* data)
+{
+  char* libname = (char*)(data);
+  const char *path = info->dlpi_name;
+  if(strstr(path, libname)){
+    strncpy(libname, path, 512);
+    return 1;
+  }
+  
+  return 0;
+}
+#endif
+
+static void smpi_init_privatization_dlopen(const char* executable)
+{
+  std::string executable_copy = executable;
+
+  // Prepare the copy of the binary (get its size)
+  struct stat fdin_stat;
+  stat(executable_copy.c_str(), &fdin_stat);
+  off_t fdin_size         = fdin_stat.st_size;
+  static std::size_t rank = 0;
+
+  std::string libnames = simgrid::config::get_value<std::string>("smpi/privatize-libs");
+  if (not libnames.empty()) {
+    // split option
+    std::vector<std::string> privatize_libs;
+    boost::split(privatize_libs, libnames, boost::is_any_of(";"));
+
+    for (auto const& libname : privatize_libs) {
+      // load the library once to add it to the local libs, to get the absolute path
+      void* libhandle = dlopen(libname.c_str(), RTLD_LAZY);
+      // get library name from path
+      char fullpath[512] = {'\0'};
+      strcpy(fullpath, libname.c_str());
+#if not defined(__APPLE__)
+      int ret = dl_iterate_phdr(visit_libs, fullpath);
+      if (ret == 0)
+        xbt_die("Can't find a linked %s - check the setting you gave to smpi/privatize-libs", fullpath);
+      else
+        XBT_DEBUG("Extra lib to privatize found : %s", fullpath);
+#else
+      xbt_die("smpi/privatize-libs is not (yet) compatible with OSX");
+#endif
+      privatize_libs_paths.push_back(fullpath);
+      dlclose(libhandle);
+    }
+  }
+
+  simix_global->default_function = [executable_copy, fdin_size](std::vector<std::string> args) {
+    return std::function<void()>([executable_copy, fdin_size, args] {
+
+      // Copy the dynamic library:
+      std::string target_executable =
+          executable_copy + "_" + std::to_string(getpid()) + "_" + std::to_string(rank) + ".so";
+
+      smpi_copy_file(executable_copy, target_executable, fdin_size);
+      // if smpi/privatize-libs is set, duplicate pointed lib and link each executable copy to a different one.
+      std::string target_lib;
+      for (auto const& libpath : privatize_libs_paths) {
+        // if we were given a full path, strip it
+        size_t index = libpath.find_last_of("/\\");
+        std::string libname;
+        if (index != std::string::npos)
+          libname = libpath.substr(index + 1);
+
+        if (not libname.empty()) {
+          // load the library to add it to the local libs, to get the absolute path
+          struct stat fdin_stat2;
+          stat(libpath.c_str(), &fdin_stat2);
+          off_t fdin_size2 = fdin_stat2.st_size;
+
+          // Copy the dynamic library, the new name must be the same length as the old one
+          // just replace the name with 7 digits for the rank and the rest of the name.
+          unsigned int pad = 7;
+          if (libname.length() < pad)
+            pad = libname.length();
+          target_lib =
+              std::string(pad - std::to_string(rank).length(), '0') + std::to_string(rank) + libname.substr(pad);
+          XBT_DEBUG("copy lib %s to %s, with size %lld", libpath.c_str(), target_lib.c_str(), (long long)fdin_size2);
+          smpi_copy_file(libpath, target_lib, fdin_size2);
+
+          std::string sedcommand = "sed -i -e 's/" + libname + "/" + target_lib + "/g' " + target_executable;
+          int ret                = system(sedcommand.c_str());
+          if (ret != 0)
+            xbt_die("error while applying sed command %s \n", sedcommand.c_str());
+        }
+      }
+
+      rank++;
+      // Load the copy and resolve the entry point:
+      void* handle    = dlopen(target_executable.c_str(), RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
+      int saved_errno = errno;
+      if (simgrid::config::get_value<bool>("smpi/keep-temps") == false) {
+        unlink(target_executable.c_str());
+        if (not target_lib.empty())
+          unlink(target_lib.c_str());
+      }
+      if (handle == nullptr)
+        xbt_die("dlopen failed: %s (errno: %d -- %s)", dlerror(), saved_errno, strerror(saved_errno));
+      smpi_entry_point_type entry_point = smpi_resolve_function(handle);
+      if (not entry_point)
+        xbt_die("Could not resolve entry point");
+      smpi_run_entry_point(entry_point, args);
+    });
+  };
+}
+
+static void smpi_init_privatization_no_dlopen(const char* executable)
+{
+  if (smpi_privatize_global_variables == SmpiPrivStrategies::MMAP)
+    smpi_prepare_global_memory_segment();
+  // Load the dynamic library and resolve the entry point:
+  void* handle = dlopen(executable, RTLD_LAZY | RTLD_LOCAL);
+  if (handle == nullptr)
+    xbt_die("dlopen failed for %s: %s (errno: %d -- %s)", executable, dlerror(), errno, strerror(errno));
+  smpi_entry_point_type entry_point = smpi_resolve_function(handle);
+  if (not entry_point)
+    xbt_die("main not found in %s", executable);
+  if (smpi_privatize_global_variables == SmpiPrivStrategies::MMAP)
+    smpi_backup_global_memory_segment();
+
+  // Execute the same entry point for each simulated process:
+  simix_global->default_function = [entry_point](std::vector<std::string> args) {
+    return std::function<void()>([entry_point, args] { smpi_run_entry_point(entry_point, args); });
+  };
+}
+
+int smpi_main(const char* executable, int argc, char* argv[])
 {
   srand(SMPI_RAND_SEED);
 
@@ -457,7 +620,7 @@ int smpi_main(const char* executable, int argc, char *argv[])
   TRACE_global_init();
 
   SIMIX_global_init(&argc, argv);
-  MSG_init(&argc,argv);
+  MSG_init(&argc, argv);
 
   SMPI_switch_data_segment = &smpi_switch_data_segment;
 
@@ -472,94 +635,10 @@ int smpi_main(const char* executable, int argc, char *argv[])
   SIMIX_comm_set_copy_data_callback(smpi_comm_copy_buffer_callback);
 
   smpi_init_options();
-  if (smpi_privatize_global_variables == SmpiPrivStrategies::DLOPEN) {
-
-    std::string executable_copy = executable;
-
-    // Prepare the copy of the binary (get its size)
-    struct stat fdin_stat;
-    stat(executable_copy.c_str(), &fdin_stat);
-    off_t fdin_size = fdin_stat.st_size;
-    static std::size_t rank = 0;
-
-    simix_global->default_function = [executable_copy, fdin_size](std::vector<std::string> args) {
-      return std::function<void()>([executable_copy, fdin_size, args] {
-
-        // Copy the dynamic library:
-        std::string target_executable = executable_copy
-          + "_" + std::to_string(getpid())
-          + "_" + std::to_string(rank++) + ".so";
-
-        int fdin = open(executable_copy.c_str(), O_RDONLY);
-        xbt_assert(fdin >= 0, "Cannot read from %s. Please make sure that the file exists and is executable.",
-                   executable_copy.c_str());
-        int fdout = open(target_executable.c_str(), O_CREAT | O_RDWR, S_IRWXU);
-        xbt_assert(fdout >= 0, "Cannot write into %s", target_executable.c_str());
-
-        XBT_DEBUG("Copy %ld bytes into %s", static_cast<long>(fdin_size), target_executable.c_str());
-#if HAVE_SENDFILE
-        ssize_t sent_size = sendfile(fdout, fdin, NULL, fdin_size);
-        xbt_assert(sent_size == fdin_size,
-                   "Error while copying %s: only %zd bytes copied instead of %ld (errno: %d -- %s)",
-                   target_executable.c_str(), sent_size, fdin_size, errno, strerror(errno));
-#else
-        const int bufsize = 1024 * 1024 * 4;
-        char buf[bufsize];
-        while (int got = read(fdin, buf, bufsize)) {
-          if (got == -1) {
-            xbt_assert(errno == EINTR, "Cannot read from %s", executable_copy.c_str());
-          } else {
-            char* p  = buf;
-            int todo = got;
-            while (int done = write(fdout, p, todo)) {
-              if (done == -1) {
-                xbt_assert(errno == EINTR, "Cannot write into %s", target_executable.c_str());
-              } else {
-                p += done;
-                todo -= done;
-              }
-            }
-          }
-        }
-#endif
-        close(fdin);
-        close(fdout);
-
-        // Load the copy and resolve the entry point:
-        void* handle = dlopen(target_executable.c_str(), RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
-        int saved_errno = errno;
-        if (simgrid::config::get_value<bool>("smpi/keep-temps") == false)
-          unlink(target_executable.c_str());
-        if (handle == nullptr)
-          xbt_die("dlopen failed: %s (errno: %d -- %s)", dlerror(), saved_errno, strerror(saved_errno));
-        smpi_entry_point_type entry_point = smpi_resolve_function(handle);
-        if (not entry_point)
-          xbt_die("Could not resolve entry point");
-
-        smpi_run_entry_point(entry_point, args);
-      });
-    };
-  }
-  else {
-    if (smpi_privatize_global_variables == SmpiPrivStrategies::MMAP)
-      smpi_prepare_global_memory_segment();
-    // Load the dynamic library and resolve the entry point:
-    void* handle = dlopen(executable, RTLD_LAZY | RTLD_LOCAL);
-    if (handle == nullptr)
-      xbt_die("dlopen failed for %s: %s (errno: %d -- %s)", executable, dlerror(), errno, strerror(errno));
-    smpi_entry_point_type entry_point = smpi_resolve_function(handle);
-    if (not entry_point)
-      xbt_die("main not found in %s", executable);
-    if (smpi_privatize_global_variables == SmpiPrivStrategies::MMAP)
-      smpi_backup_global_memory_segment();
-
-    // Execute the same entry point for each simulated process:
-    simix_global->default_function = [entry_point](std::vector<std::string> args) {
-      return std::function<void()>([entry_point, args] {
-        smpi_run_entry_point(entry_point, args);
-      });
-    };
-  }
+  if (smpi_privatize_global_variables == SmpiPrivStrategies::DLOPEN)
+    smpi_init_privatization_dlopen(executable);
+  else
+    smpi_init_privatization_no_dlopen(executable);
 
   SMPI_init();
   SIMIX_launch_application(argv[2]);
index 671ed7c..8d6b628 100644 (file)
@@ -3,23 +3,24 @@
 /* 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 "private.hpp"
 #include "smpi_coll.hpp"
 #include "smpi_comm.hpp"
 #include "smpi_datatype.hpp"
 #include "smpi_group.hpp"
-#include "smpi_process.hpp"
 #include "smpi_request.hpp"
 #include "xbt/replay.hpp"
 #include <simgrid/smpi/replay.hpp>
+#include <src/smpi/include/private.hpp>
 
-#include <boost/algorithm/string/join.hpp>
 #include <memory>
 #include <numeric>
 #include <unordered_map>
 #include <vector>
 
 #include <tuple>
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_replay, smpi, "Trace Replay with SMPI");
+
 // From https://stackoverflow.com/questions/7110301/generic-hash-for-tuples-in-unordered-map-unordered-set
 // This is all just to make std::unordered_map work with std::tuple. If we need this in other places,
 // this could go into a header file.
@@ -60,13 +61,10 @@ public:
 };
 }
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_replay,smpi,"Trace Replay with SMPI");
-
 typedef std::tuple</*sender*/ int, /* reciever */ int, /* tag */int> req_key_t;
 typedef std::unordered_map<req_key_t, MPI_Request, hash_tuple::hash<std::tuple<int,int,int>>> req_storage_t;
 
-
-static void log_timed_action(simgrid::xbt::ReplayAction& action, double clock)
+void log_timed_action(simgrid::xbt::ReplayAction& action, double clock)
 {
   if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){
     std::string s = boost::algorithm::join(action, " ");
@@ -252,7 +250,7 @@ void GatherVArgParser::parse(simgrid::xbt::ReplayAction& action, std::string nam
   disps      = std::vector<int>(comm_size, 0);
   recvcounts = std::shared_ptr<std::vector<int>>(new std::vector<int>(comm_size));
 
-  if (name == "gatherV") {
+  if (name == "gatherv") {
     root = (action.size() > 3 + comm_size) ? std::stoi(action[3 + comm_size]) : 0;
     if (action.size() > 4 + comm_size)
       datatype1 = simgrid::smpi::Datatype::decode(action[4 + comm_size]);
@@ -343,7 +341,7 @@ void ScatterVArgParser::parse(simgrid::xbt::ReplayAction& action, std::string na
 void ReduceScatterArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name)
 {
   /* The structure of the reducescatter action for the rank 0 (total 4 processes) is the following:
-       0 reduceScatter 275427 275427 275427 204020 11346849 0
+       0 reducescatter 275427 275427 275427 204020 11346849 0
      where:
        1) The first four values after the name of the action declare the recvcounts array
        2) The value 11346849 is the amount of instructions
@@ -364,8 +362,8 @@ void ReduceScatterArgParser::parse(simgrid::xbt::ReplayAction& action, std::stri
 
 void AllToAllVArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name)
 {
-  /* The structure of the allToAllV action for the rank 0 (total 4 processes) is the following:
-        0 allToAllV 100 1 7 10 12 100 1 70 10 5
+  /* The structure of the alltoallv action for the rank 0 (total 4 processes) is the following:
+        0 alltoallv 100 1 7 10 12 100 1 70 10 5
      where:
       1) 100 is the size of the send buffer *sizeof(int),
       2) 1 7 10 12 is the sendcounts array
@@ -394,17 +392,6 @@ void AllToAllVArgParser::parse(simgrid::xbt::ReplayAction& action, std::string n
   recv_size_sum = std::accumulate(recvcounts->begin(), recvcounts->end(), 0);
 }
 
-template<class T>
-void ReplayAction<T>::execute(simgrid::xbt::ReplayAction& action)
-{
-  // Needs to be re-initialized for every action, hence here
-  double start_time = smpi_process()->simulated_elapsed();
-  args.parse(action, name);
-  kernel(action);
-  if (name != "Init")
-    log_timed_action(action, start_time);
-}
-
 void WaitAction::kernel(simgrid::xbt::ReplayAction& action)
 {
   std::string s = boost::algorithm::join(action, " ");
@@ -424,7 +411,7 @@ void WaitAction::kernel(simgrid::xbt::ReplayAction& action)
   // MPI_REQUEST_NULL by Request::wait!
   bool is_wait_for_receive = (request->flags() & MPI_REQ_RECV);
   // TODO: Here we take the rank while we normally take the process id (look for my_proc_id)
-  TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::NoOpTIData("wait"));
+  TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::WaitTIData(args.src, args.dst, args.tag));
 
   MPI_Status status;
   Request::wait(&request, &status);
@@ -432,285 +419,285 @@ void WaitAction::kernel(simgrid::xbt::ReplayAction& action)
   TRACE_smpi_comm_out(rank);
   if (is_wait_for_receive)
     TRACE_smpi_recv(args.src, args.dst, args.tag);
+}
+
+void SendAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  int dst_traced = MPI_COMM_WORLD->group()->actor(args.partner)->get_pid();
+
+  TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData(name, args.partner, args.size,
+        args.tag, Datatype::encode(args.datatype1)));
+  if (not TRACE_smpi_view_internals())
+    TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, args.tag, args.size * args.datatype1->size());
+
+  if (name == "send") {
+    Request::send(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD);
+  } else if (name == "isend") {
+    MPI_Request request = Request::isend(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD);
+    req_storage.add(request);
+  } else {
+    xbt_die("Don't know this action, %s", name.c_str());
   }
 
-  void SendAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    int dst_traced = MPI_COMM_WORLD->group()->actor(args.partner)->get_pid();
+  TRACE_smpi_comm_out(my_proc_id);
+}
 
-    TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData(name, args.partner, args.size,
-                                                                             args.tag, Datatype::encode(args.datatype1)));
-    if (not TRACE_smpi_view_internals())
-      TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, args.tag, args.size * args.datatype1->size());
+void RecvAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  int src_traced = MPI_COMM_WORLD->group()->actor(args.partner)->get_pid();
 
-    if (name == "send") {
-      Request::send(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD);
-    } else if (name == "Isend") {
-      MPI_Request request = Request::isend(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD);
-      req_storage.add(request);
-    } else {
-      xbt_die("Don't know this action, %s", name.c_str());
-    }
+  TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData(name, args.partner, args.size,
+        args.tag, Datatype::encode(args.datatype1)));
 
-    TRACE_smpi_comm_out(my_proc_id);
+  MPI_Status status;
+  // unknown size from the receiver point of view
+  if (args.size <= 0.0) {
+    Request::probe(args.partner, args.tag, MPI_COMM_WORLD, &status);
+    args.size = status.count;
   }
 
-  void RecvAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    int src_traced = MPI_COMM_WORLD->group()->actor(args.partner)->get_pid();
+  if (name == "recv") {
+    Request::recv(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD, &status);
+  } else if (name == "irecv") {
+    MPI_Request request = Request::irecv(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD);
+    req_storage.add(request);
+  }
 
-    TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData(name, args.partner, args.size,
-                                                                             args.tag, Datatype::encode(args.datatype1)));
+  TRACE_smpi_comm_out(my_proc_id);
+  // TODO: Check why this was only activated in the "recv" case and not in the "irecv" case
+  if (name == "recv" && not TRACE_smpi_view_internals()) {
+    TRACE_smpi_recv(src_traced, my_proc_id, args.tag);
+  }
+}
+
+void ComputeAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  TRACE_smpi_computing_in(my_proc_id, args.flops);
+  smpi_execute_flops(args.flops);
+  TRACE_smpi_computing_out(my_proc_id);
+}
+
+void TestAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  MPI_Request request = req_storage.find(args.src, args.dst, args.tag);
+  req_storage.remove(request);
+  // if request is null here, this may mean that a previous test has succeeded
+  // Different times in traced application and replayed version may lead to this
+  // In this case, ignore the extra calls.
+  if (request != MPI_REQUEST_NULL) {
+    TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("test"));
 
     MPI_Status status;
-    // unknown size from the receiver point of view
-    if (args.size <= 0.0) {
-      Request::probe(args.partner, args.tag, MPI_COMM_WORLD, &status);
-      args.size = status.count;
-    }
+    int flag = Request::test(&request, &status);
 
-    if (name == "recv") {
-      Request::recv(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD, &status);
-    } else if (name == "Irecv") {
-      MPI_Request request = Request::irecv(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD);
+    XBT_DEBUG("MPI_Test result: %d", flag);
+    /* push back request in vector to be caught by a subsequent wait. if the test did succeed, the request is now
+     * nullptr.*/
+    if (request == MPI_REQUEST_NULL)
+      req_storage.addNullRequest(args.src, args.dst, args.tag);
+    else
       req_storage.add(request);
-    }
 
     TRACE_smpi_comm_out(my_proc_id);
-    // TODO: Check why this was only activated in the "recv" case and not in the "Irecv" case
-    if (name == "recv" && not TRACE_smpi_view_internals()) {
-      TRACE_smpi_recv(src_traced, my_proc_id, args.tag);
-    }
-  }
-
-  void ComputeAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    TRACE_smpi_computing_in(my_proc_id, args.flops);
-    smpi_execute_flops(args.flops);
-    TRACE_smpi_computing_out(my_proc_id);
-  }
-
-  void TestAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    MPI_Request request = req_storage.find(args.src, args.dst, args.tag);
-    req_storage.remove(request);
-    // if request is null here, this may mean that a previous test has succeeded
-    // Different times in traced application and replayed version may lead to this
-    // In this case, ignore the extra calls.
-    if (request != MPI_REQUEST_NULL) {
-      TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("test"));
-
-      MPI_Status status;
-      int flag = Request::test(&request, &status);
-
-      XBT_DEBUG("MPI_Test result: %d", flag);
-      /* push back request in vector to be caught by a subsequent wait. if the test did succeed, the request is now
-       * nullptr.*/
-      if (request == MPI_REQUEST_NULL)
-        req_storage.addNullRequest(args.src, args.dst, args.tag);
-      else
-        req_storage.add(request);
-
-      TRACE_smpi_comm_out(my_proc_id);
-    }
   }
+}
 
-  void InitAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    CHECK_ACTION_PARAMS(action, 0, 1)
+void InitAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  CHECK_ACTION_PARAMS(action, 0, 1)
     MPI_DEFAULT_TYPE = (action.size() > 2) ? MPI_DOUBLE // default MPE datatype
-                                           : MPI_BYTE;  // default TAU datatype
+    : MPI_BYTE;  // default TAU datatype
 
-    /* start a simulated timer */
-    smpi_process()->simulated_start();
-  }
+  /* start a simulated timer */
+  smpi_process()->simulated_start();
+}
 
-  void CommunicatorAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    /* nothing to do */
-  }
+void CommunicatorAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  /* nothing to do */
+}
 
-  void WaitAllAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    const unsigned int count_requests = req_storage.size();
-
-    if (count_requests > 0) {
-      TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData("waitAll", -1, count_requests, ""));
-      std::vector<std::pair</*sender*/int,/*recv*/int>> sender_receiver;
-      std::vector<MPI_Request> reqs;
-      req_storage.get_requests(reqs);
-      for (const auto& req : reqs) {
-        if (req && (req->flags() & MPI_REQ_RECV)) {
-          sender_receiver.push_back({req->src(), req->dst()});
-        }
-      }
-      MPI_Status status[count_requests];
-      Request::waitall(count_requests, &(reqs.data())[0], status);
-      req_storage.get_store().clear();
+void WaitAllAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  const unsigned int count_requests = req_storage.size();
 
-      for (auto& pair : sender_receiver) {
-        TRACE_smpi_recv(pair.first, pair.second, 0);
+  if (count_requests > 0) {
+    TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData("waitall", -1, count_requests, ""));
+    std::vector<std::pair</*sender*/int,/*recv*/int>> sender_receiver;
+    std::vector<MPI_Request> reqs;
+    req_storage.get_requests(reqs);
+    for (const auto& req : reqs) {
+      if (req && (req->flags() & MPI_REQ_RECV)) {
+        sender_receiver.push_back({req->src(), req->dst()});
       }
-      TRACE_smpi_comm_out(my_proc_id);
     }
-  }
+    MPI_Status status[count_requests];
+    Request::waitall(count_requests, &(reqs.data())[0], status);
+    req_storage.get_store().clear();
 
-  void BarrierAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("barrier"));
-    Colls::barrier(MPI_COMM_WORLD);
+    for (auto& pair : sender_receiver) {
+      TRACE_smpi_recv(pair.first, pair.second, 0);
+    }
     TRACE_smpi_comm_out(my_proc_id);
   }
+}
 
-  void BcastAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    TRACE_smpi_comm_in(my_proc_id, "action_bcast",
-                       new simgrid::instr::CollTIData("bcast", MPI_COMM_WORLD->group()->actor(args.root)->get_pid(),
-                                                      -1.0, args.size, -1, Datatype::encode(args.datatype1), ""));
+void BarrierAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("barrier"));
+  Colls::barrier(MPI_COMM_WORLD);
+  TRACE_smpi_comm_out(my_proc_id);
+}
 
-    Colls::bcast(send_buffer(args.size * args.datatype1->size()), args.size, args.datatype1, args.root, MPI_COMM_WORLD);
+void BcastAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  TRACE_smpi_comm_in(my_proc_id, "action_bcast",
+      new simgrid::instr::CollTIData("bcast", MPI_COMM_WORLD->group()->actor(args.root)->get_pid(),
+        -1.0, args.size, -1, Datatype::encode(args.datatype1), ""));
 
-    TRACE_smpi_comm_out(my_proc_id);
-  }
+  Colls::bcast(send_buffer(args.size * args.datatype1->size()), args.size, args.datatype1, args.root, MPI_COMM_WORLD);
 
-  void ReduceAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    TRACE_smpi_comm_in(my_proc_id, "action_reduce",
-                       new simgrid::instr::CollTIData("reduce", MPI_COMM_WORLD->group()->actor(args.root)->get_pid(),
-                                                      args.comp_size, args.comm_size, -1,
-                                                      Datatype::encode(args.datatype1), ""));
+  TRACE_smpi_comm_out(my_proc_id);
+}
 
-    Colls::reduce(send_buffer(args.comm_size * args.datatype1->size()),
-        recv_buffer(args.comm_size * args.datatype1->size()), args.comm_size, args.datatype1, MPI_OP_NULL, args.root, MPI_COMM_WORLD);
-    smpi_execute_flops(args.comp_size);
+void ReduceAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  TRACE_smpi_comm_in(my_proc_id, "action_reduce",
+      new simgrid::instr::CollTIData("reduce", MPI_COMM_WORLD->group()->actor(args.root)->get_pid(),
+        args.comp_size, args.comm_size, -1,
+        Datatype::encode(args.datatype1), ""));
 
-    TRACE_smpi_comm_out(my_proc_id);
-  }
+  Colls::reduce(send_buffer(args.comm_size * args.datatype1->size()),
+      recv_buffer(args.comm_size * args.datatype1->size()), args.comm_size, args.datatype1, MPI_OP_NULL, args.root, MPI_COMM_WORLD);
+  smpi_execute_flops(args.comp_size);
 
-  void AllReduceAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    TRACE_smpi_comm_in(my_proc_id, "action_allReduce", new simgrid::instr::CollTIData("allReduce", -1, args.comp_size, args.comm_size, -1,
-                                                                                Datatype::encode(args.datatype1), ""));
+  TRACE_smpi_comm_out(my_proc_id);
+}
 
-    Colls::allreduce(send_buffer(args.comm_size * args.datatype1->size()),
-        recv_buffer(args.comm_size * args.datatype1->size()), args.comm_size, args.datatype1, MPI_OP_NULL, MPI_COMM_WORLD);
-    smpi_execute_flops(args.comp_size);
+void AllReduceAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  TRACE_smpi_comm_in(my_proc_id, "action_allreduce", new simgrid::instr::CollTIData("allreduce", -1, args.comp_size, args.comm_size, -1,
+        Datatype::encode(args.datatype1), ""));
 
-    TRACE_smpi_comm_out(my_proc_id);
-  }
+  Colls::allreduce(send_buffer(args.comm_size * args.datatype1->size()),
+      recv_buffer(args.comm_size * args.datatype1->size()), args.comm_size, args.datatype1, MPI_OP_NULL, MPI_COMM_WORLD);
+  smpi_execute_flops(args.comp_size);
 
-  void AllToAllAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    TRACE_smpi_comm_in(my_proc_id, "action_allToAll",
-                     new simgrid::instr::CollTIData("allToAll", -1, -1.0, args.send_size, args.recv_size,
-                                                    Datatype::encode(args.datatype1),
-                                                    Datatype::encode(args.datatype2)));
+  TRACE_smpi_comm_out(my_proc_id);
+}
 
-    Colls::alltoall(send_buffer(args.send_size * args.comm_size * args.datatype1->size()), args.send_size,
-                    args.datatype1, recv_buffer(args.recv_size * args.comm_size * args.datatype2->size()),
-                    args.recv_size, args.datatype2, MPI_COMM_WORLD);
+void AllToAllAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  TRACE_smpi_comm_in(my_proc_id, "action_alltoall",
+      new simgrid::instr::CollTIData("alltoall", -1, -1.0, args.send_size, args.recv_size,
+        Datatype::encode(args.datatype1),
+        Datatype::encode(args.datatype2)));
 
-    TRACE_smpi_comm_out(my_proc_id);
-  }
+  Colls::alltoall(send_buffer(args.send_size * args.comm_size * args.datatype1->size()), args.send_size,
+      args.datatype1, recv_buffer(args.recv_size * args.comm_size * args.datatype2->size()),
+      args.recv_size, args.datatype2, MPI_COMM_WORLD);
 
-  void GatherAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    TRACE_smpi_comm_in(my_proc_id, name.c_str(), new simgrid::instr::CollTIData(name, (name == "gather") ? args.root : -1, -1.0, args.send_size, args.recv_size,
-                                                                          Datatype::encode(args.datatype1), Datatype::encode(args.datatype2)));
+  TRACE_smpi_comm_out(my_proc_id);
+}
 
-    if (name == "gather") {
-      int rank = MPI_COMM_WORLD->rank();
-      Colls::gather(send_buffer(args.send_size * args.datatype1->size()), args.send_size, args.datatype1,
-                 (rank == args.root) ? recv_buffer(args.recv_size * args.comm_size * args.datatype2->size()) : nullptr, args.recv_size, args.datatype2, args.root, MPI_COMM_WORLD);
-    }
-    else
-      Colls::allgather(send_buffer(args.send_size * args.datatype1->size()), args.send_size, args.datatype1,
-                       recv_buffer(args.recv_size * args.datatype2->size()), args.recv_size, args.datatype2, MPI_COMM_WORLD);
+void GatherAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  TRACE_smpi_comm_in(my_proc_id, name.c_str(), new simgrid::instr::CollTIData(name, (name == "gather") ? args.root : -1, -1.0, args.send_size, args.recv_size,
+        Datatype::encode(args.datatype1), Datatype::encode(args.datatype2)));
 
-    TRACE_smpi_comm_out(my_proc_id);
+  if (name == "gather") {
+    int rank = MPI_COMM_WORLD->rank();
+    Colls::gather(send_buffer(args.send_size * args.datatype1->size()), args.send_size, args.datatype1,
+        (rank == args.root) ? recv_buffer(args.recv_size * args.comm_size * args.datatype2->size()) : nullptr, args.recv_size, args.datatype2, args.root, MPI_COMM_WORLD);
   }
+  else
+    Colls::allgather(send_buffer(args.send_size * args.datatype1->size()), args.send_size, args.datatype1,
+        recv_buffer(args.recv_size * args.datatype2->size()), args.recv_size, args.datatype2, MPI_COMM_WORLD);
 
-  void GatherVAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    int rank = MPI_COMM_WORLD->rank();
+  TRACE_smpi_comm_out(my_proc_id);
+}
 
-    TRACE_smpi_comm_in(my_proc_id, name.c_str(), new simgrid::instr::VarCollTIData(
-                                               name, (name == "gatherV") ? args.root : -1, args.send_size, nullptr, -1, args.recvcounts,
-                                               Datatype::encode(args.datatype1), Datatype::encode(args.datatype2)));
+void GatherVAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  int rank = MPI_COMM_WORLD->rank();
 
-    if (name == "gatherV") {
-      Colls::gatherv(send_buffer(args.send_size * args.datatype1->size()), args.send_size, args.datatype1,
-                     (rank == args.root) ? recv_buffer(args.recv_size_sum * args.datatype2->size()) : nullptr,
-                     args.recvcounts->data(), args.disps.data(), args.datatype2, args.root, MPI_COMM_WORLD);
-    }
-    else {
-      Colls::allgatherv(send_buffer(args.send_size * args.datatype1->size()), args.send_size, args.datatype1,
-                        recv_buffer(args.recv_size_sum * args.datatype2->size()), args.recvcounts->data(),
-                        args.disps.data(), args.datatype2, MPI_COMM_WORLD);
-    }
+  TRACE_smpi_comm_in(my_proc_id, name.c_str(), new simgrid::instr::VarCollTIData(
+        name, (name == "gatherv") ? args.root : -1, args.send_size, nullptr, -1, args.recvcounts,
+        Datatype::encode(args.datatype1), Datatype::encode(args.datatype2)));
 
-    TRACE_smpi_comm_out(my_proc_id);
+  if (name == "gatherv") {
+    Colls::gatherv(send_buffer(args.send_size * args.datatype1->size()), args.send_size, args.datatype1,
+        (rank == args.root) ? recv_buffer(args.recv_size_sum * args.datatype2->size()) : nullptr,
+        args.recvcounts->data(), args.disps.data(), args.datatype2, args.root, MPI_COMM_WORLD);
+  }
+  else {
+    Colls::allgatherv(send_buffer(args.send_size * args.datatype1->size()), args.send_size, args.datatype1,
+        recv_buffer(args.recv_size_sum * args.datatype2->size()), args.recvcounts->data(),
+        args.disps.data(), args.datatype2, MPI_COMM_WORLD);
   }
 
-  void ScatterAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    int rank = MPI_COMM_WORLD->rank();
-    TRACE_smpi_comm_in(my_proc_id, "action_scatter", new simgrid::instr::CollTIData(name, args.root, -1.0, args.send_size, args.recv_size,
-                                                                          Datatype::encode(args.datatype1),
-                                                                          Datatype::encode(args.datatype2)));
+  TRACE_smpi_comm_out(my_proc_id);
+}
 
-    Colls::scatter(send_buffer(args.send_size * args.datatype1->size()), args.send_size, args.datatype1,
-                  (rank == args.root) ? recv_buffer(args.recv_size * args.datatype2->size()) : nullptr, args.recv_size, args.datatype2, args.root, MPI_COMM_WORLD);
+void ScatterAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  int rank = MPI_COMM_WORLD->rank();
+  TRACE_smpi_comm_in(my_proc_id, "action_scatter", new simgrid::instr::CollTIData(name, args.root, -1.0, args.send_size, args.recv_size,
+        Datatype::encode(args.datatype1),
+        Datatype::encode(args.datatype2)));
 
-    TRACE_smpi_comm_out(my_proc_id);
-  }
+  Colls::scatter(send_buffer(args.send_size * args.datatype1->size()), args.send_size, args.datatype1,
+      (rank == args.root) ? recv_buffer(args.recv_size * args.datatype2->size()) : nullptr, args.recv_size, args.datatype2, args.root, MPI_COMM_WORLD);
 
-  void ScatterVAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    int rank = MPI_COMM_WORLD->rank();
-    TRACE_smpi_comm_in(my_proc_id, "action_scatterv", new simgrid::instr::VarCollTIData(name, args.root, -1, args.sendcounts, args.recv_size,
-          nullptr, Datatype::encode(args.datatype1),
-          Datatype::encode(args.datatype2)));
+  TRACE_smpi_comm_out(my_proc_id);
+}
 
-    Colls::scatterv((rank == args.root) ? send_buffer(args.send_size_sum * args.datatype1->size()) : nullptr,
-                    args.sendcounts->data(), args.disps.data(), args.datatype1,
-                    recv_buffer(args.recv_size * args.datatype2->size()), args.recv_size, args.datatype2, args.root,
-                    MPI_COMM_WORLD);
+void ScatterVAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  int rank = MPI_COMM_WORLD->rank();
+  TRACE_smpi_comm_in(my_proc_id, "action_scatterv", new simgrid::instr::VarCollTIData(name, args.root, -1, args.sendcounts, args.recv_size,
+        nullptr, Datatype::encode(args.datatype1),
+        Datatype::encode(args.datatype2)));
 
-    TRACE_smpi_comm_out(my_proc_id);
-  }
+  Colls::scatterv((rank == args.root) ? send_buffer(args.send_size_sum * args.datatype1->size()) : nullptr,
+      args.sendcounts->data(), args.disps.data(), args.datatype1,
+      recv_buffer(args.recv_size * args.datatype2->size()), args.recv_size, args.datatype2, args.root,
+      MPI_COMM_WORLD);
 
-  void ReduceScatterAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    TRACE_smpi_comm_in(my_proc_id, "action_reducescatter",
-                       new simgrid::instr::VarCollTIData("reduceScatter", -1, 0, nullptr, -1, args.recvcounts,
-                                                         std::to_string(args.comp_size), /* ugly hack to print comp_size */
-                                                         Datatype::encode(args.datatype1)));
+  TRACE_smpi_comm_out(my_proc_id);
+}
 
-    Colls::reduce_scatter(send_buffer(args.recv_size_sum * args.datatype1->size()),
-                          recv_buffer(args.recv_size_sum * args.datatype1->size()), args.recvcounts->data(),
-                          args.datatype1, MPI_OP_NULL, MPI_COMM_WORLD);
+void ReduceScatterAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  TRACE_smpi_comm_in(my_proc_id, "action_reducescatter",
+      new simgrid::instr::VarCollTIData("reducescatter", -1, 0, nullptr, -1, args.recvcounts,
+        std::to_string(args.comp_size), /* ugly hack to print comp_size */
+        Datatype::encode(args.datatype1)));
 
-    smpi_execute_flops(args.comp_size);
-    TRACE_smpi_comm_out(my_proc_id);
-  }
+  Colls::reduce_scatter(send_buffer(args.recv_size_sum * args.datatype1->size()),
+      recv_buffer(args.recv_size_sum * args.datatype1->size()), args.recvcounts->data(),
+      args.datatype1, MPI_OP_NULL, MPI_COMM_WORLD);
 
-  void AllToAllVAction::kernel(simgrid::xbt::ReplayAction& action)
-  {
-    TRACE_smpi_comm_in(my_proc_id, __func__,
-                       new simgrid::instr::VarCollTIData(
-                           "allToAllV", -1, args.send_size_sum, args.sendcounts, args.recv_size_sum, args.recvcounts,
-                           Datatype::encode(args.datatype1), Datatype::encode(args.datatype2)));
+  smpi_execute_flops(args.comp_size);
+  TRACE_smpi_comm_out(my_proc_id);
+}
 
-    Colls::alltoallv(send_buffer(args.send_buf_size * args.datatype1->size()), args.sendcounts->data(), args.senddisps.data(), args.datatype1,
-                     recv_buffer(args.recv_buf_size * args.datatype2->size()), args.recvcounts->data(), args.recvdisps.data(), args.datatype2, MPI_COMM_WORLD);
+void AllToAllVAction::kernel(simgrid::xbt::ReplayAction& action)
+{
+  TRACE_smpi_comm_in(my_proc_id, __func__,
+      new simgrid::instr::VarCollTIData(
+        "alltoallv", -1, args.send_size_sum, args.sendcounts, args.recv_size_sum, args.recvcounts,
+        Datatype::encode(args.datatype1), Datatype::encode(args.datatype2)));
 
-    TRACE_smpi_comm_out(my_proc_id);
-  }
+  Colls::alltoallv(send_buffer(args.send_buf_size * args.datatype1->size()), args.sendcounts->data(), args.senddisps.data(), args.datatype1,
+      recv_buffer(args.recv_buf_size * args.datatype2->size()), args.recvcounts->data(), args.recvdisps.data(), args.datatype2, MPI_COMM_WORLD);
+
+  TRACE_smpi_comm_out(my_proc_id);
+}
 } // Replay Namespace
 }} // namespace simgrid::smpi
 
-std::vector<simgrid::smpi::replay::RequestStorage> storage;
+static std::vector<simgrid::smpi::replay::RequestStorage> storage;
 /** @brief Only initialize the replay, don't do it for real */
 void smpi_replay_init(int* argc, char*** argv)
 {
@@ -731,25 +718,25 @@ void smpi_replay_init(int* argc, char*** argv)
   xbt_replay_action_register("comm_split",[](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::CommunicatorAction().execute(action); });
   xbt_replay_action_register("comm_dup",  [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::CommunicatorAction().execute(action); });
   xbt_replay_action_register("send",  [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::SendAction("send", storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
-  xbt_replay_action_register("Isend", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::SendAction("Isend", storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
+  xbt_replay_action_register("isend", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::SendAction("isend", storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
   xbt_replay_action_register("recv",  [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::RecvAction("recv", storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
-  xbt_replay_action_register("Irecv", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::RecvAction("Irecv", storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
+  xbt_replay_action_register("irecv", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::RecvAction("irecv", storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
   xbt_replay_action_register("test",  [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::TestAction(storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
   xbt_replay_action_register("wait",  [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::WaitAction(storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
-  xbt_replay_action_register("waitAll", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::WaitAllAction(storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
+  xbt_replay_action_register("waitall", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::WaitAllAction(storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
   xbt_replay_action_register("barrier", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::BarrierAction().execute(action); });
   xbt_replay_action_register("bcast",   [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::BcastAction().execute(action); });
   xbt_replay_action_register("reduce",  [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::ReduceAction().execute(action); });
-  xbt_replay_action_register("allReduce", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::AllReduceAction().execute(action); });
-  xbt_replay_action_register("allToAll", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::AllToAllAction().execute(action); });
-  xbt_replay_action_register("allToAllV", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::AllToAllVAction().execute(action); });
+  xbt_replay_action_register("allreduce", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::AllReduceAction().execute(action); });
+  xbt_replay_action_register("alltoall", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::AllToAllAction().execute(action); });
+  xbt_replay_action_register("alltoallv", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::AllToAllVAction().execute(action); });
   xbt_replay_action_register("gather",   [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::GatherAction("gather").execute(action); });
   xbt_replay_action_register("scatter",  [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::ScatterAction().execute(action); });
-  xbt_replay_action_register("gatherV",  [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::GatherVAction("gatherV").execute(action); });
-  xbt_replay_action_register("scatterV", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::ScatterVAction().execute(action); });
-  xbt_replay_action_register("allGather", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::GatherAction("allGather").execute(action); });
-  xbt_replay_action_register("allGatherV", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::GatherVAction("allGatherV").execute(action); });
-  xbt_replay_action_register("reduceScatter", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::ReduceScatterAction().execute(action); });
+  xbt_replay_action_register("gatherv",  [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::GatherVAction("gatherv").execute(action); });
+  xbt_replay_action_register("scatterv", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::ScatterVAction().execute(action); });
+  xbt_replay_action_register("allgather", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::GatherAction("allgather").execute(action); });
+  xbt_replay_action_register("allgatherv", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::GatherVAction("allgatherv").execute(action); });
+  xbt_replay_action_register("reducescatter", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::ReduceScatterAction().execute(action); });
   xbt_replay_action_register("compute", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::ComputeAction().execute(action); });
 
   //if we have a delayed start, sleep here.
index ff759eb..e3eed4d 100644 (file)
@@ -25,7 +25,7 @@ Group::Group()
   refcount_          = 1;       /* refcount_: start > 0 so that this group never gets freed */
 }
 
-Group::Group(int n) : size_(n), rank_to_actor_map_(size_, nullptr), rank_to_index_map_(size_, MPI_UNDEFINED), index_to_rank_map_(size_, MPI_UNDEFINED)
+Group::Group(int n) : size_(n), rank_to_actor_map_(size_, nullptr), index_to_rank_map_(size_, MPI_UNDEFINED)
 {
   refcount_ = 1;
 }
@@ -35,7 +35,7 @@ Group::Group(Group* origin)
   if (origin != MPI_GROUP_NULL && origin != MPI_GROUP_EMPTY) {
     size_              = origin->size();
     refcount_          = 1;
-    rank_to_index_map_ = origin->rank_to_index_map_;
+    // FIXME: cheinrich: There is no such thing as an index any more; the two maps should be removed
     index_to_rank_map_ = origin->index_to_rank_map_;
     rank_to_actor_map_ = origin->rank_to_actor_map_;
     actor_to_rank_map_ = origin->actor_to_rank_map_;
@@ -46,7 +46,6 @@ void Group::set_mapping(simgrid::s4u::ActorPtr actor, int rank)
 {
   if (0 <= rank && rank < size_) {
     int index                = actor->get_pid();
-    rank_to_index_map_[rank] = index;
     if (index != MPI_UNDEFINED) {
       if ((unsigned)index >= index_to_rank_map_.size())
         index_to_rank_map_.resize(index + 1, MPI_UNDEFINED);
index 4732410..10c3639 100644 (file)
@@ -680,7 +680,7 @@ void Request::iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status*
   // nsleeps is a multiplier to the sleeptime, to increase speed of execution, each failed iprobe will increase it
   // This can speed up the execution of certain applications by an order of magnitude, such as HPL
   static int nsleeps = 1;
-  double speed        = simgrid::s4u::Actor::self()->get_host()->getSpeed();
+  double speed        = simgrid::s4u::Actor::self()->get_host()->get_speed();
   double maxrate      = simgrid::config::get_value<double>("smpi/iprobe-cpu-usage");
   MPI_Request request = new Request(nullptr, 0, MPI_CHAR,
                                     source == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(source)->get_pid(),
@@ -737,6 +737,9 @@ void Request::finish_wait(MPI_Request* request, MPI_Status * status)
   if (req->cancelled_==1){
     if (status!=MPI_STATUS_IGNORE)
       status->cancelled=1;
+    if(req->detached_sender_ != nullptr)
+      unref(&(req->detached_sender_));
+    unref(request);
     return;
   }
 
index 0af62a7..1e6b88d 100755 (executable)
@@ -19,7 +19,7 @@ CMAKE_LINKARGS="-L@libdir@"
 list_set CXXFLAGS "-std=gnu++11"
 list_set LINKARGS "-std=gnu++11"
 if [ "@WIN32@" != "1" ]; then
-    # list_add CXXFLAGS "-Dmain=smpi_simulated_main_"
+    # list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_helpers.h"
     list_add CXXFLAGS "-fpic"
     if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
        list_add LINKARGS "-shared"
index 5623d6b..ef849d3 100644 (file)
@@ -32,13 +32,13 @@ void HostModel::ignore_empty_vm_in_pm_LMM()
     int active_tasks = cpu->get_constraint()->get_variable_amount();
 
     /* The impact of the VM over its PM is the min between its vCPU amount and the amount of tasks it contains */
-    int impact = std::min(active_tasks, ws_vm->getImpl()->get_core_amount());
+    int impact = std::min(active_tasks, ws_vm->get_impl()->get_core_amount());
 
     XBT_DEBUG("set the weight of the dummy CPU action of VM%p on PM to %d (#tasks: %d)", ws_vm, impact, active_tasks);
     if (impact > 0)
-      ws_vm->getImpl()->action_->set_priority(1. / impact);
+      ws_vm->get_impl()->action_->set_priority(1. / impact);
     else
-      ws_vm->getImpl()->action_->set_priority(0.);
+      ws_vm->get_impl()->action_->set_priority(0.);
   }
 }
 
index 204791f..6f50872 100644 (file)
@@ -64,7 +64,7 @@ public:
 class StorageImpl : public kernel::resource::Resource, public PropertyHolder {
 public:
   /** @brief Storage constructor */
-  StorageImpl(kernel::resource::Model* model, std::string name, kernel::lmm::System* maxminSystem, double bread,
+  StorageImpl(kernel::resource::Model* model, std::string name, kernel::lmm::System* maxmin_system, double bread,
               double bwrite, std::string type_id, std::string content_name, sg_size_t size, std::string attach);
 
   ~StorageImpl() override;
index 139c303..b67c8e6 100644 (file)
@@ -35,11 +35,11 @@ public:
 
 class CpuCas01 : public Cpu {
 public:
-  CpuCas01(CpuCas01Model *model, simgrid::s4u::Host *host, std::vector<double> *speedPerPstate, int core);
+  CpuCas01(CpuCas01Model* model, simgrid::s4u::Host* host, std::vector<double>* speed_per_pstate, int core);
   ~CpuCas01() override;
   void apply_event(tmgr_trace_event_t event, double value) override;
   CpuAction* execution_start(double size) override;
-  CpuAction* execution_start(double size, int requestedCore) override;
+  CpuAction* execution_start(double size, int requested_cores) override;
   CpuAction* sleep(double duration) override;
 
   bool is_used() override;
@@ -56,7 +56,7 @@ class CpuCas01Action: public CpuAction {
   friend CpuAction *CpuCas01::sleep(double duration);
 public:
   CpuCas01Action(kernel::resource::Model* model, double cost, bool failed, double speed,
-                 kernel::lmm::Constraint* constraint, int coreAmount);
+                 kernel::lmm::Constraint* constraint, int core_count);
   CpuCas01Action(kernel::resource::Model* model, double cost, bool failed, double speed,
                  kernel::lmm::Constraint* constraint);
   ~CpuCas01Action() override;
index ace74b4..0f1a3ab 100644 (file)
@@ -166,24 +166,26 @@ void CpuAction::update_remains_lazy(double now)
   set_last_value(get_variable()->get_value());
 }
 
-simgrid::xbt::signal<void(simgrid::surf::CpuAction*)> CpuAction::on_state_change;
+simgrid::xbt::signal<void(simgrid::surf::CpuAction*, kernel::resource::Action::State)> CpuAction::on_state_change;
 
 void CpuAction::suspend(){
-  on_state_change(this);
+  Action::State previous = get_state();
+  on_state_change(this, previous);
   Action::suspend();
 }
 
 void CpuAction::resume(){
-  on_state_change(this);
+  Action::State previous = get_state();
+  on_state_change(this, previous);
   Action::resume();
 }
 
 void CpuAction::set_state(Action::State state)
 {
+  Action::State previous = get_state();
   Action::set_state(state);
-  on_state_change(this);
+  on_state_change(this, previous);
 }
-
 /** @brief returns a list of all CPUs that this action is using */
 std::list<Cpu*> CpuAction::cpus() {
   std::list<Cpu*> retlist;
index 2d7fc3e..c9ce425 100644 (file)
@@ -36,7 +36,7 @@ public:
    * @param speedPerPstate Processor speed (in Flops) of each pstate. This ignores any potential external load coming from a trace.
    * @param core The number of core of this Cpu
    */
-  virtual Cpu* create_cpu(simgrid::s4u::Host* host, std::vector<double>* speedPerPstate, int core) = 0;
+  virtual Cpu* create_cpu(simgrid::s4u::Host* host, std::vector<double>* speed_per_pstate, int core) = 0;
 
   void update_actions_state_lazy(double now, double delta) override;
   void update_actions_state_full(double now, double delta) override;
@@ -92,7 +92,7 @@ public:
    * @param requestedCores The desired amount of cores. Must be >= 1
    * @return The CpuAction corresponding to the processing
    */
-  virtual simgrid::kernel::resource::Action* execution_start(double size, int requestedCores) = 0;
+  virtual simgrid::kernel::resource::Action* execution_start(double size, int requested_cores) = 0;
 
   /**
    * @brief Make a process sleep for duration (in seconds)
@@ -163,13 +163,13 @@ protected:
 class XBT_PUBLIC CpuAction : public simgrid::kernel::resource::Action {
 public:
   /** @brief Signal emitted when the action state changes (ready/running/done, etc)
-   *  Signature: `void(CpuAction *action)`
+   *  Signature: `void(CpuAction *action, simgrid::kernel::resource::Action::State previous)`
    */
-  static simgrid::xbt::signal<void(simgrid::surf::CpuAction*)> on_state_change;
+  static simgrid::xbt::signal<void(simgrid::surf::CpuAction*, simgrid::kernel::resource::Action::State)> on_state_change;
   /** @brief Signal emitted when the action share changes (amount of flops it gets)
    *  Signature: `void(CpuAction *action)`
    */
-  static simgrid::xbt::signal<void(simgrid::surf::CpuAction*)> onShareChange;
+  static simgrid::xbt::signal<void(simgrid::surf::CpuAction*)> on_share_change;
 
   CpuAction(simgrid::kernel::resource::Model * model, double cost, bool failed) : Action(model, cost, failed) {}
   CpuAction(simgrid::kernel::resource::Model * model, double cost, bool failed, kernel::lmm::Variable* var)
index 5751546..519e744 100644 (file)
@@ -51,7 +51,7 @@ enum trace_type {
 class CpuTiTmgr {
 public:
   CpuTiTmgr(trace_type type, double value) : type_(type), value_(value){};
-  CpuTiTmgr(tmgr_trace_t speedTrace, double value);
+  CpuTiTmgr(tmgr_trace_t speed_trace, double value);
   CpuTiTmgr(const CpuTiTmgr&) = delete;
   CpuTiTmgr& operator=(const CpuTiTmgr&) = delete;
   ~CpuTiTmgr();
@@ -113,7 +113,7 @@ public:
 
   bool is_used() override;
   CpuAction *execution_start(double size) override;
-  simgrid::kernel::resource::Action* execution_start(double size, int requestedCores) override
+  simgrid::kernel::resource::Action* execution_start(double size, int requested_cores) override
   {
     THROW_UNIMPLEMENTED;
     return nullptr;
index 4ee72d2..e334a3e 100644 (file)
@@ -84,7 +84,7 @@ void surf_network_model_init_Reno()
   if (surf_network_model)
     return;
 
-  using namespace simgrid::kernel;
+  namespace lmm = simgrid::kernel::lmm;
   lmm::Lagrange::set_default_protocol_function(lmm::func_reno_f, lmm::func_reno_fp, lmm::func_reno_fpi);
 
   simgrid::config::set_default<double>("network/latency-factor", 13.01);
@@ -101,7 +101,7 @@ void surf_network_model_init_Reno2()
   if (surf_network_model)
     return;
 
-  using namespace simgrid::kernel;
+  namespace lmm = simgrid::kernel::lmm;
   lmm::Lagrange::set_default_protocol_function(lmm::func_reno2_f, lmm::func_reno2_fp, lmm::func_reno2_fpi);
 
   simgrid::config::set_default<double>("network/latency-factor", 13.01);
@@ -117,7 +117,7 @@ void surf_network_model_init_Vegas()
   if (surf_network_model)
     return;
 
-  using namespace simgrid::kernel;
+  namespace lmm = simgrid::kernel::lmm;
   lmm::Lagrange::set_default_protocol_function(lmm::func_vegas_f, lmm::func_vegas_fp, lmm::func_vegas_fpi);
 
   simgrid::config::set_default<double>("network/latency-factor", 13.01);
index 15a1618..a35400c 100644 (file)
@@ -159,7 +159,7 @@ NetworkNS3Model::NetworkNS3Model() : NetworkModel(Model::UpdateAlgo::FULL)
 
   ns3_initialize(ns3_tcp_model.get().c_str());
 
-  simgrid::kernel::routing::NetPoint::onCreation.connect([](simgrid::kernel::routing::NetPoint* pt) {
+  simgrid::kernel::routing::NetPoint::on_creation.connect([](simgrid::kernel::routing::NetPoint* pt) {
     pt->extension_set<NetPointNs3>(new NetPointNs3());
     XBT_VERB("SimGrid's %s is known as node %d within NS3", pt->get_cname(), pt->extension<NetPointNs3>()->node_num);
   });
index 93ea87c..c7c496c 100644 (file)
@@ -24,13 +24,13 @@ public:
 };
 
 XBT_PUBLIC void ns3_initialize(std::string TcpProtocol);
-XBT_PUBLIC void ns3_simulator(double maxSeconds);
+XBT_PUBLIC void ns3_simulator(double max_seconds);
 XBT_PUBLIC void ns3_add_link(NetPointNs3* src, NetPointNs3* dst, double bw, double lat);
 XBT_PUBLIC void ns3_add_cluster(const char* id, double bw, double lat);
 
 class XBT_PRIVATE SgFlow {
 public:
-  SgFlow(uint32_t totalBytes, simgrid::kernel::resource::NetworkNS3Action* action);
+  SgFlow(uint32_t total_bytes, simgrid::kernel::resource::NetworkNS3Action* action);
 
   // private:
   std::uint32_t bufferedBytes_ = 0;
@@ -43,10 +43,10 @@ public:
 
 void StartFlow(ns3::Ptr<ns3::Socket> sock, const char* to, uint16_t port_number);
 
-static inline std::string transformSocketPtr(ns3::Ptr<ns3::Socket> localSocket)
+static inline std::string transformSocketPtr(ns3::Ptr<ns3::Socket> local_socket)
 {
   std::stringstream sstream;
-  sstream << localSocket;
+  sstream << local_socket;
   return sstream.str();
 }
 
index 149b22e..09e4043 100644 (file)
@@ -76,7 +76,7 @@ public:
   bool is_used() override;
   void apply_event(tmgr_trace_event_t event, double value) override;
   kernel::resource::Action* execution_start(double size) override;
-  simgrid::kernel::resource::Action* execution_start(double size, int requestedCores) override
+  simgrid::kernel::resource::Action* execution_start(double size, int requested_cores) override
   {
     THROW_UNIMPLEMENTED;
     return nullptr;
index 24def5e..f521fd9 100644 (file)
@@ -54,8 +54,8 @@ void sg_platf_init()
 
 /** Module management function: frees all internal data structures */
 void sg_platf_exit() {
-  simgrid::surf::on_cluster.disconnectSlots();
-  simgrid::s4u::on_platform_created.disconnectSlots();
+  simgrid::surf::on_cluster.disconnect_slots();
+  simgrid::s4u::on_platform_created.disconnect_slots();
 
   /* make sure that we will reinit the models while loading the platf once reinited */
   surf_parse_models_setup_already_called = 0;
@@ -484,7 +484,7 @@ void sg_platf_new_peer(simgrid::kernel::routing::PeerCreationArgs* peer)
   speedPerPstate.push_back(peer->speed);
   simgrid::s4u::Host* host = as->create_host(peer->id.c_str(), &speedPerPstate, 1, nullptr);
 
-  as->setPeerLink(host->pimpl_netpoint, peer->bw_in, peer->bw_out, peer->coord);
+  as->set_peer_link(host->pimpl_netpoint, peer->bw_in, peer->bw_out, peer->coord);
 
   /* Change from the defaults */
   if (peer->state_trace)
@@ -542,7 +542,7 @@ static void surf_config_models_setup()
  *
  * @param zone the parameters defining the Zone to build.
  */
-simgrid::s4u::NetZone* sg_platf_new_Zone_begin(simgrid::kernel::routing::ZoneCreationArgs* zone)
+simgrid::kernel::routing::NetZoneImpl* sg_platf_new_Zone_begin(simgrid::kernel::routing::ZoneCreationArgs* zone)
 {
   if (not surf_parse_models_setup_already_called) {
     simgrid::s4u::on_platform_creation();
@@ -600,18 +600,18 @@ simgrid::s4u::NetZone* sg_platf_new_Zone_begin(simgrid::kernel::routing::ZoneCre
   }
 
   if (current_routing == nullptr) { /* it is the first one */
-    simgrid::s4u::Engine::get_instance()->set_netzone_root(new_zone);
+    simgrid::s4u::Engine::get_instance()->set_netzone_root(new_zone->get_iface());
   } else {
     /* set the father behavior */
     if (current_routing->hierarchy_ == simgrid::kernel::routing::NetZoneImpl::RoutingMode::unset)
       current_routing->hierarchy_ = simgrid::kernel::routing::NetZoneImpl::RoutingMode::recursive;
     /* add to the sons dictionary */
-    current_routing->get_children()->push_back(static_cast<simgrid::s4u::NetZone*>(new_zone));
+    current_routing->get_children()->push_back(new_zone);
   }
 
   /* set the new current component of the tree */
   current_routing = new_zone;
-  simgrid::s4u::NetZone::on_creation(*new_zone); // notify the signal
+  simgrid::s4u::NetZone::on_creation(*new_zone->get_iface()); // notify the signal
 
   return new_zone;
 }
@@ -626,7 +626,7 @@ void sg_platf_new_Zone_seal()
 {
   xbt_assert(current_routing, "Cannot seal the current AS: none under construction");
   current_routing->seal();
-  simgrid::s4u::NetZone::on_seal(*current_routing);
+  simgrid::s4u::NetZone::on_seal(*current_routing->get_iface());
   current_routing = static_cast<simgrid::kernel::routing::NetZoneImpl*>(current_routing->get_father());
 }
 
index 8ae587d..0f24ff8 100644 (file)
@@ -185,7 +185,8 @@ public:
 void routing_cluster_add_backbone(simgrid::kernel::resource::LinkImpl* bb);
 /*** END of the parsing cruft ***/
 
-XBT_PUBLIC simgrid::s4u::NetZone* sg_platf_new_Zone_begin(simgrid::kernel::routing::ZoneCreationArgs* zone); // Begin description of new Zone
+XBT_PUBLIC simgrid::kernel::routing::NetZoneImpl*
+sg_platf_new_Zone_begin(simgrid::kernel::routing::ZoneCreationArgs* zone);         // Begin description of new Zone
 XBT_PUBLIC void sg_platf_new_Zone_seal();                                          // That Zone is fully described
 
 XBT_PUBLIC void sg_platf_new_host(simgrid::kernel::routing::HostCreationArgs* host);      // Add a host      to the current Zone
index 377992a..a601827 100644 (file)
@@ -8,6 +8,7 @@
 #include "xbt/automaton.h"
 #include <stdio.h> /* printf */
 #include <xbt/log.h>
+#include <xbt/sysdep.h>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_automaton, xbt, "Automaton");
 
index 4b6061f..098d85e 100644 (file)
@@ -511,7 +511,7 @@ char *xbt_automaton_parser_text;
  * under the terms of the license (GNU LGPL) which comes with this package. */
 #line 10 "parserPromela.lex"
 
-#include "simgrid_config.h"
+#include "simgrid/config.h"
 #if !HAVE_UNISTD_H
 #define YY_NO_UNISTD_H /* hello Windows */
 #endif
index 6f59cb4..9bc4586 100644 (file)
@@ -13,6 +13,7 @@
 # include <unistd.h>   /* isatty */
 #endif
 #include <xbt/log.h>
+#include <xbt/sysdep.h>
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(xbt_automaton);
 
index 5107d1b..956ba7e 100644 (file)
@@ -8,7 +8,7 @@
 
 %{
 
-#include "simgrid_config.h"
+#include "simgrid/config.h"
 #if !HAVE_UNISTD_H
 #define YY_NO_UNISTD_H /* hello Windows */
 #endif
index 52a2cea..f721f97 100644 (file)
@@ -72,7 +72,7 @@
 /* Copy the first part of user declarations.  */
 #line 7 "parserPromela.yacc" /* yacc.c:339  */
 
-#include "simgrid_config.h"
+#include "simgrid/config.h"
 #if !HAVE_UNISTD_H
 #define YY_NO_UNISTD_H /* hello Windows */
 #endif
index 2499e83..cfbc046 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 %{
-#include "simgrid_config.h"
+#include "simgrid/config.h"
 #if !HAVE_UNISTD_H
 #define YY_NO_UNISTD_H /* hello Windows */
 #endif
index c05076a..0fc1168 100644 (file)
@@ -32,7 +32,7 @@ static bool startWith(std::string str, const char* prefix)
 void xbt_backtrace_display(xbt_backtrace_location_t* loc, std::size_t count)
 {
 #ifdef HAVE_BACKTRACE
-  std::vector<std::string> backtrace = simgrid::xbt::resolveBacktrace(loc, count);
+  std::vector<std::string> backtrace = simgrid::xbt::resolve_backtrace(loc, count);
   if (backtrace.empty()) {
     fprintf(stderr, "(backtrace not set)\n");
     return;
index 655a4c2..95bf87a 100644 (file)
@@ -23,8 +23,12 @@ int xbt_backtrace_no_malloc(void **array, int size) {
 namespace simgrid {
 namespace xbt {
 
-std::vector<std::string> resolveBacktrace(
-  xbt_backtrace_location_t const* loc, std::size_t count)
+std::vector<std::string> resolveBacktrace(xbt_backtrace_location_t const* loc, std::size_t count) // deprecated
+{
+  return resolve_backtrace(loc, count);
+}
+
+std::vector<std::string> resolve_backtrace(xbt_backtrace_location_t const* loc, std::size_t count)
 {
   return std::vector<std::string>();
 }
index 5df45b9..3c8ecb3 100644 (file)
@@ -136,10 +136,14 @@ static std::string get_binary_path()
   return "";
 }
 
+std::vector<std::string> resolveBacktrace(xbt_backtrace_location_t const* loc, std::size_t count) // deprecated
+{
+  return resolve_backtrace(loc, count);
+}
+
 //FIXME: This code could be greatly improved/simplifyied with
 //   http://cairo.sourcearchive.com/documentation/1.9.4/backtrace-symbols_8c-source.html
-std::vector<std::string> resolveBacktrace(
-  xbt_backtrace_location_t const* loc, std::size_t count)
+std::vector<std::string> resolve_backtrace(xbt_backtrace_location_t const* loc, std::size_t count)
 {
   std::vector<std::string> result;
 
index f6d6ee0..95b4d95 100644 (file)
@@ -581,7 +581,8 @@ void _xbt_test_fail(const char *file, int line, const char *fmt, ...)
 
 void xbt_test_exception(xbt_ex_t e)
 {
-  _xbt_test_fail(e.throwPoint().file, e.throwPoint().line, "Exception %s raised: %s", xbt_ex_catname(e.category), e.what());
+  _xbt_test_fail(e.throw_point().file, e.throw_point().line, "Exception %s raised: %s", xbt_ex_catname(e.category),
+                 e.what());
 }
 
 void xbt_test_expect_failure()
index d4c7af3..ce4cc7b 100644 (file)
@@ -246,12 +246,6 @@ char *xbt_dict_get_key(xbt_dict_t dict, const void *data)
   return nullptr;
 }
 
-/** @brief retrieve the key associated to that xbt_dictelm_t. */
-char *xbt_dict_get_elm_key(xbt_dictelm_t elm)
-{
-  return elm->key;
-}
-
 /**
  * \brief Retrieve data from the dict (null-terminated key)
  *
@@ -394,12 +388,6 @@ int xbt_dict_length(xbt_dict_t dict)
   return dict->count;
 }
 
-/** @brief function to be used in xbt_dict_dump as long as the stored values are strings */
-void xbt_dict_dump_output_string(void *s)
-{
-  fputs((char*) s, stdout);
-}
-
 /**
  * \brief test if the dict is empty or not
  */
@@ -442,63 +430,6 @@ void xbt_dict_dump(xbt_dict_t dict, void_f_pvoid_t output)
   }
 }
 
-xbt_dynar_t all_sizes = nullptr;
-/** @brief shows some debugging info about the bucklet repartition */
-void xbt_dict_dump_sizes(xbt_dict_t dict)
-{
-  unsigned int count;
-  unsigned int size;
-
-  printf("Dict %p: %d bucklets, %d used cells (of %d) ", dict, dict->count, dict->fill, dict->table_size);
-
-  if (not dict) {
-    printf("\n");
-    return;
-  }
-  xbt_dynar_t sizes = xbt_dynar_new(sizeof(int), nullptr);
-
-  for (int i = 0; i < dict->table_size; i++) {
-    xbt_dictelm_t element = dict->table[i];
-    size = 0;
-    if (element) {
-      while (element != nullptr) {
-        size++;
-        element = element->next;
-      }
-    }
-    if (xbt_dynar_length(sizes) <= size) {
-      int prevsize = 1;
-      xbt_dynar_set(sizes, size, &prevsize);
-    } else {
-      int prevsize;
-      xbt_dynar_get_cpy(sizes, size, &prevsize);
-      prevsize++;
-      xbt_dynar_set(sizes, size, &prevsize);
-    }
-  }
-  if (not all_sizes)
-    all_sizes = xbt_dynar_new(sizeof(int), nullptr);
-
-  xbt_dynar_foreach(sizes, count, size) {
-    /* Copy values of this one into all_sizes */
-    int prevcount;
-    if (xbt_dynar_length(all_sizes) <= count) {
-      prevcount = size;
-      xbt_dynar_set(all_sizes, count, &prevcount);
-    } else {
-      xbt_dynar_get_cpy(all_sizes, count, &prevcount);
-      prevcount += size;
-      xbt_dynar_set(all_sizes, count, &prevcount);
-    }
-
-    /* Report current sizes */
-    if (count != 0 && size != 0)
-      printf("%uelm x %u cells; ", count, size);
-  }
-  printf("\n");
-  xbt_dynar_free(&sizes);
-}
-
 /**
  * Create the dict mallocators.
  * This is an internal XBT function called during the lib initialization.
@@ -521,24 +452,6 @@ void xbt_dict_postexit()
     xbt_mallocator_free(dict_elm_mallocator);
     dict_elm_mallocator = nullptr;
   }
-  if (all_sizes) {
-    unsigned int count;
-    int size;
-    double avg = 0;
-    int total_count = 0;
-    printf("Overall stats:");
-    xbt_dynar_foreach(all_sizes, count, size) {
-      if (count != 0 && size != 0) {
-        printf("%uelm x %d cells; ", count, size);
-        avg += count * size;
-        total_count += size;
-      }
-    }
-    if (total_count > 0)
-      printf("; %f elm per cell\n", avg / (double)total_count);
-    else
-      printf("; 0 elm per cell\n");
-  }
 }
 
 #ifdef SIMGRID_TEST
index f6b6a3d..b528645 100644 (file)
@@ -164,15 +164,3 @@ inline void *xbt_dict_cursor_get_data(xbt_dict_cursor_t cursor)
 
   return cursor->current->content;
 }
-
-/**
- * @brief Set current data
- * @param cursor the cursor
- * @param data the new data
- * @param free_ctn unused parameter (kept for compatibility)
- */
-inline void xbt_dict_cursor_set_data(xbt_dict_cursor_t cursor, void* data, XBT_ATTRIB_UNUSED void_f_pvoid_t free_ctn)
-{
-  __cursor_not_null(cursor);
-  xbt_dictelm_set_data(cursor->dict, cursor->current, data);
-}
index add5c21..ac0b6de 100644 (file)
@@ -40,7 +40,7 @@ void _xbt_throw(char* message, xbt_errcat_t errcat, int value, const char* file,
 /** @brief shows an exception content and the associated stack if available */
 void xbt_ex_display(xbt_ex_t * e)
 {
-  simgrid::xbt::logException(xbt_log_priority_critical, "UNCAUGHT EXCEPTION", *e);
+  simgrid::xbt::log_exception(xbt_log_priority_critical, "UNCAUGHT EXCEPTION", *e);
 }
 
 /** \brief returns a short name for the given exception category */
index dd91449..9d5ad43 100644 (file)
@@ -28,26 +28,22 @@ namespace xbt {
 
 WithContextException::~WithContextException() = default;
 
-void logException(
-  e_xbt_log_priority_t prio,
-  const char* context, std::exception const& exception)
+void log_exception(e_xbt_log_priority_t prio, const char* context, std::exception const& exception)
 {
   try {
     auto name = simgrid::xbt::demangle(typeid(exception).name());
 
     auto* with_context = dynamic_cast<const simgrid::xbt::WithContextException*>(&exception);
     if (with_context != nullptr)
-      XBT_LOG(prio, "%s %s by %s/%d: %s",
-        context, name.get(),
-        with_context->processName().c_str(), with_context->pid(),
-        exception.what());
+      XBT_LOG(prio, "%s %s by %s/%d: %s", context, name.get(), with_context->process_name().c_str(),
+              with_context->pid(), exception.what());
     else
       XBT_LOG(prio, "%s %s: %s", context, name.get(), exception.what());
 
     // Do we have a backtrace?
     if (with_context != nullptr && not simgrid::config::get_value<bool>("exception/cutpath")) {
-      auto backtrace = simgrid::xbt::resolveBacktrace(
-        with_context->backtrace().data(), with_context->backtrace().size());
+      auto backtrace =
+          simgrid::xbt::resolve_backtrace(with_context->backtrace().data(), with_context->backtrace().size());
       for (std::string const& s : backtrace)
         XBT_LOG(prio, "  -> %s", s.c_str());
     }
@@ -60,7 +56,7 @@ void logException(
       with_nested->rethrow_nested();
     }
     catch (std::exception& nested_exception) {
-      logException(prio, "Caused by", nested_exception);
+      log_exception(prio, "Caused by", nested_exception);
     }
     // We could catch nested_exception or WithContextException but we don't bother:
     catch (...) {
@@ -78,7 +74,7 @@ static void showBacktrace(std::vector<xbt_backtrace_location_t>& bt)
     XBT_LOG(xbt_log_priority_critical, "Display of current backtrace disabled by --cfg=exception/cutpath.");
     return;
   }
-  std::vector<std::string> res = resolveBacktrace(&bt[0], bt.size());
+  std::vector<std::string> res = resolve_backtrace(&bt[0], bt.size());
   XBT_LOG(xbt_log_priority_critical, "Current backtrace:");
   for (std::string const& s : res)
     XBT_LOG(xbt_log_priority_critical, "  -> %s", s.c_str());
@@ -105,7 +101,7 @@ static void handler()
 
   // We manage C++ exception ourselves
   catch (std::exception& e) {
-    logException(xbt_log_priority_critical, "Uncaught exception", e);
+    log_exception(xbt_log_priority_critical, "Uncaught exception", e);
     showBacktrace(bt);
     std::abort();
   }
@@ -124,13 +120,22 @@ static void handler()
 
 }
 
-void installExceptionHandler()
+void install_exception_handler()
 {
   static std::once_flag handler_flag;
   std::call_once(handler_flag, [] {
     previous_terminate_handler = std::set_terminate(handler);
   });
 }
-
+// deprecated
+void logException(e_xbt_log_priority_t priority, const char* context, std::exception const& exception)
+{
+  log_exception(priority, context, exception);
 }
+void installExceptionHandler()
+{
+  install_exception_handler();
+}
+
+} // namespace xbt
 }
index df50495..753eda8 100644 (file)
@@ -69,11 +69,9 @@ void *mrealloc(xbt_mheap_t mdp, void *ptr, size_t size)
     if (size <= BLOCKSIZE / 2) { // Full block -> Fragment; no need to optimize for time
 
       result = mmalloc(mdp, size);
-      if (result != NULL) { // useless (mmalloc never returns NULL), but harmless
-        memcpy(result, ptr, requested_size);
-        mfree(mdp, ptr);
-        return (result);
-      }
+      memcpy(result, ptr, requested_size);
+      mfree(mdp, ptr);
+      return (result);
     }
 
     /* Full blocks -> Full blocks; see if we can hold it in place. */
index b8a553b..a3d6559 100644 (file)
@@ -1,17 +1,15 @@
-/* Copyright (c) 2015-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2015-2018. 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 <cstdarg>
-#include <cstdio>
-
-#include <simgrid_config.h>
-
+#include <simgrid/config.h>
 #include <xbt/string.hpp>
 #include <xbt/sysdep.h>
 
+#include <cstdarg>
+#include <cstdio>
+
 namespace simgrid {
 namespace xbt {
 
index 3faed87..5cb3298 100644 (file)
@@ -7,22 +7,19 @@
 
 #define XBT_LOG_LOCALLY_DEFINE_XBT_CHANNEL /* MSVC don't want it to be declared extern in headers and local here */
 
-#include "simgrid_config.h"
+#include "simgrid/config.h"
+#include "simgrid/sg_config.hpp"
+#include "src/internal_config.h"
+#include "src/xbt_modinter.h" /* prototype of other module's init/exit in XBT */
 #include "xbt/config.hpp"
 #include "xbt/dynar.h"
 #include "xbt/log.h"
 #include "xbt/log.hpp"
 #include "xbt/misc.h"
+#include "xbt/module.h" /* this module */
 #include "xbt/sysdep.h"
-#include <cmath>
-
-#include "xbt/module.h"         /* this module */
-
-#include "src/xbt_modinter.h"       /* prototype of other module's init/exit in XBT */
 
-#include "simgrid/sg_config.hpp"
-
-#include "src/internal_config.h"
+#include <cmath>
 #include <cstdio>
 #ifdef _WIN32
 # include <csignal> /* To silence MSVC on abort() */
@@ -122,7 +119,7 @@ static void xbt_postexit()
 /** @brief Initialize the xbt mechanisms. */
 void xbt_init(int *argc, char **argv)
 {
-  simgrid::xbt::installExceptionHandler();
+  simgrid::xbt::install_exception_handler();
 
   xbt_initialized++;
   if (xbt_initialized > 1) {
index da1efbb..bf6d4b4 100644 (file)
@@ -11,7 +11,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_cloud_interrupt_migration, "Messages specific f
 
 static void vm_migrate(simgrid::s4u::VirtualMachine* vm, simgrid::s4u::Host* dst_pm)
 {
-  simgrid::s4u::Host* src_pm = vm->getPm();
+  simgrid::s4u::Host* src_pm = vm->get_pm();
   double mig_sta             = simgrid::s4u::Engine::get_clock();
   sg_vm_migrate(vm, dst_pm);
   double mig_end = simgrid::s4u::Engine::get_clock();
@@ -30,7 +30,7 @@ static void master_main()
   simgrid::s4u::Host* pm1 = simgrid::s4u::Host::by_name("Tremblay");
 
   simgrid::s4u::VirtualMachine* vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
-  vm0->setRamsize(1e9); // 1Gbytes
+  vm0->set_ramsize(1e9); // 1Gbytes
   vm0->start();
 
   XBT_INFO("Start the migration of %s from %s to %s", vm0->get_cname(), pm0->get_cname(), pm1->get_cname());
index 648e9a2..76b4fef 100644 (file)
@@ -16,8 +16,6 @@
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example");
 
-using namespace simgrid::s4u;
-
 static void usage(const char* binaryName, const char* defaultSend, const char* defaultRecv)
 {
   std::fprintf(stderr, "Usage: %s examples/platforms/cluster.xml <send_spec> <recv_spec>\n"
@@ -49,7 +47,7 @@ static void sender(std::vector<std::string> args)
 {
   XBT_INFO("Sender spec: %s", args[0].c_str());
   for (unsigned int test = 1; test <= args[0].size(); test++) {
-    this_actor::sleep_until(test * 5 - 5);
+    simgrid::s4u::this_actor::sleep_until(test * 5 - 5);
     std::string* mboxName         = new std::string("Test #" + std::to_string(test));
     simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::by_name(mboxName->c_str());
 
@@ -96,7 +94,7 @@ static void receiver(std::vector<std::string> args)
 {
   XBT_INFO("Receiver spec: %s", args[0].c_str());
   for (unsigned int test = 1; test <= args[0].size(); test++) {
-    this_actor::sleep_until(test * 5 - 5);
+    simgrid::s4u::this_actor::sleep_until(test * 5 - 5);
     std::string mboxName          = "Test #" + std::to_string(test);
     simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::by_name(mboxName.c_str());
     void* received                = nullptr;
@@ -123,24 +121,24 @@ static void receiver(std::vector<std::string> args)
         break;
       case 'p':
         XBT_INFO("Test %u: p (regular receive on permanent mailbox)", test);
-        mbox->set_receiver(Actor::self());
+        mbox->set_receiver(simgrid::s4u::Actor::self());
         received = mbox->get();
         break;
       case 'P':
         XBT_INFO("Test %u: P (sleep + regular receive on permanent mailbox)", test);
         simgrid::s4u::this_actor::sleep_for(0.5);
-        mbox->set_receiver(Actor::self());
+        mbox->set_receiver(simgrid::s4u::Actor::self());
         received = mbox->get();
         break;
       case 'j':
         XBT_INFO("Test %u: j (irecv on permanent mailbox)", test);
-        mbox->set_receiver(Actor::self());
+        mbox->set_receiver(simgrid::s4u::Actor::self());
         mbox->get_async(&received)->wait();
         break;
       case 'J':
         XBT_INFO("Test %u: J (sleep + irecv on permanent mailbox)", test);
         simgrid::s4u::this_actor::sleep_for(0.5);
-        mbox->set_receiver(Actor::self());
+        mbox->set_receiver(simgrid::s4u::Actor::self());
         mbox->get_async(&received)->wait();
         break;
       default:
index d2ed8fe..26c3404 100644 (file)
@@ -103,7 +103,7 @@ static void storage_info(simgrid::s4u::Host* host)
 {
   XBT_INFO("*** Storage info on %s ***", host->get_cname());
 
-  for (auto const& elm : host->getMountedStorages()) {
+  for (auto const& elm : host->get_mounted_storages()) {
     const std::string& mount_name  = elm.first;
     simgrid::s4u::Storage* storage = elm.second;
     XBT_INFO("\tStorage name: %s, mount name: %s", storage->get_cname(), mount_name.c_str());
index 8e9ffc4..497861e 100644 (file)
@@ -38,17 +38,17 @@ static int master(int argc, char* argv[])
   XBT_INFO("kernel, returned");
 
   // Synchronize on a successful Future<void>:
-  simgrid::simix::kernelSync([] {
+  simgrid::simix::kernel_sync([] {
     return kernel_wait_until(10).then([](simgrid::kernel::Future<void> future) {
       future.get();
-      XBT_INFO("kernelSync with void");
+      XBT_INFO("kernel_sync with void");
     });
   });
-  XBT_INFO("kernelSync with void, returned");
+  XBT_INFO("kernel_sync with void, returned");
 
   // Synchronize on a failing Future<void>:
   try {
-    simgrid::simix::kernelSync([] {
+    simgrid::simix::kernel_sync([] {
       return kernel_wait_until(20).then([](simgrid::kernel::Future<void> future) {
         future.get();
         throw example::exception("Exception throwed from kernel_defer");
@@ -60,31 +60,31 @@ static int master(int argc, char* argv[])
   }
 
   // Synchronize on a successul Future<int> and get the value:
-  int res = simgrid::simix::kernelSync([] {
+  int res = simgrid::simix::kernel_sync([] {
     return kernel_wait_until(30).then([](simgrid::kernel::Future<void> future) {
       future.get();
-      XBT_INFO("kernelSync with value");
+      XBT_INFO("kernel_sync with value");
       return 42;
     });
   });
-  XBT_INFO("kernelSync with value returned with %i", res);
+  XBT_INFO("kernel_sync with value returned with %i", res);
 
   // Synchronize on a successul Future<int> and get the value:
-  simgrid::simix::Future<int> future = simgrid::simix::kernelAsync([] {
+  simgrid::simix::Future<int> future = simgrid::simix::kernel_async([] {
     return kernel_wait_until(50).then([](simgrid::kernel::Future<void> future) {
       future.get();
-      XBT_INFO("kernelAsync with value");
+      XBT_INFO("kernel_async with value");
       return 43;
     });
   });
   res = future.get();
-  XBT_INFO("kernelAsync with value returned with %i", res);
+  XBT_INFO("kernel_async with value returned with %i", res);
 
   // Synchronize on a successul Future<int> and get the value:
-  future = simgrid::simix::kernelAsync([] {
+  future = simgrid::simix::kernel_async([] {
     return kernel_wait_until(60).then([](simgrid::kernel::Future<void> future) {
       future.get();
-      XBT_INFO("kernelAsync with value");
+      XBT_INFO("kernel_async with value");
       return 43;
     });
   });
@@ -92,7 +92,7 @@ static int master(int argc, char* argv[])
   future.wait();
   XBT_INFO("The future is %s", future.is_ready() ? "ready" : "not ready");
   res = future.get();
-  XBT_INFO("kernelAsync with value returned with %i", res);
+  XBT_INFO("kernel_async with value returned with %i", res);
 
   return 0;
 }
index f168c68..0cbed1d 100644 (file)
@@ -2,14 +2,14 @@ $ ${bindir:=.}/generic-simcalls --cfg=contexts/stack-size:96 ${srcdir:=.}/exampl
 > [Tremblay:master:(1) 0.000000] [test/INFO] Start
 > [0.000000] [test/INFO] kernel
 > [Tremblay:master:(1) 0.000000] [test/INFO] kernel, returned
-> [10.000000] [test/INFO] kernelSync with void
-> [Tremblay:master:(1) 10.000000] [test/INFO] kernelSync with void, returned
+> [10.000000] [test/INFO] kernel_sync with void
+> [Tremblay:master:(1) 10.000000] [test/INFO] kernel_sync with void, returned
 > [Tremblay:master:(1) 20.000000] [test/INFO] Exception caught: Exception throwed from kernel_defer
-> [30.000000] [test/INFO] kernelSync with value
-> [Tremblay:master:(1) 30.000000] [test/INFO] kernelSync with value returned with 42
-> [50.000000] [test/INFO] kernelAsync with value
-> [Tremblay:master:(1) 50.000000] [test/INFO] kernelAsync with value returned with 43
+> [30.000000] [test/INFO] kernel_sync with value
+> [Tremblay:master:(1) 30.000000] [test/INFO] kernel_sync with value returned with 42
+> [50.000000] [test/INFO] kernel_async with value
+> [Tremblay:master:(1) 50.000000] [test/INFO] kernel_async with value returned with 43
 > [Tremblay:master:(1) 50.000000] [test/INFO] The future is not ready
-> [60.000000] [test/INFO] kernelAsync with value
+> [60.000000] [test/INFO] kernel_async with value
 > [Tremblay:master:(1) 60.000000] [test/INFO] The future is ready
-> [Tremblay:master:(1) 60.000000] [test/INFO] kernelAsync with value returned with 43
\ No newline at end of file
+> [Tremblay:master:(1) 60.000000] [test/INFO] kernel_async with value returned with 43
\ No newline at end of file
index 341e150..18ac176 100644 (file)
@@ -12,9 +12,6 @@ if(enable_smpi)
     add_executable       (${x}  ${x}/${x}.c)
     target_link_libraries(${x}  simgrid)
     set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
-
-    set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
-    set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
   endforeach()
 
   if(NOT WIN32)
@@ -22,13 +19,18 @@ if(enable_smpi)
       add_executable       (${x}  ${x}/${x}.c)
       target_link_libraries(${x}  simgrid)
       set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
-
-      set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
-      set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
     endforeach()
   endif()
 endif()
 
+foreach(x coll-allgather coll-allgatherv coll-allreduce coll-alltoall coll-alltoallv coll-barrier coll-bcast
+    coll-gather coll-reduce coll-reduce-scatter coll-scatter macro-sample pt2pt-dsend pt2pt-pingpong
+    type-hvector type-indexed type-struct type-vector bug-17132 timers privatization
+    macro-shared macro-partial-shared macro-partial-shared-communication)
+  set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
+  set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
+endforeach()
+
 set (teshsuite_src ${teshsuite_src} PARENT_SCOPE)
 set(tesh_files    ${tesh_files}     ${CMAKE_CURRENT_SOURCE_DIR}/coll-allreduce/coll-allreduce-large.tesh
                                     ${CMAKE_CURRENT_SOURCE_DIR}/coll-allreduce/coll-allreduce-automatic.tesh
index 7325d85..d843420 100644 (file)
@@ -16,11 +16,18 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
     add_executable(${file} ${file}.c)
     target_link_libraries(${file} simgrid mtest_c)
   endforeach()
-endif()
 
-if (enable_smpi_MPICH3_testsuite AND HAVE_RAW_CONTEXTS)
-  ADD_TEST(test-smpi-mpich3-pt2pt-raw      ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/pt2pt ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests ${TESH_OPTION} -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/pt2pt -tests=testlist -execarg=--cfg=contexts/factory:raw)
-  SET_TESTS_PROPERTIES(test-smpi-mpich3-pt2pt-raw PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
+  if(HAVE_RAW_CONTEXTS AND (NOT enable_memcheck) AND (NOT enable_address_sanitizer) AND (NOT enable_undefined_sanitizer) AND (NOT enable_thread_sanitizer))
+    set(facto "--cfg=contexts/factory:raw")
+    set(name raw)
+  else()
+    set(facto "--cfg=contexts/factory:thread")
+    set(name thread)
+  endif()
+  ADD_TEST(test-smpi-mpich3-pt2pt-${name}      ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/pt2pt ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests ${TESH_OPTION} -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/pt2pt -tests=testlist -execarg=${facto} )
+  SET_TESTS_PROPERTIES(test-smpi-mpich3-pt2pt-${name} PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
+  unset(facto)
+  unset(name)
 endif()
 
 foreach(file anyall bottom eagerdt huge_anysrc huge_underflow inactivereq isendself isendirecv isendselfprobe issendselfcancel pingping probenull
index 8b2d01c..c66a43c 100644 (file)
@@ -16,7 +16,7 @@
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");
 
-using namespace simgrid::kernel;
+namespace lmm = simgrid::kernel::lmm;
 
 #define PRINT_VAR(var) XBT_DEBUG(#var " = %g", (var)->get_value())
 #define SHOW_EXPR(expr) XBT_DEBUG(#expr " = %g",expr)
index 5175990..da990b1 100644 (file)
@@ -17,8 +17,6 @@
 #include <cstdio>
 #include <cstdlib>
 
-using namespace simgrid::kernel;
-
 double date;
 int64_t seedx = 0;
 
@@ -40,12 +38,12 @@ static unsigned int int_random(int max)
 static void test(int nb_cnst, int nb_var, int nb_elem, unsigned int pw_base_limit, unsigned int pw_max_limit,
                  float rate_no_limit, int max_share, int mode)
 {
-  lmm::Constraint* cnst[nb_cnst];
-  lmm::Variable* var[nb_var];
+  simgrid::kernel::lmm::Constraint* cnst[nb_cnst];
+  simgrid::kernel::lmm::Variable* var[nb_var];
   int used[nb_cnst];
 
   /* We cannot activate the selective update as we pass nullptr as an Action when creating the variables */
-  lmm::System* Sys = new lmm::System(false);
+  simgrid::kernel::lmm::System* Sys = new simgrid::kernel::lmm::System(false);
 
   for (int i = 0; i < nb_cnst; i++) {
     cnst[i] = Sys->constraint_new(NULL, float_random(10.0));
index d2e9dcb..9375b33 100644 (file)
@@ -4,6 +4,7 @@ set(bin_files ${bin_files}    ${CMAKE_CURRENT_SOURCE_DIR}/fix-paje-trace.sh
                               ${CMAKE_CURRENT_SOURCE_DIR}/sg_unit_extractor.pl
                               ${CMAKE_CURRENT_SOURCE_DIR}/sg_xml_unit_converter.py
                               ${CMAKE_CURRENT_SOURCE_DIR}/simgrid_update_xml.pl
+                              ${CMAKE_CURRENT_SOURCE_DIR}/simgrid_convert_TI_traces.py
                               ${CMAKE_CURRENT_SOURCE_DIR}/doxygen/fig2dev_postprocessor.pl
                               ${CMAKE_CURRENT_SOURCE_DIR}/doxygen/xbt_log_extract_hierarchy.pl
                               ${CMAKE_CURRENT_SOURCE_DIR}/MSG_visualization/colorize.pl
index e6ecdf5..be8804d 100644 (file)
@@ -444,7 +444,6 @@ set(MSG_SRC
   src/msg/msg_global.cpp
   src/msg/msg_gos.cpp
   src/msg/msg_legacy.cpp
-  src/msg/msg_mailbox.cpp
   src/msg/msg_process.cpp
   src/msg/msg_synchro.cpp
   src/msg/msg_task.cpp
@@ -658,6 +657,7 @@ set(MC_SIMGRID_MC_SRC  src/mc/checker/simgrid_mc.cpp)
 
 set(headers_to_install
 
+  include/simgrid_config.h
   include/simgrid/actor.h
   include/simgrid/engine.h
   include/simgrid/chrono.hpp
@@ -669,6 +669,7 @@ set(headers_to_install
   include/simgrid/plugins/load_balancer.h
   include/simgrid/smpi/replay.hpp
   include/simgrid/instr.h
+  include/simgrid/mailbox.h
   include/simgrid/msg.h
   include/simgrid/simdag.h
   include/simgrid/modelchecker.h
@@ -718,6 +719,7 @@ set(headers_to_install
   include/smpi/smpi.h
   include/smpi/smpi_main.h
   include/smpi/smpi_helpers.h
+  include/smpi/smpi_helpers_internal.h
   include/smpi/smpi_extended_traces.h
   include/smpi/smpi_extended_traces_fortran.h
   include/smpi/forward.hpp
@@ -763,7 +765,7 @@ set(headers_to_install
   include/xbt/xbt_os_time.h
   )
 set(source_of_generated_headers
-  include/simgrid_config.h.in
+  include/simgrid/config.h.in
   include/smpi/mpif.h.in)
 
 ### depend of some variables setted upper
index 486b809..d85418f 100644 (file)
@@ -45,6 +45,14 @@ add_custom_target(simgrid_update_xml ALL
   COMMENT "Install ${CMAKE_BINARY_DIR}/bin/simgrid_update_xml"
   COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/tools/simgrid_update_xml.pl ${CMAKE_BINARY_DIR}/bin/simgrid_update_xml)
 
+install(PROGRAMS ${CMAKE_HOME_DIRECTORY}/tools/simgrid_convert_TI_traces.py
+  DESTINATION bin/
+  RENAME simgrid_convert_TI_traces)
+
+add_custom_target(simgrid_convert_TI_traces ALL
+    COMMENT "Install ${CMAKE_BINARY_DIR}/bin/simgrid_convert_TI_traces"
+    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/tools/simgrid_convert_TI_traces.py ${CMAKE_BINARY_DIR}/bin/simgrid_convert_TI_traces)
+
 # libraries
 install(TARGETS simgrid DESTINATION lib/)
 
@@ -89,6 +97,7 @@ add_custom_target(uninstall
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/tesh
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/simgrid-colorizer
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/simgrid_update_xml
+  COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/simgrid_convert_TI_traces
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/graphicator
   COMMAND ${CMAKE_COMMAND} -E  echo "uninstall bin ok"
   COMMAND ${CMAKE_COMMAND} -E  remove_directory ${CMAKE_INSTALL_PREFIX}/include/instr
@@ -101,7 +110,7 @@ add_custom_target(uninstall
   COMMAND ${CMAKE_COMMAND} -E  remove_directory ${CMAKE_INSTALL_PREFIX}/include/mc
   COMMAND ${CMAKE_COMMAND} -E  remove_directory ${CMAKE_INSTALL_PREFIX}/include/simgrid
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/include/simgrid.h
-  COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/include/simgrid_config.h
+  COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/include/simgrid/config.h
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/include/xbt.h
   COMMAND ${CMAKE_COMMAND} -E  echo "uninstall include ok"
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/share/man/man1/simgrid_update_xml.1
index d5d876a..457aaf2 100644 (file)
@@ -8,7 +8,7 @@
 /* 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 "simgrid_config.h"       /* what was compiled in? */
+#include "simgrid/config.h"       /* what was compiled in? */
 
 /* Non-standard header files */
 /* <execinfo.h> */
index a874451..03d09e3 100644 (file)
 - doc/html/.*
 
 + BuildSimGrid.sh
-+ circle.yml
++ COPYRIGHT.template
++ README\.(coding|git)
++ \.appveyor.yml
++ \.circleci/.*
++ \.clang-format
 + \.classpath
 + \.cproject
++ \.editorconfig
 + \.project
 + \.travis.yml
 + sonar-project.properties
-+ \.editorconfig
-+ \.appveyor.yml
-+ COPYRIGHT.template
-+ README\.(coding|git)
-+ mk_win-dist.sh
-
-+ tools/jenkins/.*
 
 + contrib/.*
 
-+ src/simix/README_attempt_without_stack
-+ src/simix/simix_network\.tla
++ tools/git-hooks/.*
++ tools/internal/.*
++ tools/jenkins/.*
 
++ src/simix/simix_network\.tla
 + src/smpi/BUGS
-+ src/smpi/colls/alltoall-bruck\.c
-
-+ .clang-format
-+ tools/git-hooks/clang-format.pre-commit
 
 + teshsuite/smpi/mpich3-test/f77/attr/.*
-
-+ tools/internal/.*
diff --git a/tools/simgrid_convert_TI_traces.py b/tools/simgrid_convert_TI_traces.py
new file mode 100755 (executable)
index 0000000..b4b3f28
--- /dev/null
@@ -0,0 +1,117 @@
+#!/usr/bin/env python3
+
+'''
+This script is intended to convert SMPI time independent traces (TIT) from the
+old format (simgrid version <= 3.19) to the new format.
+
+On the previous format each MPI_wait calls were associated to the last ISend of
+IRecv call arbitrarily.
+
+This new that includes tags field that links MPI_wait calls to the
+MPI_ISend or MPI_IRecv associated to this wait.
+
+This script reproduce the old behavior of simgrid because informations are
+missing to add the tags properly. It also lower case all the mpi calls.
+
+It takes in input (as argument or in stdin) the trace list file that is only a
+simple text file that contains path of actual TIT files split by rank.
+
+It creates a directory to put the traces on ("converted_traces" by default)
+'''
+
+import os
+import pathlib
+import shutil
+
+
+def insert_elem(split_line, position, elem):
+    split_line.insert(position, elem)
+    return " ".join(split_line)
+
+
+def convert_trace(trace_path, base_path, output_path, trace_version="1.0"):
+    old_file_path = os.path.join(base_path, trace_path)
+    with open(old_file_path) as trace_file:
+
+        new_file_path = os.path.join(output_path, trace_path)
+        pathlib.Path(os.path.dirname(new_file_path)).mkdir(
+                parents=True, exist_ok=True)
+
+        with open(new_file_path, "w") as new_trace:
+            # Write header
+            new_trace.write("# version: " + trace_version + "\n")
+
+            last_async_call_src = None
+            last_async_call_dst = None
+            for line_num, line in enumerate(trace_file.readlines()):
+                #print(line)
+                new_line = None
+                split_line = line.lower().strip().split(" ")
+                mpi_call = split_line[1]
+
+                if mpi_call == "recv" or mpi_call == "send":
+                    new_line = insert_elem(split_line, 3, "0")
+
+                elif mpi_call == "irecv" or mpi_call == "isend":
+                    last_async_call_src = split_line[0]
+                    last_async_call_dst = split_line[2]
+                    new_line = insert_elem(split_line, 3, "0")
+                    # print("found async call in line: "+ str(line_num))
+
+                elif mpi_call == "wait":
+                    # print("found wait call in line: "+ str(line_num))
+                    if (last_async_call_src is None
+                            or last_async_call_dst is None):
+                        raise Exception("Invalid traces: No Isend or Irecv "
+                                "found before the wait in line " +
+                                str(line_num) + " in file " + old_file_path )
+                    new_line = insert_elem(split_line, 2, last_async_call_src)
+                    new_line = insert_elem(split_line, 3, last_async_call_dst)
+                    new_line = insert_elem(split_line, 4, "0")
+
+                if new_line is not None:
+                    # print("line: "+ str(line_num) + " in file " + old_file_path +
+                    #        " processed\n:OLD: " + line + "\n:NEW: " + new_line)
+                    new_trace.write(new_line + "\n")
+                else:
+                    new_trace.write(line)
+
+
+if __name__ == "__main__":
+    import argparse
+    import sys
+
+
+    parser = argparse.ArgumentParser(description=sys.modules[__name__].__doc__)
+
+    parser.add_argument('trace_list_file', type=argparse.FileType('r'),
+            default=sys.stdin, help="The trace list file (e.g. smpi_simgrid.txt)")
+
+    parser.add_argument('--output_path', '-o', default="converted_traces",
+            help="The path where converted traces will be put")
+
+    args = parser.parse_args()
+
+    trace_list_file_path = args.trace_list_file.name
+
+    # creates results dir
+    pathlib.Path(args.output_path).mkdir(
+            parents=True, exist_ok=True)
+
+    # copy trace list file
+    shutil.copy(trace_list_file_path, args.output_path)
+
+    with open(trace_list_file_path) as tracelist_file:
+        trace_list = tracelist_file.readlines()
+
+    # get based path relative to trace list file
+    base_path = os.path.dirname(trace_list_file_path)
+
+    trace_list = [x.strip() for x in trace_list]
+
+    # process trace files
+    for trace_path in trace_list:
+        convert_trace(trace_path, base_path, args.output_path)
+
+    print("Traces converted!")
+    print("Result directory:\n" + args.output_path)