From 1c0be8f49824bc3edab5359aa1254d197629b967 Mon Sep 17 00:00:00 2001 From: Philipp Bucher Date: Tue, 8 Feb 2022 11:22:50 +0100 Subject: [PATCH] Changelog V4 (#334) * WIP changelog * Update CHANGELOG.md * Update CHANGELOG.md * increment version to 4.0.0 * minor * updated changelog * enable MPI-Comm * missing type * updating changelog * revert unwanted change --- CHANGELOG.md | 15 +++++++++++++++ co_sim_io/sources/version.cpp | 2 +- docs/communication.md | 3 +++ docs/info/info_cpp.md | 1 + 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96ed90f6..aa265b62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,3 +49,18 @@ All important and notable changes in the _CoSimIO_ are documented in this file. - All CMake macros of _CoSimIO_ now start with `CO_SIM_IO_`. This affects especially `BUILD_C` and `BUILD_PYTHON` which are changed to `CO_SIM_IO_BUILD_C` and `CO_SIM_IO_BUILD_PYTHON`. - Several minor improvements to the CI (continuous integration) - Internal errors now give much better error messages including detailed stacktraces + +## 4.0.0 +- (Interprocess) Communication + - Socket based communication was added (using TCP network sockets with IPv4). Documentation is available [here](https://kratosmultiphysics.github.io/CoSimIO/communication.html#socket-based-communication). + Due to its versatility it is the **new default** (previously it was file-based communication) + - Experimental support for unix domain sockets was added (see [here](https://kratosmultiphysics.github.io/CoSimIO/communication.html#unix-domain-socket-based-communication)) + - PipeCommunication now supports large data (data larger than pipe buffer). Furthermore the buffer size can be configured with `buffer_size`, see the [documentation](https://kratosmultiphysics.github.io/CoSimIO/communication.html#pipe-based-communication). + - Experimental support for communication based on `MPI_Ports` was added (see [here](https://kratosmultiphysics.github.io/CoSimIO/communication.html#mpi-based-communication)). It is available when connection is done with MPI and can be enabled with `CO_SIM_IO_BUILD_MPI_COMMUNICATION` +- Mesh container (`ModelPart`) + - Creating entities in the ModelPart is now significantly faster. Especially when creating many entities the speedup is several orders of magnitude. + - New interfaces are added to the ModelPart with which multiple entities can be created. +- Improved and extended documentation +- Improved synchronization during initial handshake to avoid deadlocks +- Printing timing information for communication is now unified for all communication methods (can be enabled with `print_timing`) +- other minor interal improvements and fixes diff --git a/co_sim_io/sources/version.cpp b/co_sim_io/sources/version.cpp index 55c6af12..05b2c8a5 100644 --- a/co_sim_io/sources/version.cpp +++ b/co_sim_io/sources/version.cpp @@ -16,7 +16,7 @@ namespace CoSimIO { int GetMajorVersion() { - return 3; + return 4; } int GetMinorVersion() { diff --git a/docs/communication.md b/docs/communication.md index a96fa05a..828c70d9 100644 --- a/docs/communication.md +++ b/docs/communication.md @@ -104,6 +104,7 @@ The following logic is used for selecting the ip-address ## Unix domain socket-based communication **This form of communication is experimental** + This type of communication uses unix domain sockets for the data exchange. It is similar to the tcp socket communication, but instead of passing the data through the network, it uses the kernel memory. This makes it faster, but at the same time it only works locally on one compute node. The [ASIO](https://think-async.com/Asio/) library is used as a high level interface for the sockets. @@ -124,6 +125,7 @@ Set `communication_format` to `local_socket`. ## Pipe-based communication **This form of communication is experimental** + A pipe is a data channel to perform interprocess communication between two processes. No data is written to the filesystem, it is directly exchanged through the kernel memory. This makes it more efficient than the file-based communication, but at the same time it only works locally on one compute node. The (default) buffer size is specific for each operating system, see e.g. [here](https://man7.org/linux/man-pages/man7/pipe.7.html) for information for Linux. If the data to be exchanged is larger than the buffer size, then it is exchanged in chuncks. Hence a larger buffer size results in less data exchanges. @@ -145,6 +147,7 @@ Set `communication_format` to `pipe`. ## MPI-based communication **This form of communication is experimental** + MPI is usually used to communicate between different ranks within an executable/one MPI-communicator. MPI 2.0 added functionalities with which the communication can be done also between independent communicators (i.e. if two executables were started separately with MPI as shown below). This can be done similarly to the socket based communication through opening ports and accepting connection (on the primary/server side) and connecting to the opened port (on the secondary/client side). After the connection is established, communication is done with the standard MPI calls like `MPI_Send` and `MPI_Recv`. This is oftentimes the fastest way of exchanging data in a distributed memory environment. The disadvantage of this form of communication is that the features required for establishing communication across communicators are not robustly available for all MPI implementations. Experience shows that it is problematic with OpenMPI but works well with IntelMPI. Furthermore it might be required to use the same compilers and MPI implementation for successfully connecting. diff --git a/docs/info/info_cpp.md b/docs/info/info_cpp.md index 45f7653b..e23d01fe 100644 --- a/docs/info/info_cpp.md +++ b/docs/info/info_cpp.md @@ -23,6 +23,7 @@ The `CoSimIO::Info` object plays a very important role in the _CoSimIO_. It is a map (implemented with `std::map`) holding key-value pairs of different value types, similar to the `dict` of Python. It is used as a configuration object and supports the following value types: - `int` +- `std::size_t` - `double` - `bool` - `std::string`