Skip to content

Commit

Permalink
Merge pull request #1164 from GMLC-TDC/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
phlptp authored Mar 28, 2020
2 parents 805f078 + d9cd9e9 commit f05591c
Show file tree
Hide file tree
Showing 146 changed files with 3,155 additions and 1,145 deletions.
21 changes: 21 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,25 @@ jobs:
- checkout
- run: *setup_helics
- run: *run_installer_tests

helicsNoZmq:
docker:
- image: helics/buildenv:gcc8-builder
environment:
CMAKE_FLAGS: '-DHELICS_BUILD_CXX_SHARED_LIB=ON -DENABLE_ZMQ_CORE=OFF -DENABLE_IPC_CORE=OFF -DHELICS_BUILD_TESTS=ON -DCMAKE_CXX_STANDARD=17'
steps:
- checkout
- run: *setup_helics
- run: *run_helics_tests

helicsTumbleweed:
docker:
- image: helics/buildenv:tumbleweed-builder
environment:
CMAKE_FLAGS: '-DHELICS_BUILD_CXX_SHARED_LIB=ON -DENABLE_ZMQ_CORE=OFF -DENABLE_IPC_CORE=OFF -DENABLE_UDP_CORE=OFF -DHELICS_BUILD_TESTS=ON -DCMAKE_CXX_STANDARD=17'
steps:
- checkout
- run: *setup_helics

helicsInstall2:
docker:
Expand Down Expand Up @@ -148,6 +167,8 @@ workflows:
- helicsMSan
- helicsASan
- helicsTSan
- helicsTumbleweed
- helicsNoZmq
benchmark:
triggers:
- schedule:
Expand Down
5 changes: 1 addition & 4 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ coverage:
precision: 2
round: down
range: "50...95"
tests:
target: 100%
paths: "src/helics/shared_api_library/"
status:
project: yes
patch: yes
Expand Down Expand Up @@ -37,4 +34,4 @@ ignore:
- "**/logger.*"
- "**/loggerCore.*"
- "**/zmqHelper.*"
- "**/internal/api_objects.h"
- "src/helics/shared_api_library/internal/api_objects.h"
36 changes: 33 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,41 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
A note on future revisions.
Everything within a major version number should be code compatible (with the exception of experimental interfaces). The most notable example of an experimental interface is the support for multiple source inputs. The APIs to deal with this will change in future minor releases. Everything within a single minor release should be network compatible with other federates on the same minor release number. Compatibility across minor release numbers may be possible in some situations but we are not going to guarantee this as those components are subject to performance improvements and may need to be modified at some point. Patch releases will be limited to bug fixes and other improvements not impacting the public API or network compatibility. Check the [Public API](./docs/Public_API.md) for details on what is included and excluded from the public API and version stability.

## [2.4.2][] - 2020-03-27
Increased code coverage and additional bug fixes.

### Changed
- Update toml11 library to 3.3.1 with some warning fixes for C++17
- The query handling in the core library was cleaned up to be more extensible and uniform

### Fixed
- MacOS build with python 2.7 failure
- Fixed some issues with the build/test process if the `ENABLE_ZMQ_CORE=OFF`
- Fixed a potential issue with queries if they are triggered before the connection ack
- An issue with host name resolution on some systems with restricted DNS lookup
- Allow camelCase in file parameters from JSON
- Fixed linking error with default OpenMPI Spack package
- Fixed timing benchmark federate name

### Added
- A series of tests for MessageFederate.cpp to increase coverage on that file to 100%
- Callbacks for custom filters in the C shared library
- A series of tests for CoreApp, BrokerApp, and FederateInfo and a few fixes for them
- A few additional tests of helics supports types and conversions
- CoreApp has a connect() and reset() method and constructor from a Core shared pointer
- BrokerApp has a connect() method and constructor from a Broker shared pointer
- Added a data_flow_graph query which gets all the connections in a federation

### Deprecated

### Removed

## [2.4.1][] - 2020-03-06
Increased code coverage and additional bug fixes. The error propagation in HELICS was improved such that local errors can be escalated to global errors, and a federate can define errors coming from the federate that are handled appropriately and can halt a co-simulation.


