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
src/*_unit.c
### Generated files
_*.c
-include/simgrid_config.h
+include/simgrid/config.h
include/smpi/smpif.h
src/internal_config.h
testprog
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
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>
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>
# - 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
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
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)
# 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)
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 )
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)
${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
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}")
-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
----------------------------------------------------------------------------
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
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()
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
* 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.
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
- 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
- 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
* 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.
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)
- 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.
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)
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
* 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
* 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
* 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
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
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
+ _ _____ ____ _
+__ _____ _ __ ___(_) ___ _ __ |___ / |___ \/ |
+\ \ / / _ \ '__/ __| |/ _ \| '_ \ |_ \ __) | |
+ \ 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)
_ _____ _ ___ _
__ _____ _ __ ___(_) ___ _ __ |___ / / |/ _ \ / |
[![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&)
[![Doc](https://readthedocs.org/projects/pip/badge/?version=stable)](http://simgrid.gforge.inria.fr/simgrid/latest/doc/)
[![License: LGPL v3][license-badge]](COPYING)
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.
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
~~~
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;
}
~~~
-<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?
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
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
\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)
- 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
- 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.
- 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
\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
- \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
\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
\subsubsection pf_router <router/>
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 ####
\verbinclude example_filelist_routing_dijkstra
-Dijkstra example :
+Dijkstra example:
\verbatim
<zone id="zone_2" routing="Dijkstra">
<host id="zone_2_host1" speed="1000000000"/>
\anchor pf_routing_model_full
### Full ###
-Full example :
+Full example:
\verbatim
<zone id="zone0" routing="Full">
<host id="host1" speed="1000000000"/>
<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 ####
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 ####
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>
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">
\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
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)
@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;
`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())
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;
### 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`)
}
@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;
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;
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
* 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
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());
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();
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();
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);
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();
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%%.");
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;
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(" ");
! 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
> [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
> [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
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();
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();
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();
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();
" 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);
#!/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"
#!/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"
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();
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));
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.",
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[])
/* 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).
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);
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);
// 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);
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;
}
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();
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!");
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);
/* - 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)
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.
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();
{
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();
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");
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");
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()
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;
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")
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
${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
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
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
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
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
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
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
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
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
> [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
$ 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
> [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
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
$ 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
$ 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
$ 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
! 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
-/* 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. */
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();
#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{
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_ */
#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{
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_ */
#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 {
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 {
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_ */
#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_ */
}
};
-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
*
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)
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.
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) */
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
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);
}
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,
}
/* 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_; }
*/
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
*/
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;
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
*/
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;
*/
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)
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
*/
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;
*/
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;
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.
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_; }
#include <xbt/graph.h>
#include <map>
+#include <vector>
namespace simgrid {
namespace kernel {
* 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:
/**
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
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
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;
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 {
--- /dev/null
+/* 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_ */
#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);
#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>
+/* 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
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)(); };
}
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);
}
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();
}
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);
}
/** @} */
/** 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();
}
/** @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;
}
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();
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);
}
{
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);
}
/** 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()));
}
}
}
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);
*
* 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);
/** 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
{
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(); }
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;
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,
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(); }
{
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();
}
{
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;
}
};
}
}
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;
#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 {
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
// 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();
}
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;
}
}
* @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())
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);
});
}
});
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()
// 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);
});
}
* @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;
// 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);
+}
}
}
/* 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 {
/**
* 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 {
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); }
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;
};
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;
};
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
--- /dev/null
+/* 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>
-#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)
#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
--- /dev/null
+/* 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
-/* 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. */
#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()
*
* 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);
}
}
#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)))
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";
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);
/** @} */
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);
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 */
}
};
-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));
}
};
-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));
+}
}
}
* @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)());
}
}
-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)();
* @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(); });
}
}
*
* @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();
}
}
#ifndef XBT_MISC_H
#define XBT_MISC_H
-#include <simgrid_config.h>
+#include <simgrid/config.h>
#include <xbt/base.h>
#include <xbt/dynar.h>
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(); }
};
}
#ifndef SIMGRID_XBT_STRING_HPP
#define SIMGRID_XBT_STRING_HPP
-#include <simgrid_config.h>
+#include <simgrid/config.h>
#include <cstdarg>
#include <cstdlib>
#include <xbt/log.h>
#include <xbt/misc.h>
-#include <simgrid_config.h>
+#include <simgrid/config.h>
#include <string.h>
#include <stdlib.h>
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
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");
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");
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);
}
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);
}
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(' ', '_');
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 */
#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 */
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);
void* malloc_no_memset(size_t n);
+#endif
SG_END_DECL()
-#endif
#endif /* SIMGRID_MMALLOC_H */
* 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"
class StateEvent : public PajeEvent {
EntityValue* value;
- std::string filename = "(null)";
#if HAVE_SMPI
+ std::string filename = "(null)";
int linenumber = -1;
#endif
TIData* extra_;
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);
}
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)),
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())
->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(),
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);
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()
#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"
// 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)
, 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,
}
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 ""; }
+};
}
}
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");
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");
}
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;
}
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;
}
}
}
-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;
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) {
child->print(jed_file);
}
} else {
- this->printResources(jed_file);
+ this->print_resources(jed_file);
}
fprintf(jed_file, " </res>\n");
}
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()
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()
FILE *fh = fopen(fname, "w");
- my_jedule->writeOutput(fh);
+ my_jedule->write_output(fh);
fclose(fh);
xbt_free(fname);
/**
* 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
{
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)
{
}
}
-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;
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;
/* 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;
/* 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);
}
}
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;
/* 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)
{
}
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_)
* 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) {
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);
}
}
}
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()
{
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)
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_];
}
}
-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;
}
}
-void DragonflyZone::generateLinks()
+void DragonflyZone::generate_links()
{
static int uniqueId = 0;
resource::LinkImpl* linkup;
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)
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;
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;
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;
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;
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.");
}
}
}
-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);
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++)
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;
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++;
}
}
}
}
-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,
return connectionsNumber;
}
-bool FatTreeZone::areRelated(FatTreeNode* parent, FatTreeNode* child)
+bool FatTreeZone::are_related(FatTreeNode* parent, FatTreeNode* child)
{
std::stringstream msgBuffer;
return true;
}
-void FatTreeZone::generateSwitches()
+void FatTreeZone::generate_switches()
{
XBT_DEBUG("Generating switches.");
this->nodes_by_level_.resize(this->levels_ + 1, 0);
}
}
-void FatTreeZone::generateLabels()
+void FatTreeZone::generate_labels()
{
XBT_DEBUG("Generating labels.");
// TODO : check if nodesByLevel and nodes are filled
}
}
-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;
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;
{
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;
/* 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 */
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();
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 */
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()
{
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();
/* 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) {
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);
}
}
}
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)
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);
}
}
}
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)
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)
{
/* (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_;
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)
/* ************************************************************************** */
/* ************************* 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();
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.",
"%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();
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);
}
}
}
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)
{
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)",
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");
/* 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)) +
-/* 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. */
#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"
-/* 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. */
#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"
#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
*
#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"
#include "src/mc/mc_forward.hpp"
#include "src/mc/DwarfExpression.hpp"
+#include <cstdint>
+#include <vector>
+
namespace simgrid {
namespace dwarf {
#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"
#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");
-/* 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 {
* 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
-/* 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 "xbt/asserts.h"
#include "xbt/base.h"
-#include <dwarf.h>
-
#include "src/mc/mc_forward.hpp"
#include "src/mc/LocationList.hpp"
#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"
#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>
/* 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"
#if SIMGRID_HAVE_MC
#include "src/mc/ModelChecker.hpp"
+#include "src/mc/remote/RemoteClient.hpp"
using simgrid::mc::remote;
#endif
#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>
#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"
-/* 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. */
class Member;
class Type;
class Variable;
+class Transition;
class Frame;
class ActorInformation;
#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>
#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
#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
#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"
#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 {
-/* 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. */
#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 {
-/* 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. */
#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 {
#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 {
-/* 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. */
#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 {
#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"
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
*
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.
*
{
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);
{
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)
{
+++ /dev/null
-/* 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);
-}
{
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;
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)
/* 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();
}
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());
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*/
{
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;
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_; }
};
/**
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"; }
};
/**
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"; }
};
/**
* 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)
*
*/
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);
}
}
};
* > 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);
}
}
}
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
// 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();
}
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 {
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;
/* 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);
}
}
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
// 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;
*
* 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
* (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);
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);
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));
"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);
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;
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();
// 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();
}
}
/* 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;
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();
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;
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
{
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
{
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%
{
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
{
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();
}
/* 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"
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());
}
/*
*/
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
/* **************************** 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;
}
/* 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();
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) {
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
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
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
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)
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)
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_{};
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_)
}
}
-double LinkEnergy::getPower()
+double LinkEnergy::get_power()
{
if (!inited_)
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
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()) {
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;
}
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) {
}
});
- 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
*/
double sg_link_get_consumed_energy(sg_link_t link)
{
- return link->extension<LinkEnergy>()->getConsumedEnergy();
+ return link->extension<LinkEnergy>()->get_consumed_energy();
}
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();
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();
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(),
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;
smx_process.resume();
}
- vm_state_ = SURF_VM_STATE_RUNNING;
+ vm_state_ = s4u::VirtualMachine::state::RUNNING;
}
/** @brief Power off a VM.
*/
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 */
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 */
}
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_; }
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;
};
/*********
/* 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()) {
{
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_);
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;
}
}
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);
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() + ")";
tx->join();
rx->join();
- vm->getImpl()->is_migrating_ = false;
+ vm->get_impl()->is_migrating_ = false;
}
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() + ")");
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() + ")");
}
// 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)
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).",
}
}
- this->pimpl_vm_->set_state(SURF_VM_STATE_RUNNING);
+ this->pimpl_vm_->set_state(VirtualMachine::state::RUNNING);
});
on_started(*this);
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);
}
* 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); });
}
/** @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)
void Engine::run()
{
+ /* Clean IO before the run */
+ fflush(stdout);
+ fflush(stderr);
+
if (MC_is_active()) {
MC_run();
} else {
/** @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)
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;
{
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);
}
/** @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()).
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*>();
simcall_execution_wait(s);
}
-double Host::getLoad()
-{
- return this->pimpl_cpu->get_load();
-}
-
} // namespace s4u
} // namespace simgrid
{
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);
/** @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.
*/
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
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();
{
return this->pimpl_->get_cname();
}
-const char* Link::name()
-{
- return get_cname();
-}
bool Link::is_used()
{
return this->pimpl_->is_used();
}
} // 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;
+}
*
* See @ref s4u_raii.
*/
-MutexPtr Mutex::createMutex()
+MutexPtr Mutex::create()
{
smx_mutex_t mutex = simcall_mutex_init();
return MutexPtr(&mutex->mutex(), false);
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()
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)
*/
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);
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
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);
}
}
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++)
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.",
{
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);
// 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)); };
}
/**
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};
}
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()) {
*/
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;
}
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)));
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)));
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)));
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)));
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), ""));
}
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);
}
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];
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)));
}
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)));
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)));
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)));
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;
}
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);
#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
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 {
*/
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_;
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)
{
*/
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);
}
/**
*/
double smpi_get_host_current_power_peak()
{
- return sg_host_self()->getSpeed();
+ return sg_host_self()->get_speed();
}
/**
#include <cfloat> /* DBL_MAX */
#include <dlfcn.h>
#include <fcntl.h>
+#if not defined(__APPLE__)
+#include <link.h>
+#endif
#include <fstream>
#if HAVE_SENDFILE
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
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)
return 0;
}
+
// TODO, remove the number of functions involved here
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);
TRACE_global_init();
SIMIX_global_init(&argc, argv);
- MSG_init(&argc,argv);
+ MSG_init(&argc, argv);
SMPI_switch_data_segment = &smpi_switch_data_segment;
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]);
/* 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.
};
}
-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, " ");
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]);
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
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
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, " ");
// 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);
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)
{
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.
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;
}
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_;
{
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);
// 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(),
if (req->cancelled_==1){
if (status!=MPI_STATUS_IGNORE)
status->cancelled=1;
+ if(req->detached_sender_ != nullptr)
+ unref(&(req->detached_sender_));
+ unref(request);
return;
}
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"
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.);
}
}
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;
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;
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;
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;
* @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;
* @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)
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)
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();
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;
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);
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);
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);
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);
});
};
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;
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();
}
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;
/** 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;
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)
*
* @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();
}
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;
}
{
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());
}
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
#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");
* 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
# include <unistd.h> /* isatty */
#endif
#include <xbt/log.h>
+#include <xbt/sysdep.h>
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(xbt_automaton);
%{
-#include "simgrid_config.h"
+#include "simgrid/config.h"
#if !HAVE_UNISTD_H
#define YY_NO_UNISTD_H /* hello Windows */
#endif
/* 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
* 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
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;
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>();
}
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;
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()
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)
*
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
*/
}
}
-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.
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
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);
-}
/** @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 */
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());
}
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 (...) {
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());
// 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();
}
}
-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
}
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. */
-/* 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 {
#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() */
/** @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) {
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();
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());
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"
{
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());
{
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;
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:
{
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());
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");
}
// 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;
});
});
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;
}
> [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
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)
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
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
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)
#include <cstdio>
#include <cstdlib>
-using namespace simgrid::kernel;
-
double date;
int64_t seedx = 0;
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));
${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
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
set(headers_to_install
+ include/simgrid_config.h
include/simgrid/actor.h
include/simgrid/engine.h
include/simgrid/chrono.hpp
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
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
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
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/)
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
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
/* 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> */
- 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/.*
--- /dev/null
+#!/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)