### Changed
- The helics webserver will build by default if the conditions are met
- The HELICS webserver will build by default if the conditions are met
- Update filesystem library to [v1.3.0](https://github.com/gulrak/filesystem/releases/tag/v1.3.0)
- The behavior of the `Federate*Complete` slightly modified to be uniform and consistent, no API changes
- Configuration of flags and targets for interfaces in JSON and TOML files can be done in multiple sections
Expand All @@ -37,8 +66,8 @@ Increased code coverage and additional bug fixes. The error propagation in HELI
- Standalone benchmark federates for use in multinode benchmark runs
- A FreeBSD 12.1 CI build using Cirrus CI
- Sending an event from GitHub Actions release builds to trigger updating additional HELICS packages when a new release is made
- `localError`, and `GlobalError` function calls the Federate API and in the C++ and sharedLibrary.
- `helics_terminate_on_error` flag to escalate what would be a local error into a global one that will halt the co-simulation. This flag can be specified through the flag to federates or to brokers and cores through a command line option `--terminate_on_error`
- `localError`, and `GlobalError` function calls the Federate API and in the C++ and sharedLibrary.
- `helics_terminate_on_error` flag to escalate what would be a local error into a global one that will halt the co-simulation. This flag can be specified through the flag to federates or to brokers and cores through a command line option `--terminate_on_error`
- `addDependency` function was added to the C++ Federate API and shared library API, it can add a direct dependency between federates manually.
- A 32-bit Windows zip install archive for releases
- "global_time", "current_time", and "state" queries for brokers and cores, and "current_time" query for federates.
Expand Down Expand Up @@ -537,3 +566,4 @@ This is a major revision so this changelog will not capture all the changes that
[2.3.1]: https://github.com/GMLC-TDC/HELICS/releases/tag/v2.3.1
[2.4.0]: https://github.com/GMLC-TDC/HELICS/releases/tag/v2.4.0
[2.4.1]: https://github.com/GMLC-TDC/HELICS/releases/tag/v2.4.1
[2.4.2]: https://github.com/GMLC-TDC/HELICS/releases/tag/v2.4.2
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ else()
cmake_policy(VERSION 3.16)
endif()

project(HELICS VERSION 2.4.1)
project(HELICS VERSION 2.4.2)

# -----------------------------------------------------------------------------
# HELICS Version number
# -----------------------------------------------------------------------------
set(HELICS_VERSION_BUILD)
# use ISO date YYYY-MM-DD
set(HELICS_DATE "2020-03-06")
set(HELICS_DATE "2020-03-27")

set(HELICS_VERSION_UNDERSCORE
"${HELICS_VERSION_MAJOR}_${HELICS_VERSION_MINOR}_${HELICS_VERSION_PATCH}"
Expand Down Expand Up @@ -444,6 +444,9 @@ if(ENABLE_MPI_CORE)
include(addMPI)
if(MPI_C_FOUND)
target_link_libraries(helics_base INTERFACE MPI::MPI_C)
if(MPI_CXX_FOUND)
target_link_libraries(helics_base INTERFACE MPI::MPI_CXX)
endif()
else()
message(FATAL_ERROR "MPI not found")
endif(MPI_C_FOUND)
Expand All @@ -467,6 +470,7 @@ if(UNIX AND NOT APPLE)
target_link_libraries(helics_base INTERFACE rt)
endif()

target_compile_definitions(helics_base INTERFACE "CLI11_HAS_FILESYSTEM=0")
# -------------------------------------------------------------
# add some additional libraries for MINGW and MSYS
# -------------------------------------------------------------
Expand Down
21 changes: 0 additions & 21 deletions ThirdParty/LICENSE.MIT

This file was deleted.

2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
clone_depth: 1

version: 2.4.1.{build}
version: 2.4.2.{build}

image: Visual Studio 2015

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/helics/TimingHubFederate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class TimingHub: public BenchmarkFederate {
public:
TimingHub(): BenchmarkFederate("TimingHub") {}

std::string getName() override { return "echohub"; }
std::string getName() override { return "timinghub"; }

void setupArgumentParsing() override
{
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/helics/TimingLeafFederate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TimingLeaf: public BenchmarkFederate {
public:
TimingLeaf(): BenchmarkFederate("TimingLeaf") {}

std::string getName() override { return "echoleaf_" + std::to_string(index); }
std::string getName() override { return "timingleaf_" + std::to_string(index); }

void setupArgumentParsing() override { opt_index->required(); }

Expand Down
34 changes: 34 additions & 0 deletions config/cmake/addMPI.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,37 @@ if(MPI_C_FOUND AND NOT TARGET MPI::MPI_C)
PROPERTIES INTERFACE_COMPILE_DEFINITIONS "${MPI_C_COMPILE_DEFINITIONS}"
)
endif()
if(MPI_CXX_FOUND AND NOT TARGET MPI::MPI_CXX)
add_library(MPI::MPI_CXX INTERFACE IMPORTED)
set_property(TARGET MPI::MPI_CXX PROPERTY INTERFACE_LINK_LIBRARIES "")
if(MPI_CXX_LIBRARIES)
set_property(
TARGET MPI::MPI_CXX
APPEND
PROPERTY INTERFACE_LINK_LIBRARIES "${MPI_CXX_LIBRARIES}"
)
endif()
if(MPI_CXX_LINK_FLAGS)
string(STRIP "${MPI_CXX_LINK_FLAGS}" trimmed_mpi_cxx_flags)
set_property(
TARGET MPI::MPI_CXX
APPEND
PROPERTY INTERFACE_LINK_LIBRARIES "${trimmed_mpi_cxx_flags}"
)
endif()
set_target_properties(
MPI::MPI_CXX
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES
"${MPI_CXX_INCLUDE_DIR};${MPI_CXX_HEADER_DIR};${MPI_CXX_ADDITIONAL_INCLUDE_DIRS};${MPI_CXX_INCLUDE_PATH}"
)
set_target_properties(
MPI::MPI_CXX
PROPERTIES INTERFACE_COMPILE_OPTIONS "${MPI_CXX_COMPILE_OPTIONS}"
)
set_target_properties(
MPI::MPI_CXX
PROPERTIES INTERFACE_COMPILE_DEFINITIONS "${MPI_CXX_COMPILE_DEFINITIONS}"
)

endif()
7 changes: 7 additions & 0 deletions config/cmake/compiler_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,19 @@ if(${PROJECT_NAME}_ENABLE_EXTRA_COMPILER_WARNINGS)
compile_flags_target
INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-Wimplicit-fallthrough=2 -Wno-psabi>
)
if (CMAKE_CXX_STANDARD GREATER 16)
target_compile_options(
compile_flags_target
INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-declarations>
)
endif()
endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.9)
target_compile_options(
compile_flags_target
INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-Wclass-memaccess>
)

endif()
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
Expand Down
2 changes: 1 addition & 1 deletion config/helics-config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SPDX-License-Identifier: BSD-3-Clause
#cmakedefine HELICS_ENABLE_LOGGING
#cmakedefine HELICS_ENABLE_TRACE_LOGGING
#cmakedefine HELICS_ENABLE_DEBUG_LOGGING
#cmakedefine HELCIS_ENABLE_WEBSERVER
#cmakedefine HELICS_ENABLE_WEBSERVER

#cmakedefine HELICS_DISABLE_ASIO

Expand Down
13 changes: 9 additions & 4 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This document contains tentative plans for changes and improvements of note in u


## \[2.5\] ~ 2020-04-15
It is unlikely all of this will be in place for the 2.5 release but some/most of the remaining will come on the 2.5.X release

- Multi-broker to allow multiple communication cores to be connected in the same federation
- Some dynamic federation support
- C API callbacks for custom filters
Expand All @@ -27,17 +29,20 @@ This will be the last of the 2.X series releases, there will likely be at least
- Performance improvements and tests

## \[3.0\] ~ 2020-08-26
- Upgrade minimum compilers and build systems. Currently planned targets are gcc 7.0, clang 5.0, MSVC 2017 15.7, CMake 3.10. This is a setup which should be supported on Ubuntu 18.04 repositories. Minimum Boost version will also be updated though Boost is becoming less critical for the HELICS core so may not be that important. The likely minimum tested target will likely be 1.65.1 though the core make work with older versions and can be disabled completely. Certain features may require a newer boost version(1.70) than what would be available on Ubuntu 18.04. HELICS 3.0 will not be released until Ubuntu 20.04 LTS is out and RHEL 8.0 has been out for a year, and RHEL 8.1 is released, and probably 8.2. Minimum required compilers for building on macOS and systems using ICC will include Xcode 10 and ICC 19. The minimum ZMQ version will also be bumped up to 4.2. General policy for Mac builds will be supporting Xcode compilers on versions of MacOS that receive security upgrades which is generally the last 3 versions, though 11 and 10 will likely be the only 2 supported at HELICS 3.0 release. MSVC compilers will be supported for at least 2 years from release date, an appropriate CMake (meaning slightly newer than the compiler) will also be required for Visual studio builds.
Upgrade minimum compilers and build systems. Currently planned minimum targets are gcc 7.0, clang 5.0, MSVC 2017 15.7, CMake 3.10. This is a setup which should be supported on Ubuntu 18.04 repositories. Minimum Boost version will also be updated though Boost is becoming less critical for the HELICS core so may not be that important. The likely minimum tested target will likely be 1.65.1 though the core might work with older versions and its use can be disabled completely. Certain features may require a newer boost version(1.70) than what would be available on Ubuntu 18.04. HELICS 3.0 will not be released until Ubuntu 20.04 LTS is out and RHEL 8.0 has been out for a year, and RHEL 8.1 is released, and probably 8.2. Minimum required compilers for building on macOS and systems using ICC will include Xcode 10 and ICC 19. The minimum ZMQ version will also be bumped up to 4.2. General policy for Mac builds will be supporting Xcode compilers on versions of MacOS that receive security upgrades which is generally the last 3 versions, though 11 and 10 will likely be the only 2 supported at HELICS 3.0 release. MSVC compilers will be supported for at least 2 years from release date, an appropriate CMake (meaning slightly newer than the compiler) will also be required for Visual studio builds.
- Control interface
- Full Dynamic Federation support
- Much more general debugging support
- Targeted endpoints
- General API changes based on feedback
- SSL capable core
- Single thread cores
- General API changes based on feedback and code review
- Single thread cores(partial at release)
- Plugin architecture for user defined cores
- Remove deprecated functions
- Change values for log level enumerations
- Some additional renaming of CMake variables
- xSDK compatibility
- Renaming of the libraries and reorganization of the header locations

## \[3.1\] ~ 2020-10-15
Very little idea of what will be in this release, only that there will be a release around this date probably with a few things that didn't quite make it in 3.0 and a number of bug fixes that come from transitioning to HELICS 3.0.
- SSL capable core?
4 changes: 2 additions & 2 deletions docs/configuration/MessageFederate.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ File based configuration looks primarily at an "endpoints" JSON array
"only_transmit_on_change":false, //indicator that the federate should only publish if the value changed
"source_only":false, //indicator that the federate is only a source and is not expected to receive anything
"uninterruptible":false, //indicator that the federate should only return requested times
"coreType":"test", //the type of the core "test","zmq","udp","icp","tcp","mpi"
"coreName":"the name of the core", //this matters most for icp and test cores, can be empty
"coreType":"test", //the type of the core "test","zmq","udp","ipc","tcp","mpi"
"coreName":"the name of the core", //this matters most for ipc and test cores, can be empty
"coreInit":"1", // the initialization string for the core in the form of a command line arguments
"maxIterations":10, //the maximum number of iterations for a time step
"period": 1.0, //the period with which federate may return time
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration/ValueFederate.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ File based configuration looks primarily at an "publications" or "subscriptions"
"only_transmit_on_change":false, //indicator that the federate should only publish if the value changed
"source_only":false, //indicator that the federate is only a source and is not expected to receive anything
"uninterruptible":false, //indicator that the federate should only return requested times
"coretype":"test", //the type of the core "test","zmq","udp","icp","tcp","mpi"
"corename":"the name of the core", //this matters most for icp and test cores, can be empty
"coretype":"test", //the type of the core "test","zmq","udp","ipc","tcp","mpi"
"corename":"the name of the core", //this matters most for ipc and test cores, can be empty
"coreinit":"--autobroker", // the initialization string for the core in the form of a command line arguments
"max_iterations":10, //the maximum number of iterations for a time step
"period": 1.0, //the period with which federate may return time
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ There are a number of classes of HELICS users:
* [**Getting Information from a running simulation**](./running_interaction.md) - Getting live information from a running co-simulation.
* [**Integrating a New Simulator**](./simulator_integration.md) - General overview of the process by which a simulator is integrated with HELICS including usage of the common APIs
* **Trouble-Shooting HELICS Co-Simulations (forthcoming)** - What to do when the co-simulations don't seem to be working correctly.
* [**Simultaneous co-simulations**](./simultaneous_cosimulation.md) - Options for running multiple independent co-simulations on a single system
* [**Simultaneous co-simulations**](./simultaneous_cosimulations.md) - Options for running multiple independent co-simulations on a single system
* **Large Co-Simulations in HELICS (forthcoming)** - How to run HELICS co-simulations with a large (100+) number of federates

## Additional Resources ##
Expand Down
Loading

0 comments on commit f05591c

Please sign in to comment.