diff --git a/.github/actions/benchmark-build/benchmark-Linux.sh b/.github/actions/benchmark-build/benchmark-Linux.sh new file mode 100755 index 0000000000..02d4af5eeb --- /dev/null +++ b/.github/actions/benchmark-build/benchmark-Linux.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# This uses bash variable substitution in a few places +# 1. getting the cmake directory for running cpack with an absolute path (chocolatey has an unfortunately named alias) + +#wget --quiet -O cmake-install.sh https://github.com/Kitware/CMake/releases/download/v3.15.5/cmake-3.15.5-Linux-x86_64.sh && chmod +x cmake-install.sh +#sudo ./cmake-install.sh --prefix=/usr/local --exclude-subdir --skip-license +#rm cmake-install.sh + +mkdir build && cd build || exit +cmake -DCMAKE_BUILD_TYPE=Release -DHELICS_ZMQ_SUBPROJECT=ON -DHELICS_ENABLE_PACKAGE_BUILD=ON -DSTATIC_STANDARD_LIB=static -DHELICS_BUILD_EXAMPLES=OFF -DHELICS_BUILD_APP_EXECUTABLES=ON -DHELICS_BUILD_APP_LIBRARY=OFF -DHELICS_BUILD_BENCHMARKS=ON -DBUILD_TESTING=OFF .. +cmake --build . --config Release +cpack_dir="$(command -v cmake)" +cpack_dir="${cpack_dir%/cmake}" +"${cpack_dir}/cpack" -G "${CPACK_GEN}" -C Release -B "$(pwd)/../artifact" +cd ../artifact || exit +rm -rf _CPack_Packages diff --git a/.github/actions/benchmark-build/benchmark-Windows.sh b/.github/actions/benchmark-build/benchmark-Windows.sh new file mode 100755 index 0000000000..b678fa96f6 --- /dev/null +++ b/.github/actions/benchmark-build/benchmark-Windows.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# This uses bash variable substitution in a few places +# 1. replacing x86 with Win32 (setting the Python version uses x86) +# 2. getting the cmake directory for running cpack with an absolute path (chocolatey has an unfortunately named alias) + +echo "Building ${CPACK_GEN} installer with ${BUILD_GEN} for ${BUILD_ARCH}" +BOOST_ROOT="${BOOST_ROOT_1_72_0}" +export BOOST_ROOT +mkdir build && cd build || exit +cmake -G "${BUILD_GEN}" -A "${BUILD_ARCH/x86/Win32}" -DCMAKE_BUILD_TYPE=Release -DHELICS_ENABLE_PACKAGE_BUILD=ON -DSTATIC_STANDARD_LIB=static -DHELICS_USE_ZMQ_STATIC_LIBRARY=ON -DHELICS_BUILD_EXAMPLES=OFF -DHELICS_BUILD_APP_EXECUTABLES=ON -DHELICS_BUILD_APP_LIBRARY=OFF -DHELICS_BUILD_BENCHMARKS=ON -DBUILD_TESTING=OFF .. +cmake --build . --config Release +cpack_dir="$(command -v cmake)" +cpack_dir="${cpack_dir%/cmake}" +"${cpack_dir}/cpack" -G "${CPACK_GEN}" -C Release -B "$(pwd)/../artifact" +cd ../artifact || exit +rm -rf _CPack_Packages diff --git a/.github/actions/benchmark-build/benchmark-macOS.sh b/.github/actions/benchmark-build/benchmark-macOS.sh new file mode 100755 index 0000000000..e913703937 --- /dev/null +++ b/.github/actions/benchmark-build/benchmark-macOS.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# This uses bash variable substitution in a few places +# 1. getting the cmake directory for running cpack with an absolute path (chocolatey has an unfortunately named alias) + +brew install boost +mkdir build && cd build || exit +cmake -DCMAKE_BUILD_TYPE=Release -DHELICS_ZMQ_SUBPROJECT=ON -DHELICS_ENABLE_PACKAGE_BUILD=ON -DHELICS_BUILD_EXAMPLES=OFF -DHELICS_BUILD_APP_EXECUTABLES=ON -DHELICS_BUILD_APP_LIBRARY=OFF -DHELICS_BUILD_BENCHMARKS=ON -DBUILD_TESTING=OFF .. +cmake --build . --config Release +cpack_dir="$(command -v cmake)" +cpack_dir="${cpack_dir%/cmake}" +"${cpack_dir}/cpack" -G "${CPACK_GEN}" -C Release -B "$(pwd)/../artifact" +cd ../artifact || exit +rm -rf _CPack_Packages diff --git a/.github/workflows/benchmark-package.yml b/.github/workflows/benchmark-package.yml new file mode 100644 index 0000000000..f7cca330c3 --- /dev/null +++ b/.github/workflows/benchmark-package.yml @@ -0,0 +1,95 @@ +name: Build benchmarks + +on: + workflow_dispatch: + inputs: + webhook: + description: 'Webhook to call with the completed workflow run id' + required: false + schedule: + - cron: '15 09 * * */2' # Run at in the early hours of the morning every other day of the week (UTC) + +jobs: +##################################### +# Build benchmarks +##################################### + build-benchmarks: + runs-on: ${{ matrix.os }} + name: Build ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.cpack_gen }} Benchmarks + strategy: + matrix: + id: [windows-x64, macos-x64, linux-x64] + include: + - id: windows-x64 + os: windows-latest + arch: x64 + cpack_gen: ZIP + cmake_gen: 'Visual Studio 16 2019' + msvc_ver: 'msvc2019' + - id: macos-x64 + os: macos-latest + arch: x64 + cpack_gen: ZIP + macos_target_ver: '10.9' + - id: linux-x64 + os: ubuntu-latest + arch: x64 + cpack_gen: TGZ + + steps: + - name: Checkout event ref + uses: actions/checkout@v2 + if: github.event_name != 'schedule' + + - name: Checkout develop branch + uses: actions/checkout@v2 + with: + ref: develop + if: github.event_name == 'schedule' + + # Setup a copy of the macOS SDK + - name: Setup macOS SDK + if: runner.os == 'macOS' + run: ./.github/actions/setup-macos-10.9-sdk.sh + + # Compile HELICS and create the benchmark package + - name: Build benchmarks + if: runner.os != 'Linux' + env: + BUILD_ARCH: ${{ matrix.arch }} + BUILD_GEN: ${{ matrix.cmake_gen }} + MSVC_VER: ${{ matrix.msvc_ver }} + MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos_target_ver }} + CPACK_GEN: ${{ matrix.cpack_gen }} + shell: bash + run: ./.github/actions/benchmark-build/benchmark-${{ runner.os }}.sh + + - name: Build benchmarks (container) + if: runner.os == 'Linux' + uses: ./.github/actions/linux-release-builder + with: + script: ./.github/actions/benchmark-build/benchmark-${{ runner.os }}.sh + + # GitHub Actions combines artifacts uploaded with the same name + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ runner.os }}-benchmarks + path: artifact + + +##################################### +# Call webhook for finished build +##################################### + benchmark-build-complete-webhook: + name: Call webhook to notify of the finished benchmark build + needs: [build-benchmarks] + runs-on: ubuntu-latest + if: github.event.inputs.webhook + steps: + - name: Call webhook + run: | + curl -X POST --header 'authorization: Bearer ${{ secrets.BM_BUILD_SECRET }}' \ + --url ${{ github.event.inputs.webhook }} \ + --header 'content-type: application/json' \ + --data "{\"id\":\"${{ github.run_id }}\"}" diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index df121aefb1..e3c7de2f56 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -17,6 +17,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - uses: actions/setup-python@v2 - name: set PY run: echo "::set-env name=PY::$(python --version --version | sha256sum | cut -d' ' -f1)" diff --git a/.github/workflows/swig-interface-gen.yml b/.github/workflows/swig-interface-gen.yml index 7adfe9de0e..ff142fe699 100644 --- a/.github/workflows/swig-interface-gen.yml +++ b/.github/workflows/swig-interface-gen.yml @@ -16,6 +16,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Run SWIG run: | rm -rf interfaces/*/interface/* diff --git a/.gitmodules b/.gitmodules index c09acafc05..858c4c78e2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -27,3 +27,6 @@ [submodule "ThirdParty/netif"] path = ThirdParty/netif url = https://github.com/GMLC-TDC/netif.git +[submodule "ThirdParty/spdlog"] + path = ThirdParty/spdlog + url = https://github.com/gabime/spdlog.git diff --git a/CHANGELOG.md b/CHANGELOG.md index 930f1b083b..771cb666b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,43 @@ 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.6.0][] ~ 2020-08-20 + +Bug fixes and major logging update + +### Changed + +- The build flag function now returns correct debug or release flags depending on the build +- The debug postfix `d` is no longer added to the interface libraries +- Spdlog is now being used for logging inside HELICS and the old logger has been removed this results in fewer thread being generated by HELICS. +- CMake will now error if the install directory is set to the build directory +- Some argument names in the C API have been changed for consistency +- Output a more descriptive error message for mismatched data sizes when converting types #1521 +- Some C++98 API functions were added and changed for consistency, specifically endpoint get type no returns a `char *` instead of std::string, and a getCurrentTime function was added to `Federate` +- logging level properties from a federateInfo structure will be inherited by a core for the first registered federate + +### Fixed + +- String with negative numerical values were not acknowledging the negation Issue #1306 +- Config file parsing was not acknowledging "unit" string #1512 +- A performance issue with the tcpss and tcp cores in some cases has been resolved by setting the no_delay option +- Inconsistency in type returned by endpoint getType in C++98 API #1523 +- a potential segmentation fault when calling some methods in the C shared library after calling helicsCloseLibrary + +### Added + +- Flags for `dumplog` and `force_logging_flush` were added to the C API +- Added missing C++98 call to `getCurrentTime` +- Added `closeLibrary` function to the C++98 API +- Added a Python benchmark file +- An option to install the benchmark executables has been added +- Data logging output for both send and receive of messages +- A GitHub Actions workflow to build packages for Linux with the benchmark executables + +### Removed + +- The previous logger including logger.h has been replaced with spdlog + ## [2.5.2][] ~ 2020-06-15 Bug fix release for some build issues and a fix to the `wait_for_current_time` flag @@ -734,3 +771,4 @@ This is a major revision so this changelog will not capture all the changes that [2.5.0]: https://github.com/GMLC-TDC/HELICS/releases/tag/v2.5.0 [2.5.1]: https://github.com/GMLC-TDC/HELICS/releases/tag/v2.5.1 [2.5.2]: https://github.com/GMLC-TDC/HELICS/releases/tag/v2.5.2 +[2.5.2]: https://github.com/GMLC-TDC/HELICS/releases/tag/v2.6.0 diff --git a/CMakeLists.txt b/CMakeLists.txt index 01f1ecbe5f..49111c8ef9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,14 +17,14 @@ else() cmake_policy(VERSION 3.17) endif() -project(HELICS VERSION 2.5.2) +project(HELICS VERSION 2.6.0) # ----------------------------------------------------------------------------- # HELICS Version number # ----------------------------------------------------------------------------- set(HELICS_VERSION_BUILD) # use ISO date YYYY-MM-DD -set(HELICS_DATE "2020-06-14") +set(HELICS_DATE "2020-08-20") set(HELICS_VERSION_UNDERSCORE "${HELICS_VERSION_MAJOR}_${HELICS_VERSION_MINOR}_${HELICS_VERSION_PATCH}" @@ -100,6 +100,18 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND CMAKE_PROJECT_NAME STREQUAL P endif(WIN32) endif() +# Check to make sure the install prefix isn't the build folder, if it is, build errors will happen +get_filename_component(tmp_install_prefix ${CMAKE_INSTALL_PREFIX} REALPATH) +get_filename_component(tmp_proj_bindir ${PROJECT_BINARY_DIR} REALPATH) +# Windows paths are case insensitive +if(WIN32) + string(TOLOWER "${tmp_install_prefix}" tmp_install_prefix) + string(TOLOWER "${tmp_proj_bindir}" tmp_proj_bindir) +endif() +if(tmp_install_prefix STREQUAL tmp_proj_bindir) + message(FATAL_ERROR "CMAKE_INSTALL_PREFIX must not be set to the build folder") +endif() + if(MSYS OR CYGWIN OR UNIX @@ -244,9 +256,6 @@ add_library(HELICS::compile_flags_target ALIAS compile_flags_target) add_library(HELICS::build_flags_target ALIAS build_flags_target) get_target_property(EXTRA_BUILD_FLAGS build_flags_target INTERFACE_COMPILE_OPTIONS) -set(HELICS_BUILD_FLAGS_OUTPUT - "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_STATIC_LINKER_FLAGS} ${EXTRA_BUILD_FLAGS} " -) if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) if(NOT USE_LIBCXX) @@ -380,6 +389,9 @@ if(NOT HELICS_DISABLE_GIT_OPERATIONS) submod_update(ThirdParty/netif) endif() + if(NOT EXISTS "${PROJECT_SOURCE_DIR}/ThirdParty/spdlog/CMakeLists.txt") + submod_update(ThirdParty/spdlog) + endif() check_submodule_status() endif() # NOT HELICS_DISABLE_GIT_OPERATIONS @@ -649,6 +661,12 @@ include(addfmt) include(addJsoncpp) add_library(HELICS::jsoncpp_lib ALIAS jsoncpp_lib) +# -------------------------------------------------------------- +# Create the target for spdlog +# ----------------------------------------------------------- +include(addSpdlog) +add_library(HELICS::spdlog ALIAS spdlog) + # -------------------------------------------------------------- # Create the target for unitslib # ----------------------------------------------------------- @@ -980,6 +998,7 @@ if(HELICS_ENABLE_PACKAGE_BUILD) java octave csharp + benchmarks cereal ) if(WIN32) @@ -994,6 +1013,7 @@ if(HELICS_ENABLE_PACKAGE_BUILD) set(CPACK_COMPONENT_LIBS_DISPLAY_NAME "Libraries") set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "Headers") set(CPACK_COMPONENT_RUNTIME_DISPLAY_NAME "Runtime Libraries") + set(CPACK_COMPONENT_BENCHMARKS_DISPLAY_NAME "Benchmarks") set(CPACK_COMPONENT_SWIG_DISPLAY_NAME "SWIG") set(CPACK_COMPONENT_JAVA_DISPLAY_NAME "Java") set(CPACK_COMPONENT_PYTHON_DISPLAY_NAME "Python") @@ -1021,6 +1041,7 @@ if(HELICS_ENABLE_PACKAGE_BUILD) set(CPACK_COMPONENT_LIBS_DESCRIPTION "Libraries for compiling and linking with HELICS") set(CPACK_COMPONENT_HEADERS_DESCRIPTION "Headers for linking and compiling with HELICS") set(CPACK_COMPONENT_RUNTIME_DESCRIPTION "Runtime libraries for HELICS") + set(CPACK_COMPONENT_BENCHMARKS_DESCRIPTION "Benchmark applications for HELICS") set(CPACK_COMPONENT_CEREAL_DESCRIPTION "cereal C++11 serialization library [no support for other language interfaces]" ) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 1d8b2eee1a..c2062be007 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -16,6 +16,7 @@ If you would like to contribute to the HELICS project see [CONTRIBUTING](CONTRIB - [Jacob Hansen](https://github.com/Jacobhansens) - [Marc Eberlein](https://github.com/eberleim) - [Shrirang Abhyankar](https://github.com/abhyshr) +- [Corrine Roth](https://github.com/corinnegroth) ### Lawrence Livermore National Lab @@ -98,6 +99,10 @@ A library that provides runtime unit values, instead of individual unit types, f The cereal library is used for serialization of messages sent around inside HELICS. A modified version of cereal is included in the HELICS source and licensed under the [BSD-3 clause](https://github.com/USCiLab/cereal/blob/master/LICENSE) license. The modifications include modifying the headers to use relative paths instead of absolute so it can be included in different locations. +### [spdlog](https://https://github.com/gabime/spdlog) + +Very fast, header-only/compiled, C++ logging library. The spdlog library is used for logging. It is included in HELICS as a submodule and is released under a [MIT](https://github.com/gabime/spdlog/blob/v1.x/LICENSE) license. + ### [FNCS](https://github.com/FNCS/fncs), [IGMS](https://www.nrel.gov/docs/fy16osti/65552.pdf), and FSKIT While not used directly, much of the inspiration for HELICS comes from three separate projects at the different National Labs. These include FNCS at PNNL, FSKIT at LLNL(unreleased), and IGMS(unreleased) at NREL. The lessons learned from these three co-simulation platforms was fed directly into the design of HELICS, and the hope that the combination and partnership is better than any one lab could have accomplished on their own. diff --git a/ThirdParty/fmtlib b/ThirdParty/fmtlib index 9bdd1596ce..b9d749095e 160000 --- a/ThirdParty/fmtlib +++ b/ThirdParty/fmtlib @@ -1 +1 @@ -Subproject commit 9bdd1596cef1b57b9556f8bef32dc4a32322ef3e +Subproject commit b9d749095e3397f154e2938f96dd11912f2d9300 diff --git a/ThirdParty/spdlog b/ThirdParty/spdlog new file mode 160000 index 0000000000..616caa5d30 --- /dev/null +++ b/ThirdParty/spdlog @@ -0,0 +1 @@ +Subproject commit 616caa5d30172b65cc3a06800894c575d70cb8e6 diff --git a/appveyor.yml b/appveyor.yml index 0ba706c07d..bf8967c12e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ clone_depth: 1 -version: 2.5.2.{build} +version: 2.6.0.{build} image: Visual Studio 2015 diff --git a/benchmarks/helics/CMakeLists.txt b/benchmarks/helics/CMakeLists.txt index e7b34dd9b4..442242a06a 100644 --- a/benchmarks/helics/CMakeLists.txt +++ b/benchmarks/helics/CMakeLists.txt @@ -62,14 +62,20 @@ foreach(T ${HELICS_BENCHMARKS}) target_compile_definitions( ${T} PRIVATE "HELICS_BENCHMARK_SHIFT_FACTOR=(${HELICS_BENCHMARK_SHIFT_FACTOR})" ) + install(TARGETS ${T} ${HELICS_EXPORT_COMMAND} DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT benchmarks + ) endforeach() add_executable(helics_benchmarks BenchmarkMain.cpp BenchmarkFederate.hpp) target_link_libraries(helics_benchmarks PUBLIC helics_application_api) set_target_properties(helics_benchmarks PROPERTIES FOLDER benchmarks_multimachine) foreach(T ${HELICS_MULTINODE_BENCHMARKS}) - target_sources(helics_benchmarks PUBLIC ${T}.hpp) + target_sources(helics_benchmarks PRIVATE ${T}.hpp) endforeach() +install(TARGETS helics_benchmarks ${HELICS_EXPORT_COMMAND} DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT benchmarks +) if(NOT HELICS_DISABLE_C_SHARED_LIB) add_executable(echoBenchmarks_c echoBenchmarks_c.cpp) @@ -80,7 +86,10 @@ if(NOT HELICS_DISABLE_C_SHARED_LIB) echoBenchmarks_c PRIVATE "HELICS_BENCHMARK_SHIFT_FACTOR=(${HELICS_BENCHMARK_SHIFT_FACTOR})" ) target_include_directories( - echoBenchmarks_c PUBLIC ${HELICS_BINARY_DIR}/helics_generated_includes/ + echoBenchmarks_c PRIVATE ${HELICS_BINARY_DIR}/helics_generated_includes/ + ) + install(TARGETS echoBenchmarks_c ${HELICS_EXPORT_COMMAND} DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT benchmarks ) endif() diff --git a/benchmarks/helics/echoBenchmarks_py.py b/benchmarks/helics/echoBenchmarks_py.py new file mode 100644 index 0000000000..3ea0fb0111 --- /dev/null +++ b/benchmarks/helics/echoBenchmarks_py.py @@ -0,0 +1,714 @@ +# -*- coding: utf-8 -*- +""" +Created on Mon May 11 09:59:05 2020 + +Performs echoBenchmark of the current HELICS Version. It provides some +performacne results of HELICS for a single core and multiple cores for a +variety of core types. + +The command line arguments for the function can be found in the code +following the lines following the "if __name__ == '__main__':" line +at the end of this file. + +@author: barn553 +""" + +import helics as h +import sys +import sysconfig +import os +import argparse +import pprint +import string +import random +import logging +from threading import Thread, Barrier, Timer +import json +import cpuinfo +import multiprocessing +import platform +import datetime +import time +import timeit +import psutil + +# Setting up logger +logger = logging.getLogger(__name__) + +# Setting up pretty printer +pp = pprint.PrettyPrinter(indent=4) + + +class EchoHub_c: + def __init__(self): + self.finalTime = 0.1 + self.vFed = None + self.pubs = [] + self.subs = [] + self.cnt_ = 10 + self.initialized = False + self.readyToRun = False + logging.info("created the echo hub") + + def call_on_ready(self, parties): + """This function creates the barrier for running the tests with + multiple threads. + + Args: + parties (int) - The number of barriers to create. In this + case, it is the number of federates plus 1. + + Returns: + brr (barrier object) - The barrier for the test. + """ + brr = Barrier(parties) + logging.info("echo hub - created the barrier object") + return brr + + def create_value_federate(self, coreName): + """This function creates a value federate. + + Args: + coreName (str) - The name of the core for creating the + value federate. + + Returns: + vFed (helics federate object) - The value federate. + """ + name = "echohub Test--T" + fi = h.helicsCreateFederateInfo() + h.helicsFederateInfoSetCoreName(fi, coreName) + global vFed + vFed = h.helicsCreateValueFederate(name, fi) + logging.info("echo hub - created the value federate") + return vFed + + def initialize(self, vFed, cnt): + """This function prepares the data for running the test. + + Args: + vFed (helics federate object) - The value federate. + + cnt (int) - An initial number. In this case, it is + the number of federates. + + Returns: + (null) + """ + logging.info("echo hub - preparing the data for the run") + self.vFed = vFed + self.cnt_ = cnt + i = 0 + while i < self.cnt_: + leafname = "leafrx_{}".format(i) + self.pubs.append( + h.helicsFederateRegisterGlobalPublication( + self.vFed, leafname, h.helics_data_type_string, "" + ) + ) + leafname2 = "leafsend_{}".format(i) + self.subs.append(h.helicsFederateRegisterSubscription(self.vFed, leafname2, "")) + i += 1 + self.initialized = True + logging.info("echo hub - the data is prepared for the run") + + def make_ready(self, vFed): + """This function assert that the test is ready to execute. + + Args: + vFed (helics federate object) - The value federate + + Returns: + (null) + """ + logging.info("echo hub - making sure the test is ready to run") + self.vFed = vFed + if self.initialized is not True: + logging.debug("the test has not been initialized for echo hub") + raise Exception("Must initialize first") + sys.stdout.flush() + h.helicsFederateEnterExecutingModeAsync(self.vFed) + while h.helicsFederateIsAsyncOperationCompleted(self.vFed) == 0: + pass + sys.stdout.flush() + h.helicsFederateEnterExecutingModeComplete(self.vFed) + sys.stdout.flush() + self.readyToRun = True + logging.info("echo hub - the test is ready to run") + + def _main_loop(self, vFed): + """The main loop for running the HELICS functions. + + Args: + vFed (helics federate object) - The value federate. + + Returns: + (null) + """ + self.vFed = vFed + buffer = chr(256) + cTime = h.helics_time_zero + logging.info("echo hub - starting the helics functions") + while cTime <= self.finalTime: + i = 0 + for c in range(0, self.cnt_): + if h.helicsInputIsUpdated(self.subs[i]): + actLen = 0 + h.helicsInputGetString(self.subs[i], buffer, 256, actLen) + h.helicsPublicationPublishRaw(self.pub[i], buffer, actLen) + h.helicsFederateRequestTimeAsync(self.vFed, self.finalTime + 0.05) + while h.helicsFederateIsAsyncOperationCompleted(self.vFed) == 0: + pass + cTime = h.helicsFederateRequestTimeComplete(self.vFed) + h.helicsFederateFinalizeAsync(self.vFed) + while h.helicsFederateIsAsyncOperationCompleted(self.vFed) == 0: + pass + h.helicsFederateFinalizeComplete(self.vFed) + logging.info("echo hub - the helics functions have been completed") + + def run(self, parties, vFed): + """This function executes all the above functions. This function + is what we are benchmarking to evaluate its performance. + + Args: + parties (int) - The number of barriers to create for the threads. + In this case, it is the number of federates plus 1. + + vFed (helics federate object) - The value federate. + + Returns: + (null) + """ + logging.info("echo hub - starting the execution of the helics functions") + self.vFed = vFed + self.parties = parties + if not self.readyToRun: + self.make_ready(self.vFed) + sys.stdout.flush() + self.call_on_ready(self.parties) + sys.stdout.flush() + self._main_loop(self.vFed) + logging.info("echo hub - finished the execution of the helics functions") + + def __del__(self): + h.helicsFederateFree(self.vFed) + logging.info("echo hub - the test is done -> information is cleared") + + +class EchoLeaf_c: + def __init__(self): + self.vFed = None + self.pub = None + self.sub = None + self.index_ = 0 + self.initialized = False + self.readyToRun = False + logging.info("created the echo leaf") + + def call_on_ready(self, parties): + """This function creates the barrier for running the tests with + multiple threads. + + Args: + parties (int) - The number of barriers to create. In this + case, it is the number of federates plus 1. + + Returns: + brr (barrier object) - The barrier for the test. + """ + brr = Barrier(parties) + logging.info("echo leaf - created the barrier object") + return brr + + def create_value_federate(self, coreName, index): + """This function creates a value federate. + + Args: + coreName (str) - The name of the core for creating the + value federate. + + index (int) - The number that indicates which value federate + is created and used during the test. + + Returns: + vFed (helics federate object) - The value federate. + """ + name = "echoleaf_{} Test--T".format(index) + fi = h.helicsCreateFederateInfo() + h.helicsFederateInfoSetCoreName(fi, coreName) + global vFed + vFed = h.helicsCreateValueFederate(name, fi) + logging.info("echo leaf - created the value federate") + return vFed + + def initialize(self, vFed, index): + """This function prepares the data for running the test. + + Args: + vFed (helics federate object) - The value federate. + + index (int) - An identifying number for the name of the leaf. + + Returns: + (null) + """ + logging.info("echo leaf - preparing the data for the run") + self.vFed = vFed + self.index_ = index + leafname = "leafsend_{}".format(index) + self.pub = h.helicsFederateRegisterGlobalPublication( + self.vFed, leafname, h.helics_data_type_string, "" + ) + leafname2 = "leafrx_{}".format(index) + self.sub = h.helicsFederateRegisterSubscription(self.vFed, leafname2, "") + self.initialized = True + logging.info("echo leaf - the data is prepared for the run") + + def make_ready(self, vFed): + """This function assert that the test is ready to execute. + + Args: + vFed (helics federate object) - The value federate + + Returns: + (null) + """ + self.vFed = vFed + logging.info("echo leaf - making sure the test is ready to run") + if self.initialized is False: + raise Exception("must initizialize first") + sys.stdout.flush() + h.helicsFederateEnterExecutingModeAsync(self.vFed) + while h.helicsFederateIsAsyncOperationCompleted(self.vFed) == 0: + pass + sys.stdout.flush() + h.helicsFederateEnterExecutingModeComplete(self.vFed) + sys.stdout.flush() + self.readyToRun = True + logging.info("echo leaf - the test is ready to run") + + def _main_loop(self, vFed): + """The main loop for running the HELICS functions. + + Args: + vFed (helics federate object) - The value federate. + + Returns: + (null) + """ + cnt = 0 + txstring = "{:<100000}{:<100}".format(self.index_, "1") + tbuffer = chr(256) + itr = 5000 + self.vFed = vFed + logging.info("echo leaf - starting the helics functions") + while cnt <= itr + 1: + h.helicsFederateRequestTimeAsync(self.vFed, 1.0) + while h.helicsFederateIsAsyncOperationCompleted(self.vFed) == 0: + pass + h.helicsFederateRequestTimeComplete(self.vFed) + if cnt <= itr: + h.helicsPublicationPublishString(self.pub, txstring) + if h.helicsInputIsUpdated(self.sub): + actLen = 0 + h.helicsInputGetString(self.sub, tbuffer, 256, actLen) + if str(tbuffer) != txstring: + logging.error("incorrect string\n") + break + cnt += 1 + h.helicsFederateFinalizeAsync(self.vFed) + while h.helicsFederateIsAsyncOperationCompleted(self.vFed) == 0: + pass + h.helicsFederateFinalizeComplete(self.vFed) + logging.info("echo leaf - the helics functions have been completed") + + def run(self, parties, vFed): + """This function executes all the above functions. This function + is what we are benchmarking to evaluate its performance. + + Args: + parties (int) - The number of barriers to create for the threads. + In this case, it is the number of federates plus 1. + + vFed (helics federate object) - The value federate. + + Returns: + (null) + """ + logging.info("echo leaf - starting the execution of the helics functions") + self.vFed = vFed + self.parties = parties + if not self.readyToRun: + self.make_ready(self.vFed) + sys.stdout.flush() + self.call_on_ready(self.parties) + sys.stdout.flush() + self._main_loop(self.vFed) + logging.info("echo leaf - finished the execution of the helics functions") + + def __del__(self): + h.helicsFederateFree(self.vFed) + logging.info("echo leaf - the test is done -> information is cleared") + + +def timer(): + logging.info("starting the timer") + + +def BMecho_singleCore(federates): + """This function performs the echo test. + + Args: + federates (int) - The number of federates to create for the single + core echo test. + + Returns: + (null) + """ + logging.info("starting the single core test") + t = Timer(1, timer) + t.cancel() + feds = [f for f in range(0, federates)] + wcore = h.helicsCreateCore("inproc", None, "--autobroker --federates={}".format((federates))) + hub = EchoHub_c() + hub_vFed = hub.create_value_federate(h.helicsCoreGetIdentifier(wcore)) + hub.initialize(hub_vFed, federates) + leafs = [EchoLeaf_c() for f in range(0, federates)] + i = 0 + leaf_vFeds = [] + logging.info("preparing the federates") + for f in feds: + leaf_vFed = leafs[f].create_value_federate(h.helicsCoreGetIdentifier(wcore), i) + leafs[f].initialize(leaf_vFed, i) + leaf_vFeds.append(leaf_vFed) + i += 1 + threads = [] + i = 0 + logging.info("creating the threads") + for l, f in zip(leaf_vFeds, feds): + x = Thread(target=leafs[f].run, name=leafs[f], args=(len(feds) + 1, l)) + threads.append(x) + x.start() + i += 1 + time.sleep(0.1) + hub.make_ready(hub_vFed) + logging.info("executing the echo hub") + t.start() + hub.run(len(feds) + 1, hub_vFed) + t.cancel() + logging.info("joining the threads") + for thrd in threads: + thrd.join() + h.helicsCoreFree(wcore) + h.helicsCleanupLibrary() + logging.info("finished the single core test") + + +def BMecho_multiCore(cTypeString, federates): + """This function performs the multicore test for a specific core + type. + + Args: + cTypeString (str) - Specific core type, e.g. inproc + + federates (int) - The number of federates to create for the echo + multicore test. + + Returns: + (null) + """ + logging.info("starting the multicore test for {}".format(cTypeString)) + t = Timer(1, timer) + t.cancel() + if h.helicsIsCoreTypeAvailable(cTypeString) == h.helics_false: + t.start() + feds = [f for f in range(0, federates)] + initString = "--log-level=no_print --federates={}".format(federates) + broker = h.helicsCreateBroker(cTypeString, "brokerf", initString) + wcore = h.helicsCreateCore(cTypeString, "", "--federates=1 --log_level=no_print") + hub = EchoHub_c() + hub_vFed = hub.create_value_federate(h.helicsCoreGetIdentifier(wcore)) + hub.initialize(hub_vFed, federates) + leafs = [EchoLeaf_c() for f in range(0, federates)] + cores = [] + i = 0 + leaf_vFeds = [] + logging.info("preparing the federates") + for f in feds: + core = h.helicsCreateCore(cTypeString, None, "-f 1 --log_level=no_print") + h.helicsCoreConnect(core) + leaf_vFed = leafs[f].create_value_federate(h.helicsCoreGetIdentifier(core), i) + leafs[f].initialize(leaf_vFed, i) + leaf_vFeds.append(leaf_vFed) + cores.append(core) + i += 1 + threads = [] + i = 0 + logging.info("creating the threads") + for l, f in zip(leaf_vFeds, feds): + x = Thread(target=leafs[f].run, name=leafs[f], args=(len(feds) + 1, l)) + threads.append(x) + x.start() + i += 1 + time.sleep(0.1) + hub.make_ready(hub_vFed) + logging.info("executing the echo hub") + t.start() + hub.run(len(feds) + 1, hub_vFed) + t.cancel() + logging.info("joining the threads") + for thrd in threads: + thrd.join() + h.helicsBrokerDisconnect(broker) + h.helicsBrokerFree(broker) + logging.info("clearing the cores") + for cr in cores: + h.helicsCoreFree(cr) + cores.clear() + h.helicsCoreFree(wcore) + h.helicsCleanupLibrary() + logging.info("finished the multicore test for {}".format(cTypeString)) + + +def create_bm_dictionary(name, federate_count, core_type, real_time, cpu_time, threads): + """This function creates a dictionary for a single benchmark + run. + + Args: + name (str) - The name of the benchmark, e.g. BMecho_singleCore + federate_count (int) - The number of federates. + + core_type (str) - The name of the core type. + + real_time (float) - The human-interpreted time it takes to + execute this script. + + cpu_time (float) - The time it takes a CPU to execute this script. + + threads (int) - The number of threads. + + Returns: + bm_dict (dict) - A dictionary of the benchmark results. + """ + if name == "BMecho_singleCore": + bm_dict = { + "name": "{}/{}/iterations:1/real_time".format(name, federate_count), + "run_name": "{}/{}/iterations:1/real_time".format(name, federate_count), + "run_type": "iteration", + "repetitions": 1, + "repetitions_index": 1, + "threads": threads, + "iterations": 1, + "real_time": real_time, + "cpu_time": cpu_time, + "time_unit": "s", + } + else: + bm_dict = { + "name": "{}/{}Core/{}/real_time".format(name, core_type, federate_count), + "run_name": "{}/{}Core/{}/real_time".format(name, core_type, federate_count), + "run_type": "iteration", + "repetitions": 1, + "repetitions_index": 1, + "threads": threads, + "iterations": 1, + "real_time": real_time, + "cpu_time": cpu_time, + "time_unit": "s", + } + return bm_dict + + +def wrapper(func, *args, **kwargs): + """This is a wrapper function to be used for benchmarking. It allows + func to be passed directly to timeit. + + Args: + func (function) - The function to be wrapped. + + Returns: + wrapped (function) - The original function, but in a format that + is ready to be passed to the timeit function call. + """ + + def wrapped(): + return func(*args, **kwargs) + + return wrapped + + +def create_output_file(benchmark, output_path, filename, date, bm_dicts): + """This function creates the output file, which contains some basic + information, along with the benchmark results. + + Args: + benchmark (str) - The name of the benchmark, e.g. echoBenchmark + + output_path (str) - The location to send the results. + + filename (str) - The name of the results file. + + date (datetime object) - The date and time of the benchmark run. + + bm_dicts (list) - The list of benchmark results. + + Returns: + (null) + """ + helics_version = h.helicsGetVersion() + cpu_freq = psutil.cpu_freq() + # zmq_version = h.getZMQVersion() + s, v, c = platform.system(), platform.version(), platform.python_compiler() + compiler = "{}-{}:{}".format(s, v, c) + build_flags_dict = sysconfig.get_config_vars() + build_flags = ( + str(build_flags_dict.get("base")) + "\\" + "py{}".format(build_flags_dict.get("py_version")) + ) + machine = platform.machine() + # NOTE: To get the host name, do platform.node() + # Creating the header string + string = "HELICS_BENCHMARK: {}\n".format(benchmark) + string += "------------HELICS BUILD INFO -------------\n" + string += "HELICS VERSION: {}\n".format(helics_version) + # string += 'ZMQ VERSION: {}\n'.format(zmq_version) + string += "COMPILER INFO: {}\n".format(compiler) + string += "BUILD FLAGS: {}\n".format(build_flags) + string += "------------PROCESSOR INFO ----------------\n" + string += "HOST PROCESSOR TYPE: {}\n".format(machine) + string += "CPU MODEL: {}\n".format(cpuinfo.get_cpu_info().get("brand")) + string += "NUM CPU: {}\n".format(multiprocessing.cpu_count()) + string += "-------------------------------------------\n" + bm_dict = { + "context": { + "date": date, + "host_name": platform.node(), + "executable": sys.executable, + "num_cpus": multiprocessing.cpu_count(), + "mhz_per_cpu": cpu_freq.max, + "cpu_scaling_enabled": False, + "caches": [], + "load_avg": [], + "library_build_type": "release", + }, + "benchmarks": bm_dicts, + } + bm_dict = json.dumps(bm_dict, indent=2) + string += str(bm_dict) + # Combing the header string with the benchmark dictionary + with open("{}\\{}.txt".format(output_path, filename), "w") as output_file: + output_file.write(string) + + +def _auto_run(args): + """This function runs this script as a stand-alone executable. + + Args: + '-p' or '--power' - An integaer, including 0, used to represent + how many federates should be created, e.g. 2**p where p equals 0, 1, + 2, etc. + + '-o' or '--output_path' - The path to send the benchmark results. + + Returns: + (null) + """ + logging.info("starting the echoBenchmark run") + benchmarks = [] + assert isinstance(args.power, int) + for i in range(0, args.power): + single = wrapper(BMecho_singleCore, 2 ** i) + single_real_time_start = time.time() + BMecho_singleCore(2 ** i) + single_real_time_stop = time.time() + single_cpu_time = timeit.timeit(stmt=single, number=1) + single_real_time = single_real_time_stop - single_real_time_start + single_dict = create_bm_dictionary( + "BMecho_singleCore", 2 ** i, "singleCore", single_real_time, single_cpu_time, 1 + ) + inproc = wrapper(BMecho_multiCore, "inproc", 2 ** i) + inproc_real_time_start = time.time() + BMecho_multiCore("inproc", 2 ** i) + inproc_real_time_stop = time.time() + inproc_cpu_time = timeit.timeit(stmt=inproc, number=1) + inproc_real_time = inproc_real_time_stop - inproc_real_time_start + inproc_dict = create_bm_dictionary( + "BMecho_multiCore", 2 ** i, "inproc", inproc_real_time, inproc_cpu_time, 1 + ) + zmq = wrapper(BMecho_multiCore, "zmq", 2 ** i) + zmq_real_time_start = time.time() + BMecho_multiCore("zmq", 2 ** i) + zmq_real_time_stop = time.time() + zmq_cpu_time = timeit.timeit(stmt=zmq, number=1) + zmq_real_time = zmq_real_time_stop - zmq_real_time_start + zmq_dict = create_bm_dictionary( + "BMecho_multiCore", 2 ** i, "zmq", zmq_real_time, zmq_cpu_time, 1 + ) + zmqss = wrapper(BMecho_multiCore, "zmqss", 2 ** i) + zmqss_real_time_start = time.time() + BMecho_multiCore("zmqss", 2 ** i) + zmqss_real_time_stop = time.time() + zmqss_cpu_time = timeit.timeit(stmt=zmqss, number=1) + zmqss_real_time = zmqss_real_time_stop - zmqss_real_time_start + zmqss_dict = create_bm_dictionary( + "BMecho_multiCore", 2 ** i, "zmqss", zmqss_real_time, zmqss_cpu_time, 1 + ) + udp = wrapper(BMecho_multiCore, "udp", 2 ** i) + udp_real_time_start = time.time() + BMecho_multiCore("udp", 2 ** i) + udp_real_time_stop = time.time() + udp_cpu_time = timeit.timeit(stmt=udp, number=1) + udp_real_time = udp_real_time_stop - udp_real_time_start + udp_dict = create_bm_dictionary( + "BMecho_multiCore", 2 ** i, "udp", udp_real_time, udp_cpu_time, 1 + ) + # NOTE: The following core types take way too long to complete. + # This indicates there is an issue that cannot be fixed by Python, + # but within HELICS for these core types to work. When these core + # types finally work, uncomment these lines and update the script + # to match the above lines and run this code to include their + # results. + # ipc = wrapper(BMecho_multiCore, 'ipc', 1) + # print('ipc core before timeit') + # ipc_b = timeit.timeit(stmt=ipc, number=1) + # print('ipc core after timeit') + # ipc_dict = create_bm_dictionary( + # 'BMecho_multiCore', 2**i, 'ipc', ipc_b, 1) + # tcp = wrapper(BMecho_multiCore, 'tcp', 1) + # tcp_b = timeit.timeit(stmt=tcp, number=1) + # tcp_dict = create_bm_dictionary( + # 'BMecho_multiCore', 2**i, 'tcp', tcp_b, 1) + # tcpss = wrapper(BMecho_multiCore, 'tcpss', 1) + # tcpss_b = timeit.timeit(stmt=tcpss, number=1) + # tcpss_dict = create_bm_dictionary( + # 'BMecho_multiCore', 2**i, 'tcpss', tcpss_b, 1) + benchmarks.append([single_dict, inproc_dict, zmq_dict, zmqss_dict, udp_dict]) + # Simplifying the benchmarks list before adding it to the output file + benchmarks = [val for sublist in benchmarks for val in sublist] + # Getting the current date and time of the run + date_time = "{}".format(datetime.datetime.now()) + run_id = "".join(random.choices(string.ascii_uppercase + string.digits, k=5)) + create_output_file( + "echoBenchmark", + args.output_path, + "bm_echo_pyResults{}_{}".format(datetime.date.today(), str(run_id)), + date_time, + benchmarks, + ) + logging.info("finished the echoBenchmark run") + + +if __name__ == "__main__": + fileHandle = logging.FileHandler("echoBenchmarks.log", mode="w") + fileHandle.setLevel(logging.DEBUG) + streamHandle = logging.StreamHandler(sys.stdout) + streamHandle.setLevel(logging.ERROR) + logging.basicConfig(level=logging.INFO, handlers=[fileHandle, streamHandle]) + + parser = argparse.ArgumentParser(description="Produce benchmark results.") + script_path = os.path.dirname(os.path.realpath(__file__)) + # print(script_path) + head, tail = os.path.split(script_path) + parser.add_argument("-p", "--power", nargs="?", default=2) + parser.add_argument("-o", "--output_path", nargs="?", default=os.path.join(head)) + args = parser.parse_args() + _auto_run(args) diff --git a/benchmarks/helics/multinode/README.md b/benchmarks/helics/multinode/README.md new file mode 100644 index 0000000000..f0f3877959 --- /dev/null +++ b/benchmarks/helics/multinode/README.md @@ -0,0 +1,42 @@ +# Multi-node Benchmarks + +This is a set of bash scripts and SLURM sbatch files for running multi-node HELICS benchmarks on clusters that use SLURM for scheduling jobs. + +For running on the Quartz cluster at LLNL, and other clusters that use `pbatch` as the partition name that allow scheduling jobs with a time of up to 1 hour and 8 nodes, these scripts should work with the default settings. Otherwise, it _will_ be necessary to go in and edit the default partition/times in the sbatch files, and alter the submitter bash scripts to use a number of nodes that is suitable for your cluster. + +Files are output from the directory that the job was submitted in. For the least painful experience with finding executables, it's best to run it from inside this folder of a git checkout, and a build folder in the root of the git repository called `build`. + +Some clusters may require a `--exclusive` argument getting added to the srun/sbatch commands in the scripts. + +## \*-sbatch-submitter.sh Files + +The submitter bash scripts take care of submitting multiple jobs with different parameters (number of nodes, federates per node, etc) to SLURM quickly. + +Variables of interest for controlling what jobs get submitted include: (note that the number of jobs submitted will increase very quickly as entries are added to array variables): + +- `coretypes_arr` - a list of the core types to submit benchmark jobs for +- `numnodes_arr` - a list of the number of nodes to run submitted benchmark jobs on +- `fedcount_arr` - a list of the number of federates to run per node in submitted benchmark jobs +- `msg_count_arr` - the number of messages to send for the MessageExchange benchmark +- `msg_size_arr` - the size of messages to send for the MessageExchange benchmark + +Two things to note: not every benchmark submitter supports all of these variables, and the number of jobs submitted will increase very quickly as entries are added to array variables. + +## index\*-bm.sbatch files + +The sbatch files are the script that runs when a SLURM allocates resources to a job that's been waiting in the queue. They take care of launching the broker and federates on the nodes given to the job. + +The main things of interest in these files to change are the SBATCH directives at the top of the file. They are just SLURM command line arguments, see the SLURM documentation for details. + +```shell +#SBATCH -t 1:00:00 +#SBATCH -p pbatch +``` + +`-t` is the estimated time the benchmark needs to run. 1 hour is a big overestimate for most benchmark runs smaller than 100 or so federates, changing this to something smaller may make so that the job gets scheduled and run sooner if SLURM sees an opportunity to schedule a quick job. + +`-p` is the partition of nodes to use for running the job. _This is the most likely thing that will need changing to run benchmarks on a cluster other than Quartz or LC._ + +## launch_node_federates.sh + +This is a helper script used by most of the sbatch launching scripts to ensure the right number of federates get started on a single node. It should not require any tweaks to get working on other clusters. diff --git a/benchmarks/helics/multinode/echo-sbatch-submitter.sh b/benchmarks/helics/multinode/echo-sbatch-submitter.sh new file mode 100755 index 0000000000..c90cd5e80d --- /dev/null +++ b/benchmarks/helics/multinode/echo-sbatch-submitter.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# by default this script submits jobs with 1, 2, 4, and 8 nodes +# if arguments are given when running the script, they are used as an array for the number of nodes to use + +# mpi is not on this list because starting an mpi federation requires a different setup procedure +coretypes_arr=("zmq" "zmqss" "tcp" "tcpss" "udp") +numnodes_arr=(1 2 4 8) +fedcount_arr=(2 4 8 16) +topology="single_broker" + +if [ "$#" -ne 0 ]; then + numnodes_arr=("$@") +fi + +for ct in "${coretypes_arr[@]}"; do + for numnodes in "${numnodes_arr[@]}"; do + for fedcount in "${fedcount_arr[@]}"; do + sbatch --export="CORE_TYPE=${ct},BM_FED=EchoLeaf,BM_HUB=EchoHub,LEAFS_ARG=true,FEDS_PER_NODE=${fedcount},TOPOLOGY=${topology}" -N "${numnodes}" index-hub-bm.sbatch + sbatch --export="CORE_TYPE=${ct},BM_FED=EchoMessageLeaf,BM_HUB=EchoMessageHub,FEDS_PER_NODE=${fedcount},TOPOLOGY=${topology}" -N "${numnodes}" index-hub-bm.sbatch + done + done +done diff --git a/benchmarks/helics/multinode/index-bm.sbatch b/benchmarks/helics/multinode/index-bm.sbatch new file mode 100755 index 0000000000..9ef7715779 --- /dev/null +++ b/benchmarks/helics/multinode/index-bm.sbatch @@ -0,0 +1,85 @@ +#!/bin/bash +#SBATCH -t 1:00:00 +#SBATCH -p pbatch +#SBATCH -N 1 + +# the sbatch arguments set above can be changed by passing the same argument to the sbatch command (e.g. -N100 to use 100 nodes instead of 1) +# see the https://slurm.schedmd.com/ website for docs + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +if [ -n "$SLURM_JOB_ID" ]; then + sbatch_orig_file="$(scontrol show job "$SLURM_JOBID" | awk -F= '/Command=/{print $2}')" + SCRIPT_DIR="$(cd "$(dirname "${sbatch_orig_file}")" >/dev/null 2>&1 && pwd)" +fi +echo "sbatch script location: $SCRIPT_DIR" + +# Give a way to override the name of the federate used... though things will likely break due to different benchmark federates using different arguments +if [[ "${BM_FED}" == "" ]]; then + echo "BM_FED must be provided" + exit 1 +fi + +# set coretype to other cores using --export=CORE_TYPE='' argument to sbatch +if [[ "${CORE_TYPE}" == "" ]]; then + CORE_TYPE="zmq" +fi +echo "Running ${BM_FED} benchmark on ${SLURM_JOB_NUM_NODES} nodes with core type ${CORE_TYPE}" + +# set BUILD_PATH using sbatch argument --export=BUILD_PATH='' +# default path is to a folder named build in the root of the git repository +if [[ "$BUILD_PATH" == "" ]]; then + # if the build was in a git repository, use it as a hint for where the build folder could be located + git_toplevel="$(git rev-parse --show-toplevel)" + rv=$? + if [[ "$rv" == "0" ]]; then + BUILD_PATH="${git_toplevel}/build" + else + # guess at where the build path is + BUILD_PATH="$PWD/../../../build" + fi +fi + +if [[ "${helics_broker_exe}" == "" ]]; then + helics_broker_exe="${BUILD_PATH}/bin/helics_broker" +fi +command -v "${helics_broker_exe}" || { + echo >&2 "unable to find helics broker at ${helics_broker_exe}; check for working build and set BUILD_PATH if needed" + exit 1 +} + +if [[ "${helics_bm_fed_exe}" == "" ]]; then + helics_bm_fed_exe="${BUILD_PATH}/bin/helics_benchmarks" +fi +command -v "${helics_bm_fed_exe}" || { + echo >&2 "unable to find benchmark federate at ${helics_bm_fed_exe}; check for working build and set BUILD_PATH if needed" + exit 1 +} + +# create an output folder for results +output_folder="${BM_FED}Federate-${CORE_TYPE}-N${SLURM_JOB_NUM_NODES}-job-${SLURM_JOB_ID}" +mkdir -p "${output_folder}" + +# output some basic info for this benchmark run +sys_info=$("${helics_bm_fed_exe}" --print_systeminfo) +echo "${sys_info} +DATE: $(date --universal +"%Y-%m-%d %T") +CLUSTER: ${SLURM_CLUSTER_NAME} +NUM NODES: ${SLURM_JOB_NUM_NODES} +FEDS PER NODE: ${FEDS_PER_NODE} +TOPOLOGY: ${TOPOLOGY}" >"${output_folder}/summary.txt" + +# Run info and srun job launch +echo "Running broker on $HOSTNAME" +num_feds=$((SLURM_JOB_NUM_NODES * FEDS_PER_NODE)) +"${BUILD_PATH}/bin/helics_broker" --all -f "${num_feds}" --coretype "${CORE_TYPE}" --loglevel=5 >"${output_folder}/helics-broker-out.txt" 2>&1 & + +# give some time for the broker to start up +sleep 5 + +for i in $(seq 1 "${SLURM_JOB_NUM_NODES}"); do + ((idx = i - 1)) + srun -N1 "$SCRIPT_DIR/launch_node_federates.sh" "${helics_bm_fed_exe}" "${output_folder}/${BM_FED}Federate" $((idx * FEDS_PER_NODE)) --broker="${HOSTNAME}" --coretype "${CORE_TYPE}" & +done + +wait +echo 'Done' diff --git a/benchmarks/helics/multinode/index-hub-bm.sbatch b/benchmarks/helics/multinode/index-hub-bm.sbatch new file mode 100755 index 0000000000..d15c6ba73e --- /dev/null +++ b/benchmarks/helics/multinode/index-hub-bm.sbatch @@ -0,0 +1,107 @@ +#!/bin/bash +#SBATCH -t 1:00:00 +#SBATCH -p pbatch +#SBATCH -N 1 + +# the sbatch arguments set above can be changed by passing the same argument to the sbatch command (e.g. -N100 to use 100 nodes instead of 1) +# see the https://slurm.schedmd.com/ website for docs + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +if [ -n "$SLURM_JOB_ID" ]; then + sbatch_orig_file="$(scontrol show job "$SLURM_JOBID" | awk -F= '/Command=/{print $2}')" + SCRIPT_DIR="$(cd "$(dirname "${sbatch_orig_file}")" >/dev/null 2>&1 && pwd)" +fi +echo "sbatch script location: $SCRIPT_DIR" + +# Give a way to override the name of the federate used... though things will likely break due to different benchmark federates using different arguments +if [[ "${BM_FED}" == "" ]]; then + echo "BM_FED must be provided" + exit 1 +fi + +if [[ "${BM_HUB}" == "" ]]; then + echo "BM_HUB must be provided" + exit 1 +fi + +# set coretype to other cores using --export=CORE_TYPE='' argument to sbatch +if [[ "${CORE_TYPE}" == "" ]]; then + CORE_TYPE="zmq" +fi +echo "Running ${BM_FED} benchmark on ${SLURM_JOB_NUM_NODES} nodes with core type ${CORE_TYPE}" + +# set BUILD_PATH using sbatch argument --export=BUILD_PATH='' +# default path is to a folder named build in the root of the git repository +if [[ "$BUILD_PATH" == "" ]]; then + # if the build was in a git repository, use it as a hint for where the build folder could be located + git_toplevel="$(git rev-parse --show-toplevel)" + rv=$? + if [[ "$rv" == "0" ]]; then + BUILD_PATH="${git_toplevel}/build" + else + # guess at where the build path is + BUILD_PATH="$PWD/../../../build" + fi +fi + +if [[ "${helics_broker_exe}" == "" ]]; then + helics_broker_exe="${BUILD_PATH}/bin/helics_broker" +fi +command -v "${helics_broker_exe}" || { + echo >&2 "unable to find helics broker at ${helics_broker_exe}; check for working build and set BUILD_PATH if needed" + exit 1 +} + +if [[ "${helics_bm_fed_exe}" == "" ]]; then + helics_bm_fed_exe="${BUILD_PATH}/bin/helics_benchmarks" +fi +command -v "${helics_bm_fed_exe}" || { + echo >&2 "unable to find benchmark federate at ${helics_bm_fed_exe}; check for working build and set BUILD_PATH if needed" + exit 1 +} + +if [[ "${helics_bm_hub_exe}" == "" ]]; then + helics_bm_hub_exe="${BUILD_PATH}/bin/helics_benchmarks" +fi +command -v "${helics_bm_hub_exe}" || { + echo >&2 "unable to find benchmark federate at ${helics_bm_hub_exe}; check for working build and set BUILD_PATH if needed" + exit 1 +} + +# create an output folder for results +output_folder="${BM_FED}Federate-${CORE_TYPE}-N${SLURM_JOB_NUM_NODES}-job-${SLURM_JOB_ID}" +mkdir -p "${output_folder}" + +# output some basic info for this benchmark run +sys_info=$("${helics_bm_fed_exe}" --print_systeminfo) +echo "${sys_info} +DATE: $(date --universal +"%Y-%m-%d %T") +CLUSTER: ${SLURM_CLUSTER_NAME} +NUM NODES: ${SLURM_JOB_NUM_NODES} +FEDS PER NODE: ${FEDS_PER_NODE} +TOPOLOGY: ${TOPOLOGY} +NUM LEAFS: ${SLURM_JOB_NUM_NODES}" >"${output_folder}/summary.txt" + +# Run info and srun job launch +echo "Running broker on $HOSTNAME" +num_feds=$((SLURM_JOB_NUM_NODES * FEDS_PER_NODE)) +"${BUILD_PATH}/bin/helics_broker" --all -f "$((num_feds + 1))" --coretype "${CORE_TYPE}" --loglevel=5 >"${output_folder}/helics-broker-out.txt" 2>&1 & + +# give some time for the broker to start up +sleep 5 + +# start the hub on the broker node +echo "Starting $BM_HUB on $HOSTNAME" +if [[ "$LEAFS_ARG" == "" ]]; then + "${helics_bm_hub_exe}" "${BM_HUB}" --broker="${HOSTNAME}" --coretype "${CORE_TYPE}" >"${output_folder}/${BM_HUB}Federate-out.txt" 2>&1 & +else + "${helics_bm_hub_exe}" "${BM_HUB}" --broker="${HOSTNAME}" --coretype "${CORE_TYPE}" --num_leafs="${num_feds}" >"${output_folder}/${BM_HUB}Federate-out.txt" 2>&1 & +fi + +for i in $(seq 1 "${SLURM_JOB_NUM_NODES}"); do + ((idx = i - 1)) + srun -N1 "$SCRIPT_DIR/launch_node_federates.sh" "${helics_bm_fed_exe}" "${output_folder}/${BM_FED}Federate" $((idx * FEDS_PER_NODE)) --broker="${HOSTNAME}" --coretype "${CORE_TYPE}" & +done + +wait +echo 'Done' diff --git a/benchmarks/helics/multinode/index-maxindex-bm.sbatch b/benchmarks/helics/multinode/index-maxindex-bm.sbatch new file mode 100755 index 0000000000..2b45724f27 --- /dev/null +++ b/benchmarks/helics/multinode/index-maxindex-bm.sbatch @@ -0,0 +1,84 @@ +#!/bin/bash +#SBATCH -t 1:00:00 +#SBATCH -p pbatch +#SBATCH -N 1 + +# the sbatch arguments set above can be changed by passing the same argument to the sbatch command (e.g. -N100 to use 100 nodes instead of 1) +# see the https://slurm.schedmd.com/ website for docs + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +if [ -n "$SLURM_JOB_ID" ]; then + sbatch_orig_file="$(scontrol show job "$SLURM_JOBID" | awk -F= '/Command=/{print $2}')" + SCRIPT_DIR="$(cd "$(dirname "${sbatch_orig_file}")" >/dev/null 2>&1 && pwd)" +fi +echo "sbatch script location: $SCRIPT_DIR" + +# Give a way to override the name of the federate used... though things will likely break due to different benchmark federates using different arguments +if [[ "${BM_FED}" == "" ]]; then + BM_FED="Phold" +fi + +# set coretype to other cores using --export=CORE_TYPE='' argument to sbatch +if [[ "${CORE_TYPE}" == "" ]]; then + CORE_TYPE="zmq" +fi +echo "Running ${BM_FED} benchmark on ${SLURM_JOB_NUM_NODES} nodes with core type ${CORE_TYPE}" + +# set BUILD_PATH using sbatch argument --export=BUILD_PATH='' +# default path is to a folder named build in the root of the git repository +if [[ "$BUILD_PATH" == "" ]]; then + # if the build was in a git repository, use it as a hint for where the build folder could be located + git_toplevel="$(git rev-parse --show-toplevel)" + rv=$? + if [[ "$rv" == "0" ]]; then + BUILD_PATH="${git_toplevel}/build" + else + # guess at where the build path is + BUILD_PATH="$PWD/../../../build" + fi +fi + +if [[ "${helics_broker_exe}" == "" ]]; then + helics_broker_exe="${BUILD_PATH}/bin/helics_broker" +fi +command -v "${helics_broker_exe}" || { + echo >&2 "unable to find helics broker at ${helics_broker_exe}; check for working build and set BUILD_PATH if needed" + exit 1 +} + +if [[ "${helics_bm_fed_exe}" == "" ]]; then + helics_bm_fed_exe="${BUILD_PATH}/bin/helics_benchmarks" +fi +command -v "${helics_bm_fed_exe}" || { + echo >&2 "unable to find benchmark federate at ${helics_bm_fed_exe}; check for working build and set BUILD_PATH if needed" + exit 1 +} + +# create an output folder for results +output_folder="${BM_FED}Federate-${CORE_TYPE}-N${SLURM_JOB_NUM_NODES}-job-${SLURM_JOB_ID}" +mkdir -p "${output_folder}" + +# output some basic info for this benchmark run +sys_info=$("${helics_bm_fed_exe}" --print_systeminfo) +echo "${sys_info} +DATE: $(date --universal +"%Y-%m-%d %T") +CLUSTER: ${SLURM_CLUSTER_NAME} +NUM NODES: ${SLURM_JOB_NUM_NODES} +FEDS PER NODE: ${FEDS_PER_NODE} +TOPOLOGY: ${TOPOLOGY}" >"${output_folder}/summary.txt" + +# Run info and srun job launch +echo "Running broker on $HOSTNAME" +num_feds=$((SLURM_JOB_NUM_NODES * FEDS_PER_NODE)) +"${BUILD_PATH}/bin/helics_broker" --all -f "${num_feds}" --coretype "${CORE_TYPE}" --loglevel=5 >"${output_folder}/helics-broker-out.txt" 2>&1 & + +# give some time for the broker to start up +sleep 5 + +for i in $(seq 1 "${SLURM_JOB_NUM_NODES}"); do + ((idx = i - 1)) + srun -N1 "$SCRIPT_DIR/launch_node_federates.sh" "${helics_bm_fed_exe}" "${output_folder}/${BM_FED}Federate" $((idx * FEDS_PER_NODE)) --max_index="${num_feds}" --broker="${HOSTNAME}" --coretype "${CORE_TYPE}" & +done + +wait +echo 'Done' diff --git a/benchmarks/helics/multinode/index-msg_size-msg_count-bm.sbatch b/benchmarks/helics/multinode/index-msg_size-msg_count-bm.sbatch new file mode 100755 index 0000000000..27ae0a06e7 --- /dev/null +++ b/benchmarks/helics/multinode/index-msg_size-msg_count-bm.sbatch @@ -0,0 +1,95 @@ +#!/bin/bash +#SBATCH -t 1:00:00 +#SBATCH -p pbatch +#SBATCH -N 1 + +# the sbatch arguments set above can be changed by passing the same argument to the sbatch command (e.g. -N100 to use 100 nodes instead of 1) +# see the https://slurm.schedmd.com/ website for docs + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +if [ -n "$SLURM_JOB_ID" ]; then + sbatch_orig_file="$(scontrol show job "$SLURM_JOBID" | awk -F= '/Command=/{print $2}')" + SCRIPT_DIR="$(cd "$(dirname "${sbatch_orig_file}")" >/dev/null 2>&1 && pwd)" +fi +echo "sbatch script location: $SCRIPT_DIR" + +# Give a way to override the name of the federate used... though things will likely break due to different benchmark federates using different arguments +if [[ "${BM_FED}" == "" ]]; then + echo "BM_FED must be provided" + exit 1 +fi + +if [[ "${MSG_SIZE}" == "" ]]; then + MSG_SIZE=0 +fi + +if [[ "${MSG_COUNT}" == "" ]]; then + MSG_COUNT=0 +fi + +# set coretype to other cores using --export=CORE_TYPE='' argument to sbatch +if [[ "${CORE_TYPE}" == "" ]]; then + CORE_TYPE="zmq" +fi +echo "Running ${BM_FED} benchmark on ${SLURM_JOB_NUM_NODES} nodes with core type ${CORE_TYPE}" + +# set BUILD_PATH using sbatch argument --export=BUILD_PATH='' +# default path is to a folder named build in the root of the git repository +if [[ "$BUILD_PATH" == "" ]]; then + # if the build was in a git repository, use it as a hint for where the build folder could be located + git_toplevel="$(git rev-parse --show-toplevel)" + rv=$? + if [[ "$rv" == "0" ]]; then + BUILD_PATH="${git_toplevel}/build" + else + # guess at where the build path is + BUILD_PATH="$PWD/../../../build" + fi +fi + +if [[ "${helics_broker_exe}" == "" ]]; then + helics_broker_exe="${BUILD_PATH}/bin/helics_broker" +fi +command -v "${helics_broker_exe}" || { + echo >&2 "unable to find helics broker at ${helics_broker_exe}; check for working build and set BUILD_PATH if needed" + exit 1 +} + +if [[ "${helics_bm_fed_exe}" == "" ]]; then + helics_bm_fed_exe="${BUILD_PATH}/bin/helics_benchmarks" +fi +command -v "${helics_bm_fed_exe}" || { + echo >&2 "unable to find benchmark federate at ${helics_bm_fed_exe}; check for working build and set BUILD_PATH if needed" + exit 1 +} + +# create an output folder for results +output_folder="${BM_FED}Federate-${CORE_TYPE}-N${SLURM_JOB_NUM_NODES}-job-${SLURM_JOB_ID}" +mkdir -p "${output_folder}" + +# output some basic info for this benchmark run +sys_info=$("${helics_bm_fed_exe}" --print_systeminfo) +echo "${sys_info} +DATE: $(date --universal +"%Y-%m-%d %T") +CLUSTER: ${SLURM_CLUSTER_NAME} +NUM NODES: ${SLURM_JOB_NUM_NODES} +FEDS PER NODE: ${FEDS_PER_NODE} +TOPOLOGY: ${TOPOLOGY} +MESSAGE SIZE: ${MSG_SIZE} +MESSAGE COUNT: ${MSG_COUNT}" >"${output_folder}/summary.txt" + +# Run info and srun job launch +echo "Running broker on $HOSTNAME" +num_feds=$((SLURM_JOB_NUM_NODES * FEDS_PER_NODE)) +"${BUILD_PATH}/bin/helics_broker" --all -f "${num_feds}" --coretype "${CORE_TYPE}" --loglevel=5 >"${output_folder}/helics-broker-out.txt" 2>&1 & + +# give some time for the broker to start up +sleep 5 + +for i in $(seq 1 "${SLURM_JOB_NUM_NODES}"); do + ((idx = i - 1)) + srun -N1 "$SCRIPT_DIR/launch_node_federates.sh" "${helics_bm_fed_exe}" "${output_folder}/${BM_FED}Federate" $((idx * FEDS_PER_NODE)) --broker="${HOSTNAME}" --coretype "${CORE_TYPE}" --msg_size="${MSG_SIZE}" --msg_count="${MSG_COUNT}" & +done + +wait +echo 'Done' diff --git a/benchmarks/helics/multinode/launch_node_federates.sh b/benchmarks/helics/multinode/launch_node_federates.sh new file mode 100755 index 0000000000..34c8df5a0f --- /dev/null +++ b/benchmarks/helics/multinode/launch_node_federates.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# Args: benchmark exe, number of federates per node, starting index, output folder +# Passthrough at end of arg handling: broker, coretype, msg_size, msg_count, max_index (update max_index script to multiply SLURM_JOB_NUM_NODES by feds per node) + +helics_bm_fed_exe=$1 +shift +# next argument is positional; output folder prefix, minus -${idx}-out.txt +output_prefix=$1 +shift +# last positional argument is starting index +start_index=$1 +shift + +echo "FEDS_PER_NODE=${FEDS_PER_NODE}" +echo "helics_bm_fed_exe" +echo "output_prefix" +echo "start_index" + +for ((i = start_index; i < start_index + FEDS_PER_NODE; i++)); do + echo "Running: \"${helics_bm_fed_exe}\" \"${BM_FED}\" --index=${i} \"$*\" > \"${output_prefix}-${i}-out.txt\" 2>&1 &" + "${helics_bm_fed_exe}" "${BM_FED}" --index="${i}" "$@" >"${output_prefix}-${i}-out.txt" 2>&1 & +done + +#grep -inr "$@" + +# wait until all background processes are done running +wait + +# the different commands srun currently launches +# --broker="${HOSTNAME}" --coretype "${CORE_TYPE}" +# --broker="${HOSTNAME}" --coretype "${CORE_TYPE}" +# --max_index="${SLURM_JOB_NUM_NODES}" --broker="${HOSTNAME}" --coretype "${CORE_TYPE}" +# --broker="${HOSTNAME}" --coretype "${CORE_TYPE}" --msg_size="${MSG_SIZE}" --msg_count="${MSG_COUNT}" diff --git a/benchmarks/helics/multinode/messageexchange-sbatch-submitter.sh b/benchmarks/helics/multinode/messageexchange-sbatch-submitter.sh new file mode 100755 index 0000000000..eeda9d410a --- /dev/null +++ b/benchmarks/helics/multinode/messageexchange-sbatch-submitter.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# mpi is not on this list because starting an mpi federation requires a different setup procedure +coretypes_arr=("zmq" "zmqss" "tcp" "tcpss" "udp") +msg_count_arr=(1 4 16 64) +# 4096 can cause errors with some core types +msg_size_arr=(1 16 64 256 1024 2048) + +fedcount=1 +topology="single_broker" + +for ct in "${coretypes_arr[@]}"; do + for msg_size in "${msg_size_arr[@]}"; do + for msg_count in "${msg_count_arr[@]}"; do + sbatch --export="CORE_TYPE=${ct},BM_FED=MessageExchange,MSG_SIZE=${msg_size},MSG_COUNT=${msg_count},FEDS_PER_NODE=${fedcount},TOPOLOGY=${topology}" -N "2" index-msg_size-msg_count-bm.sbatch + done + done +done diff --git a/benchmarks/helics/multinode/mpi-sbatch-submitter.sh b/benchmarks/helics/multinode/mpi-sbatch-submitter.sh new file mode 100755 index 0000000000..cd7283bf40 --- /dev/null +++ b/benchmarks/helics/multinode/mpi-sbatch-submitter.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# by default this script submits jobs with 1, 2, 4, and 8 nodes +# if arguments are given when running the script, they are used as an array for the number of nodes to use + +msg_size_arr=(1 64 256 2048) +msg_count_arr=(1 16 64) +for msg_sz in "${msg_size_arr[@]}"; do + for msg_cnt in "${msg_count_arr[@]}"; do + sbatch --export="BM_FED=MessageExchange,MSG_SIZE=$msg_sz,MSG_COUNT=$msg_cnt" -N3 submit-mpi.sbatch + done +done diff --git a/benchmarks/helics/multinode/phold-sbatch-submitter.sh b/benchmarks/helics/multinode/phold-sbatch-submitter.sh index 4e1788b5f0..7b8fd8968e 100755 --- a/benchmarks/helics/multinode/phold-sbatch-submitter.sh +++ b/benchmarks/helics/multinode/phold-sbatch-submitter.sh @@ -1,17 +1,22 @@ #!/bin/bash -# by default this script submits jobs with 1, 2, 4, and 8 nodes +# by default this script submits jobs on 1, 2, 4, and 8 nodes # if arguments are given when running the script, they are used as an array for the number of nodes to use # mpi is not on this list because starting an mpi federation requires a different setup procedure -coretypes_arr=("zmq" "zmqss" "tcp" "tcpss" "udp") numnodes_arr=(1 2 4 8) +coretypes_arr=("zmq" "zmqss" "tcp" "tcpss" "udp") +fedcount_arr=(1 2 4 16) +topology="single_broker" + if [ "$#" -ne 0 ]; then numnodes_arr=("$@") fi for ct in "${coretypes_arr[@]}"; do for numnodes in "${numnodes_arr[@]}"; do - sbatch --export="CORE_TYPE=${ct}" -N "${numnodes}" phold.sbatch + for fedcount in "${fedcount_arr[@]}"; do + sbatch --export="CORE_TYPE=${ct},BM_FED=Phold,FEDS_PER_NODE=${fedcount},TOPOLOGY=${topology}" -N "${numnodes}" index-maxindex-bm.sbatch + done done done diff --git a/benchmarks/helics/multinode/phold.sbatch b/benchmarks/helics/multinode/phold.sbatch index 29b0efbbcd..1fab3e7cb9 100755 --- a/benchmarks/helics/multinode/phold.sbatch +++ b/benchmarks/helics/multinode/phold.sbatch @@ -1,6 +1,6 @@ #!/bin/bash #SBATCH -t 0:20:00 -#SBATCH -p pdebug +#SBATCH -p pbatch #SBATCH -N 1 # the sbatch arguments set above can be changed by passing the same argument to the sbatch command (e.g. -N100 to use 100 nodes instead of 1) @@ -8,7 +8,7 @@ # Give a way to override the name of the federate used... though things will likely break due to different benchmark federates using different arguments if [[ "${BM_FED}" == "" ]]; then - BM_FED="PholdFederate" + BM_FED="Phold" fi # set coretype to other cores using --export=CORE_TYPE='' argument to sbatch @@ -32,7 +32,7 @@ if [[ "$BUILD_PATH" == "" ]]; then fi if [[ "${helics_broker_exe}" == "" ]]; then - helics_broker_exe="${BUILD_PATH}/src/helics/apps/helics_broker" + helics_broker_exe="${BUILD_PATH}/bin/helics_broker" fi command -v "${helics_broker_exe}" || { echo >&2 "unable to find helics broker at ${helics_broker_exe}; check for working build and set BUILD_PATH if needed" @@ -40,7 +40,7 @@ command -v "${helics_broker_exe}" || { } if [[ "${helics_bm_fed_exe}" == "" ]]; then - helics_bm_fed_exe="${BUILD_PATH}/benchmarks/helics/${BM_FED}" + helics_bm_fed_exe="${BUILD_PATH}/bin/helics_benchmarks" fi command -v "${helics_bm_fed_exe}" || { echo >&2 "unable to find benchmark federate at ${helics_bm_fed_exe}; check for working build and set BUILD_PATH if needed" @@ -48,21 +48,19 @@ command -v "${helics_bm_fed_exe}" || { } # create an output folder for results -output_folder="${BM_FED}-${CORE_TYPE}-N${SLURM_JOB_NUM_NODES}-job-${SLURM_JOB_ID}" +output_folder="${BM_FED}Federate-${CORE_TYPE}-N${SLURM_JOB_NUM_NODES}-job-${SLURM_JOB_ID}" mkdir -p "${output_folder}" # Run info and srun job launch echo "Running broker on $HOSTNAME" -"${BUILD_PATH}/src/helics/apps/helics_broker" --all -f "${SLURM_JOB_NUM_NODES}" --coretype "${CORE_TYPE}" --loglevel=5 >"${output_folder}/helics-broker-out.txt" 2>&1 & +"${BUILD_PATH}/bin/helics_broker" --all -f "${SLURM_JOB_NUM_NODES}" --coretype "${CORE_TYPE}" --loglevel=5 >"${output_folder}/helics-broker-out.txt" 2>&1 & # give some time for the broker to start up sleep 5 -# Run on 1 and 2 nodes to verify output, then scale to 4,8,16,32 to get performance numbers -# Run on 1 node with 2, 4, 8, 16, and 32 instances to verify Eaton results for single node for i in $(seq 1 "${SLURM_JOB_NUM_NODES}"); do ((idx = i - 1)) - srun -N1 "${helics_bm_fed_exe}" --index="$idx" --max_index="${SLURM_JOB_NUM_NODES}" --broker="${HOSTNAME}" --coretype "${CORE_TYPE}" >"${output_folder}/${BM_FED}-${idx}-out.txt" 2>&1 & + srun -N1 "${helics_bm_fed_exe}" "${BM_FED}" --index="$idx" --max_index="${SLURM_JOB_NUM_NODES}" --broker="${HOSTNAME}" --coretype "${CORE_TYPE}" >"${output_folder}/${BM_FED}Federate-${idx}-out.txt" 2>&1 & done wait diff --git a/benchmarks/helics/multinode/ringtransmit-sbatch-submitter.sh b/benchmarks/helics/multinode/ringtransmit-sbatch-submitter.sh new file mode 100755 index 0000000000..ef6b487ce3 --- /dev/null +++ b/benchmarks/helics/multinode/ringtransmit-sbatch-submitter.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# by default this script submits jobs with 1, 2, 4, and 8 nodes +# if arguments are given when running the script, they are used as an array for the number of nodes to use + +# mpi is not on this list because starting an mpi federation requires a different setup procedure +coretypes_arr=("zmq" "zmqss" "tcp" "tcpss" "udp") +numnodes_arr=(1 2 4 8) +fedcount_arr=(2 4 8 16) +topology="single_broker" + +if [ "$#" -ne 0 ]; then + numnodes_arr=("$@") +fi + +for ct in "${coretypes_arr[@]}"; do + for numnodes in "${numnodes_arr[@]}"; do + for fedcount in "${fedcount_arr[@]}"; do + sbatch --export="CORE_TYPE=${ct},BM_FED=RingTransmit,FEDS_PER_NODE=${fedcount},TOPOLOGY=${topology}" -N "${numnodes}" index-maxindex-bm.sbatch + sbatch --export="CORE_TYPE=${ct},BM_FED=RingTransmitMessage,FEDS_PER_NODE=${fedcount},TOPOLOGY=${topology}" -N "${numnodes}" index-maxindex-bm.sbatch + done + done +done diff --git a/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz1-cnt1.conf b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz1-cnt1.conf new file mode 100644 index 0000000000..83a50a8089 --- /dev/null +++ b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz1-cnt1.conf @@ -0,0 +1,7 @@ +# %t gets replaced with task number +# %o gets replaced with offset within range of task numbers given to a particular task + +1 ./helics_benchmarks messageexchange --index=0 --msg_size=1 --msg_count=1 --coretype mpi --broker "0:0" +2 ./helics_benchmarks messageexchange --index=1 --msg_size=1 --msg_count=1 --coretype mpi --broker "0:0" + +0 ./helics_broker -f2 --coretype mpi --loglevel=4 diff --git a/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz1-cnt16.conf b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz1-cnt16.conf new file mode 100644 index 0000000000..995995fd18 --- /dev/null +++ b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz1-cnt16.conf @@ -0,0 +1,7 @@ +# %t gets replaced with task number +# %o gets replaced with offset within range of task numbers given to a particular task + +1 ./helics_benchmarks messageexchange --index=0 --msg_size=1 --msg_count=16 --coretype mpi --broker "0:0" +2 ./helics_benchmarks messageexchange --index=1 --msg_size=1 --msg_count=16 --coretype mpi --broker "0:0" + +0 ./helics_broker -f2 --coretype mpi --loglevel=4 diff --git a/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz1-cnt64.conf b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz1-cnt64.conf new file mode 100644 index 0000000000..170d2a598b --- /dev/null +++ b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz1-cnt64.conf @@ -0,0 +1,7 @@ +# %t gets replaced with task number +# %o gets replaced with offset within range of task numbers given to a particular task + +1 ./helics_benchmarks messageexchange --index=0 --msg_size=1 --msg_count=64 --coretype mpi --broker "0:0" +2 ./helics_benchmarks messageexchange --index=1 --msg_size=1 --msg_count=64 --coretype mpi --broker "0:0" + +0 ./helics_broker -f2 --coretype mpi --loglevel=4 diff --git a/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz2048-cnt1.conf b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz2048-cnt1.conf new file mode 100644 index 0000000000..1249ab3d2f --- /dev/null +++ b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz2048-cnt1.conf @@ -0,0 +1,7 @@ +# %t gets replaced with task number +# %o gets replaced with offset within range of task numbers given to a particular task + +1 ./helics_benchmarks messageexchange --index=0 --msg_size=2048 --msg_count=1 --coretype mpi --broker "0:0" +2 ./helics_benchmarks messageexchange --index=1 --msg_size=2048 --msg_count=1 --coretype mpi --broker "0:0" + +0 ./helics_broker -f2 --coretype mpi --loglevel=4 diff --git a/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz2048-cnt16.conf b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz2048-cnt16.conf new file mode 100644 index 0000000000..de87ce5a3a --- /dev/null +++ b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz2048-cnt16.conf @@ -0,0 +1,7 @@ +# %t gets replaced with task number +# %o gets replaced with offset within range of task numbers given to a particular task + +1 ./helics_benchmarks messageexchange --index=0 --msg_size=2048 --msg_count=16 --coretype mpi --broker "0:0" +2 ./helics_benchmarks messageexchange --index=1 --msg_size=2048 --msg_count=16 --coretype mpi --broker "0:0" + +0 ./helics_broker -f2 --coretype mpi --loglevel=4 diff --git a/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz2048-cnt64.conf b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz2048-cnt64.conf new file mode 100644 index 0000000000..370489f840 --- /dev/null +++ b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz2048-cnt64.conf @@ -0,0 +1,7 @@ +# %t gets replaced with task number +# %o gets replaced with offset within range of task numbers given to a particular task + +1 ./helics_benchmarks messageexchange --index=0 --msg_size=2048 --msg_count=64 --coretype mpi --broker "0:0" +2 ./helics_benchmarks messageexchange --index=1 --msg_size=2048 --msg_count=64 --coretype mpi --broker "0:0" + +0 ./helics_broker -f2 --coretype mpi --loglevel=4 diff --git a/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz256-cnt1.conf b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz256-cnt1.conf new file mode 100644 index 0000000000..682ce03fd8 --- /dev/null +++ b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz256-cnt1.conf @@ -0,0 +1,7 @@ +# %t gets replaced with task number +# %o gets replaced with offset within range of task numbers given to a particular task + +1 ./helics_benchmarks messageexchange --index=0 --msg_size=256 --msg_count=1 --coretype mpi --broker "0:0" +2 ./helics_benchmarks messageexchange --index=1 --msg_size=256 --msg_count=1 --coretype mpi --broker "0:0" + +0 ./helics_broker -f2 --coretype mpi --loglevel=4 diff --git a/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz256-cnt16.conf b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz256-cnt16.conf new file mode 100644 index 0000000000..de4d8e8485 --- /dev/null +++ b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz256-cnt16.conf @@ -0,0 +1,7 @@ +# %t gets replaced with task number +# %o gets replaced with offset within range of task numbers given to a particular task + +1 ./helics_benchmarks messageexchange --index=0 --msg_size=256 --msg_count=16 --coretype mpi --broker "0:0" +2 ./helics_benchmarks messageexchange --index=1 --msg_size=256 --msg_count=16 --coretype mpi --broker "0:0" + +0 ./helics_broker -f2 --coretype mpi --loglevel=4 diff --git a/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz256-cnt64.conf b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz256-cnt64.conf new file mode 100644 index 0000000000..67907053a0 --- /dev/null +++ b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz256-cnt64.conf @@ -0,0 +1,7 @@ +# %t gets replaced with task number +# %o gets replaced with offset within range of task numbers given to a particular task + +1 ./helics_benchmarks messageexchange --index=0 --msg_size=256 --msg_count=64 --coretype mpi --broker "0:0" +2 ./helics_benchmarks messageexchange --index=1 --msg_size=256 --msg_count=64 --coretype mpi --broker "0:0" + +0 ./helics_broker -f2 --coretype mpi --loglevel=4 diff --git a/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz64-cnt1.conf b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz64-cnt1.conf new file mode 100644 index 0000000000..c5c1e7f834 --- /dev/null +++ b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz64-cnt1.conf @@ -0,0 +1,7 @@ +# %t gets replaced with task number +# %o gets replaced with offset within range of task numbers given to a particular task + +1 ./helics_benchmarks messageexchange --index=0 --msg_size=64 --msg_count=1 --coretype mpi --broker "0:0" +2 ./helics_benchmarks messageexchange --index=1 --msg_size=64 --msg_count=1 --coretype mpi --broker "0:0" + +0 ./helics_broker -f2 --coretype mpi --loglevel=4 diff --git a/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz64-cnt16.conf b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz64-cnt16.conf new file mode 100644 index 0000000000..ae32dd86fd --- /dev/null +++ b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz64-cnt16.conf @@ -0,0 +1,7 @@ +# %t gets replaced with task number +# %o gets replaced with offset within range of task numbers given to a particular task + +1 ./helics_benchmarks messageexchange --index=0 --msg_size=64 --msg_count=16 --coretype mpi --broker "0:0" +2 ./helics_benchmarks messageexchange --index=1 --msg_size=64 --msg_count=16 --coretype mpi --broker "0:0" + +0 ./helics_broker -f2 --coretype mpi --loglevel=4 diff --git a/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz64-cnt64.conf b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz64-cnt64.conf new file mode 100644 index 0000000000..4d3c52f739 --- /dev/null +++ b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange-sz64-cnt64.conf @@ -0,0 +1,7 @@ +# %t gets replaced with task number +# %o gets replaced with offset within range of task numbers given to a particular task + +1 ./helics_benchmarks messageexchange --index=0 --msg_size=64 --msg_count=64 --coretype mpi --broker "0:0" +2 ./helics_benchmarks messageexchange --index=1 --msg_size=64 --msg_count=64 --coretype mpi --broker "0:0" + +0 ./helics_broker -f2 --coretype mpi --loglevel=4 diff --git a/benchmarks/helics/multinode/srun-multi-prog/MessageExchange.conf b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange.conf new file mode 100644 index 0000000000..e1b8ea1bd7 --- /dev/null +++ b/benchmarks/helics/multinode/srun-multi-prog/MessageExchange.conf @@ -0,0 +1,7 @@ +# %t gets replaced with task number +# %o gets replaced with offset within range of task numbers given to a particular task + +1 ./helics_benchmarks messageexchange --index=0 --msg_size=1 --coretype mpi --broker "0:0" +2 ./helics_benchmarks messageexchange --index=1 --msg_count=1 --coretype mpi --broker "0:0" + +0 ./helics_broker -f2 --coretype mpi --loglevel=4 diff --git a/benchmarks/helics/multinode/submit-mpi.sbatch b/benchmarks/helics/multinode/submit-mpi.sbatch new file mode 100755 index 0000000000..6faf00921b --- /dev/null +++ b/benchmarks/helics/multinode/submit-mpi.sbatch @@ -0,0 +1,76 @@ +#!/bin/bash +#SBATCH -t 0:20:00 +#SBATCH -p pdebug +#SBATCH -N 3 + +# sbatch --export="CORE_TYPE=${ct},FEDS_PER_NODE=2,BM_FED=Phold" -N1 test.sbatch + +if [[ "$1" != "" ]]; then + BM_FED=$1 +fi + +numnodes_arr=("${SLURM_JOB_NUM_NODES}") +bm_arr=("${BM_FED}") + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +if [ -n "$SLURM_JOB_ID" ]; then + sbatch_orig_file="$(scontrol show job "$SLURM_JOBID" | awk -F= '/Command=/{print $2}')" + SCRIPT_DIR="$(cd "$(dirname "${sbatch_orig_file}")" >/dev/null 2>&1 && pwd)" +fi +export SCRIPT_DIR + +# Give a way to override the name of the federate used... though things will likely break due to different benchmark federates using different arguments +if [[ "${BM_FED}" == "" ]]; then + echo "Using default bmfeds: \"Phold\", \"Echo\", \"EchoMessage\", \"RingTransmit\", \"RingTransmitMessage\", \"Timing\"" + bm_arr=("Phold" "Echo" "EchoMessage" "RingTransmit" "RingTransmitMessage" "Timing") +fi + +if [[ "${NUM_NODES}" == "" ]]; then + echo "Using default numnodes: 2, 3, 5, 9" + numnodes_arr=(2 3 5 9) +fi + +# set BUILD_PATH using sbatch argument --export=BUILD_PATH='' +# default path is to a folder named build in the root of the git repository +if [[ "$BUILD_PATH" == "" ]]; then + # if the build was in a git repository, use it as a hint for where the build folder could be located + git_toplevel="$(git rev-parse --show-toplevel)" + rv=$? + if [[ "$rv" == "0" ]]; then + BUILD_PATH="${git_toplevel}/build" + else + # guess at where the build path is + BUILD_PATH="$PWD/../../../build" + fi +fi + +srun_conf_dir="$PWD/srun-multi-prog" + +output_dir="$PWD/${BM_FED}Federate-mpi-N${SLURM_JOB_NUM_NODES}-job-${SLURM_JOBID}" +mkdir -p "$output_dir" +output_pattern="$output_dir/%t.out" + +# output some basic info for this benchmark run +sys_info=$("${BUILD_PATH}/bin/helics_benchmarks" --print_systeminfo) +echo "${sys_info} +DATE: $(date --universal +"%Y-%m-%d %T") +CLUSTER: ${SLURM_CLUSTER_NAME} +NUM NODES: ${SLURM_JOB_NUM_NODES} +FEDS PER NODE: 1 +TOPOLOGY: ${TOPOLOGY} +MESSAGE SIZE: ${MSG_SIZE} +MESSAGE COUNT: ${MSG_COUNT}" >"${output_dir}/summary.txt" + +pushd "$BUILD_PATH/bin" || exit 1 +for bm in "${bm_arr[@]}"; do + # MessageExchange is special, only 3 nodes (2 federates+broker) but then msg size + count change + if [[ "$bm" != "MessageExchange" ]]; then + for node_ct in "${numnodes_arr[@]}"; do + echo "Running $bm on $node_ct nodes" + #srun -N "${node_ct}" -ppdebug --output="$output_pattern" --multi-prog srun-mpi.conf + done + else + echo "Running MessageExchange" + srun -N3 --output="$output_pattern" --multi-prog "${srun_conf_dir}/MessageExchange-sz${MSG_SIZE}-cnt${MSG_COUNT}.conf" + fi +done diff --git a/benchmarks/helics/multinode/timing-sbatch-submitter.sh b/benchmarks/helics/multinode/timing-sbatch-submitter.sh new file mode 100755 index 0000000000..d683bc8ccf --- /dev/null +++ b/benchmarks/helics/multinode/timing-sbatch-submitter.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# by default this script submits jobs with 1, 2, 4, and 8 nodes +# if arguments are given when running the script, they are used as an array for the number of nodes to use + +# mpi is not on this list because starting an mpi federation requires a different setup procedure +coretypes_arr=("zmq" "zmqss" "tcp" "tcpss" "udp") +numnodes_arr=(1 2 4 8) +fedcount_arr=(2 4 8 16) +topology="single_broker" + +if [ "$#" -ne 0 ]; then + numnodes_arr=("$@") +fi + +for ct in "${coretypes_arr[@]}"; do + for numnodes in "${numnodes_arr[@]}"; do + for fedcount in "${fedcount_arr[@]}"; do + sbatch --export="CORE_TYPE=${ct},BM_FED=TimingLeaf,BM_HUB=TimingHub,LEAFS_ARG=true,FEDS_PER_NODE=${fedcount},TOPOLOGY=${topology}" -N "${numnodes}" index-hub-bm.sbatch + done + done +done diff --git a/benchmarks/helics/multinode/wattsstrogatz-sbatch-submitter.sh b/benchmarks/helics/multinode/wattsstrogatz-sbatch-submitter.sh new file mode 100755 index 0000000000..a91b90d859 --- /dev/null +++ b/benchmarks/helics/multinode/wattsstrogatz-sbatch-submitter.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# by default this script submits jobs with 1, 2, 4, and 8 nodes +# if arguments are given when running the script, they are used as an array for the number of nodes to use + +# mpi is not on this list because starting an mpi federation requires a different setup procedure +coretypes_arr=("zmq" "zmqss" "tcp" "tcpss" "udp") +numnodes_arr=(1 2 4 8) +fedcount_arr=(2 4 8 16) +topology="single_broker" + +if [ "$#" -ne 0 ]; then + numnodes_arr=("$@") +fi + +for ct in "${coretypes_arr[@]}"; do + for numnodes in "${numnodes_arr[@]}"; do + for fedcount in "${fedcount_arr[@]}"; do + sbatch --export="CORE_TYPE=${ct},BM_FED=WattsStrogatz,FEDS_PER_NODE=${fedcount},TOPOLOGY=${topology}" -N "${numnodes}" index-maxindex-bm.sbatch + done + done +done diff --git a/config/cmake/addSpdlog.cmake b/config/cmake/addSpdlog.cmake new file mode 100644 index 0000000000..466a7c716a --- /dev/null +++ b/config/cmake/addSpdlog.cmake @@ -0,0 +1,37 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Copyright (c) 2017-2020, Battelle Memorial Institute; Lawrence Livermore +# National Security, LLC; Alliance for Sustainable Energy, LLC. +# See the top-level NOTICE for additional details. +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# ----------------------------------------------------------------------------- +# create the spdlog target +# ----------------------------------------------------------------------------- + +set(SPDLOG_FMT_EXTERNAL ON CACHE INTERNAL "") + +# get the SPDLOG library +add_subdirectory(ThirdParty/spdlog) + +set_target_properties(spdlog PROPERTIES FOLDER Extern) +hide_variable(SPDLOG_BUILD_ALL) +hide_variable(SPDLOG_BUILD_BENCH) +hide_variable(SPDLOG_BUILD_EXAMPLE) +hide_variable(SPDLOG_BUILD_EXAMPLE_HO) +hide_variable(SPDLOG_BUILD_SHARED) +hide_variable(SPDLOG_BUILD_TESTS) +hide_variable(SPDLOG_BUILD_TESTS_HO) +hide_variable(SPDLOG_BUILD_WARNINGS) +hide_variable(SPDLOG_ENABLE_PCH) +hide_variable(SPDLOG_NO_ATOMIC_LEVELS) +hide_variable(SPDLOG_NO_EXCEPTIONS) +hide_variable(SPDLOG_NO_THREAD_ID) +hide_variable(SPDLOG_NO_TLS) +hide_variable(SPDLOG_PREVENT_CHILD_FD) +hide_variable(SPDLOG_SANITIZE_ADDRESS) +hide_variable(SPDLOG_TIDY) +hide_variable(SPDLOG_WCHAR_FILENAMES) +hide_variable(SPDLOG_WCHAR_SUPPORT) diff --git a/config/cmake/addfmt.cmake b/config/cmake/addfmt.cmake index d1728b7d93..f4328e9370 100644 --- a/config/cmake/addfmt.cmake +++ b/config/cmake/addfmt.cmake @@ -20,6 +20,7 @@ endif() set(SUPPORTS_VARIADIC_TEMPLATES ON) set(SUPPORTS_USER_DEFINED_LITERALS ON) set(FMT_HAS_VARIANT OFF) +set(type STRING CACHE INTERNAL "") # get the FMT header only library add_subdirectory(ThirdParty/fmtlib) diff --git a/config/helics-config.h.in b/config/helics-config.h.in index 63f3b195a2..c699af094a 100644 --- a/config/helics-config.h.in +++ b/config/helics-config.h.in @@ -36,5 +36,6 @@ SPDX-License-Identifier: BSD-3-Clause #define HELICS_VERSION_STRING "${HELICS_VERSION_STRING}" #define HELICS_DATE "${HELICS_DATE}" #define HELICS_COMPILER_VERSION "${HELICS_COMPILER_VERSION}" -#define HELICS_BUILD_FLAGS "${HELICS_BUILD_FLAGS_OUTPUT}" +#define HELICS_BUILD_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_STATIC_LINKER_FLAGS} ${EXTRA_BUILD_FLAGS}" +#define HELICS_BUILD_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_STATIC_LINKER_FLAGS} ${EXTRA_BUILD_FLAGS}" #define HELICS_BUILD_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}" diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index a5e9dfb8d2..25364ae9f1 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -2,38 +2,32 @@ This document contains tentative plans for changes and improvements of note in upcoming versions of the HELICS library. All dates are approximate and subject to change, but this is a snapshot of the current planning thoughts. See the [projects](https://github.com/GMLC-TDC/HELICS/projects) for additional details -## \[2.6\] ~ 2020-07-24 +## \[2.7\] ~ 2020-09-24 This will be the last of the 2.X series releases, there will likely be at least one patch release after this before fully moving to 3.0 - Internal text based (probably JSON) message format option for general backwards compatibility -- Additional Debugging tools -- Increased code Coverage (target 80%) -- Additional package manager integration -- Some dynamic federation support -- Performance improvements and tests -- Websocket based core type -- Debugging tools (Global time synchronization points) +- Function deprecations to prepare people to move to 3.0 -## \[3.0\] ~ 2020-08-26 +## \[3.0\] ~ 2020-08-30 Beta, Final release in September Upgrade minimum compilers and build systems. Currently planned minimum targets are gcc 7.0, clang 5.0, MSVC 2017 15.7, XCode 10.1, and 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. General target requirements will allow HELICS to build on the most recent 2 LTS versions of Ubuntu using readily available repo packages. 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 10.1+ and 11 will likely be the only 2 supported at HELICS 3.0 release, and support minor releases for at least 2 years. 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 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 some of the libraries and reorganization of the header locations -## \[3.1\] ~ 2020-10-15 +## \[3.1\] ~ 2020-11-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. +Mostly things that didn't quite make it into the 3.0 release and a number of bug fixes that come from transitioning to HELICS 3.0. - SSL capable core (unlikely in 3.1 but someday) +- Full Dynamic Federation support +- Single thread cores (partial at release) +- Plugin architecture for user defined cores +- xSDK compatibility +- Much more general debugging support diff --git a/docs/Tools_using_HELICS.md b/docs/Tools_using_HELICS.md index b1e3f974c7..2cc8757c9c 100644 --- a/docs/Tools_using_HELICS.md +++ b/docs/Tools_using_HELICS.md @@ -65,3 +65,7 @@ Check the corresponding links for more information. - [BEAM](http://beam.lbl.gov/). - [POLARIS](https://www.anl.gov/es/polaris-transportation-system-simulation-tool). + +## Buildings + +- [Energy Plus](https://energyplus.net/). diff --git a/docs/user-guide/debugging.md b/docs/user-guide/debugging.md new file mode 100644 index 0000000000..4247edda80 --- /dev/null +++ b/docs/user-guide/debugging.md @@ -0,0 +1,78 @@ +# Debugging + +Debugging a co-simulation can be challenging. There are often many components running a on multiple machines and traditional debugging doesn't work that well for coordinating since the processes are often independent. +Enhancing the tools for debugging a HELICS based co-simulation is one area of focus for the coming year and we expect significant changes and improvements as we gain experience in this area. There are now a few basic capabilities in HELICS that support and help with debugging. Those capabilities are outlined in this document and will continue to be expanded. + +## Queries + +Queries are regarded as a key component of debugging. They are asynchronous from the main simulation timing and can be used from anywhere in the co-simulation. There are a number of queries that can be used to get the publications, inputs, endpoints, and filters in a co-simulation and get structures with the connections between them. See [Queries](./queries.md) for more details on the specific queries and how to execute them. + +## HELICS-CLI + +The [HELICS CLI tool](./helics_cli.md) is a tool that can help set up a co-simulation and will eventually have significant debugging capabilities which make use of the underlying capabilities documented here. It is recommended that this tool be used to help with debugging. + +## Global Time Barrier + +The capability of halting execution at a particular simulation time is a fundamental underlying capability for debugging a co-simulation. The global time barrier capability in HELICS will prevent any simulation that has not reached the given time from granting any time greater or equal to the barrier time. If the barrier is issued and a federate is already passed the given time, it will be blocked at its current time. Once a barrier is issued it will not halt an executing co-simulation until a `requestTime` operation is called by the federate. There are two mechanisms for creating a barrier, some API calls on the broker, and through a REST API in the webserver. + +### API calls + +The Broker API has two functions related to the time barrier + +```c++ +setTimeBarrier(Time time); +clearTimeBarrier(); +``` + +For the C API + +```C +helicsBrokerSetTimeBarrier(helics_broker brk, helics_time time, helics_error *err); +helicsBrokerClearTimeBarrier(helics_broker brk); +``` + +For Python and the other language API's + +```python +helicsBrokerSetTimeBarrier(helics_broker brk, helics_time time) +helicsBrokerClearTimeBarrier(helics_broker brk) +``` + +The first function creates or updates a time barrier. +The second clears it. There are no restrictions on what can be done. Simulations start at time 0 so giving a negative time to the `setTimeBarrier` operation will effectively clear the barrier. + +### Webbserver interface + +Barriers can also be created and updated through the [Webserver](./webserver.md). This includes the websocket server and the HTTP REST API components of the webserver. + +Barriers can be created or updated with an HTTP post command +`\\barrier` with `time=` in the body. The time can be specified as decimal seconds of simulation or as a value+unit such as "15 ms" or "34 min" + +They can be deleted through an HTTP delete command to `\\clear_barrier` + +Json instructions are also accepted to a websocket interface. Some examples follow: + +```json +{ + "command": "barrier", + "broker": "broker1", + "time": 15.5 +} +``` + +```json +{ + "command": "barrier", + "broker": "broker1", + "time": "275 ms" +} +``` + +```json +{ + "command": "barrier_clear", + "broker": "broker1" +} +``` + +It is expected that some additional mechanics for handling time barriers and manipulating them at finer granualarity will be available in the future and particularly in HELICS 3.0 diff --git a/docs/user-guide/index.md b/docs/user-guide/index.md index 24e1f18136..ce63869230 100644 --- a/docs/user-guide/index.md +++ b/docs/user-guide/index.md @@ -32,6 +32,7 @@ There are a number of classes of HELICS users: - [**Connecting Multiple Core Types**](./multibroker.md) - What to do when one type of communication isn't sufficient. - [**N to 1 input connections**](./multiSourceInputs.md) - Handling multiple publications to a single input - **Large Co-Simulations in HELICS (forthcoming)** - How to run HELICS co-simulations with a large (100+) number of federates +- [**Debugging**](./debugging.md) - Capabilities to help with debugging ## Additional Resources diff --git a/docs/user-guide/logging.md b/docs/user-guide/logging.md index fc92ad9abb..6bf05ca19a 100644 --- a/docs/user-guide/logging.md +++ b/docs/user-guide/logging.md @@ -22,6 +22,8 @@ helicsFederateInfoSetIntegerProperty(fi,helics_property_int_log_level, helics_lo h.helicsFederateInfoSetIntegerProperty(fi,h.helics_property_int_log_level, h.helics_log_level_data) ``` +NOTE: logging level properties set in a federateInfo will apply to a core as well if it is the first federate registered in the core. After registration log level properties must be set separately for the core and federate. + There are several levels used inside HELICS for logging - `helics_log_level_no_print` Don't print anything diff --git a/docs/user-guide/webserver.md b/docs/user-guide/webserver.md index 5c8935a691..a155aa547b 100644 --- a/docs/user-guide/webserver.md +++ b/docs/user-guide/webserver.md @@ -47,19 +47,19 @@ The running webserver will start a process that can respond to HTTP requests. ### HTTP actions ```eval_rst -+------------+---------------------------------------------------------------------------------------+ -| HTTP VERB | Description | -+============+=======================================================================================+ -| ``GET`` | Make a query, usually with nothing in the message body | -+------------+---------------------------------------------------------------------------------------+ -| ``PUSH`` | most general command, usually for creating a broker, but other actions are possible | -+------------+---------------------------------------------------------------------------------------+ -| ``SEARCH`` | make a query mostly with data in the body | -+------------+---------------------------------------------------------------------------------------+ -| ``PUT`` | create a broker | -+------------+---------------------------------------------------------------------------------------+ -| ``DELETE`` | remove a broker | -+------------+---------------------------------------------------------------------------------------+ ++------------+------------------------------------------------------------------------------------------------------+ +| HTTP VERB | Description | ++============+======================================================================================================+ +| ``GET`` | Make a query, usually with nothing in the message body | ++------------+------------------------------------------------------------------------------------------------------+ +| ``PUSH`` | most general command, usually for creating a broker or time barrier but other actions are possible | ++------------+------------------------------------------------------------------------------------------------------+ +| ``SEARCH`` | make a query mostly with data in the body | ++------------+------------------------------------------------------------------------------------------------------+ +| ``PUT`` | create a broker, or time barrier on a broker | ++------------+------------------------------------------------------------------------------------------------------+ +| ``DELETE`` | remove a broker or time barrier | ++------------+------------------------------------------------------------------------------------------------------+ ``` ### Parameters @@ -80,6 +80,8 @@ The running webserver will start a process that can respond to HTTP requests. +-------------+---------------------------------------------------------------------------------------+ | ``args`` | The command line args to pass into a created broker | +-------------+---------------------------------------------------------------------------------------+ +| ``time`` | The time associated with creation or update of a time barrier | ++-------------+---------------------------------------------------------------------------------------+ ``` Valid commands for the `command` parameter in either JSON or the URI: @@ -87,6 +89,8 @@ Valid commands for the `command` parameter in either JSON or the URI: - `query`, `search` : run a query - `create` : create a broker - `delete`, `remove` : remove a broker +- `barrier` : create or update a time barrier +- `clear_barrier`: clear a time barrier ## Websocket API @@ -242,6 +246,10 @@ The target is some named object in the federation and the query is a question. The available queries are listed [here](queries.md). More are expected to be added. +## Time Barriers + +[Time Barriers](./debugging.md) can be created and cleared through the Webserver. + ## Json For both the websockets and REST API they can accept arguments in JSON format. diff --git a/interfaces/csharp/CMakeLists.txt b/interfaces/csharp/CMakeLists.txt index d08467515f..92ccd2a203 100644 --- a/interfaces/csharp/CMakeLists.txt +++ b/interfaces/csharp/CMakeLists.txt @@ -23,7 +23,9 @@ if(SWIG_EXECUTABLE) swig_link_libraries(CShelics helicsSharedLib) - set_target_properties(${SWIG_MODULE_CShelics_REAL_NAME} PROPERTIES FOLDER interfaces) + set_target_properties( + ${SWIG_MODULE_CShelics_REAL_NAME} PROPERTIES FOLDER interfaces DEBUG_POSTFIX "" + ) else() message(SEND_ERROR "C# interface build requires swig") diff --git a/interfaces/csharp/csharp_maps.i b/interfaces/csharp/csharp_maps.i index 18a308aae0..e669d7b439 100644 --- a/interfaces/csharp/csharp_maps.i +++ b/interfaces/csharp/csharp_maps.i @@ -183,21 +183,21 @@ // // //// typemap for raw data output function -//%typemap(in, numinputs=0) (void *data, int maxDatalen, int *actualSize) { +//%typemap(in, numinputs=0) (void *data, int maxDataLength, int *actualSize) { // $3=&($2); //} // -//%typemap(freearg) (void *data, int maxDatalen, int *actualSize) { +//%typemap(freearg) (void *data, int maxDataLength, int *actualSize) { // if ($1) free($1); //} // //// Set argument to NULL before any conversion occurs -//%typemap(check)(void *data, int maxDatalen, int *actualSize) { +//%typemap(check)(void *data, int maxDataLength, int *actualSize) { // $2=helicsSubscriptionGetValueSize(arg1)+2; // $1 = malloc($2); //} // -//%typemap(argout) (void *data, int maxDatalen, int *actualSize) { +//%typemap(argout) (void *data, int maxDataLength, int *actualSize) { // PyObject *o2=PyBytes_FromStringAndSize($1,*$3); // $result = SWIG_Python_AppendOutput($result, o2); //} diff --git a/interfaces/java/CMakeLists.txt b/interfaces/java/CMakeLists.txt index 35e7f2769b..9feb793b11 100644 --- a/interfaces/java/CMakeLists.txt +++ b/interfaces/java/CMakeLists.txt @@ -180,7 +180,9 @@ if(HELICS_ENABLE_SWIG AND SWIG_EXECUTABLE) endif() endif() - set_target_properties(${SWIG_MODULE_helicsJava_REAL_NAME} PROPERTIES FOLDER interfaces) + set_target_properties( + ${SWIG_MODULE_helicsJava_REAL_NAME} PROPERTIES FOLDER interfaces DEBUG_POSTFIX "" + ) add_library(helics::java ALIAS ${SWIG_MODULE_helicsJava_REAL_NAME}) message(STATUS "java target is ${SWIG_MODULE_helicsJava_REAL_NAME}") set(HELICS_JAVA_TARGET ${SWIG_MODULE_helicsJava_REAL_NAME}) @@ -203,7 +205,7 @@ else() endif() endif() - set_target_properties(helicsJava PROPERTIES FOLDER interfaces) + set_target_properties(helicsJava PROPERTIES FOLDER interfaces DEBUG_POSTFIX "") add_library(helics::java ALIAS helicsJava) set(HELICS_JAVA_TARGET helicsJava) diff --git a/interfaces/java/interface/helics.java b/interfaces/java/interface/helics.java index fb048bd3cc..0a4c87661f 100644 --- a/interfaces/java/interface/helics.java +++ b/interfaces/java/interface/helics.java @@ -1379,6 +1379,25 @@ public static void helicsBrokerSetLogFile(SWIGTYPE_p_void broker, String logFile helicsJNI.helicsBrokerSetLogFile(SWIGTYPE_p_void.getCPtr(broker), logFileName); } + /** + * Set a broker time barrier.
+ *
+ * @param broker The broker to set the time barrier for.
+ * @param barrierTime The time to set the barrier at. + */ + public static void helicsBrokerSetTimeBarrier(SWIGTYPE_p_void broker, double barrierTime) { + helicsJNI.helicsBrokerSetTimeBarrier(SWIGTYPE_p_void.getCPtr(broker), barrierTime); + } + + /** + * Clear any time barrier on a broker.
+ *
+ * @param broker The broker to clear the barriers on. + */ + public static void helicsBrokerClearTimeBarrier(SWIGTYPE_p_void broker) { + helicsJNI.helicsBrokerClearTimeBarrier(SWIGTYPE_p_void.getCPtr(broker)); + } + /** * Create a query object.
*
@@ -1954,8 +1973,8 @@ public static int helicsInputGetRawValueSize(SWIGTYPE_p_void ipt) { *
* @return Raw string data. */ - public static void helicsInputGetRawValue(SWIGTYPE_p_void ipt, SWIGTYPE_p_void data, int maxDatalen, int[] actualSize) { - helicsJNI.helicsInputGetRawValue(SWIGTYPE_p_void.getCPtr(ipt), SWIGTYPE_p_void.getCPtr(data), maxDatalen, actualSize); + public static void helicsInputGetRawValue(SWIGTYPE_p_void ipt, SWIGTYPE_p_void data, int maxDataLength, int[] actualSize) { + helicsJNI.helicsInputGetRawValue(SWIGTYPE_p_void.getCPtr(ipt), SWIGTYPE_p_void.getCPtr(data), maxDataLength, actualSize); } /** @@ -2083,8 +2102,8 @@ public static int helicsInputGetVectorSize(SWIGTYPE_p_void ipt) { *
* @return a list of floating point values */ - public static void helicsInputGetVector(SWIGTYPE_p_void ipt, SWIGTYPE_p_double data, int maxlen, int[] actualSize) { - helicsJNI.helicsInputGetVector(SWIGTYPE_p_void.getCPtr(ipt), SWIGTYPE_p_double.getCPtr(data), maxlen, actualSize); + public static void helicsInputGetVector(SWIGTYPE_p_void ipt, SWIGTYPE_p_double data, int maxLength, int[] actualSize) { + helicsJNI.helicsInputGetVector(SWIGTYPE_p_void.getCPtr(ipt), SWIGTYPE_p_double.getCPtr(data), maxLength, actualSize); } /** @@ -2547,10 +2566,10 @@ public static int helicsEndpointIsValid(SWIGTYPE_p_void endpoint) { * Set the default destination for an endpoint if no other endpoint is given.
*
* @param endpoint The endpoint to set the destination for.
- * @param dest A string naming the desired default endpoint. + * @param dst A string naming the desired default endpoint. */ - public static void helicsEndpointSetDefaultDestination(SWIGTYPE_p_void endpoint, String dest) { - helicsJNI.helicsEndpointSetDefaultDestination(SWIGTYPE_p_void.getCPtr(endpoint), dest); + public static void helicsEndpointSetDefaultDestination(SWIGTYPE_p_void endpoint, String dst) { + helicsJNI.helicsEndpointSetDefaultDestination(SWIGTYPE_p_void.getCPtr(endpoint), dst); } /** @@ -2568,22 +2587,22 @@ public static String helicsEndpointGetDefaultDestination(SWIGTYPE_p_void endpoin * Send a message to the specified destination.
*
* @param endpoint The endpoint to send the data from.
- * @param dest The target destination.
+ * @param dst The target destination.
*
*
* "" to use the default destination.
*
* @param data The data to send. */ - public static void helicsEndpointSendMessageRaw(SWIGTYPE_p_void endpoint, String dest, SWIGTYPE_p_void data, int inputDataLength) { - helicsJNI.helicsEndpointSendMessageRaw(SWIGTYPE_p_void.getCPtr(endpoint), dest, SWIGTYPE_p_void.getCPtr(data), inputDataLength); + public static void helicsEndpointSendMessageRaw(SWIGTYPE_p_void endpoint, String dst, SWIGTYPE_p_void data, int inputDataLength) { + helicsJNI.helicsEndpointSendMessageRaw(SWIGTYPE_p_void.getCPtr(endpoint), dst, SWIGTYPE_p_void.getCPtr(data), inputDataLength); } /** * Send a message at a specific time to the specified destination.
*
* @param endpoint The endpoint to send the data from.
- * @param dest The target destination.
+ * @param dst The target destination.
*
*
* "" to use the default destination.
@@ -2592,8 +2611,8 @@ public static void helicsEndpointSendMessageRaw(SWIGTYPE_p_void endpoint, String *
* @param time The time the message should be sent. */ - public static void helicsEndpointSendEventRaw(SWIGTYPE_p_void endpoint, String dest, SWIGTYPE_p_void data, int inputDataLength, double time) { - helicsJNI.helicsEndpointSendEventRaw(SWIGTYPE_p_void.getCPtr(endpoint), dest, SWIGTYPE_p_void.getCPtr(data), inputDataLength, time); + public static void helicsEndpointSendEventRaw(SWIGTYPE_p_void endpoint, String dst, SWIGTYPE_p_void data, int inputDataLength, double time) { + helicsJNI.helicsEndpointSendEventRaw(SWIGTYPE_p_void.getCPtr(endpoint), dst, SWIGTYPE_p_void.getCPtr(data), inputDataLength, time); } /** @@ -2834,33 +2853,33 @@ public static String helicsEndpointGetInfo(SWIGTYPE_p_void end) { /** * Set the data in the info field for a filter.
*
- * @param end The endpoint to query.
+ *
* @param info The string to set. */ - public static void helicsEndpointSetInfo(SWIGTYPE_p_void end, String info) { - helicsJNI.helicsEndpointSetInfo(SWIGTYPE_p_void.getCPtr(end), info); + public static void helicsEndpointSetInfo(SWIGTYPE_p_void endpoint, String info) { + helicsJNI.helicsEndpointSetInfo(SWIGTYPE_p_void.getCPtr(endpoint), info); } /** * Set a handle option on an endpoint.
*
- * @param end The endpoint to modify.
+ *
* @param option Integer code for the option to set /ref helics_handle_options.
* @param value The value to set the option to. */ - public static void helicsEndpointSetOption(SWIGTYPE_p_void end, int option, int value) { - helicsJNI.helicsEndpointSetOption(SWIGTYPE_p_void.getCPtr(end), option, value); + public static void helicsEndpointSetOption(SWIGTYPE_p_void endpoint, int option, int value) { + helicsJNI.helicsEndpointSetOption(SWIGTYPE_p_void.getCPtr(endpoint), option, value); } /** * Set a handle option on an endpoint.
*
- * @param end The endpoint to modify.
+ *
* @param option Integer code for the option to set /ref helics_handle_options.
* @return the value of the option, for boolean options will be 0 or 1 */ - public static int helicsEndpointGetOption(SWIGTYPE_p_void end, int option) { - return helicsJNI.helicsEndpointGetOption(SWIGTYPE_p_void.getCPtr(end), option); + public static int helicsEndpointGetOption(SWIGTYPE_p_void endpoint, int option) { + return helicsJNI.helicsEndpointGetOption(SWIGTYPE_p_void.getCPtr(endpoint), option); } /** @@ -2972,8 +2991,8 @@ public static int helicsMessageGetRawDataSize(SWIGTYPE_p_void message) { *
* @return Raw string data. */ - public static void helicsMessageGetRawData(SWIGTYPE_p_void message, SWIGTYPE_p_void data, int maxMessagelen, int[] actualSize) { - helicsJNI.helicsMessageGetRawData(SWIGTYPE_p_void.getCPtr(message), SWIGTYPE_p_void.getCPtr(data), maxMessagelen, actualSize); + public static void helicsMessageGetRawData(SWIGTYPE_p_void message, SWIGTYPE_p_void data, int maxMessageLength, int[] actualSize) { + helicsJNI.helicsMessageGetRawData(SWIGTYPE_p_void.getCPtr(message), SWIGTYPE_p_void.getCPtr(data), maxMessageLength, actualSize); } /** @@ -3001,10 +3020,10 @@ public static void helicsMessageSetSource(SWIGTYPE_p_void message, String src) { * Set the destination of a message.
*
* @param message The message object in question.
- * @param dest A string containing the new destination. + * @param dst A string containing the new destination. */ - public static void helicsMessageSetDestination(SWIGTYPE_p_void message, String dest) { - helicsJNI.helicsMessageSetDestination(SWIGTYPE_p_void.getCPtr(message), dest); + public static void helicsMessageSetDestination(SWIGTYPE_p_void message, String dst) { + helicsJNI.helicsMessageSetDestination(SWIGTYPE_p_void.getCPtr(message), dst); } /** @@ -3021,10 +3040,10 @@ public static void helicsMessageSetOriginalSource(SWIGTYPE_p_void message, Strin * Set the original destination of a message.
*
* @param message The message object in question.
- * @param dest A string containing the new original source. + * @param dst A string containing the new original source. */ - public static void helicsMessageSetOriginalDestination(SWIGTYPE_p_void message, String dest) { - helicsJNI.helicsMessageSetOriginalDestination(SWIGTYPE_p_void.getCPtr(message), dest); + public static void helicsMessageSetOriginalDestination(SWIGTYPE_p_void message, String dst) { + helicsJNI.helicsMessageSetOriginalDestination(SWIGTYPE_p_void.getCPtr(message), dst); } /** @@ -3116,11 +3135,11 @@ public static void helicsMessageAppendData(SWIGTYPE_p_void message, SWIGTYPE_p_v /** * Copy a message object.
*
- * @param source_message The message object to copy from.
- * @param dest_message The message object to copy to. + * @param src_message The message object to copy from.
+ * @param dst_message The message object to copy to. */ - public static void helicsMessageCopy(SWIGTYPE_p_void source_message, SWIGTYPE_p_void dest_message) { - helicsJNI.helicsMessageCopy(SWIGTYPE_p_void.getCPtr(source_message), SWIGTYPE_p_void.getCPtr(dest_message)); + public static void helicsMessageCopy(SWIGTYPE_p_void src_message, SWIGTYPE_p_void dst_message) { + helicsJNI.helicsMessageCopy(SWIGTYPE_p_void.getCPtr(src_message), SWIGTYPE_p_void.getCPtr(dst_message)); } /** @@ -3337,10 +3356,10 @@ public static void helicsFilterSetString(SWIGTYPE_p_void filt, String prop, Stri *
* All messages going to a destination are copied to the delivery address(es).
* @param filt The given filter to add a destination target to.
- * @param dest The name of the endpoint to add as a destination target. + * @param dst The name of the endpoint to add as a destination target. */ - public static void helicsFilterAddDestinationTarget(SWIGTYPE_p_void filt, String dest) { - helicsJNI.helicsFilterAddDestinationTarget(SWIGTYPE_p_void.getCPtr(filt), dest); + public static void helicsFilterAddDestinationTarget(SWIGTYPE_p_void filt, String dst) { + helicsJNI.helicsFilterAddDestinationTarget(SWIGTYPE_p_void.getCPtr(filt), dst); } /** diff --git a/interfaces/java/interface/helicsJNI.java b/interfaces/java/interface/helicsJNI.java index a14adfd562..9d40466854 100644 --- a/interfaces/java/interface/helicsJNI.java +++ b/interfaces/java/interface/helicsJNI.java @@ -53,6 +53,8 @@ public class helicsJNI { public final static native int helics_flag_enable_init_entry_get(); public final static native int helics_flag_ignore_time_mismatch_warnings_get(); public final static native int helics_flag_terminate_on_error_get(); + public final static native int helics_flag_force_logging_flush_get(); + public final static native int helics_flag_dumplog_get(); public final static native int helics_log_level_no_print_get(); public final static native int helics_log_level_error_get(); public final static native int helics_log_level_warning_get(); @@ -268,6 +270,8 @@ public class helicsJNI { public final static native void helicsBrokerSetGlobal(long jarg1, String jarg2, String jarg3); public final static native void helicsCoreSetLogFile(long jarg1, String jarg2); public final static native void helicsBrokerSetLogFile(long jarg1, String jarg2); + public final static native void helicsBrokerSetTimeBarrier(long jarg1, double jarg2); + public final static native void helicsBrokerClearTimeBarrier(long jarg1); public final static native long helicsCreateQuery(String jarg1, String jarg2); public final static native String helicsQueryExecute(long jarg1, long jarg2); public final static native String helicsQueryCoreExecute(long jarg1, long jarg2); diff --git a/interfaces/java/interface/helicsJava.c b/interfaces/java/interface/helicsJava.c index 1c8d52880d..ebfd2bc442 100644 --- a/interfaces/java/interface/helicsJava.c +++ b/interfaces/java/interface/helicsJava.c @@ -749,6 +749,30 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helics_1flag_1terminate_1 } +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helics_1flag_1force_1logging_1flush_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + helics_federate_flags result; + + (void)jenv; + (void)jcls; + result = (helics_federate_flags)helics_flag_force_logging_flush; + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helics_1flag_1dumplog_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + helics_federate_flags result; + + (void)jenv; + (void)jcls; + result = (helics_federate_flags)helics_flag_dumplog; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helics_1log_1level_1no_1print_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; helics_log_levels result; @@ -5119,6 +5143,41 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerSetLogFile(JN } +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerSetTimeBarrier(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { + helics_broker arg1 = (helics_broker) 0 ; + helics_time arg2 ; + helics_error *arg3 = (helics_error *) 0 ; + helics_error etemp3 ; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(helics_broker *)&jarg1; + arg2 = (helics_time)jarg2; + helicsBrokerSetTimeBarrier(arg1,arg2,arg3); + { + if (arg3->error_code!=helics_ok) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerClearTimeBarrier(JNIEnv *jenv, jclass jcls, jlong jarg1) { + helics_broker arg1 = (helics_broker) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(helics_broker *)&jarg1; + helicsBrokerClearTimeBarrier(arg1); +} + + SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateQuery(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) { jlong jresult = 0 ; char *arg1 = (char *) 0 ; diff --git a/interfaces/java/interface/helics_federate_flags.java b/interfaces/java/interface/helics_federate_flags.java index 2c4603862e..e53070712b 100644 --- a/interfaces/java/interface/helics_federate_flags.java +++ b/interfaces/java/interface/helics_federate_flags.java @@ -87,6 +87,14 @@ public final class helics_federate_flags { * specify that a federate error should terminate the federation */ public final static helics_federate_flags helics_flag_terminate_on_error = new helics_federate_flags("helics_flag_terminate_on_error", helicsJNI.helics_flag_terminate_on_error_get()); + /** + * specify that the log files should be flushed on every log message + */ + public final static helics_federate_flags helics_flag_force_logging_flush = new helics_federate_flags("helics_flag_force_logging_flush", helicsJNI.helics_flag_force_logging_flush_get()); + /** + * specify that a full log should be dumped into a file + */ + public final static helics_federate_flags helics_flag_dumplog = new helics_federate_flags("helics_flag_dumplog", helicsJNI.helics_flag_dumplog_get()); public final int swigValue() { return swigValue; @@ -122,7 +130,7 @@ private helics_federate_flags(String swigName, helics_federate_flags swigEnum) { swigNext = this.swigValue+1; } - private static helics_federate_flags[] swigValues = { helics_flag_observer, helics_flag_uninterruptible, helics_flag_interruptible, helics_flag_source_only, helics_flag_only_transmit_on_change, helics_flag_only_update_on_change, helics_flag_wait_for_current_time_update, helics_flag_restrictive_time_policy, helics_flag_rollback, helics_flag_forward_compute, helics_flag_realtime, helics_flag_single_thread_federate, helics_flag_slow_responding, helics_flag_delay_init_entry, helics_flag_enable_init_entry, helics_flag_ignore_time_mismatch_warnings, helics_flag_terminate_on_error }; + private static helics_federate_flags[] swigValues = { helics_flag_observer, helics_flag_uninterruptible, helics_flag_interruptible, helics_flag_source_only, helics_flag_only_transmit_on_change, helics_flag_only_update_on_change, helics_flag_wait_for_current_time_update, helics_flag_restrictive_time_policy, helics_flag_rollback, helics_flag_forward_compute, helics_flag_realtime, helics_flag_single_thread_federate, helics_flag_slow_responding, helics_flag_delay_init_entry, helics_flag_enable_init_entry, helics_flag_ignore_time_mismatch_warnings, helics_flag_terminate_on_error, helics_flag_force_logging_flush, helics_flag_dumplog }; private static int swigNext = 0; private final int swigValue; private final String swigName; diff --git a/interfaces/java/interface/helics_filter_type.java b/interfaces/java/interface/helics_filter_type.java index 8bde682ef5..f8a8da9381 100644 --- a/interfaces/java/interface/helics_filter_type.java +++ b/interfaces/java/interface/helics_filter_type.java @@ -29,7 +29,8 @@ public final class helics_filter_type { */ public final static helics_filter_type helics_filter_type_random_drop = new helics_filter_type("helics_filter_type_random_drop", helicsJNI.helics_filter_type_random_drop_get()); /** - * a filter type that reroutes a message to a different destination than originally specified + * a filter type that reroutes a message to a different destination than originally
+ * specified */ public final static helics_filter_type helics_filter_type_reroute = new helics_filter_type("helics_filter_type_reroute", helicsJNI.helics_filter_type_reroute_get()); /** @@ -37,8 +38,8 @@ public final class helics_filter_type { */ public final static helics_filter_type helics_filter_type_clone = new helics_filter_type("helics_filter_type_clone", helicsJNI.helics_filter_type_clone_get()); /** - * a customizable filter type that can perform different actions on a message based on firewall
- * like rules + * a customizable filter type that can perform different actions on a message based on
+ * firewall like rules */ public final static helics_filter_type helics_filter_type_firewall = new helics_filter_type("helics_filter_type_firewall", helicsJNI.helics_filter_type_firewall_get()); diff --git a/interfaces/java/interface/helics_handle_options.java b/interfaces/java/interface/helics_handle_options.java index 91a67adb0e..5beebfd669 100644 --- a/interfaces/java/interface/helics_handle_options.java +++ b/interfaces/java/interface/helics_handle_options.java @@ -43,7 +43,8 @@ public final class helics_handle_options { */ public final static helics_handle_options helics_handle_option_ignore_unit_mismatch = new helics_handle_options("helics_handle_option_ignore_unit_mismatch", helicsJNI.helics_handle_option_ignore_unit_mismatch_get()); /** - * specify that an interface will only transmit on change(only applicable to publications) + * specify that an interface will only transmit on change(only applicable to
+ * publications) */ public final static helics_handle_options helics_handle_option_only_transmit_on_change = new helics_handle_options("helics_handle_option_only_transmit_on_change", helicsJNI.helics_handle_option_only_transmit_on_change_get()); /** diff --git a/interfaces/java/interface/helics_log_levels.java b/interfaces/java/interface/helics_log_levels.java index 14b509a670..e647f71b30 100644 --- a/interfaces/java/interface/helics_log_levels.java +++ b/interfaces/java/interface/helics_log_levels.java @@ -29,7 +29,8 @@ public final class helics_log_levels { */ public final static helics_log_levels helics_log_level_summary = new helics_log_levels("helics_log_level_summary", helicsJNI.helics_log_level_summary_get()); /** - * summary+ notices about federate and broker connections +messages about network connections + * summary+ notices about federate and broker connections +messages about network
+ * connections */ public final static helics_log_levels helics_log_level_connections = new helics_log_levels("helics_log_level_connections", helicsJNI.helics_log_level_connections_get()); /** diff --git a/interfaces/java/interface/helics_properties.java b/interfaces/java/interface/helics_properties.java index 8914d51a10..a8d7ca27f5 100644 --- a/interfaces/java/interface/helics_properties.java +++ b/interfaces/java/interface/helics_properties.java @@ -25,17 +25,18 @@ public final class helics_properties { */ public final static helics_properties helics_property_time_offset = new helics_properties("helics_property_time_offset", helicsJNI.helics_property_time_offset_get()); /** - * the property controlling real time lag for a federate the max time a federate can lag real
- * time + * the property controlling real time lag for a federate the max time a federate can lag
+ * real time */ public final static helics_properties helics_property_time_rt_lag = new helics_properties("helics_property_time_rt_lag", helicsJNI.helics_property_time_rt_lag_get()); /** - * the property controlling real time lead for a federate the max time a federate can be ahead
- * of real time + * the property controlling real time lead for a federate the max time a federate can be
+ * ahead of real time */ public final static helics_properties helics_property_time_rt_lead = new helics_properties("helics_property_time_rt_lead", helicsJNI.helics_property_time_rt_lead_get()); /** - * the property controlling real time tolerance for a federate sets both rt_lag and rt_lead + * the property controlling real time tolerance for a federate sets both rt_lag and
+ * rt_lead */ public final static helics_properties helics_property_time_rt_tolerance = new helics_properties("helics_property_time_rt_tolerance", helicsJNI.helics_property_time_rt_tolerance_get()); /** diff --git a/interfaces/java/java_maps.i b/interfaces/java/java_maps.i index a83a247a15..cacec4b058 100644 --- a/interfaces/java/java_maps.i +++ b/interfaces/java/java_maps.i @@ -3,38 +3,38 @@ %} -//typemap for short maxlen strings -%typemap(in) (char *outputString, int maxlen) { +//typemap for short maxLength strings +%typemap(in) (char *outputString, int maxLength) { $1 = (char*)JCALL2(GetByteArrayElements, jenv, $input, 0); $2 = (int)JCALL1(GetArrayLength, jenv, $input); } -%typemap(argout) (char *outputString, int maxlen) { +%typemap(argout) (char *outputString, int maxLength) { JCALL3(ReleaseByteArrayElements, jenv, $input, (jbyte*)$1, 0); } -%typemap(jni) (char *outputString, int maxlen) "jbyteArray" -%typemap(jtype) (char *outputString, int maxlen) "byte[]" -%typemap(jstype) (char *outputString, int maxlen) "byte[]" -%typemap(javain) (char *outputString, int maxlen) "$javainput" +%typemap(jni) (char *outputString, int maxLength) "jbyteArray" +%typemap(jtype) (char *outputString, int maxLength) "byte[]" +%typemap(jstype) (char *outputString, int maxLength) "byte[]" +%typemap(javain) (char *outputString, int maxLength) "$javainput" -%apply (char *outputString, int maxlen) { (char *outputString, int maxStringLen) }; +%apply (char *outputString, int maxLength) { (char *outputString, int maxStringLength) }; ////typemap for large string output with a length return in C -//%typemap(in, numinputs=0) (char *outputString, int maxStringLen, int *actualLength) { +//%typemap(in, numinputs=0) (char *outputString, int maxStringLength, int *actualLength) { // $3=&($2); //} // -//%typemap(freearg) (char *outputString, int maxStringLen, int *actualLength) { +//%typemap(freearg) (char *outputString, int maxStringLength, int *actualLength) { // if ($1) free($1); //} // -//%typemap(check)(char *outputString, int maxStringLen, int *actualLength) { +//%typemap(check)(char *outputString, int maxStringLength, int *actualLength) { // $2=helicsInputGetStringSize(arg1)+2; // $1 = (char *) malloc($2); //} // -//%typemap(argout) (char *outputString, int maxStringLen, int *actualLength) { +//%typemap(argout) (char *outputString, int maxStringLength, int *actualLength) { // PyObject *o2=PyString_FromString($1); // $result = SWIG_Python_AppendOutput($result, o2); //} @@ -188,21 +188,21 @@ // // //// typemap for raw data output function -//%typemap(in, numinputs=0) (void *data, int maxDatalen, int *actualSize) { +//%typemap(in, numinputs=0) (void *data, int maxDataLength, int *actualSize) { // $3=&($2); //} // -//%typemap(freearg) (void *data, int maxDatalen, int *actualSize) { +//%typemap(freearg) (void *data, int maxDataLength, int *actualSize) { // if ($1) free($1); //} // //// Set argument to NULL before any conversion occurs -//%typemap(check)(void *data, int maxDatalen, int *actualSize) { +//%typemap(check)(void *data, int maxDataLength, int *actualSize) { // $2=helicsSubscriptionGetValueSize(arg1)+2; // $1 = malloc($2); //} // -//%typemap(argout) (void *data, int maxDatalen, int *actualSize) { +//%typemap(argout) (void *data, int maxDataLength, int *actualSize) { // PyObject *o2=PyBytes_FromStringAndSize($1,*$3); // $result = SWIG_Python_AppendOutput($result, o2); //} diff --git a/interfaces/matlab/interface/+helics/helicsBrokerClearTimeBarrier.m b/interfaces/matlab/interface/+helics/helicsBrokerClearTimeBarrier.m new file mode 100644 index 0000000000..ac43db9fd7 --- /dev/null +++ b/interfaces/matlab/interface/+helics/helicsBrokerClearTimeBarrier.m @@ -0,0 +1,3 @@ +function varargout = helicsBrokerClearTimeBarrier(varargin) + [varargout{1:nargout}] = helicsMEX(148, varargin{:}); +end diff --git a/interfaces/matlab/interface/+helics/helicsBrokerSetTimeBarrier.m b/interfaces/matlab/interface/+helics/helicsBrokerSetTimeBarrier.m new file mode 100644 index 0000000000..26abe8edd0 --- /dev/null +++ b/interfaces/matlab/interface/+helics/helicsBrokerSetTimeBarrier.m @@ -0,0 +1,3 @@ +function varargout = helicsBrokerSetTimeBarrier(varargin) + [varargout{1:nargout}] = helicsMEX(147, varargin{:}); +end diff --git a/interfaces/matlab/interface/+helics/helicsCleanupLibrary.m b/interfaces/matlab/interface/+helics/helicsCleanupLibrary.m index 51d28a79b5..9ab34b802e 100644 --- a/interfaces/matlab/interface/+helics/helicsCleanupLibrary.m +++ b/interfaces/matlab/interface/+helics/helicsCleanupLibrary.m @@ -1,3 +1,3 @@ function varargout = helicsCleanupLibrary(varargin) - [varargout{1:nargout}] = helicsMEX(157, varargin{:}); + [varargout{1:nargout}] = helicsMEX(159, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsCoreRegisterCloningFilter.m b/interfaces/matlab/interface/+helics/helicsCoreRegisterCloningFilter.m index 90bb8c83d7..b1177698ca 100644 --- a/interfaces/matlab/interface/+helics/helicsCoreRegisterCloningFilter.m +++ b/interfaces/matlab/interface/+helics/helicsCoreRegisterCloningFilter.m @@ -1,3 +1,3 @@ function varargout = helicsCoreRegisterCloningFilter(varargin) - [varargout{1:nargout}] = helicsMEX(300, varargin{:}); + [varargout{1:nargout}] = helicsMEX(302, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsCoreRegisterFilter.m b/interfaces/matlab/interface/+helics/helicsCoreRegisterFilter.m index a203ce970a..90cafb3293 100644 --- a/interfaces/matlab/interface/+helics/helicsCoreRegisterFilter.m +++ b/interfaces/matlab/interface/+helics/helicsCoreRegisterFilter.m @@ -1,3 +1,3 @@ function varargout = helicsCoreRegisterFilter(varargin) - [varargout{1:nargout}] = helicsMEX(299, varargin{:}); + [varargout{1:nargout}] = helicsMEX(301, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsCreateQuery.m b/interfaces/matlab/interface/+helics/helicsCreateQuery.m index 7cab441c9d..dbc733bfc4 100644 --- a/interfaces/matlab/interface/+helics/helicsCreateQuery.m +++ b/interfaces/matlab/interface/+helics/helicsCreateQuery.m @@ -1,3 +1,3 @@ function varargout = helicsCreateQuery(varargin) - [varargout{1:nargout}] = helicsMEX(147, varargin{:}); + [varargout{1:nargout}] = helicsMEX(149, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointClearMessages.m b/interfaces/matlab/interface/+helics/helicsEndpointClearMessages.m index 5017bc9809..f6416ed8d4 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointClearMessages.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointClearMessages.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointClearMessages(varargin) - [varargout{1:nargout}] = helicsMEX(261, varargin{:}); + [varargout{1:nargout}] = helicsMEX(263, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointCreateMessageObject.m b/interfaces/matlab/interface/+helics/helicsEndpointCreateMessageObject.m index 4dbd8972d3..82416c8fff 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointCreateMessageObject.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointCreateMessageObject.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointCreateMessageObject(varargin) - [varargout{1:nargout}] = helicsMEX(256, varargin{:}); + [varargout{1:nargout}] = helicsMEX(258, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointGetDefaultDestination.m b/interfaces/matlab/interface/+helics/helicsEndpointGetDefaultDestination.m index 301d5eb60b..be8e67c390 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointGetDefaultDestination.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointGetDefaultDestination.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointGetDefaultDestination(varargin) - [varargout{1:nargout}] = helicsMEX(243, varargin{:}); + [varargout{1:nargout}] = helicsMEX(245, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointGetInfo.m b/interfaces/matlab/interface/+helics/helicsEndpointGetInfo.m index 2e38709e3a..20e6448cc6 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointGetInfo.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointGetInfo.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointGetInfo(varargin) - [varargout{1:nargout}] = helicsMEX(265, varargin{:}); + [varargout{1:nargout}] = helicsMEX(267, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointGetMessage.m b/interfaces/matlab/interface/+helics/helicsEndpointGetMessage.m index f3e6716b67..8b7e42e4e4 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointGetMessage.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointGetMessage.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointGetMessage(varargin) - [varargout{1:nargout}] = helicsMEX(254, varargin{:}); + [varargout{1:nargout}] = helicsMEX(256, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointGetMessageObject.m b/interfaces/matlab/interface/+helics/helicsEndpointGetMessageObject.m index b60ae5926d..df7f7ec1fe 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointGetMessageObject.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointGetMessageObject.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointGetMessageObject(varargin) - [varargout{1:nargout}] = helicsMEX(255, varargin{:}); + [varargout{1:nargout}] = helicsMEX(257, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointGetName.m b/interfaces/matlab/interface/+helics/helicsEndpointGetName.m index bcfc340fc1..fb026c852f 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointGetName.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointGetName.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointGetName(varargin) - [varargout{1:nargout}] = helicsMEX(263, varargin{:}); + [varargout{1:nargout}] = helicsMEX(265, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointGetOption.m b/interfaces/matlab/interface/+helics/helicsEndpointGetOption.m index 230216c1d9..9e47389c01 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointGetOption.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointGetOption.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointGetOption(varargin) - [varargout{1:nargout}] = helicsMEX(268, varargin{:}); + [varargout{1:nargout}] = helicsMEX(270, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointGetType.m b/interfaces/matlab/interface/+helics/helicsEndpointGetType.m index 698b9ee17c..14671a6960 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointGetType.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointGetType.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointGetType(varargin) - [varargout{1:nargout}] = helicsMEX(262, varargin{:}); + [varargout{1:nargout}] = helicsMEX(264, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointHasMessage.m b/interfaces/matlab/interface/+helics/helicsEndpointHasMessage.m index 59ad25d2fd..694a1bcc5a 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointHasMessage.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointHasMessage.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointHasMessage(varargin) - [varargout{1:nargout}] = helicsMEX(251, varargin{:}); + [varargout{1:nargout}] = helicsMEX(253, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointIsValid.m b/interfaces/matlab/interface/+helics/helicsEndpointIsValid.m index 2df40c93c3..985fde36f1 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointIsValid.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointIsValid.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointIsValid(varargin) - [varargout{1:nargout}] = helicsMEX(241, varargin{:}); + [varargout{1:nargout}] = helicsMEX(243, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointPendingMessages.m b/interfaces/matlab/interface/+helics/helicsEndpointPendingMessages.m index a6b2a7b90c..54c764399a 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointPendingMessages.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointPendingMessages.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointPendingMessages(varargin) - [varargout{1:nargout}] = helicsMEX(253, varargin{:}); + [varargout{1:nargout}] = helicsMEX(255, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointSendEventRaw.m b/interfaces/matlab/interface/+helics/helicsEndpointSendEventRaw.m index 1b3ecfacd2..3136e25c0f 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointSendEventRaw.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointSendEventRaw.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointSendEventRaw(varargin) - [varargout{1:nargout}] = helicsMEX(245, varargin{:}); + [varargout{1:nargout}] = helicsMEX(247, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointSendMessage.m b/interfaces/matlab/interface/+helics/helicsEndpointSendMessage.m index e7cb8ef8ed..bd846afea8 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointSendMessage.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointSendMessage.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointSendMessage(varargin) - [varargout{1:nargout}] = helicsMEX(246, varargin{:}); + [varargout{1:nargout}] = helicsMEX(248, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointSendMessageObject.m b/interfaces/matlab/interface/+helics/helicsEndpointSendMessageObject.m index 332f0b7b71..33c5bd165b 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointSendMessageObject.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointSendMessageObject.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointSendMessageObject(varargin) - [varargout{1:nargout}] = helicsMEX(247, varargin{:}); + [varargout{1:nargout}] = helicsMEX(249, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointSendMessageObjectZeroCopy.m b/interfaces/matlab/interface/+helics/helicsEndpointSendMessageObjectZeroCopy.m index bd04abe787..6672f26c0a 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointSendMessageObjectZeroCopy.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointSendMessageObjectZeroCopy.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointSendMessageObjectZeroCopy(varargin) - [varargout{1:nargout}] = helicsMEX(248, varargin{:}); + [varargout{1:nargout}] = helicsMEX(250, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointSendMessageRaw.m b/interfaces/matlab/interface/+helics/helicsEndpointSendMessageRaw.m index e47799d771..2af891256b 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointSendMessageRaw.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointSendMessageRaw.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointSendMessageRaw(varargin) - [varargout{1:nargout}] = helicsMEX(244, varargin{:}); + [varargout{1:nargout}] = helicsMEX(246, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointSetDefaultDestination.m b/interfaces/matlab/interface/+helics/helicsEndpointSetDefaultDestination.m index 1a94b3ae1d..f1575385f5 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointSetDefaultDestination.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointSetDefaultDestination.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointSetDefaultDestination(varargin) - [varargout{1:nargout}] = helicsMEX(242, varargin{:}); + [varargout{1:nargout}] = helicsMEX(244, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointSetInfo.m b/interfaces/matlab/interface/+helics/helicsEndpointSetInfo.m index 82573b83ee..9f8af5ed46 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointSetInfo.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointSetInfo.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointSetInfo(varargin) - [varargout{1:nargout}] = helicsMEX(266, varargin{:}); + [varargout{1:nargout}] = helicsMEX(268, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointSetOption.m b/interfaces/matlab/interface/+helics/helicsEndpointSetOption.m index 9f1e54e065..f4fe1dedfd 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointSetOption.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointSetOption.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointSetOption(varargin) - [varargout{1:nargout}] = helicsMEX(267, varargin{:}); + [varargout{1:nargout}] = helicsMEX(269, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsEndpointSubscribe.m b/interfaces/matlab/interface/+helics/helicsEndpointSubscribe.m index 12216aaf5d..dca5c7a46c 100644 --- a/interfaces/matlab/interface/+helics/helicsEndpointSubscribe.m +++ b/interfaces/matlab/interface/+helics/helicsEndpointSubscribe.m @@ -1,3 +1,3 @@ function varargout = helicsEndpointSubscribe(varargin) - [varargout{1:nargout}] = helicsMEX(249, varargin{:}); + [varargout{1:nargout}] = helicsMEX(251, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateClearMessages.m b/interfaces/matlab/interface/+helics/helicsFederateClearMessages.m index dc31ba8e77..5f707b7ac0 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateClearMessages.m +++ b/interfaces/matlab/interface/+helics/helicsFederateClearMessages.m @@ -1,3 +1,3 @@ function varargout = helicsFederateClearMessages(varargin) - [varargout{1:nargout}] = helicsMEX(260, varargin{:}); + [varargout{1:nargout}] = helicsMEX(262, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateClearUpdates.m b/interfaces/matlab/interface/+helics/helicsFederateClearUpdates.m index 024720fe92..7dbd2a0ca2 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateClearUpdates.m +++ b/interfaces/matlab/interface/+helics/helicsFederateClearUpdates.m @@ -1,3 +1,3 @@ function varargout = helicsFederateClearUpdates(varargin) - [varargout{1:nargout}] = helicsMEX(172, varargin{:}); + [varargout{1:nargout}] = helicsMEX(174, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateCreateMessageObject.m b/interfaces/matlab/interface/+helics/helicsFederateCreateMessageObject.m index 3cd91bfdee..589ccda064 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateCreateMessageObject.m +++ b/interfaces/matlab/interface/+helics/helicsFederateCreateMessageObject.m @@ -1,3 +1,3 @@ function varargout = helicsFederateCreateMessageObject(varargin) - [varargout{1:nargout}] = helicsMEX(259, varargin{:}); + [varargout{1:nargout}] = helicsMEX(261, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetEndpoint.m b/interfaces/matlab/interface/+helics/helicsFederateGetEndpoint.m index 0f6a899049..0395fbbc4e 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetEndpoint.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetEndpoint.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetEndpoint(varargin) - [varargout{1:nargout}] = helicsMEX(239, varargin{:}); + [varargout{1:nargout}] = helicsMEX(241, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetEndpointByIndex.m b/interfaces/matlab/interface/+helics/helicsFederateGetEndpointByIndex.m index 0397bf51a1..60f606fec9 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetEndpointByIndex.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetEndpointByIndex.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetEndpointByIndex(varargin) - [varargout{1:nargout}] = helicsMEX(240, varargin{:}); + [varargout{1:nargout}] = helicsMEX(242, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetEndpointCount.m b/interfaces/matlab/interface/+helics/helicsFederateGetEndpointCount.m index 6e7128fb25..c2df06f5c4 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetEndpointCount.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetEndpointCount.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetEndpointCount(varargin) - [varargout{1:nargout}] = helicsMEX(264, varargin{:}); + [varargout{1:nargout}] = helicsMEX(266, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetFilter.m b/interfaces/matlab/interface/+helics/helicsFederateGetFilter.m index 5eebe5499d..d08c0be443 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetFilter.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetFilter.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetFilter(varargin) - [varargout{1:nargout}] = helicsMEX(302, varargin{:}); + [varargout{1:nargout}] = helicsMEX(304, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetFilterByIndex.m b/interfaces/matlab/interface/+helics/helicsFederateGetFilterByIndex.m index e5bc4ede41..1b646827f1 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetFilterByIndex.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetFilterByIndex.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetFilterByIndex(varargin) - [varargout{1:nargout}] = helicsMEX(303, varargin{:}); + [varargout{1:nargout}] = helicsMEX(305, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetFilterCount.m b/interfaces/matlab/interface/+helics/helicsFederateGetFilterCount.m index a8e1f7c688..bd99320dd5 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetFilterCount.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetFilterCount.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetFilterCount(varargin) - [varargout{1:nargout}] = helicsMEX(301, varargin{:}); + [varargout{1:nargout}] = helicsMEX(303, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetInput.m b/interfaces/matlab/interface/+helics/helicsFederateGetInput.m index 6509e83a02..a7a5709f15 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetInput.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetInput.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetInput(varargin) - [varargout{1:nargout}] = helicsMEX(169, varargin{:}); + [varargout{1:nargout}] = helicsMEX(171, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetInputByIndex.m b/interfaces/matlab/interface/+helics/helicsFederateGetInputByIndex.m index 28b6dfdfac..db409a627f 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetInputByIndex.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetInputByIndex.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetInputByIndex(varargin) - [varargout{1:nargout}] = helicsMEX(170, varargin{:}); + [varargout{1:nargout}] = helicsMEX(172, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetInputCount.m b/interfaces/matlab/interface/+helics/helicsFederateGetInputCount.m index 3b19bfe2f4..e535ef79a8 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetInputCount.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetInputCount.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetInputCount(varargin) - [varargout{1:nargout}] = helicsMEX(236, varargin{:}); + [varargout{1:nargout}] = helicsMEX(238, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetMessage.m b/interfaces/matlab/interface/+helics/helicsFederateGetMessage.m index 4b6552b9dd..27ae2878e4 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetMessage.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetMessage.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetMessage(varargin) - [varargout{1:nargout}] = helicsMEX(257, varargin{:}); + [varargout{1:nargout}] = helicsMEX(259, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetMessageObject.m b/interfaces/matlab/interface/+helics/helicsFederateGetMessageObject.m index 70b0a9abcc..5b6419e672 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetMessageObject.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetMessageObject.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetMessageObject(varargin) - [varargout{1:nargout}] = helicsMEX(258, varargin{:}); + [varargout{1:nargout}] = helicsMEX(260, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetPublication.m b/interfaces/matlab/interface/+helics/helicsFederateGetPublication.m index 3e4e3e834d..56f5823e99 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetPublication.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetPublication.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetPublication(varargin) - [varargout{1:nargout}] = helicsMEX(167, varargin{:}); + [varargout{1:nargout}] = helicsMEX(169, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetPublicationByIndex.m b/interfaces/matlab/interface/+helics/helicsFederateGetPublicationByIndex.m index 7c94608db5..8a3c56f987 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetPublicationByIndex.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetPublicationByIndex.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetPublicationByIndex(varargin) - [varargout{1:nargout}] = helicsMEX(168, varargin{:}); + [varargout{1:nargout}] = helicsMEX(170, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetPublicationCount.m b/interfaces/matlab/interface/+helics/helicsFederateGetPublicationCount.m index ae116b8b53..93e8bb28dd 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetPublicationCount.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetPublicationCount.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetPublicationCount(varargin) - [varargout{1:nargout}] = helicsMEX(235, varargin{:}); + [varargout{1:nargout}] = helicsMEX(237, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateGetSubscription.m b/interfaces/matlab/interface/+helics/helicsFederateGetSubscription.m index e3acd77859..d8281896cc 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateGetSubscription.m +++ b/interfaces/matlab/interface/+helics/helicsFederateGetSubscription.m @@ -1,3 +1,3 @@ function varargout = helicsFederateGetSubscription(varargin) - [varargout{1:nargout}] = helicsMEX(171, varargin{:}); + [varargout{1:nargout}] = helicsMEX(173, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateHasMessage.m b/interfaces/matlab/interface/+helics/helicsFederateHasMessage.m index 6cd0c5ded9..a3d9091ff2 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateHasMessage.m +++ b/interfaces/matlab/interface/+helics/helicsFederateHasMessage.m @@ -1,3 +1,3 @@ function varargout = helicsFederateHasMessage(varargin) - [varargout{1:nargout}] = helicsMEX(250, varargin{:}); + [varargout{1:nargout}] = helicsMEX(252, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederatePendingMessages.m b/interfaces/matlab/interface/+helics/helicsFederatePendingMessages.m index 0981d4b4b7..f27508e2f1 100644 --- a/interfaces/matlab/interface/+helics/helicsFederatePendingMessages.m +++ b/interfaces/matlab/interface/+helics/helicsFederatePendingMessages.m @@ -1,3 +1,3 @@ function varargout = helicsFederatePendingMessages(varargin) - [varargout{1:nargout}] = helicsMEX(252, varargin{:}); + [varargout{1:nargout}] = helicsMEX(254, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederatePublishJSON.m b/interfaces/matlab/interface/+helics/helicsFederatePublishJSON.m index 61a0948898..3dbea77f0e 100644 --- a/interfaces/matlab/interface/+helics/helicsFederatePublishJSON.m +++ b/interfaces/matlab/interface/+helics/helicsFederatePublishJSON.m @@ -1,3 +1,3 @@ function varargout = helicsFederatePublishJSON(varargin) - [varargout{1:nargout}] = helicsMEX(174, varargin{:}); + [varargout{1:nargout}] = helicsMEX(176, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterCloningFilter.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterCloningFilter.m index 10e17decc3..5178d5bbc8 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterCloningFilter.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterCloningFilter.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterCloningFilter(varargin) - [varargout{1:nargout}] = helicsMEX(297, varargin{:}); + [varargout{1:nargout}] = helicsMEX(299, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterEndpoint.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterEndpoint.m index c3145b6a2d..84ab3104b3 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterEndpoint.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterEndpoint.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterEndpoint(varargin) - [varargout{1:nargout}] = helicsMEX(237, varargin{:}); + [varargout{1:nargout}] = helicsMEX(239, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterFilter.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterFilter.m index deb5cbeeca..8af509e109 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterFilter.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterFilter.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterFilter(varargin) - [varargout{1:nargout}] = helicsMEX(295, varargin{:}); + [varargout{1:nargout}] = helicsMEX(297, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterFromPublicationJSON.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterFromPublicationJSON.m index 04695594f0..3132e03bfc 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterFromPublicationJSON.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterFromPublicationJSON.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterFromPublicationJSON(varargin) - [varargout{1:nargout}] = helicsMEX(173, varargin{:}); + [varargout{1:nargout}] = helicsMEX(175, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalCloningFilter.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalCloningFilter.m index ba0ca9f263..03cba1697a 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalCloningFilter.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalCloningFilter.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterGlobalCloningFilter(varargin) - [varargout{1:nargout}] = helicsMEX(298, varargin{:}); + [varargout{1:nargout}] = helicsMEX(300, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalEndpoint.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalEndpoint.m index 6cc5b1b146..51ef00b017 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalEndpoint.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalEndpoint.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterGlobalEndpoint(varargin) - [varargout{1:nargout}] = helicsMEX(238, varargin{:}); + [varargout{1:nargout}] = helicsMEX(240, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalFilter.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalFilter.m index a6dd3406c9..4dee636219 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalFilter.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalFilter.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterGlobalFilter(varargin) - [varargout{1:nargout}] = helicsMEX(296, varargin{:}); + [varargout{1:nargout}] = helicsMEX(298, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalInput.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalInput.m index 4c6995ee5d..e46935c38e 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalInput.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalInput.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterGlobalInput(varargin) - [varargout{1:nargout}] = helicsMEX(165, varargin{:}); + [varargout{1:nargout}] = helicsMEX(167, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalPublication.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalPublication.m index 9acd992a80..f2052ba019 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalPublication.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalPublication.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterGlobalPublication(varargin) - [varargout{1:nargout}] = helicsMEX(161, varargin{:}); + [varargout{1:nargout}] = helicsMEX(163, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalTypeInput.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalTypeInput.m index ff745d5d3c..2aac98d917 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalTypeInput.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalTypeInput.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterGlobalTypeInput(varargin) - [varargout{1:nargout}] = helicsMEX(166, varargin{:}); + [varargout{1:nargout}] = helicsMEX(168, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalTypePublication.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalTypePublication.m index 08e5072dde..e34a4adf2c 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalTypePublication.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterGlobalTypePublication.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterGlobalTypePublication(varargin) - [varargout{1:nargout}] = helicsMEX(162, varargin{:}); + [varargout{1:nargout}] = helicsMEX(164, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterInput.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterInput.m index 8b79df77c5..5b2863d7db 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterInput.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterInput.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterInput(varargin) - [varargout{1:nargout}] = helicsMEX(163, varargin{:}); + [varargout{1:nargout}] = helicsMEX(165, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterPublication.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterPublication.m index d9f5e072dc..9d9521516c 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterPublication.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterPublication.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterPublication(varargin) - [varargout{1:nargout}] = helicsMEX(159, varargin{:}); + [varargout{1:nargout}] = helicsMEX(161, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterSubscription.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterSubscription.m index 0d67295941..2e50639854 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterSubscription.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterSubscription.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterSubscription(varargin) - [varargout{1:nargout}] = helicsMEX(158, varargin{:}); + [varargout{1:nargout}] = helicsMEX(160, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterTypeInput.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterTypeInput.m index 6b6c91ee90..77878577d7 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterTypeInput.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterTypeInput.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterTypeInput(varargin) - [varargout{1:nargout}] = helicsMEX(164, varargin{:}); + [varargout{1:nargout}] = helicsMEX(166, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFederateRegisterTypePublication.m b/interfaces/matlab/interface/+helics/helicsFederateRegisterTypePublication.m index f47322a6da..0f0728d808 100644 --- a/interfaces/matlab/interface/+helics/helicsFederateRegisterTypePublication.m +++ b/interfaces/matlab/interface/+helics/helicsFederateRegisterTypePublication.m @@ -1,3 +1,3 @@ function varargout = helicsFederateRegisterTypePublication(varargin) - [varargout{1:nargout}] = helicsMEX(160, varargin{:}); + [varargout{1:nargout}] = helicsMEX(162, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFilterAddDeliveryEndpoint.m b/interfaces/matlab/interface/+helics/helicsFilterAddDeliveryEndpoint.m index 36aabad7e2..38111876f5 100644 --- a/interfaces/matlab/interface/+helics/helicsFilterAddDeliveryEndpoint.m +++ b/interfaces/matlab/interface/+helics/helicsFilterAddDeliveryEndpoint.m @@ -1,3 +1,3 @@ function varargout = helicsFilterAddDeliveryEndpoint(varargin) - [varargout{1:nargout}] = helicsMEX(310, varargin{:}); + [varargout{1:nargout}] = helicsMEX(312, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFilterAddDestinationTarget.m b/interfaces/matlab/interface/+helics/helicsFilterAddDestinationTarget.m index fa06a13426..ca91ce3b34 100644 --- a/interfaces/matlab/interface/+helics/helicsFilterAddDestinationTarget.m +++ b/interfaces/matlab/interface/+helics/helicsFilterAddDestinationTarget.m @@ -1,3 +1,3 @@ function varargout = helicsFilterAddDestinationTarget(varargin) - [varargout{1:nargout}] = helicsMEX(308, varargin{:}); + [varargout{1:nargout}] = helicsMEX(310, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFilterAddSourceTarget.m b/interfaces/matlab/interface/+helics/helicsFilterAddSourceTarget.m index 52212d3c34..991797063d 100644 --- a/interfaces/matlab/interface/+helics/helicsFilterAddSourceTarget.m +++ b/interfaces/matlab/interface/+helics/helicsFilterAddSourceTarget.m @@ -1,3 +1,3 @@ function varargout = helicsFilterAddSourceTarget(varargin) - [varargout{1:nargout}] = helicsMEX(309, varargin{:}); + [varargout{1:nargout}] = helicsMEX(311, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFilterGetInfo.m b/interfaces/matlab/interface/+helics/helicsFilterGetInfo.m index 182c6682c4..84f570d574 100644 --- a/interfaces/matlab/interface/+helics/helicsFilterGetInfo.m +++ b/interfaces/matlab/interface/+helics/helicsFilterGetInfo.m @@ -1,3 +1,3 @@ function varargout = helicsFilterGetInfo(varargin) - [varargout{1:nargout}] = helicsMEX(313, varargin{:}); + [varargout{1:nargout}] = helicsMEX(315, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFilterGetName.m b/interfaces/matlab/interface/+helics/helicsFilterGetName.m index aff181d898..1e2970022a 100644 --- a/interfaces/matlab/interface/+helics/helicsFilterGetName.m +++ b/interfaces/matlab/interface/+helics/helicsFilterGetName.m @@ -1,3 +1,3 @@ function varargout = helicsFilterGetName(varargin) - [varargout{1:nargout}] = helicsMEX(305, varargin{:}); + [varargout{1:nargout}] = helicsMEX(307, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFilterGetOption.m b/interfaces/matlab/interface/+helics/helicsFilterGetOption.m index 994356d527..9c28d75c78 100644 --- a/interfaces/matlab/interface/+helics/helicsFilterGetOption.m +++ b/interfaces/matlab/interface/+helics/helicsFilterGetOption.m @@ -1,3 +1,3 @@ function varargout = helicsFilterGetOption(varargin) - [varargout{1:nargout}] = helicsMEX(316, varargin{:}); + [varargout{1:nargout}] = helicsMEX(318, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFilterIsValid.m b/interfaces/matlab/interface/+helics/helicsFilterIsValid.m index 34d77b1863..18a218bbc1 100644 --- a/interfaces/matlab/interface/+helics/helicsFilterIsValid.m +++ b/interfaces/matlab/interface/+helics/helicsFilterIsValid.m @@ -1,3 +1,3 @@ function varargout = helicsFilterIsValid(varargin) - [varargout{1:nargout}] = helicsMEX(304, varargin{:}); + [varargout{1:nargout}] = helicsMEX(306, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFilterRemoveDeliveryEndpoint.m b/interfaces/matlab/interface/+helics/helicsFilterRemoveDeliveryEndpoint.m index 52eecf1329..6953d9f8dd 100644 --- a/interfaces/matlab/interface/+helics/helicsFilterRemoveDeliveryEndpoint.m +++ b/interfaces/matlab/interface/+helics/helicsFilterRemoveDeliveryEndpoint.m @@ -1,3 +1,3 @@ function varargout = helicsFilterRemoveDeliveryEndpoint(varargin) - [varargout{1:nargout}] = helicsMEX(312, varargin{:}); + [varargout{1:nargout}] = helicsMEX(314, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFilterRemoveTarget.m b/interfaces/matlab/interface/+helics/helicsFilterRemoveTarget.m index 382f6f0480..71ffa19e9b 100644 --- a/interfaces/matlab/interface/+helics/helicsFilterRemoveTarget.m +++ b/interfaces/matlab/interface/+helics/helicsFilterRemoveTarget.m @@ -1,3 +1,3 @@ function varargout = helicsFilterRemoveTarget(varargin) - [varargout{1:nargout}] = helicsMEX(311, varargin{:}); + [varargout{1:nargout}] = helicsMEX(313, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFilterSet.m b/interfaces/matlab/interface/+helics/helicsFilterSet.m index e2baa6a80b..4d663bbfac 100644 --- a/interfaces/matlab/interface/+helics/helicsFilterSet.m +++ b/interfaces/matlab/interface/+helics/helicsFilterSet.m @@ -1,3 +1,3 @@ function varargout = helicsFilterSet(varargin) - [varargout{1:nargout}] = helicsMEX(306, varargin{:}); + [varargout{1:nargout}] = helicsMEX(308, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFilterSetInfo.m b/interfaces/matlab/interface/+helics/helicsFilterSetInfo.m index c63a771475..8cd7299faf 100644 --- a/interfaces/matlab/interface/+helics/helicsFilterSetInfo.m +++ b/interfaces/matlab/interface/+helics/helicsFilterSetInfo.m @@ -1,3 +1,3 @@ function varargout = helicsFilterSetInfo(varargin) - [varargout{1:nargout}] = helicsMEX(314, varargin{:}); + [varargout{1:nargout}] = helicsMEX(316, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFilterSetOption.m b/interfaces/matlab/interface/+helics/helicsFilterSetOption.m index 987428b3a5..9991dd5d02 100644 --- a/interfaces/matlab/interface/+helics/helicsFilterSetOption.m +++ b/interfaces/matlab/interface/+helics/helicsFilterSetOption.m @@ -1,3 +1,3 @@ function varargout = helicsFilterSetOption(varargin) - [varargout{1:nargout}] = helicsMEX(315, varargin{:}); + [varargout{1:nargout}] = helicsMEX(317, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsFilterSetString.m b/interfaces/matlab/interface/+helics/helicsFilterSetString.m index fa55b6628a..bdb24026da 100644 --- a/interfaces/matlab/interface/+helics/helicsFilterSetString.m +++ b/interfaces/matlab/interface/+helics/helicsFilterSetString.m @@ -1,3 +1,3 @@ function varargout = helicsFilterSetString(varargin) - [varargout{1:nargout}] = helicsMEX(307, varargin{:}); + [varargout{1:nargout}] = helicsMEX(309, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputAddTarget.m b/interfaces/matlab/interface/+helics/helicsInputAddTarget.m index 07eebfcdc0..060cac309c 100644 --- a/interfaces/matlab/interface/+helics/helicsInputAddTarget.m +++ b/interfaces/matlab/interface/+helics/helicsInputAddTarget.m @@ -1,3 +1,3 @@ function varargout = helicsInputAddTarget(varargin) - [varargout{1:nargout}] = helicsMEX(188, varargin{:}); + [varargout{1:nargout}] = helicsMEX(190, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputClearUpdate.m b/interfaces/matlab/interface/+helics/helicsInputClearUpdate.m index 98057809b6..10ffa5ae1e 100644 --- a/interfaces/matlab/interface/+helics/helicsInputClearUpdate.m +++ b/interfaces/matlab/interface/+helics/helicsInputClearUpdate.m @@ -1,3 +1,3 @@ function varargout = helicsInputClearUpdate(varargin) - [varargout{1:nargout}] = helicsMEX(234, varargin{:}); + [varargout{1:nargout}] = helicsMEX(236, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetBoolean.m b/interfaces/matlab/interface/+helics/helicsInputGetBoolean.m index 34f2997a47..27005aa1f1 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetBoolean.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetBoolean.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetBoolean(varargin) - [varargout{1:nargout}] = helicsMEX(194, varargin{:}); + [varargout{1:nargout}] = helicsMEX(196, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetChar.m b/interfaces/matlab/interface/+helics/helicsInputGetChar.m index 9cfca4db76..c61d3796dc 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetChar.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetChar.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetChar(varargin) - [varargout{1:nargout}] = helicsMEX(197, varargin{:}); + [varargout{1:nargout}] = helicsMEX(199, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetComplex.m b/interfaces/matlab/interface/+helics/helicsInputGetComplex.m index 1407bbad15..83c52f8b5c 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetComplex.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetComplex.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetComplex(varargin) - [varargout{1:nargout}] = helicsMEX(198, varargin{:}); + [varargout{1:nargout}] = helicsMEX(200, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetDouble.m b/interfaces/matlab/interface/+helics/helicsInputGetDouble.m index a3b7b4804f..0c6d3e95f7 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetDouble.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetDouble.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetDouble(varargin) - [varargout{1:nargout}] = helicsMEX(195, varargin{:}); + [varargout{1:nargout}] = helicsMEX(197, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetExtractionUnits.m b/interfaces/matlab/interface/+helics/helicsInputGetExtractionUnits.m index d68e3c8047..0c0f8b6e75 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetExtractionUnits.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetExtractionUnits.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetExtractionUnits(varargin) - [varargout{1:nargout}] = helicsMEX(220, varargin{:}); + [varargout{1:nargout}] = helicsMEX(222, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetInfo.m b/interfaces/matlab/interface/+helics/helicsInputGetInfo.m index e15757d336..44d72e451d 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetInfo.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetInfo.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetInfo(varargin) - [varargout{1:nargout}] = helicsMEX(222, varargin{:}); + [varargout{1:nargout}] = helicsMEX(224, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetInjectionUnits.m b/interfaces/matlab/interface/+helics/helicsInputGetInjectionUnits.m index 8af2e918d5..15ea08eea3 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetInjectionUnits.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetInjectionUnits.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetInjectionUnits(varargin) - [varargout{1:nargout}] = helicsMEX(219, varargin{:}); + [varargout{1:nargout}] = helicsMEX(221, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetInteger.m b/interfaces/matlab/interface/+helics/helicsInputGetInteger.m index 2479bd78b6..4188311e24 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetInteger.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetInteger.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetInteger(varargin) - [varargout{1:nargout}] = helicsMEX(193, varargin{:}); + [varargout{1:nargout}] = helicsMEX(195, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetKey.m b/interfaces/matlab/interface/+helics/helicsInputGetKey.m index 4cd9d9d3af..8dd0592564 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetKey.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetKey.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetKey(varargin) - [varargout{1:nargout}] = helicsMEX(215, varargin{:}); + [varargout{1:nargout}] = helicsMEX(217, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetNamedPoint.m b/interfaces/matlab/interface/+helics/helicsInputGetNamedPoint.m index 76fed56c90..fcebf2c407 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetNamedPoint.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetNamedPoint.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetNamedPoint(varargin) - [varargout{1:nargout}] = helicsMEX(201, varargin{:}); + [varargout{1:nargout}] = helicsMEX(203, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetOption.m b/interfaces/matlab/interface/+helics/helicsInputGetOption.m index c46d268722..7a4de1a015 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetOption.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetOption.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetOption(varargin) - [varargout{1:nargout}] = helicsMEX(226, varargin{:}); + [varargout{1:nargout}] = helicsMEX(228, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetPublicationType.m b/interfaces/matlab/interface/+helics/helicsInputGetPublicationType.m index f7548e0077..51aedd54db 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetPublicationType.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetPublicationType.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetPublicationType(varargin) - [varargout{1:nargout}] = helicsMEX(213, varargin{:}); + [varargout{1:nargout}] = helicsMEX(215, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetRawValue.m b/interfaces/matlab/interface/+helics/helicsInputGetRawValue.m index 2457aa08e2..053a206334 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetRawValue.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetRawValue.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetRawValue(varargin) - [varargout{1:nargout}] = helicsMEX(190, varargin{:}); + [varargout{1:nargout}] = helicsMEX(192, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetRawValueSize.m b/interfaces/matlab/interface/+helics/helicsInputGetRawValueSize.m index 899f560781..764d00cb61 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetRawValueSize.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetRawValueSize.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetRawValueSize(varargin) - [varargout{1:nargout}] = helicsMEX(189, varargin{:}); + [varargout{1:nargout}] = helicsMEX(191, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetString.m b/interfaces/matlab/interface/+helics/helicsInputGetString.m index 9f3315e9de..bedf19c1a5 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetString.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetString.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetString(varargin) - [varargout{1:nargout}] = helicsMEX(192, varargin{:}); + [varargout{1:nargout}] = helicsMEX(194, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetStringSize.m b/interfaces/matlab/interface/+helics/helicsInputGetStringSize.m index 3e1589c81b..68e2808298 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetStringSize.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetStringSize.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetStringSize(varargin) - [varargout{1:nargout}] = helicsMEX(191, varargin{:}); + [varargout{1:nargout}] = helicsMEX(193, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetTime.m b/interfaces/matlab/interface/+helics/helicsInputGetTime.m index 232a198285..af4bb1d213 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetTime.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetTime.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetTime(varargin) - [varargout{1:nargout}] = helicsMEX(196, varargin{:}); + [varargout{1:nargout}] = helicsMEX(198, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetType.m b/interfaces/matlab/interface/+helics/helicsInputGetType.m index 3788c532a6..0afa5f0471 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetType.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetType.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetType(varargin) - [varargout{1:nargout}] = helicsMEX(212, varargin{:}); + [varargout{1:nargout}] = helicsMEX(214, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetUnits.m b/interfaces/matlab/interface/+helics/helicsInputGetUnits.m index bb1c5f2d5c..5437427822 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetUnits.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetUnits.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetUnits(varargin) - [varargout{1:nargout}] = helicsMEX(218, varargin{:}); + [varargout{1:nargout}] = helicsMEX(220, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetVector.m b/interfaces/matlab/interface/+helics/helicsInputGetVector.m index 75235a0b75..e0872dccfc 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetVector.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetVector.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetVector(varargin) - [varargout{1:nargout}] = helicsMEX(200, varargin{:}); + [varargout{1:nargout}] = helicsMEX(202, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputGetVectorSize.m b/interfaces/matlab/interface/+helics/helicsInputGetVectorSize.m index d44e9d4ad6..b317de0956 100644 --- a/interfaces/matlab/interface/+helics/helicsInputGetVectorSize.m +++ b/interfaces/matlab/interface/+helics/helicsInputGetVectorSize.m @@ -1,3 +1,3 @@ function varargout = helicsInputGetVectorSize(varargin) - [varargout{1:nargout}] = helicsMEX(199, varargin{:}); + [varargout{1:nargout}] = helicsMEX(201, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputIsUpdated.m b/interfaces/matlab/interface/+helics/helicsInputIsUpdated.m index 45ea941e91..637ae664ea 100644 --- a/interfaces/matlab/interface/+helics/helicsInputIsUpdated.m +++ b/interfaces/matlab/interface/+helics/helicsInputIsUpdated.m @@ -1,3 +1,3 @@ function varargout = helicsInputIsUpdated(varargin) - [varargout{1:nargout}] = helicsMEX(232, varargin{:}); + [varargout{1:nargout}] = helicsMEX(234, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputIsValid.m b/interfaces/matlab/interface/+helics/helicsInputIsValid.m index 5ed45059d1..927368c121 100644 --- a/interfaces/matlab/interface/+helics/helicsInputIsValid.m +++ b/interfaces/matlab/interface/+helics/helicsInputIsValid.m @@ -1,3 +1,3 @@ function varargout = helicsInputIsValid(varargin) - [varargout{1:nargout}] = helicsMEX(187, varargin{:}); + [varargout{1:nargout}] = helicsMEX(189, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputLastUpdateTime.m b/interfaces/matlab/interface/+helics/helicsInputLastUpdateTime.m index 5ec77b1470..f5e5f8a8d1 100644 --- a/interfaces/matlab/interface/+helics/helicsInputLastUpdateTime.m +++ b/interfaces/matlab/interface/+helics/helicsInputLastUpdateTime.m @@ -1,3 +1,3 @@ function varargout = helicsInputLastUpdateTime(varargin) - [varargout{1:nargout}] = helicsMEX(233, varargin{:}); + [varargout{1:nargout}] = helicsMEX(235, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputSetDefaultBoolean.m b/interfaces/matlab/interface/+helics/helicsInputSetDefaultBoolean.m index 206f6637af..ccc3da5c60 100644 --- a/interfaces/matlab/interface/+helics/helicsInputSetDefaultBoolean.m +++ b/interfaces/matlab/interface/+helics/helicsInputSetDefaultBoolean.m @@ -1,3 +1,3 @@ function varargout = helicsInputSetDefaultBoolean(varargin) - [varargout{1:nargout}] = helicsMEX(205, varargin{:}); + [varargout{1:nargout}] = helicsMEX(207, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputSetDefaultChar.m b/interfaces/matlab/interface/+helics/helicsInputSetDefaultChar.m index 509cb64bd8..c4627bef4e 100644 --- a/interfaces/matlab/interface/+helics/helicsInputSetDefaultChar.m +++ b/interfaces/matlab/interface/+helics/helicsInputSetDefaultChar.m @@ -1,3 +1,3 @@ function varargout = helicsInputSetDefaultChar(varargin) - [varargout{1:nargout}] = helicsMEX(207, varargin{:}); + [varargout{1:nargout}] = helicsMEX(209, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputSetDefaultComplex.m b/interfaces/matlab/interface/+helics/helicsInputSetDefaultComplex.m index 44d719e330..adaa7924c7 100644 --- a/interfaces/matlab/interface/+helics/helicsInputSetDefaultComplex.m +++ b/interfaces/matlab/interface/+helics/helicsInputSetDefaultComplex.m @@ -1,3 +1,3 @@ function varargout = helicsInputSetDefaultComplex(varargin) - [varargout{1:nargout}] = helicsMEX(209, varargin{:}); + [varargout{1:nargout}] = helicsMEX(211, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputSetDefaultDouble.m b/interfaces/matlab/interface/+helics/helicsInputSetDefaultDouble.m index 05632695b2..2d8c427e16 100644 --- a/interfaces/matlab/interface/+helics/helicsInputSetDefaultDouble.m +++ b/interfaces/matlab/interface/+helics/helicsInputSetDefaultDouble.m @@ -1,3 +1,3 @@ function varargout = helicsInputSetDefaultDouble(varargin) - [varargout{1:nargout}] = helicsMEX(208, varargin{:}); + [varargout{1:nargout}] = helicsMEX(210, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputSetDefaultInteger.m b/interfaces/matlab/interface/+helics/helicsInputSetDefaultInteger.m index 989d36e9c3..2e281dc3c7 100644 --- a/interfaces/matlab/interface/+helics/helicsInputSetDefaultInteger.m +++ b/interfaces/matlab/interface/+helics/helicsInputSetDefaultInteger.m @@ -1,3 +1,3 @@ function varargout = helicsInputSetDefaultInteger(varargin) - [varargout{1:nargout}] = helicsMEX(204, varargin{:}); + [varargout{1:nargout}] = helicsMEX(206, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputSetDefaultNamedPoint.m b/interfaces/matlab/interface/+helics/helicsInputSetDefaultNamedPoint.m index 889d46f006..84a394bed9 100644 --- a/interfaces/matlab/interface/+helics/helicsInputSetDefaultNamedPoint.m +++ b/interfaces/matlab/interface/+helics/helicsInputSetDefaultNamedPoint.m @@ -1,3 +1,3 @@ function varargout = helicsInputSetDefaultNamedPoint(varargin) - [varargout{1:nargout}] = helicsMEX(211, varargin{:}); + [varargout{1:nargout}] = helicsMEX(213, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputSetDefaultRaw.m b/interfaces/matlab/interface/+helics/helicsInputSetDefaultRaw.m index c38e14ba15..4e2bdff82c 100644 --- a/interfaces/matlab/interface/+helics/helicsInputSetDefaultRaw.m +++ b/interfaces/matlab/interface/+helics/helicsInputSetDefaultRaw.m @@ -1,3 +1,3 @@ function varargout = helicsInputSetDefaultRaw(varargin) - [varargout{1:nargout}] = helicsMEX(202, varargin{:}); + [varargout{1:nargout}] = helicsMEX(204, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputSetDefaultString.m b/interfaces/matlab/interface/+helics/helicsInputSetDefaultString.m index 3fa14d6c57..27b4b59445 100644 --- a/interfaces/matlab/interface/+helics/helicsInputSetDefaultString.m +++ b/interfaces/matlab/interface/+helics/helicsInputSetDefaultString.m @@ -1,3 +1,3 @@ function varargout = helicsInputSetDefaultString(varargin) - [varargout{1:nargout}] = helicsMEX(203, varargin{:}); + [varargout{1:nargout}] = helicsMEX(205, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputSetDefaultTime.m b/interfaces/matlab/interface/+helics/helicsInputSetDefaultTime.m index 3e04b73a81..825b66f98d 100644 --- a/interfaces/matlab/interface/+helics/helicsInputSetDefaultTime.m +++ b/interfaces/matlab/interface/+helics/helicsInputSetDefaultTime.m @@ -1,3 +1,3 @@ function varargout = helicsInputSetDefaultTime(varargin) - [varargout{1:nargout}] = helicsMEX(206, varargin{:}); + [varargout{1:nargout}] = helicsMEX(208, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputSetDefaultVector.m b/interfaces/matlab/interface/+helics/helicsInputSetDefaultVector.m index eb2b31bc04..406f2a5c9e 100644 --- a/interfaces/matlab/interface/+helics/helicsInputSetDefaultVector.m +++ b/interfaces/matlab/interface/+helics/helicsInputSetDefaultVector.m @@ -1,3 +1,3 @@ function varargout = helicsInputSetDefaultVector(varargin) - [varargout{1:nargout}] = helicsMEX(210, varargin{:}); + [varargout{1:nargout}] = helicsMEX(212, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputSetInfo.m b/interfaces/matlab/interface/+helics/helicsInputSetInfo.m index 9234cc517e..1a2988009c 100644 --- a/interfaces/matlab/interface/+helics/helicsInputSetInfo.m +++ b/interfaces/matlab/interface/+helics/helicsInputSetInfo.m @@ -1,3 +1,3 @@ function varargout = helicsInputSetInfo(varargin) - [varargout{1:nargout}] = helicsMEX(223, varargin{:}); + [varargout{1:nargout}] = helicsMEX(225, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputSetMinimumChange.m b/interfaces/matlab/interface/+helics/helicsInputSetMinimumChange.m index 7c82f81abd..44d8a70191 100644 --- a/interfaces/matlab/interface/+helics/helicsInputSetMinimumChange.m +++ b/interfaces/matlab/interface/+helics/helicsInputSetMinimumChange.m @@ -1,3 +1,3 @@ function varargout = helicsInputSetMinimumChange(varargin) - [varargout{1:nargout}] = helicsMEX(231, varargin{:}); + [varargout{1:nargout}] = helicsMEX(233, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsInputSetOption.m b/interfaces/matlab/interface/+helics/helicsInputSetOption.m index 8ce36f214a..a7d30fe4cf 100644 --- a/interfaces/matlab/interface/+helics/helicsInputSetOption.m +++ b/interfaces/matlab/interface/+helics/helicsInputSetOption.m @@ -1,3 +1,3 @@ function varargout = helicsInputSetOption(varargin) - [varargout{1:nargout}] = helicsMEX(227, varargin{:}); + [varargout{1:nargout}] = helicsMEX(229, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageAppendData.m b/interfaces/matlab/interface/+helics/helicsMessageAppendData.m index 6254db3062..b8922c9502 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageAppendData.m +++ b/interfaces/matlab/interface/+helics/helicsMessageAppendData.m @@ -1,3 +1,3 @@ function varargout = helicsMessageAppendData(varargin) - [varargout{1:nargout}] = helicsMEX(291, varargin{:}); + [varargout{1:nargout}] = helicsMEX(293, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageCheckFlag.m b/interfaces/matlab/interface/+helics/helicsMessageCheckFlag.m index 8946d46e1d..fe7d4cedb6 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageCheckFlag.m +++ b/interfaces/matlab/interface/+helics/helicsMessageCheckFlag.m @@ -1,3 +1,3 @@ function varargout = helicsMessageCheckFlag(varargin) - [varargout{1:nargout}] = helicsMEX(276, varargin{:}); + [varargout{1:nargout}] = helicsMEX(278, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageClearFlags.m b/interfaces/matlab/interface/+helics/helicsMessageClearFlags.m index c1a9c33df9..56382d7383 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageClearFlags.m +++ b/interfaces/matlab/interface/+helics/helicsMessageClearFlags.m @@ -1,3 +1,3 @@ function varargout = helicsMessageClearFlags(varargin) - [varargout{1:nargout}] = helicsMEX(287, varargin{:}); + [varargout{1:nargout}] = helicsMEX(289, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageClone.m b/interfaces/matlab/interface/+helics/helicsMessageClone.m index 561e4ff940..9d11f069ad 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageClone.m +++ b/interfaces/matlab/interface/+helics/helicsMessageClone.m @@ -1,3 +1,3 @@ function varargout = helicsMessageClone(varargin) - [varargout{1:nargout}] = helicsMEX(293, varargin{:}); + [varargout{1:nargout}] = helicsMEX(295, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageCopy.m b/interfaces/matlab/interface/+helics/helicsMessageCopy.m index d6bb7a91fa..9e808b57c0 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageCopy.m +++ b/interfaces/matlab/interface/+helics/helicsMessageCopy.m @@ -1,3 +1,3 @@ function varargout = helicsMessageCopy(varargin) - [varargout{1:nargout}] = helicsMEX(292, varargin{:}); + [varargout{1:nargout}] = helicsMEX(294, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageFree.m b/interfaces/matlab/interface/+helics/helicsMessageFree.m index d29447c648..682f6bdaba 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageFree.m +++ b/interfaces/matlab/interface/+helics/helicsMessageFree.m @@ -1,3 +1,3 @@ function varargout = helicsMessageFree(varargin) - [varargout{1:nargout}] = helicsMEX(294, varargin{:}); + [varargout{1:nargout}] = helicsMEX(296, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageGetDestination.m b/interfaces/matlab/interface/+helics/helicsMessageGetDestination.m index 3e8999f518..ea712eff43 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageGetDestination.m +++ b/interfaces/matlab/interface/+helics/helicsMessageGetDestination.m @@ -1,3 +1,3 @@ function varargout = helicsMessageGetDestination(varargin) - [varargout{1:nargout}] = helicsMEX(270, varargin{:}); + [varargout{1:nargout}] = helicsMEX(272, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageGetMessageID.m b/interfaces/matlab/interface/+helics/helicsMessageGetMessageID.m index 6ac6243b4a..755f71d271 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageGetMessageID.m +++ b/interfaces/matlab/interface/+helics/helicsMessageGetMessageID.m @@ -1,3 +1,3 @@ function varargout = helicsMessageGetMessageID(varargin) - [varargout{1:nargout}] = helicsMEX(275, varargin{:}); + [varargout{1:nargout}] = helicsMEX(277, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageGetOriginalDestination.m b/interfaces/matlab/interface/+helics/helicsMessageGetOriginalDestination.m index a8792a1406..2a9d3ba168 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageGetOriginalDestination.m +++ b/interfaces/matlab/interface/+helics/helicsMessageGetOriginalDestination.m @@ -1,3 +1,3 @@ function varargout = helicsMessageGetOriginalDestination(varargin) - [varargout{1:nargout}] = helicsMEX(272, varargin{:}); + [varargout{1:nargout}] = helicsMEX(274, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageGetOriginalSource.m b/interfaces/matlab/interface/+helics/helicsMessageGetOriginalSource.m index 919ef3c451..825488ae7c 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageGetOriginalSource.m +++ b/interfaces/matlab/interface/+helics/helicsMessageGetOriginalSource.m @@ -1,3 +1,3 @@ function varargout = helicsMessageGetOriginalSource(varargin) - [varargout{1:nargout}] = helicsMEX(271, varargin{:}); + [varargout{1:nargout}] = helicsMEX(273, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageGetRawData.m b/interfaces/matlab/interface/+helics/helicsMessageGetRawData.m index 6172abd2d1..cf2e4a53e1 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageGetRawData.m +++ b/interfaces/matlab/interface/+helics/helicsMessageGetRawData.m @@ -1,3 +1,3 @@ function varargout = helicsMessageGetRawData(varargin) - [varargout{1:nargout}] = helicsMEX(278, varargin{:}); + [varargout{1:nargout}] = helicsMEX(280, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageGetRawDataSize.m b/interfaces/matlab/interface/+helics/helicsMessageGetRawDataSize.m index c684808bb3..66d9756e52 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageGetRawDataSize.m +++ b/interfaces/matlab/interface/+helics/helicsMessageGetRawDataSize.m @@ -1,3 +1,3 @@ function varargout = helicsMessageGetRawDataSize(varargin) - [varargout{1:nargout}] = helicsMEX(277, varargin{:}); + [varargout{1:nargout}] = helicsMEX(279, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageGetSource.m b/interfaces/matlab/interface/+helics/helicsMessageGetSource.m index 2de4d3d4bb..74dce4394c 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageGetSource.m +++ b/interfaces/matlab/interface/+helics/helicsMessageGetSource.m @@ -1,3 +1,3 @@ function varargout = helicsMessageGetSource(varargin) - [varargout{1:nargout}] = helicsMEX(269, varargin{:}); + [varargout{1:nargout}] = helicsMEX(271, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageGetString.m b/interfaces/matlab/interface/+helics/helicsMessageGetString.m index e357a8d852..d0feccbb54 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageGetString.m +++ b/interfaces/matlab/interface/+helics/helicsMessageGetString.m @@ -1,3 +1,3 @@ function varargout = helicsMessageGetString(varargin) - [varargout{1:nargout}] = helicsMEX(274, varargin{:}); + [varargout{1:nargout}] = helicsMEX(276, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageGetTime.m b/interfaces/matlab/interface/+helics/helicsMessageGetTime.m index 5c55cecd65..b79dac74cb 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageGetTime.m +++ b/interfaces/matlab/interface/+helics/helicsMessageGetTime.m @@ -1,3 +1,3 @@ function varargout = helicsMessageGetTime(varargin) - [varargout{1:nargout}] = helicsMEX(273, varargin{:}); + [varargout{1:nargout}] = helicsMEX(275, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageIsValid.m b/interfaces/matlab/interface/+helics/helicsMessageIsValid.m index 74a9e313b4..2b5bbcc58b 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageIsValid.m +++ b/interfaces/matlab/interface/+helics/helicsMessageIsValid.m @@ -1,3 +1,3 @@ function varargout = helicsMessageIsValid(varargin) - [varargout{1:nargout}] = helicsMEX(279, varargin{:}); + [varargout{1:nargout}] = helicsMEX(281, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageReserve.m b/interfaces/matlab/interface/+helics/helicsMessageReserve.m index f37031624e..fe3069f686 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageReserve.m +++ b/interfaces/matlab/interface/+helics/helicsMessageReserve.m @@ -1,3 +1,3 @@ function varargout = helicsMessageReserve(varargin) - [varargout{1:nargout}] = helicsMEX(285, varargin{:}); + [varargout{1:nargout}] = helicsMEX(287, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageSetData.m b/interfaces/matlab/interface/+helics/helicsMessageSetData.m index 1262a35b28..40af2170dd 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageSetData.m +++ b/interfaces/matlab/interface/+helics/helicsMessageSetData.m @@ -1,3 +1,3 @@ function varargout = helicsMessageSetData(varargin) - [varargout{1:nargout}] = helicsMEX(290, varargin{:}); + [varargout{1:nargout}] = helicsMEX(292, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageSetDestination.m b/interfaces/matlab/interface/+helics/helicsMessageSetDestination.m index ad21679d47..06a0702035 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageSetDestination.m +++ b/interfaces/matlab/interface/+helics/helicsMessageSetDestination.m @@ -1,3 +1,3 @@ function varargout = helicsMessageSetDestination(varargin) - [varargout{1:nargout}] = helicsMEX(281, varargin{:}); + [varargout{1:nargout}] = helicsMEX(283, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageSetFlagOption.m b/interfaces/matlab/interface/+helics/helicsMessageSetFlagOption.m index 5cce726a9a..f661148ef2 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageSetFlagOption.m +++ b/interfaces/matlab/interface/+helics/helicsMessageSetFlagOption.m @@ -1,3 +1,3 @@ function varargout = helicsMessageSetFlagOption(varargin) - [varargout{1:nargout}] = helicsMEX(288, varargin{:}); + [varargout{1:nargout}] = helicsMEX(290, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageSetMessageID.m b/interfaces/matlab/interface/+helics/helicsMessageSetMessageID.m index 47d1bfd70f..80a8abbcb6 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageSetMessageID.m +++ b/interfaces/matlab/interface/+helics/helicsMessageSetMessageID.m @@ -1,3 +1,3 @@ function varargout = helicsMessageSetMessageID(varargin) - [varargout{1:nargout}] = helicsMEX(286, varargin{:}); + [varargout{1:nargout}] = helicsMEX(288, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageSetOriginalDestination.m b/interfaces/matlab/interface/+helics/helicsMessageSetOriginalDestination.m index 72be7cdd3a..a3da99c706 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageSetOriginalDestination.m +++ b/interfaces/matlab/interface/+helics/helicsMessageSetOriginalDestination.m @@ -1,3 +1,3 @@ function varargout = helicsMessageSetOriginalDestination(varargin) - [varargout{1:nargout}] = helicsMEX(283, varargin{:}); + [varargout{1:nargout}] = helicsMEX(285, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageSetOriginalSource.m b/interfaces/matlab/interface/+helics/helicsMessageSetOriginalSource.m index 228c2265a8..7dbde32a2b 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageSetOriginalSource.m +++ b/interfaces/matlab/interface/+helics/helicsMessageSetOriginalSource.m @@ -1,3 +1,3 @@ function varargout = helicsMessageSetOriginalSource(varargin) - [varargout{1:nargout}] = helicsMEX(282, varargin{:}); + [varargout{1:nargout}] = helicsMEX(284, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageSetSource.m b/interfaces/matlab/interface/+helics/helicsMessageSetSource.m index b80144187b..142c03b825 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageSetSource.m +++ b/interfaces/matlab/interface/+helics/helicsMessageSetSource.m @@ -1,3 +1,3 @@ function varargout = helicsMessageSetSource(varargin) - [varargout{1:nargout}] = helicsMEX(280, varargin{:}); + [varargout{1:nargout}] = helicsMEX(282, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageSetString.m b/interfaces/matlab/interface/+helics/helicsMessageSetString.m index 6a314eab2b..320e264491 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageSetString.m +++ b/interfaces/matlab/interface/+helics/helicsMessageSetString.m @@ -1,3 +1,3 @@ function varargout = helicsMessageSetString(varargin) - [varargout{1:nargout}] = helicsMEX(289, varargin{:}); + [varargout{1:nargout}] = helicsMEX(291, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsMessageSetTime.m b/interfaces/matlab/interface/+helics/helicsMessageSetTime.m index 2b8f581e02..f73ba8d4df 100644 --- a/interfaces/matlab/interface/+helics/helicsMessageSetTime.m +++ b/interfaces/matlab/interface/+helics/helicsMessageSetTime.m @@ -1,3 +1,3 @@ function varargout = helicsMessageSetTime(varargin) - [varargout{1:nargout}] = helicsMEX(284, varargin{:}); + [varargout{1:nargout}] = helicsMEX(286, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationAddTarget.m b/interfaces/matlab/interface/+helics/helicsPublicationAddTarget.m index 6612f74b9d..d947d94b0f 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationAddTarget.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationAddTarget.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationAddTarget(varargin) - [varargout{1:nargout}] = helicsMEX(186, varargin{:}); + [varargout{1:nargout}] = helicsMEX(188, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationGetInfo.m b/interfaces/matlab/interface/+helics/helicsPublicationGetInfo.m index 34067788e3..10d58f30a0 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationGetInfo.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationGetInfo.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationGetInfo(varargin) - [varargout{1:nargout}] = helicsMEX(224, varargin{:}); + [varargout{1:nargout}] = helicsMEX(226, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationGetKey.m b/interfaces/matlab/interface/+helics/helicsPublicationGetKey.m index 3503f5ac43..df79ff6287 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationGetKey.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationGetKey.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationGetKey(varargin) - [varargout{1:nargout}] = helicsMEX(217, varargin{:}); + [varargout{1:nargout}] = helicsMEX(219, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationGetOption.m b/interfaces/matlab/interface/+helics/helicsPublicationGetOption.m index 773e2545ab..649dc60438 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationGetOption.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationGetOption.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationGetOption(varargin) - [varargout{1:nargout}] = helicsMEX(228, varargin{:}); + [varargout{1:nargout}] = helicsMEX(230, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationGetType.m b/interfaces/matlab/interface/+helics/helicsPublicationGetType.m index 5233998cc3..dd5e583385 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationGetType.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationGetType.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationGetType(varargin) - [varargout{1:nargout}] = helicsMEX(214, varargin{:}); + [varargout{1:nargout}] = helicsMEX(216, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationGetUnits.m b/interfaces/matlab/interface/+helics/helicsPublicationGetUnits.m index ac388b34c8..d312658528 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationGetUnits.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationGetUnits.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationGetUnits(varargin) - [varargout{1:nargout}] = helicsMEX(221, varargin{:}); + [varargout{1:nargout}] = helicsMEX(223, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationIsValid.m b/interfaces/matlab/interface/+helics/helicsPublicationIsValid.m index de0a2481f3..7621b24104 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationIsValid.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationIsValid.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationIsValid(varargin) - [varargout{1:nargout}] = helicsMEX(175, varargin{:}); + [varargout{1:nargout}] = helicsMEX(177, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationPublishBoolean.m b/interfaces/matlab/interface/+helics/helicsPublicationPublishBoolean.m index 545efdf773..25c071468a 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationPublishBoolean.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationPublishBoolean.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationPublishBoolean(varargin) - [varargout{1:nargout}] = helicsMEX(179, varargin{:}); + [varargout{1:nargout}] = helicsMEX(181, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationPublishChar.m b/interfaces/matlab/interface/+helics/helicsPublicationPublishChar.m index 0bf7ba11ce..ab2f0a6bc5 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationPublishChar.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationPublishChar.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationPublishChar(varargin) - [varargout{1:nargout}] = helicsMEX(182, varargin{:}); + [varargout{1:nargout}] = helicsMEX(184, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationPublishComplex.m b/interfaces/matlab/interface/+helics/helicsPublicationPublishComplex.m index 7750a0407f..df2fa0bddc 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationPublishComplex.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationPublishComplex.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationPublishComplex(varargin) - [varargout{1:nargout}] = helicsMEX(183, varargin{:}); + [varargout{1:nargout}] = helicsMEX(185, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationPublishDouble.m b/interfaces/matlab/interface/+helics/helicsPublicationPublishDouble.m index fa92dfd09d..420779d896 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationPublishDouble.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationPublishDouble.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationPublishDouble(varargin) - [varargout{1:nargout}] = helicsMEX(180, varargin{:}); + [varargout{1:nargout}] = helicsMEX(182, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationPublishInteger.m b/interfaces/matlab/interface/+helics/helicsPublicationPublishInteger.m index 1978096adb..147be80869 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationPublishInteger.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationPublishInteger.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationPublishInteger(varargin) - [varargout{1:nargout}] = helicsMEX(178, varargin{:}); + [varargout{1:nargout}] = helicsMEX(180, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationPublishNamedPoint.m b/interfaces/matlab/interface/+helics/helicsPublicationPublishNamedPoint.m index 9a10b3a31e..8a96820b7c 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationPublishNamedPoint.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationPublishNamedPoint.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationPublishNamedPoint(varargin) - [varargout{1:nargout}] = helicsMEX(185, varargin{:}); + [varargout{1:nargout}] = helicsMEX(187, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationPublishRaw.m b/interfaces/matlab/interface/+helics/helicsPublicationPublishRaw.m index 9d79c63380..c1e08e31c9 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationPublishRaw.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationPublishRaw.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationPublishRaw(varargin) - [varargout{1:nargout}] = helicsMEX(176, varargin{:}); + [varargout{1:nargout}] = helicsMEX(178, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationPublishString.m b/interfaces/matlab/interface/+helics/helicsPublicationPublishString.m index 0dee3295ea..67ffda9a52 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationPublishString.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationPublishString.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationPublishString(varargin) - [varargout{1:nargout}] = helicsMEX(177, varargin{:}); + [varargout{1:nargout}] = helicsMEX(179, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationPublishTime.m b/interfaces/matlab/interface/+helics/helicsPublicationPublishTime.m index 01d55dc8c8..f4d4bf5aab 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationPublishTime.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationPublishTime.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationPublishTime(varargin) - [varargout{1:nargout}] = helicsMEX(181, varargin{:}); + [varargout{1:nargout}] = helicsMEX(183, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationPublishVector.m b/interfaces/matlab/interface/+helics/helicsPublicationPublishVector.m index e4a79aeaa7..8d2baee0bd 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationPublishVector.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationPublishVector.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationPublishVector(varargin) - [varargout{1:nargout}] = helicsMEX(184, varargin{:}); + [varargout{1:nargout}] = helicsMEX(186, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationSetInfo.m b/interfaces/matlab/interface/+helics/helicsPublicationSetInfo.m index c44f80828d..3e58438271 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationSetInfo.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationSetInfo.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationSetInfo(varargin) - [varargout{1:nargout}] = helicsMEX(225, varargin{:}); + [varargout{1:nargout}] = helicsMEX(227, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationSetMinimumChange.m b/interfaces/matlab/interface/+helics/helicsPublicationSetMinimumChange.m index a6453c0e10..d097047f47 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationSetMinimumChange.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationSetMinimumChange.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationSetMinimumChange(varargin) - [varargout{1:nargout}] = helicsMEX(230, varargin{:}); + [varargout{1:nargout}] = helicsMEX(232, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsPublicationSetOption.m b/interfaces/matlab/interface/+helics/helicsPublicationSetOption.m index ceaff9549e..417cf9d13d 100644 --- a/interfaces/matlab/interface/+helics/helicsPublicationSetOption.m +++ b/interfaces/matlab/interface/+helics/helicsPublicationSetOption.m @@ -1,3 +1,3 @@ function varargout = helicsPublicationSetOption(varargin) - [varargout{1:nargout}] = helicsMEX(229, varargin{:}); + [varargout{1:nargout}] = helicsMEX(231, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsQueryBrokerExecute.m b/interfaces/matlab/interface/+helics/helicsQueryBrokerExecute.m index 84469f5d76..5f2012cb3f 100644 --- a/interfaces/matlab/interface/+helics/helicsQueryBrokerExecute.m +++ b/interfaces/matlab/interface/+helics/helicsQueryBrokerExecute.m @@ -1,3 +1,3 @@ function varargout = helicsQueryBrokerExecute(varargin) - [varargout{1:nargout}] = helicsMEX(150, varargin{:}); + [varargout{1:nargout}] = helicsMEX(152, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsQueryCoreExecute.m b/interfaces/matlab/interface/+helics/helicsQueryCoreExecute.m index dead976fcb..ab4a1386bd 100644 --- a/interfaces/matlab/interface/+helics/helicsQueryCoreExecute.m +++ b/interfaces/matlab/interface/+helics/helicsQueryCoreExecute.m @@ -1,3 +1,3 @@ function varargout = helicsQueryCoreExecute(varargin) - [varargout{1:nargout}] = helicsMEX(149, varargin{:}); + [varargout{1:nargout}] = helicsMEX(151, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsQueryExecute.m b/interfaces/matlab/interface/+helics/helicsQueryExecute.m index a2a110eca7..81101c7d86 100644 --- a/interfaces/matlab/interface/+helics/helicsQueryExecute.m +++ b/interfaces/matlab/interface/+helics/helicsQueryExecute.m @@ -1,3 +1,3 @@ function varargout = helicsQueryExecute(varargin) - [varargout{1:nargout}] = helicsMEX(148, varargin{:}); + [varargout{1:nargout}] = helicsMEX(150, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsQueryExecuteAsync.m b/interfaces/matlab/interface/+helics/helicsQueryExecuteAsync.m index 7ee90aebc1..880e2746d8 100644 --- a/interfaces/matlab/interface/+helics/helicsQueryExecuteAsync.m +++ b/interfaces/matlab/interface/+helics/helicsQueryExecuteAsync.m @@ -1,3 +1,3 @@ function varargout = helicsQueryExecuteAsync(varargin) - [varargout{1:nargout}] = helicsMEX(151, varargin{:}); + [varargout{1:nargout}] = helicsMEX(153, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsQueryExecuteComplete.m b/interfaces/matlab/interface/+helics/helicsQueryExecuteComplete.m index 1df0d66f40..9a2e37f47d 100644 --- a/interfaces/matlab/interface/+helics/helicsQueryExecuteComplete.m +++ b/interfaces/matlab/interface/+helics/helicsQueryExecuteComplete.m @@ -1,3 +1,3 @@ function varargout = helicsQueryExecuteComplete(varargin) - [varargout{1:nargout}] = helicsMEX(152, varargin{:}); + [varargout{1:nargout}] = helicsMEX(154, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsQueryFree.m b/interfaces/matlab/interface/+helics/helicsQueryFree.m index 872c9b866c..f7c89f32f4 100644 --- a/interfaces/matlab/interface/+helics/helicsQueryFree.m +++ b/interfaces/matlab/interface/+helics/helicsQueryFree.m @@ -1,3 +1,3 @@ function varargout = helicsQueryFree(varargin) - [varargout{1:nargout}] = helicsMEX(156, varargin{:}); + [varargout{1:nargout}] = helicsMEX(158, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsQueryIsCompleted.m b/interfaces/matlab/interface/+helics/helicsQueryIsCompleted.m index 36b818c0d0..6cd66b2684 100644 --- a/interfaces/matlab/interface/+helics/helicsQueryIsCompleted.m +++ b/interfaces/matlab/interface/+helics/helicsQueryIsCompleted.m @@ -1,3 +1,3 @@ function varargout = helicsQueryIsCompleted(varargin) - [varargout{1:nargout}] = helicsMEX(153, varargin{:}); + [varargout{1:nargout}] = helicsMEX(155, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsQuerySetQueryString.m b/interfaces/matlab/interface/+helics/helicsQuerySetQueryString.m index bae12ef719..8311d4fc26 100644 --- a/interfaces/matlab/interface/+helics/helicsQuerySetQueryString.m +++ b/interfaces/matlab/interface/+helics/helicsQuerySetQueryString.m @@ -1,3 +1,3 @@ function varargout = helicsQuerySetQueryString(varargin) - [varargout{1:nargout}] = helicsMEX(155, varargin{:}); + [varargout{1:nargout}] = helicsMEX(157, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsQuerySetTarget.m b/interfaces/matlab/interface/+helics/helicsQuerySetTarget.m index b3fedd47bb..142f981353 100644 --- a/interfaces/matlab/interface/+helics/helicsQuerySetTarget.m +++ b/interfaces/matlab/interface/+helics/helicsQuerySetTarget.m @@ -1,3 +1,3 @@ function varargout = helicsQuerySetTarget(varargin) - [varargout{1:nargout}] = helicsMEX(154, varargin{:}); + [varargout{1:nargout}] = helicsMEX(156, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helicsSubscriptionGetKey.m b/interfaces/matlab/interface/+helics/helicsSubscriptionGetKey.m index d9bdd05948..673690ccb2 100644 --- a/interfaces/matlab/interface/+helics/helicsSubscriptionGetKey.m +++ b/interfaces/matlab/interface/+helics/helicsSubscriptionGetKey.m @@ -1,3 +1,3 @@ function varargout = helicsSubscriptionGetKey(varargin) - [varargout{1:nargout}] = helicsMEX(216, varargin{:}); + [varargout{1:nargout}] = helicsMEX(218, varargin{:}); end diff --git a/interfaces/matlab/interface/+helics/helics_error_connection_failure.m b/interfaces/matlab/interface/+helics/helics_error_connection_failure.m index e5365a8d6b..628b6441db 100644 --- a/interfaces/matlab/interface/+helics/helics_error_connection_failure.m +++ b/interfaces/matlab/interface/+helics/helics_error_connection_failure.m @@ -1,7 +1,7 @@ function v = helics_error_connection_failure() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 65); + vInitialized = helicsMEX(0, 67); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_error_discard.m b/interfaces/matlab/interface/+helics/helics_error_discard.m index c79638b05e..a13f643679 100644 --- a/interfaces/matlab/interface/+helics/helics_error_discard.m +++ b/interfaces/matlab/interface/+helics/helics_error_discard.m @@ -1,7 +1,7 @@ function v = helics_error_discard() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 62); + vInitialized = helicsMEX(0, 64); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_error_execution_failure.m b/interfaces/matlab/interface/+helics/helics_error_execution_failure.m index 73994fe877..7a3a7d8204 100644 --- a/interfaces/matlab/interface/+helics/helics_error_execution_failure.m +++ b/interfaces/matlab/interface/+helics/helics_error_execution_failure.m @@ -1,7 +1,7 @@ function v = helics_error_execution_failure() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 57); + vInitialized = helicsMEX(0, 59); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_error_external_type.m b/interfaces/matlab/interface/+helics/helics_error_external_type.m index 6cff62dccc..8ee9d6df7e 100644 --- a/interfaces/matlab/interface/+helics/helics_error_external_type.m +++ b/interfaces/matlab/interface/+helics/helics_error_external_type.m @@ -1,7 +1,7 @@ function v = helics_error_external_type() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 54); + vInitialized = helicsMEX(0, 56); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_error_fatal.m b/interfaces/matlab/interface/+helics/helics_error_fatal.m index c0fcc4854e..d16d5031bd 100644 --- a/interfaces/matlab/interface/+helics/helics_error_fatal.m +++ b/interfaces/matlab/interface/+helics/helics_error_fatal.m @@ -1,7 +1,7 @@ function v = helics_error_fatal() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 53); + vInitialized = helicsMEX(0, 55); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_error_insufficient_space.m b/interfaces/matlab/interface/+helics/helics_error_insufficient_space.m index 59666894ce..d57a77350c 100644 --- a/interfaces/matlab/interface/+helics/helics_error_insufficient_space.m +++ b/interfaces/matlab/interface/+helics/helics_error_insufficient_space.m @@ -1,7 +1,7 @@ function v = helics_error_insufficient_space() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 56); + vInitialized = helicsMEX(0, 58); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_error_invalid_argument.m b/interfaces/matlab/interface/+helics/helics_error_invalid_argument.m index c2b2827612..7b94f8ed45 100644 --- a/interfaces/matlab/interface/+helics/helics_error_invalid_argument.m +++ b/interfaces/matlab/interface/+helics/helics_error_invalid_argument.m @@ -1,7 +1,7 @@ function v = helics_error_invalid_argument() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 63); + vInitialized = helicsMEX(0, 65); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_error_invalid_function_call.m b/interfaces/matlab/interface/+helics/helics_error_invalid_function_call.m index 86acf313b2..785d29e2bc 100644 --- a/interfaces/matlab/interface/+helics/helics_error_invalid_function_call.m +++ b/interfaces/matlab/interface/+helics/helics_error_invalid_function_call.m @@ -1,7 +1,7 @@ function v = helics_error_invalid_function_call() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 58); + vInitialized = helicsMEX(0, 60); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_error_invalid_object.m b/interfaces/matlab/interface/+helics/helics_error_invalid_object.m index bb96fb7e20..1db9ee71c3 100644 --- a/interfaces/matlab/interface/+helics/helics_error_invalid_object.m +++ b/interfaces/matlab/interface/+helics/helics_error_invalid_object.m @@ -1,7 +1,7 @@ function v = helics_error_invalid_object() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 64); + vInitialized = helicsMEX(0, 66); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_error_invalid_state_transition.m b/interfaces/matlab/interface/+helics/helics_error_invalid_state_transition.m index bbd5b01f78..8a267340c6 100644 --- a/interfaces/matlab/interface/+helics/helics_error_invalid_state_transition.m +++ b/interfaces/matlab/interface/+helics/helics_error_invalid_state_transition.m @@ -1,7 +1,7 @@ function v = helics_error_invalid_state_transition() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 59); + vInitialized = helicsMEX(0, 61); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_error_other.m b/interfaces/matlab/interface/+helics/helics_error_other.m index 7e7881d5f2..b1c96a562f 100644 --- a/interfaces/matlab/interface/+helics/helics_error_other.m +++ b/interfaces/matlab/interface/+helics/helics_error_other.m @@ -1,7 +1,7 @@ function v = helics_error_other() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 55); + vInitialized = helicsMEX(0, 57); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_error_registration_failure.m b/interfaces/matlab/interface/+helics/helics_error_registration_failure.m index d1e0f7e143..2eefdc47de 100644 --- a/interfaces/matlab/interface/+helics/helics_error_registration_failure.m +++ b/interfaces/matlab/interface/+helics/helics_error_registration_failure.m @@ -1,7 +1,7 @@ function v = helics_error_registration_failure() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 66); + vInitialized = helicsMEX(0, 68); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_error_system_failure.m b/interfaces/matlab/interface/+helics/helics_error_system_failure.m index 144243bf15..1a71a87adc 100644 --- a/interfaces/matlab/interface/+helics/helics_error_system_failure.m +++ b/interfaces/matlab/interface/+helics/helics_error_system_failure.m @@ -1,7 +1,7 @@ function v = helics_error_system_failure() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 61); + vInitialized = helicsMEX(0, 63); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_filter_type_clone.m b/interfaces/matlab/interface/+helics/helics_filter_type_clone.m index 578e345628..c1f6397f78 100644 --- a/interfaces/matlab/interface/+helics/helics_filter_type_clone.m +++ b/interfaces/matlab/interface/+helics/helics_filter_type_clone.m @@ -1,7 +1,7 @@ function v = helics_filter_type_clone() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 108); + vInitialized = helicsMEX(0, 110); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_filter_type_custom.m b/interfaces/matlab/interface/+helics/helics_filter_type_custom.m index 344949bab7..954e5b1b98 100644 --- a/interfaces/matlab/interface/+helics/helics_filter_type_custom.m +++ b/interfaces/matlab/interface/+helics/helics_filter_type_custom.m @@ -1,7 +1,7 @@ function v = helics_filter_type_custom() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 103); + vInitialized = helicsMEX(0, 105); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_filter_type_delay.m b/interfaces/matlab/interface/+helics/helics_filter_type_delay.m index 92892e6bca..5610c459dc 100644 --- a/interfaces/matlab/interface/+helics/helics_filter_type_delay.m +++ b/interfaces/matlab/interface/+helics/helics_filter_type_delay.m @@ -1,7 +1,7 @@ function v = helics_filter_type_delay() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 104); + vInitialized = helicsMEX(0, 106); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_filter_type_firewall.m b/interfaces/matlab/interface/+helics/helics_filter_type_firewall.m index 14eaedb059..f1c61c2869 100644 --- a/interfaces/matlab/interface/+helics/helics_filter_type_firewall.m +++ b/interfaces/matlab/interface/+helics/helics_filter_type_firewall.m @@ -1,7 +1,7 @@ function v = helics_filter_type_firewall() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 109); + vInitialized = helicsMEX(0, 111); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_filter_type_random_delay.m b/interfaces/matlab/interface/+helics/helics_filter_type_random_delay.m index 8f7887e660..e82ff39eb3 100644 --- a/interfaces/matlab/interface/+helics/helics_filter_type_random_delay.m +++ b/interfaces/matlab/interface/+helics/helics_filter_type_random_delay.m @@ -1,7 +1,7 @@ function v = helics_filter_type_random_delay() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 105); + vInitialized = helicsMEX(0, 107); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_filter_type_random_drop.m b/interfaces/matlab/interface/+helics/helics_filter_type_random_drop.m index a7de164c2c..6239a3c086 100644 --- a/interfaces/matlab/interface/+helics/helics_filter_type_random_drop.m +++ b/interfaces/matlab/interface/+helics/helics_filter_type_random_drop.m @@ -1,7 +1,7 @@ function v = helics_filter_type_random_drop() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 106); + vInitialized = helicsMEX(0, 108); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_filter_type_reroute.m b/interfaces/matlab/interface/+helics/helics_filter_type_reroute.m index 88459b8b7b..7f0cedb8b2 100644 --- a/interfaces/matlab/interface/+helics/helics_filter_type_reroute.m +++ b/interfaces/matlab/interface/+helics/helics_filter_type_reroute.m @@ -1,7 +1,7 @@ function v = helics_filter_type_reroute() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 107); + vInitialized = helicsMEX(0, 109); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_flag_dumplog.m b/interfaces/matlab/interface/+helics/helics_flag_dumplog.m new file mode 100644 index 0000000000..dc60a71238 --- /dev/null +++ b/interfaces/matlab/interface/+helics/helics_flag_dumplog.m @@ -0,0 +1,7 @@ +function v = helics_flag_dumplog() + persistent vInitialized; + if isempty(vInitialized) + vInitialized = helicsMEX(0, 45); + end + v = vInitialized; +end diff --git a/interfaces/matlab/interface/+helics/helics_flag_force_logging_flush.m b/interfaces/matlab/interface/+helics/helics_flag_force_logging_flush.m new file mode 100644 index 0000000000..b39b8f0429 --- /dev/null +++ b/interfaces/matlab/interface/+helics/helics_flag_force_logging_flush.m @@ -0,0 +1,7 @@ +function v = helics_flag_force_logging_flush() + persistent vInitialized; + if isempty(vInitialized) + vInitialized = helicsMEX(0, 44); + end + v = vInitialized; +end diff --git a/interfaces/matlab/interface/+helics/helics_handle_option_buffer_data.m b/interfaces/matlab/interface/+helics/helics_handle_option_buffer_data.m index 049bb23cfe..c21f7a4bb2 100644 --- a/interfaces/matlab/interface/+helics/helics_handle_option_buffer_data.m +++ b/interfaces/matlab/interface/+helics/helics_handle_option_buffer_data.m @@ -1,7 +1,7 @@ function v = helics_handle_option_buffer_data() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 93); + vInitialized = helicsMEX(0, 95); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_handle_option_clear_priority_list.m b/interfaces/matlab/interface/+helics/helics_handle_option_clear_priority_list.m index bb06b1ba98..9c387e047a 100644 --- a/interfaces/matlab/interface/+helics/helics_handle_option_clear_priority_list.m +++ b/interfaces/matlab/interface/+helics/helics_handle_option_clear_priority_list.m @@ -1,7 +1,7 @@ function v = helics_handle_option_clear_priority_list() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 101); + vInitialized = helicsMEX(0, 103); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_handle_option_connection_optional.m b/interfaces/matlab/interface/+helics/helics_handle_option_connection_optional.m index 69b068c720..eb24fe9bc1 100644 --- a/interfaces/matlab/interface/+helics/helics_handle_option_connection_optional.m +++ b/interfaces/matlab/interface/+helics/helics_handle_option_connection_optional.m @@ -1,7 +1,7 @@ function v = helics_handle_option_connection_optional() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 90); + vInitialized = helicsMEX(0, 92); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_handle_option_connection_required.m b/interfaces/matlab/interface/+helics/helics_handle_option_connection_required.m index 01cdeb377b..9544cc7dc5 100644 --- a/interfaces/matlab/interface/+helics/helics_handle_option_connection_required.m +++ b/interfaces/matlab/interface/+helics/helics_handle_option_connection_required.m @@ -1,7 +1,7 @@ function v = helics_handle_option_connection_required() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 89); + vInitialized = helicsMEX(0, 91); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_handle_option_connections.m b/interfaces/matlab/interface/+helics/helics_handle_option_connections.m index df93bb7ef2..3295bfb47d 100644 --- a/interfaces/matlab/interface/+helics/helics_handle_option_connections.m +++ b/interfaces/matlab/interface/+helics/helics_handle_option_connections.m @@ -1,7 +1,7 @@ function v = helics_handle_option_connections() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 102); + vInitialized = helicsMEX(0, 104); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_handle_option_ignore_interrupts.m b/interfaces/matlab/interface/+helics/helics_handle_option_ignore_interrupts.m index 38f390a943..421d6212ed 100644 --- a/interfaces/matlab/interface/+helics/helics_handle_option_ignore_interrupts.m +++ b/interfaces/matlab/interface/+helics/helics_handle_option_ignore_interrupts.m @@ -1,7 +1,7 @@ function v = helics_handle_option_ignore_interrupts() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 98); + vInitialized = helicsMEX(0, 100); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_handle_option_ignore_unit_mismatch.m b/interfaces/matlab/interface/+helics/helics_handle_option_ignore_unit_mismatch.m index 7a7a563c32..65bc24b40f 100644 --- a/interfaces/matlab/interface/+helics/helics_handle_option_ignore_unit_mismatch.m +++ b/interfaces/matlab/interface/+helics/helics_handle_option_ignore_unit_mismatch.m @@ -1,7 +1,7 @@ function v = helics_handle_option_ignore_unit_mismatch() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 95); + vInitialized = helicsMEX(0, 97); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_handle_option_input_priority_location.m b/interfaces/matlab/interface/+helics/helics_handle_option_input_priority_location.m index 4ff8746765..f6711b344c 100644 --- a/interfaces/matlab/interface/+helics/helics_handle_option_input_priority_location.m +++ b/interfaces/matlab/interface/+helics/helics_handle_option_input_priority_location.m @@ -1,7 +1,7 @@ function v = helics_handle_option_input_priority_location() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 100); + vInitialized = helicsMEX(0, 102); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_handle_option_multi_input_handling_method.m b/interfaces/matlab/interface/+helics/helics_handle_option_multi_input_handling_method.m index d28670da2b..90171eb7f3 100644 --- a/interfaces/matlab/interface/+helics/helics_handle_option_multi_input_handling_method.m +++ b/interfaces/matlab/interface/+helics/helics_handle_option_multi_input_handling_method.m @@ -1,7 +1,7 @@ function v = helics_handle_option_multi_input_handling_method() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 99); + vInitialized = helicsMEX(0, 101); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_handle_option_multiple_connections_allowed.m b/interfaces/matlab/interface/+helics/helics_handle_option_multiple_connections_allowed.m index 060bba3857..b3b2935392 100644 --- a/interfaces/matlab/interface/+helics/helics_handle_option_multiple_connections_allowed.m +++ b/interfaces/matlab/interface/+helics/helics_handle_option_multiple_connections_allowed.m @@ -1,7 +1,7 @@ function v = helics_handle_option_multiple_connections_allowed() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 92); + vInitialized = helicsMEX(0, 94); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_handle_option_only_transmit_on_change.m b/interfaces/matlab/interface/+helics/helics_handle_option_only_transmit_on_change.m index 27aacfbfd5..a7eeff0c3b 100644 --- a/interfaces/matlab/interface/+helics/helics_handle_option_only_transmit_on_change.m +++ b/interfaces/matlab/interface/+helics/helics_handle_option_only_transmit_on_change.m @@ -1,7 +1,7 @@ function v = helics_handle_option_only_transmit_on_change() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 96); + vInitialized = helicsMEX(0, 98); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_handle_option_only_update_on_change.m b/interfaces/matlab/interface/+helics/helics_handle_option_only_update_on_change.m index 4e7365ce78..6e2c16b2e2 100644 --- a/interfaces/matlab/interface/+helics/helics_handle_option_only_update_on_change.m +++ b/interfaces/matlab/interface/+helics/helics_handle_option_only_update_on_change.m @@ -1,7 +1,7 @@ function v = helics_handle_option_only_update_on_change() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 97); + vInitialized = helicsMEX(0, 99); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_handle_option_single_connection_only.m b/interfaces/matlab/interface/+helics/helics_handle_option_single_connection_only.m index 8a304a278e..befb0567a7 100644 --- a/interfaces/matlab/interface/+helics/helics_handle_option_single_connection_only.m +++ b/interfaces/matlab/interface/+helics/helics_handle_option_single_connection_only.m @@ -1,7 +1,7 @@ function v = helics_handle_option_single_connection_only() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 91); + vInitialized = helicsMEX(0, 93); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_handle_option_strict_type_checking.m b/interfaces/matlab/interface/+helics/helics_handle_option_strict_type_checking.m index c2b75a4e54..c9f409d30a 100644 --- a/interfaces/matlab/interface/+helics/helics_handle_option_strict_type_checking.m +++ b/interfaces/matlab/interface/+helics/helics_handle_option_strict_type_checking.m @@ -1,7 +1,7 @@ function v = helics_handle_option_strict_type_checking() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 94); + vInitialized = helicsMEX(0, 96); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_iteration_request_force_iteration.m b/interfaces/matlab/interface/+helics/helics_iteration_request_force_iteration.m index e3c195a3c4..378da09b1c 100644 --- a/interfaces/matlab/interface/+helics/helics_iteration_request_force_iteration.m +++ b/interfaces/matlab/interface/+helics/helics_iteration_request_force_iteration.m @@ -1,7 +1,7 @@ function v = helics_iteration_request_force_iteration() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 111); + vInitialized = helicsMEX(0, 113); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_iteration_request_iterate_if_needed.m b/interfaces/matlab/interface/+helics/helics_iteration_request_iterate_if_needed.m index 90bb75ea2e..255fc98df6 100644 --- a/interfaces/matlab/interface/+helics/helics_iteration_request_iterate_if_needed.m +++ b/interfaces/matlab/interface/+helics/helics_iteration_request_iterate_if_needed.m @@ -1,7 +1,7 @@ function v = helics_iteration_request_iterate_if_needed() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 112); + vInitialized = helicsMEX(0, 114); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_iteration_request_no_iteration.m b/interfaces/matlab/interface/+helics/helics_iteration_request_no_iteration.m index 453365769d..2d7308f098 100644 --- a/interfaces/matlab/interface/+helics/helics_iteration_request_no_iteration.m +++ b/interfaces/matlab/interface/+helics/helics_iteration_request_no_iteration.m @@ -1,7 +1,7 @@ function v = helics_iteration_request_no_iteration() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 110); + vInitialized = helicsMEX(0, 112); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_iteration_result_error.m b/interfaces/matlab/interface/+helics/helics_iteration_result_error.m index 996086899e..b8493f009a 100644 --- a/interfaces/matlab/interface/+helics/helics_iteration_result_error.m +++ b/interfaces/matlab/interface/+helics/helics_iteration_result_error.m @@ -1,7 +1,7 @@ function v = helics_iteration_result_error() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 114); + vInitialized = helicsMEX(0, 116); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_iteration_result_halted.m b/interfaces/matlab/interface/+helics/helics_iteration_result_halted.m index d3ff7bfeac..ac685efd1e 100644 --- a/interfaces/matlab/interface/+helics/helics_iteration_result_halted.m +++ b/interfaces/matlab/interface/+helics/helics_iteration_result_halted.m @@ -1,7 +1,7 @@ function v = helics_iteration_result_halted() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 115); + vInitialized = helicsMEX(0, 117); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_iteration_result_iterating.m b/interfaces/matlab/interface/+helics/helics_iteration_result_iterating.m index af424f77ff..51dc3c0251 100644 --- a/interfaces/matlab/interface/+helics/helics_iteration_result_iterating.m +++ b/interfaces/matlab/interface/+helics/helics_iteration_result_iterating.m @@ -1,7 +1,7 @@ function v = helics_iteration_result_iterating() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 116); + vInitialized = helicsMEX(0, 118); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_iteration_result_next_step.m b/interfaces/matlab/interface/+helics/helics_iteration_result_next_step.m index ec1c4a952c..913bb53d73 100644 --- a/interfaces/matlab/interface/+helics/helics_iteration_result_next_step.m +++ b/interfaces/matlab/interface/+helics/helics_iteration_result_next_step.m @@ -1,7 +1,7 @@ function v = helics_iteration_result_next_step() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 113); + vInitialized = helicsMEX(0, 115); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_log_level_connections.m b/interfaces/matlab/interface/+helics/helics_log_level_connections.m index 3c3fda0911..e4ce3dcc01 100644 --- a/interfaces/matlab/interface/+helics/helics_log_level_connections.m +++ b/interfaces/matlab/interface/+helics/helics_log_level_connections.m @@ -1,7 +1,7 @@ function v = helics_log_level_connections() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 48); + vInitialized = helicsMEX(0, 50); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_log_level_data.m b/interfaces/matlab/interface/+helics/helics_log_level_data.m index 562d2ff0a2..58fc04dcb1 100644 --- a/interfaces/matlab/interface/+helics/helics_log_level_data.m +++ b/interfaces/matlab/interface/+helics/helics_log_level_data.m @@ -1,7 +1,7 @@ function v = helics_log_level_data() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 51); + vInitialized = helicsMEX(0, 53); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_log_level_error.m b/interfaces/matlab/interface/+helics/helics_log_level_error.m index 1d5880f7e4..d052c547ae 100644 --- a/interfaces/matlab/interface/+helics/helics_log_level_error.m +++ b/interfaces/matlab/interface/+helics/helics_log_level_error.m @@ -1,7 +1,7 @@ function v = helics_log_level_error() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 45); + vInitialized = helicsMEX(0, 47); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_log_level_interfaces.m b/interfaces/matlab/interface/+helics/helics_log_level_interfaces.m index b65867a43c..d5e80e9ebb 100644 --- a/interfaces/matlab/interface/+helics/helics_log_level_interfaces.m +++ b/interfaces/matlab/interface/+helics/helics_log_level_interfaces.m @@ -1,7 +1,7 @@ function v = helics_log_level_interfaces() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 49); + vInitialized = helicsMEX(0, 51); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_log_level_no_print.m b/interfaces/matlab/interface/+helics/helics_log_level_no_print.m index 0af0b39e9a..e6cdc34a4a 100644 --- a/interfaces/matlab/interface/+helics/helics_log_level_no_print.m +++ b/interfaces/matlab/interface/+helics/helics_log_level_no_print.m @@ -1,7 +1,7 @@ function v = helics_log_level_no_print() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 44); + vInitialized = helicsMEX(0, 46); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_log_level_summary.m b/interfaces/matlab/interface/+helics/helics_log_level_summary.m index 72f23b9f2f..bd80e7ec44 100644 --- a/interfaces/matlab/interface/+helics/helics_log_level_summary.m +++ b/interfaces/matlab/interface/+helics/helics_log_level_summary.m @@ -1,7 +1,7 @@ function v = helics_log_level_summary() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 47); + vInitialized = helicsMEX(0, 49); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_log_level_timing.m b/interfaces/matlab/interface/+helics/helics_log_level_timing.m index 20e124c704..bf2990dd6a 100644 --- a/interfaces/matlab/interface/+helics/helics_log_level_timing.m +++ b/interfaces/matlab/interface/+helics/helics_log_level_timing.m @@ -1,7 +1,7 @@ function v = helics_log_level_timing() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 50); + vInitialized = helicsMEX(0, 52); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_log_level_trace.m b/interfaces/matlab/interface/+helics/helics_log_level_trace.m index 684b42c179..3216a7c074 100644 --- a/interfaces/matlab/interface/+helics/helics_log_level_trace.m +++ b/interfaces/matlab/interface/+helics/helics_log_level_trace.m @@ -1,7 +1,7 @@ function v = helics_log_level_trace() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 52); + vInitialized = helicsMEX(0, 54); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_log_level_warning.m b/interfaces/matlab/interface/+helics/helics_log_level_warning.m index 35a8dba60a..99ac7bcdb0 100644 --- a/interfaces/matlab/interface/+helics/helics_log_level_warning.m +++ b/interfaces/matlab/interface/+helics/helics_log_level_warning.m @@ -1,7 +1,7 @@ function v = helics_log_level_warning() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 46); + vInitialized = helicsMEX(0, 48); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_multi_input_and_operation.m b/interfaces/matlab/interface/+helics/helics_multi_input_and_operation.m index f3a7e5495b..6955f6fa5c 100644 --- a/interfaces/matlab/interface/+helics/helics_multi_input_and_operation.m +++ b/interfaces/matlab/interface/+helics/helics_multi_input_and_operation.m @@ -1,7 +1,7 @@ function v = helics_multi_input_and_operation() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 82); + vInitialized = helicsMEX(0, 84); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_multi_input_average_operation.m b/interfaces/matlab/interface/+helics/helics_multi_input_average_operation.m index 38fa30ceac..89824d8a75 100644 --- a/interfaces/matlab/interface/+helics/helics_multi_input_average_operation.m +++ b/interfaces/matlab/interface/+helics/helics_multi_input_average_operation.m @@ -1,7 +1,7 @@ function v = helics_multi_input_average_operation() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 88); + vInitialized = helicsMEX(0, 90); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_multi_input_diff_operation.m b/interfaces/matlab/interface/+helics/helics_multi_input_diff_operation.m index 4f80c3cf98..2e55fe57c1 100644 --- a/interfaces/matlab/interface/+helics/helics_multi_input_diff_operation.m +++ b/interfaces/matlab/interface/+helics/helics_multi_input_diff_operation.m @@ -1,7 +1,7 @@ function v = helics_multi_input_diff_operation() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 85); + vInitialized = helicsMEX(0, 87); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_multi_input_max_operation.m b/interfaces/matlab/interface/+helics/helics_multi_input_max_operation.m index 4a8789c897..851dc59be1 100644 --- a/interfaces/matlab/interface/+helics/helics_multi_input_max_operation.m +++ b/interfaces/matlab/interface/+helics/helics_multi_input_max_operation.m @@ -1,7 +1,7 @@ function v = helics_multi_input_max_operation() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 86); + vInitialized = helicsMEX(0, 88); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_multi_input_min_operation.m b/interfaces/matlab/interface/+helics/helics_multi_input_min_operation.m index 9c90573bf9..ee63b8bd18 100644 --- a/interfaces/matlab/interface/+helics/helics_multi_input_min_operation.m +++ b/interfaces/matlab/interface/+helics/helics_multi_input_min_operation.m @@ -1,7 +1,7 @@ function v = helics_multi_input_min_operation() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 87); + vInitialized = helicsMEX(0, 89); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_multi_input_no_op.m b/interfaces/matlab/interface/+helics/helics_multi_input_no_op.m index 42cc79e2d8..f125360574 100644 --- a/interfaces/matlab/interface/+helics/helics_multi_input_no_op.m +++ b/interfaces/matlab/interface/+helics/helics_multi_input_no_op.m @@ -1,7 +1,7 @@ function v = helics_multi_input_no_op() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 80); + vInitialized = helicsMEX(0, 82); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_multi_input_or_operation.m b/interfaces/matlab/interface/+helics/helics_multi_input_or_operation.m index 875a67cf22..6dee84b530 100644 --- a/interfaces/matlab/interface/+helics/helics_multi_input_or_operation.m +++ b/interfaces/matlab/interface/+helics/helics_multi_input_or_operation.m @@ -1,7 +1,7 @@ function v = helics_multi_input_or_operation() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 83); + vInitialized = helicsMEX(0, 85); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_multi_input_sum_operation.m b/interfaces/matlab/interface/+helics/helics_multi_input_sum_operation.m index 3577891ef8..1eecd67e2c 100644 --- a/interfaces/matlab/interface/+helics/helics_multi_input_sum_operation.m +++ b/interfaces/matlab/interface/+helics/helics_multi_input_sum_operation.m @@ -1,7 +1,7 @@ function v = helics_multi_input_sum_operation() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 84); + vInitialized = helicsMEX(0, 86); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_multi_input_vectorize_operation.m b/interfaces/matlab/interface/+helics/helics_multi_input_vectorize_operation.m index 3b662ed2be..69a8e0c770 100644 --- a/interfaces/matlab/interface/+helics/helics_multi_input_vectorize_operation.m +++ b/interfaces/matlab/interface/+helics/helics_multi_input_vectorize_operation.m @@ -1,7 +1,7 @@ function v = helics_multi_input_vectorize_operation() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 81); + vInitialized = helicsMEX(0, 83); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_ok.m b/interfaces/matlab/interface/+helics/helics_ok.m index 67225bbb15..af3c616bce 100644 --- a/interfaces/matlab/interface/+helics/helics_ok.m +++ b/interfaces/matlab/interface/+helics/helics_ok.m @@ -1,7 +1,7 @@ function v = helics_ok() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 67); + vInitialized = helicsMEX(0, 69); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_property_int_console_log_level.m b/interfaces/matlab/interface/+helics/helics_property_int_console_log_level.m index 7c190d9d80..0e96a78f25 100644 --- a/interfaces/matlab/interface/+helics/helics_property_int_console_log_level.m +++ b/interfaces/matlab/interface/+helics/helics_property_int_console_log_level.m @@ -1,7 +1,7 @@ function v = helics_property_int_console_log_level() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 79); + vInitialized = helicsMEX(0, 81); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_property_int_file_log_level.m b/interfaces/matlab/interface/+helics/helics_property_int_file_log_level.m index 42182b6b38..cfc9970a8a 100644 --- a/interfaces/matlab/interface/+helics/helics_property_int_file_log_level.m +++ b/interfaces/matlab/interface/+helics/helics_property_int_file_log_level.m @@ -1,7 +1,7 @@ function v = helics_property_int_file_log_level() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 78); + vInitialized = helicsMEX(0, 80); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_property_int_log_level.m b/interfaces/matlab/interface/+helics/helics_property_int_log_level.m index 11aee4df55..baefbb81d4 100644 --- a/interfaces/matlab/interface/+helics/helics_property_int_log_level.m +++ b/interfaces/matlab/interface/+helics/helics_property_int_log_level.m @@ -1,7 +1,7 @@ function v = helics_property_int_log_level() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 77); + vInitialized = helicsMEX(0, 79); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_property_int_max_iterations.m b/interfaces/matlab/interface/+helics/helics_property_int_max_iterations.m index f542c1b22c..f6d6d5ad33 100644 --- a/interfaces/matlab/interface/+helics/helics_property_int_max_iterations.m +++ b/interfaces/matlab/interface/+helics/helics_property_int_max_iterations.m @@ -1,7 +1,7 @@ function v = helics_property_int_max_iterations() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 76); + vInitialized = helicsMEX(0, 78); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_property_time_delta.m b/interfaces/matlab/interface/+helics/helics_property_time_delta.m index a4f9950de7..d4205fe2b2 100644 --- a/interfaces/matlab/interface/+helics/helics_property_time_delta.m +++ b/interfaces/matlab/interface/+helics/helics_property_time_delta.m @@ -1,7 +1,7 @@ function v = helics_property_time_delta() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 68); + vInitialized = helicsMEX(0, 70); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_property_time_input_delay.m b/interfaces/matlab/interface/+helics/helics_property_time_input_delay.m index 3786771bda..962c836120 100644 --- a/interfaces/matlab/interface/+helics/helics_property_time_input_delay.m +++ b/interfaces/matlab/interface/+helics/helics_property_time_input_delay.m @@ -1,7 +1,7 @@ function v = helics_property_time_input_delay() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 74); + vInitialized = helicsMEX(0, 76); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_property_time_offset.m b/interfaces/matlab/interface/+helics/helics_property_time_offset.m index e91ebdece3..26e1cbde5b 100644 --- a/interfaces/matlab/interface/+helics/helics_property_time_offset.m +++ b/interfaces/matlab/interface/+helics/helics_property_time_offset.m @@ -1,7 +1,7 @@ function v = helics_property_time_offset() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 70); + vInitialized = helicsMEX(0, 72); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_property_time_output_delay.m b/interfaces/matlab/interface/+helics/helics_property_time_output_delay.m index 3441c14d6a..c5026b23ff 100644 --- a/interfaces/matlab/interface/+helics/helics_property_time_output_delay.m +++ b/interfaces/matlab/interface/+helics/helics_property_time_output_delay.m @@ -1,7 +1,7 @@ function v = helics_property_time_output_delay() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 75); + vInitialized = helicsMEX(0, 77); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_property_time_period.m b/interfaces/matlab/interface/+helics/helics_property_time_period.m index 3941541138..fb74adbe39 100644 --- a/interfaces/matlab/interface/+helics/helics_property_time_period.m +++ b/interfaces/matlab/interface/+helics/helics_property_time_period.m @@ -1,7 +1,7 @@ function v = helics_property_time_period() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 69); + vInitialized = helicsMEX(0, 71); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_property_time_rt_lag.m b/interfaces/matlab/interface/+helics/helics_property_time_rt_lag.m index c6b5c4cbe3..87f065421f 100644 --- a/interfaces/matlab/interface/+helics/helics_property_time_rt_lag.m +++ b/interfaces/matlab/interface/+helics/helics_property_time_rt_lag.m @@ -1,7 +1,7 @@ function v = helics_property_time_rt_lag() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 71); + vInitialized = helicsMEX(0, 73); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_property_time_rt_lead.m b/interfaces/matlab/interface/+helics/helics_property_time_rt_lead.m index c77eeb1c72..d559b4852e 100644 --- a/interfaces/matlab/interface/+helics/helics_property_time_rt_lead.m +++ b/interfaces/matlab/interface/+helics/helics_property_time_rt_lead.m @@ -1,7 +1,7 @@ function v = helics_property_time_rt_lead() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 72); + vInitialized = helicsMEX(0, 74); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_property_time_rt_tolerance.m b/interfaces/matlab/interface/+helics/helics_property_time_rt_tolerance.m index 068dbda051..25c0a65b66 100644 --- a/interfaces/matlab/interface/+helics/helics_property_time_rt_tolerance.m +++ b/interfaces/matlab/interface/+helics/helics_property_time_rt_tolerance.m @@ -1,7 +1,7 @@ function v = helics_property_time_rt_tolerance() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 73); + vInitialized = helicsMEX(0, 75); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_state_error.m b/interfaces/matlab/interface/+helics/helics_state_error.m index 40a5eae07b..df3ed4ddc9 100644 --- a/interfaces/matlab/interface/+helics/helics_state_error.m +++ b/interfaces/matlab/interface/+helics/helics_state_error.m @@ -1,7 +1,7 @@ function v = helics_state_error() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 121); + vInitialized = helicsMEX(0, 123); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_state_execution.m b/interfaces/matlab/interface/+helics/helics_state_execution.m index 23076c4a17..73fb585d5b 100644 --- a/interfaces/matlab/interface/+helics/helics_state_execution.m +++ b/interfaces/matlab/interface/+helics/helics_state_execution.m @@ -1,7 +1,7 @@ function v = helics_state_execution() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 119); + vInitialized = helicsMEX(0, 121); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_state_finalize.m b/interfaces/matlab/interface/+helics/helics_state_finalize.m index 22416cfa86..2857832fab 100644 --- a/interfaces/matlab/interface/+helics/helics_state_finalize.m +++ b/interfaces/matlab/interface/+helics/helics_state_finalize.m @@ -1,7 +1,7 @@ function v = helics_state_finalize() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 120); + vInitialized = helicsMEX(0, 122); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_state_initialization.m b/interfaces/matlab/interface/+helics/helics_state_initialization.m index 5ef36c4ca0..d9d183075a 100644 --- a/interfaces/matlab/interface/+helics/helics_state_initialization.m +++ b/interfaces/matlab/interface/+helics/helics_state_initialization.m @@ -1,7 +1,7 @@ function v = helics_state_initialization() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 118); + vInitialized = helicsMEX(0, 120); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_state_pending_exec.m b/interfaces/matlab/interface/+helics/helics_state_pending_exec.m index 027aff1020..3b586b3abb 100644 --- a/interfaces/matlab/interface/+helics/helics_state_pending_exec.m +++ b/interfaces/matlab/interface/+helics/helics_state_pending_exec.m @@ -1,7 +1,7 @@ function v = helics_state_pending_exec() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 123); + vInitialized = helicsMEX(0, 125); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_state_pending_finalize.m b/interfaces/matlab/interface/+helics/helics_state_pending_finalize.m index d27cedbbcb..d6c6811193 100644 --- a/interfaces/matlab/interface/+helics/helics_state_pending_finalize.m +++ b/interfaces/matlab/interface/+helics/helics_state_pending_finalize.m @@ -1,7 +1,7 @@ function v = helics_state_pending_finalize() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 126); + vInitialized = helicsMEX(0, 128); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_state_pending_init.m b/interfaces/matlab/interface/+helics/helics_state_pending_init.m index 568ee6c20b..82968c1f08 100644 --- a/interfaces/matlab/interface/+helics/helics_state_pending_init.m +++ b/interfaces/matlab/interface/+helics/helics_state_pending_init.m @@ -1,7 +1,7 @@ function v = helics_state_pending_init() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 122); + vInitialized = helicsMEX(0, 124); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_state_pending_iterative_time.m b/interfaces/matlab/interface/+helics/helics_state_pending_iterative_time.m index cbc2829f08..4ae7449afa 100644 --- a/interfaces/matlab/interface/+helics/helics_state_pending_iterative_time.m +++ b/interfaces/matlab/interface/+helics/helics_state_pending_iterative_time.m @@ -1,7 +1,7 @@ function v = helics_state_pending_iterative_time() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 125); + vInitialized = helicsMEX(0, 127); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_state_pending_time.m b/interfaces/matlab/interface/+helics/helics_state_pending_time.m index 795781d870..5f5d963b32 100644 --- a/interfaces/matlab/interface/+helics/helics_state_pending_time.m +++ b/interfaces/matlab/interface/+helics/helics_state_pending_time.m @@ -1,7 +1,7 @@ function v = helics_state_pending_time() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 124); + vInitialized = helicsMEX(0, 126); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_state_startup.m b/interfaces/matlab/interface/+helics/helics_state_startup.m index cc877e554f..5ef71e3b53 100644 --- a/interfaces/matlab/interface/+helics/helics_state_startup.m +++ b/interfaces/matlab/interface/+helics/helics_state_startup.m @@ -1,7 +1,7 @@ function v = helics_state_startup() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 117); + vInitialized = helicsMEX(0, 119); end v = vInitialized; end diff --git a/interfaces/matlab/interface/+helics/helics_warning.m b/interfaces/matlab/interface/+helics/helics_warning.m index 3833922835..2d1f9b3769 100644 --- a/interfaces/matlab/interface/+helics/helics_warning.m +++ b/interfaces/matlab/interface/+helics/helics_warning.m @@ -1,7 +1,7 @@ function v = helics_warning() persistent vInitialized; if isempty(vInitialized) - vInitialized = helicsMEX(0, 60); + vInitialized = helicsMEX(0, 62); end v = vInitialized; end diff --git a/interfaces/matlab/interface/helicsMEX.cpp b/interfaces/matlab/interface/helicsMEX.cpp index a2a9a13697..d76c134387 100644 --- a/interfaces/matlab/interface/helicsMEX.cpp +++ b/interfaces/matlab/interface/helicsMEX.cpp @@ -7207,6 +7207,74 @@ int _wrap_helicsBrokerSetLogFile(int resc, mxArray *resv[], int argc, mxArray *a } +int _wrap_helicsBrokerSetTimeBarrier(int resc, mxArray *resv[], int argc, mxArray *argv[]) { + helics_broker arg1 = (helics_broker) 0 ; + helics_time arg2 ; + helics_error *arg3 = (helics_error *) 0 ; + int res1 ; + double val2 ; + int ecode2 = 0 ; + helics_error etemp3 ; + mxArray * _out; + + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + if (!SWIG_check_num_args("helicsBrokerSetTimeBarrier",argc,2,2,0)) { + SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "helicsBrokerSetTimeBarrier" "', argument " "1"" of type '" "helics_broker""'"); + } + ecode2 = SWIG_AsVal_double(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "helicsBrokerSetTimeBarrier" "', argument " "2"" of type '" "helics_time""'"); + } + arg2 = static_cast< helics_time >(val2); + helicsBrokerSetTimeBarrier(arg1,arg2,arg3); + _out = (mxArray*)0; + if (_out) --resc, *resv++ = _out; + { + if (arg3->error_code!=helics_ok) + { + throwHelicsMatlabError(arg3); + } + } + return 0; +fail: + { + if (arg3->error_code!=helics_ok) + { + throwHelicsMatlabError(arg3); + } + } + return 1; +} + + +int _wrap_helicsBrokerClearTimeBarrier(int resc, mxArray *resv[], int argc, mxArray *argv[]) { + helics_broker arg1 = (helics_broker) 0 ; + int res1 ; + mxArray * _out; + + if (!SWIG_check_num_args("helicsBrokerClearTimeBarrier",argc,1,1,0)) { + SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "helicsBrokerClearTimeBarrier" "', argument " "1"" of type '" "helics_broker""'"); + } + helicsBrokerClearTimeBarrier(arg1); + _out = (mxArray*)0; + if (_out) --resc, *resv++ = _out; + return 0; +fail: + return 1; +} + + int _wrap_helicsCreateQuery(int resc, mxArray *resv[], int argc, mxArray *argv[]) { char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; @@ -9724,40 +9792,45 @@ int _wrap_helicsInputGetVector(int resc, mxArray *resv[], int argc, mxArray *arg int *arg4 = (int *) 0 ; helics_error *arg5 = (helics_error *) 0 ; int res1 ; + void *argp2 = 0 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; helics_error etemp5 ; mxArray * _out; - { - arg2=(double *)(NULL); - } - { - arg4=&(arg3); - } + arg4 = &temp4; { etemp5=helicsErrorInitialize(); arg5=&etemp5; } - if (!SWIG_check_num_args("helicsInputGetVector",argc,1,1,0)) { + if (!SWIG_check_num_args("helicsInputGetVector",argc,3,3,0)) { SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "helicsInputGetVector" "', argument " "1"" of type '" "helics_input""'"); } - { - arg3=helicsInputGetVectorSize(arg1); - arg2 = (double *) mxCalloc(arg3,sizeof(double)); - } + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "helicsInputGetVector" "', argument " "2"" of type '" "double []""'"); + } + arg2 = reinterpret_cast< double * >(argp2); + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "helicsInputGetVector" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); helicsInputGetVector(arg1,arg2,arg3,arg4,arg5); _out = (mxArray*)0; if (_out) --resc, *resv++ = _out; - { - mxArray *mat=mxCreateDoubleMatrix(*arg4,1,mxREAL); - mxSetPr(mat,arg2); - if (--resc>=0) *resv++ = mat; - } - { - //if (arg2) free(arg2); + if (SWIG_IsTmpObj(res4)) { + if (--resc>=0) *resv++ = SWIG_From_int((*arg4)); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + if (--resc>=0) *resv++ = SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags); } { if (arg5->error_code!=helics_ok) @@ -9767,9 +9840,6 @@ int _wrap_helicsInputGetVector(int resc, mxArray *resv[], int argc, mxArray *arg } return 0; fail: - { - //if (arg2) free(arg2); - } { if (arg5->error_code!=helics_ok) { @@ -14639,89 +14709,91 @@ SWIGINTERN const char* SwigConstantName(int con_id) { case 41: return "helics_flag_enable_init_entry"; case 42: return "helics_flag_ignore_time_mismatch_warnings"; case 43: return "helics_flag_terminate_on_error"; - case 44: return "helics_log_level_no_print"; - case 45: return "helics_log_level_error"; - case 46: return "helics_log_level_warning"; - case 47: return "helics_log_level_summary"; - case 48: return "helics_log_level_connections"; - case 49: return "helics_log_level_interfaces"; - case 50: return "helics_log_level_timing"; - case 51: return "helics_log_level_data"; - case 52: return "helics_log_level_trace"; - case 53: return "helics_error_fatal"; - case 54: return "helics_error_external_type"; - case 55: return "helics_error_other"; - case 56: return "helics_error_insufficient_space"; - case 57: return "helics_error_execution_failure"; - case 58: return "helics_error_invalid_function_call"; - case 59: return "helics_error_invalid_state_transition"; - case 60: return "helics_warning"; - case 61: return "helics_error_system_failure"; - case 62: return "helics_error_discard"; - case 63: return "helics_error_invalid_argument"; - case 64: return "helics_error_invalid_object"; - case 65: return "helics_error_connection_failure"; - case 66: return "helics_error_registration_failure"; - case 67: return "helics_ok"; - case 68: return "helics_property_time_delta"; - case 69: return "helics_property_time_period"; - case 70: return "helics_property_time_offset"; - case 71: return "helics_property_time_rt_lag"; - case 72: return "helics_property_time_rt_lead"; - case 73: return "helics_property_time_rt_tolerance"; - case 74: return "helics_property_time_input_delay"; - case 75: return "helics_property_time_output_delay"; - case 76: return "helics_property_int_max_iterations"; - case 77: return "helics_property_int_log_level"; - case 78: return "helics_property_int_file_log_level"; - case 79: return "helics_property_int_console_log_level"; - case 80: return "helics_multi_input_no_op"; - case 81: return "helics_multi_input_vectorize_operation"; - case 82: return "helics_multi_input_and_operation"; - case 83: return "helics_multi_input_or_operation"; - case 84: return "helics_multi_input_sum_operation"; - case 85: return "helics_multi_input_diff_operation"; - case 86: return "helics_multi_input_max_operation"; - case 87: return "helics_multi_input_min_operation"; - case 88: return "helics_multi_input_average_operation"; - case 89: return "helics_handle_option_connection_required"; - case 90: return "helics_handle_option_connection_optional"; - case 91: return "helics_handle_option_single_connection_only"; - case 92: return "helics_handle_option_multiple_connections_allowed"; - case 93: return "helics_handle_option_buffer_data"; - case 94: return "helics_handle_option_strict_type_checking"; - case 95: return "helics_handle_option_ignore_unit_mismatch"; - case 96: return "helics_handle_option_only_transmit_on_change"; - case 97: return "helics_handle_option_only_update_on_change"; - case 98: return "helics_handle_option_ignore_interrupts"; - case 99: return "helics_handle_option_multi_input_handling_method"; - case 100: return "helics_handle_option_input_priority_location"; - case 101: return "helics_handle_option_clear_priority_list"; - case 102: return "helics_handle_option_connections"; - case 103: return "helics_filter_type_custom"; - case 104: return "helics_filter_type_delay"; - case 105: return "helics_filter_type_random_delay"; - case 106: return "helics_filter_type_random_drop"; - case 107: return "helics_filter_type_reroute"; - case 108: return "helics_filter_type_clone"; - case 109: return "helics_filter_type_firewall"; - case 110: return "helics_iteration_request_no_iteration"; - case 111: return "helics_iteration_request_force_iteration"; - case 112: return "helics_iteration_request_iterate_if_needed"; - case 113: return "helics_iteration_result_next_step"; - case 114: return "helics_iteration_result_error"; - case 115: return "helics_iteration_result_halted"; - case 116: return "helics_iteration_result_iterating"; - case 117: return "helics_state_startup"; - case 118: return "helics_state_initialization"; - case 119: return "helics_state_execution"; - case 120: return "helics_state_finalize"; - case 121: return "helics_state_error"; - case 122: return "helics_state_pending_init"; - case 123: return "helics_state_pending_exec"; - case 124: return "helics_state_pending_time"; - case 125: return "helics_state_pending_iterative_time"; - case 126: return "helics_state_pending_finalize"; + case 44: return "helics_flag_force_logging_flush"; + case 45: return "helics_flag_dumplog"; + case 46: return "helics_log_level_no_print"; + case 47: return "helics_log_level_error"; + case 48: return "helics_log_level_warning"; + case 49: return "helics_log_level_summary"; + case 50: return "helics_log_level_connections"; + case 51: return "helics_log_level_interfaces"; + case 52: return "helics_log_level_timing"; + case 53: return "helics_log_level_data"; + case 54: return "helics_log_level_trace"; + case 55: return "helics_error_fatal"; + case 56: return "helics_error_external_type"; + case 57: return "helics_error_other"; + case 58: return "helics_error_insufficient_space"; + case 59: return "helics_error_execution_failure"; + case 60: return "helics_error_invalid_function_call"; + case 61: return "helics_error_invalid_state_transition"; + case 62: return "helics_warning"; + case 63: return "helics_error_system_failure"; + case 64: return "helics_error_discard"; + case 65: return "helics_error_invalid_argument"; + case 66: return "helics_error_invalid_object"; + case 67: return "helics_error_connection_failure"; + case 68: return "helics_error_registration_failure"; + case 69: return "helics_ok"; + case 70: return "helics_property_time_delta"; + case 71: return "helics_property_time_period"; + case 72: return "helics_property_time_offset"; + case 73: return "helics_property_time_rt_lag"; + case 74: return "helics_property_time_rt_lead"; + case 75: return "helics_property_time_rt_tolerance"; + case 76: return "helics_property_time_input_delay"; + case 77: return "helics_property_time_output_delay"; + case 78: return "helics_property_int_max_iterations"; + case 79: return "helics_property_int_log_level"; + case 80: return "helics_property_int_file_log_level"; + case 81: return "helics_property_int_console_log_level"; + case 82: return "helics_multi_input_no_op"; + case 83: return "helics_multi_input_vectorize_operation"; + case 84: return "helics_multi_input_and_operation"; + case 85: return "helics_multi_input_or_operation"; + case 86: return "helics_multi_input_sum_operation"; + case 87: return "helics_multi_input_diff_operation"; + case 88: return "helics_multi_input_max_operation"; + case 89: return "helics_multi_input_min_operation"; + case 90: return "helics_multi_input_average_operation"; + case 91: return "helics_handle_option_connection_required"; + case 92: return "helics_handle_option_connection_optional"; + case 93: return "helics_handle_option_single_connection_only"; + case 94: return "helics_handle_option_multiple_connections_allowed"; + case 95: return "helics_handle_option_buffer_data"; + case 96: return "helics_handle_option_strict_type_checking"; + case 97: return "helics_handle_option_ignore_unit_mismatch"; + case 98: return "helics_handle_option_only_transmit_on_change"; + case 99: return "helics_handle_option_only_update_on_change"; + case 100: return "helics_handle_option_ignore_interrupts"; + case 101: return "helics_handle_option_multi_input_handling_method"; + case 102: return "helics_handle_option_input_priority_location"; + case 103: return "helics_handle_option_clear_priority_list"; + case 104: return "helics_handle_option_connections"; + case 105: return "helics_filter_type_custom"; + case 106: return "helics_filter_type_delay"; + case 107: return "helics_filter_type_random_delay"; + case 108: return "helics_filter_type_random_drop"; + case 109: return "helics_filter_type_reroute"; + case 110: return "helics_filter_type_clone"; + case 111: return "helics_filter_type_firewall"; + case 112: return "helics_iteration_request_no_iteration"; + case 113: return "helics_iteration_request_force_iteration"; + case 114: return "helics_iteration_request_iterate_if_needed"; + case 115: return "helics_iteration_result_next_step"; + case 116: return "helics_iteration_result_error"; + case 117: return "helics_iteration_result_halted"; + case 118: return "helics_iteration_result_iterating"; + case 119: return "helics_state_startup"; + case 120: return "helics_state_initialization"; + case 121: return "helics_state_execution"; + case 122: return "helics_state_finalize"; + case 123: return "helics_state_error"; + case 124: return "helics_state_pending_init"; + case 125: return "helics_state_pending_exec"; + case 126: return "helics_state_pending_time"; + case 127: return "helics_state_pending_iterative_time"; + case 128: return "helics_state_pending_finalize"; default: return 0; } } @@ -14796,89 +14868,91 @@ SWIGINTERN int swigConstant(int SWIGUNUSEDPARM(resc), mxArray *resv[], int argc, case 41: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_flag_enable_init_entry",SWIG_From_int(static_cast< int >(helics_flag_enable_init_entry)));; break; case 42: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_flag_ignore_time_mismatch_warnings",SWIG_From_int(static_cast< int >(helics_flag_ignore_time_mismatch_warnings)));; break; case 43: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_flag_terminate_on_error",SWIG_From_int(static_cast< int >(helics_flag_terminate_on_error)));; break; - case 44: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_no_print",SWIG_From_int(static_cast< int >(helics_log_level_no_print)));; break; - case 45: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_error",SWIG_From_int(static_cast< int >(helics_log_level_error)));; break; - case 46: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_warning",SWIG_From_int(static_cast< int >(helics_log_level_warning)));; break; - case 47: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_summary",SWIG_From_int(static_cast< int >(helics_log_level_summary)));; break; - case 48: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_connections",SWIG_From_int(static_cast< int >(helics_log_level_connections)));; break; - case 49: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_interfaces",SWIG_From_int(static_cast< int >(helics_log_level_interfaces)));; break; - case 50: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_timing",SWIG_From_int(static_cast< int >(helics_log_level_timing)));; break; - case 51: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_data",SWIG_From_int(static_cast< int >(helics_log_level_data)));; break; - case 52: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_trace",SWIG_From_int(static_cast< int >(helics_log_level_trace)));; break; - case 53: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_fatal",SWIG_From_int(static_cast< int >(helics_error_fatal)));; break; - case 54: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_external_type",SWIG_From_int(static_cast< int >(helics_error_external_type)));; break; - case 55: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_other",SWIG_From_int(static_cast< int >(helics_error_other)));; break; - case 56: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_insufficient_space",SWIG_From_int(static_cast< int >(helics_error_insufficient_space)));; break; - case 57: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_execution_failure",SWIG_From_int(static_cast< int >(helics_error_execution_failure)));; break; - case 58: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_invalid_function_call",SWIG_From_int(static_cast< int >(helics_error_invalid_function_call)));; break; - case 59: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_invalid_state_transition",SWIG_From_int(static_cast< int >(helics_error_invalid_state_transition)));; break; - case 60: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_warning",SWIG_From_int(static_cast< int >(helics_warning)));; break; - case 61: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_system_failure",SWIG_From_int(static_cast< int >(helics_error_system_failure)));; break; - case 62: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_discard",SWIG_From_int(static_cast< int >(helics_error_discard)));; break; - case 63: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_invalid_argument",SWIG_From_int(static_cast< int >(helics_error_invalid_argument)));; break; - case 64: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_invalid_object",SWIG_From_int(static_cast< int >(helics_error_invalid_object)));; break; - case 65: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_connection_failure",SWIG_From_int(static_cast< int >(helics_error_connection_failure)));; break; - case 66: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_registration_failure",SWIG_From_int(static_cast< int >(helics_error_registration_failure)));; break; - case 67: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_ok",SWIG_From_int(static_cast< int >(helics_ok)));; break; - case 68: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_delta",SWIG_From_int(static_cast< int >(helics_property_time_delta)));; break; - case 69: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_period",SWIG_From_int(static_cast< int >(helics_property_time_period)));; break; - case 70: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_offset",SWIG_From_int(static_cast< int >(helics_property_time_offset)));; break; - case 71: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_rt_lag",SWIG_From_int(static_cast< int >(helics_property_time_rt_lag)));; break; - case 72: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_rt_lead",SWIG_From_int(static_cast< int >(helics_property_time_rt_lead)));; break; - case 73: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_rt_tolerance",SWIG_From_int(static_cast< int >(helics_property_time_rt_tolerance)));; break; - case 74: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_input_delay",SWIG_From_int(static_cast< int >(helics_property_time_input_delay)));; break; - case 75: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_output_delay",SWIG_From_int(static_cast< int >(helics_property_time_output_delay)));; break; - case 76: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_int_max_iterations",SWIG_From_int(static_cast< int >(helics_property_int_max_iterations)));; break; - case 77: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_int_log_level",SWIG_From_int(static_cast< int >(helics_property_int_log_level)));; break; - case 78: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_int_file_log_level",SWIG_From_int(static_cast< int >(helics_property_int_file_log_level)));; break; - case 79: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_int_console_log_level",SWIG_From_int(static_cast< int >(helics_property_int_console_log_level)));; break; - case 80: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_no_op",SWIG_From_int(static_cast< int >(helics_multi_input_no_op)));; break; - case 81: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_vectorize_operation",SWIG_From_int(static_cast< int >(helics_multi_input_vectorize_operation)));; break; - case 82: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_and_operation",SWIG_From_int(static_cast< int >(helics_multi_input_and_operation)));; break; - case 83: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_or_operation",SWIG_From_int(static_cast< int >(helics_multi_input_or_operation)));; break; - case 84: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_sum_operation",SWIG_From_int(static_cast< int >(helics_multi_input_sum_operation)));; break; - case 85: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_diff_operation",SWIG_From_int(static_cast< int >(helics_multi_input_diff_operation)));; break; - case 86: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_max_operation",SWIG_From_int(static_cast< int >(helics_multi_input_max_operation)));; break; - case 87: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_min_operation",SWIG_From_int(static_cast< int >(helics_multi_input_min_operation)));; break; - case 88: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_average_operation",SWIG_From_int(static_cast< int >(helics_multi_input_average_operation)));; break; - case 89: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_connection_required",SWIG_From_int(static_cast< int >(helics_handle_option_connection_required)));; break; - case 90: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_connection_optional",SWIG_From_int(static_cast< int >(helics_handle_option_connection_optional)));; break; - case 91: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_single_connection_only",SWIG_From_int(static_cast< int >(helics_handle_option_single_connection_only)));; break; - case 92: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_multiple_connections_allowed",SWIG_From_int(static_cast< int >(helics_handle_option_multiple_connections_allowed)));; break; - case 93: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_buffer_data",SWIG_From_int(static_cast< int >(helics_handle_option_buffer_data)));; break; - case 94: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_strict_type_checking",SWIG_From_int(static_cast< int >(helics_handle_option_strict_type_checking)));; break; - case 95: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_ignore_unit_mismatch",SWIG_From_int(static_cast< int >(helics_handle_option_ignore_unit_mismatch)));; break; - case 96: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_only_transmit_on_change",SWIG_From_int(static_cast< int >(helics_handle_option_only_transmit_on_change)));; break; - case 97: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_only_update_on_change",SWIG_From_int(static_cast< int >(helics_handle_option_only_update_on_change)));; break; - case 98: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_ignore_interrupts",SWIG_From_int(static_cast< int >(helics_handle_option_ignore_interrupts)));; break; - case 99: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_multi_input_handling_method",SWIG_From_int(static_cast< int >(helics_handle_option_multi_input_handling_method)));; break; - case 100: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_input_priority_location",SWIG_From_int(static_cast< int >(helics_handle_option_input_priority_location)));; break; - case 101: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_clear_priority_list",SWIG_From_int(static_cast< int >(helics_handle_option_clear_priority_list)));; break; - case 102: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_connections",SWIG_From_int(static_cast< int >(helics_handle_option_connections)));; break; - case 103: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_filter_type_custom",SWIG_From_int(static_cast< int >(helics_filter_type_custom)));; break; - case 104: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_filter_type_delay",SWIG_From_int(static_cast< int >(helics_filter_type_delay)));; break; - case 105: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_filter_type_random_delay",SWIG_From_int(static_cast< int >(helics_filter_type_random_delay)));; break; - case 106: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_filter_type_random_drop",SWIG_From_int(static_cast< int >(helics_filter_type_random_drop)));; break; - case 107: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_filter_type_reroute",SWIG_From_int(static_cast< int >(helics_filter_type_reroute)));; break; - case 108: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_filter_type_clone",SWIG_From_int(static_cast< int >(helics_filter_type_clone)));; break; - case 109: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_filter_type_firewall",SWIG_From_int(static_cast< int >(helics_filter_type_firewall)));; break; - case 110: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_iteration_request_no_iteration",SWIG_From_int(static_cast< int >(helics_iteration_request_no_iteration)));; break; - case 111: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_iteration_request_force_iteration",SWIG_From_int(static_cast< int >(helics_iteration_request_force_iteration)));; break; - case 112: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_iteration_request_iterate_if_needed",SWIG_From_int(static_cast< int >(helics_iteration_request_iterate_if_needed)));; break; - case 113: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_iteration_result_next_step",SWIG_From_int(static_cast< int >(helics_iteration_result_next_step)));; break; - case 114: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_iteration_result_error",SWIG_From_int(static_cast< int >(helics_iteration_result_error)));; break; - case 115: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_iteration_result_halted",SWIG_From_int(static_cast< int >(helics_iteration_result_halted)));; break; - case 116: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_iteration_result_iterating",SWIG_From_int(static_cast< int >(helics_iteration_result_iterating)));; break; - case 117: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_startup",SWIG_From_int(static_cast< int >(helics_state_startup)));; break; - case 118: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_initialization",SWIG_From_int(static_cast< int >(helics_state_initialization)));; break; - case 119: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_execution",SWIG_From_int(static_cast< int >(helics_state_execution)));; break; - case 120: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_finalize",SWIG_From_int(static_cast< int >(helics_state_finalize)));; break; - case 121: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_error",SWIG_From_int(static_cast< int >(helics_state_error)));; break; - case 122: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_pending_init",SWIG_From_int(static_cast< int >(helics_state_pending_init)));; break; - case 123: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_pending_exec",SWIG_From_int(static_cast< int >(helics_state_pending_exec)));; break; - case 124: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_pending_time",SWIG_From_int(static_cast< int >(helics_state_pending_time)));; break; - case 125: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_pending_iterative_time",SWIG_From_int(static_cast< int >(helics_state_pending_iterative_time)));; break; - case 126: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_pending_finalize",SWIG_From_int(static_cast< int >(helics_state_pending_finalize)));; break; + case 44: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_flag_force_logging_flush",SWIG_From_int(static_cast< int >(helics_flag_force_logging_flush)));; break; + case 45: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_flag_dumplog",SWIG_From_int(static_cast< int >(helics_flag_dumplog)));; break; + case 46: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_no_print",SWIG_From_int(static_cast< int >(helics_log_level_no_print)));; break; + case 47: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_error",SWIG_From_int(static_cast< int >(helics_log_level_error)));; break; + case 48: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_warning",SWIG_From_int(static_cast< int >(helics_log_level_warning)));; break; + case 49: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_summary",SWIG_From_int(static_cast< int >(helics_log_level_summary)));; break; + case 50: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_connections",SWIG_From_int(static_cast< int >(helics_log_level_connections)));; break; + case 51: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_interfaces",SWIG_From_int(static_cast< int >(helics_log_level_interfaces)));; break; + case 52: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_timing",SWIG_From_int(static_cast< int >(helics_log_level_timing)));; break; + case 53: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_data",SWIG_From_int(static_cast< int >(helics_log_level_data)));; break; + case 54: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_log_level_trace",SWIG_From_int(static_cast< int >(helics_log_level_trace)));; break; + case 55: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_fatal",SWIG_From_int(static_cast< int >(helics_error_fatal)));; break; + case 56: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_external_type",SWIG_From_int(static_cast< int >(helics_error_external_type)));; break; + case 57: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_other",SWIG_From_int(static_cast< int >(helics_error_other)));; break; + case 58: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_insufficient_space",SWIG_From_int(static_cast< int >(helics_error_insufficient_space)));; break; + case 59: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_execution_failure",SWIG_From_int(static_cast< int >(helics_error_execution_failure)));; break; + case 60: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_invalid_function_call",SWIG_From_int(static_cast< int >(helics_error_invalid_function_call)));; break; + case 61: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_invalid_state_transition",SWIG_From_int(static_cast< int >(helics_error_invalid_state_transition)));; break; + case 62: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_warning",SWIG_From_int(static_cast< int >(helics_warning)));; break; + case 63: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_system_failure",SWIG_From_int(static_cast< int >(helics_error_system_failure)));; break; + case 64: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_discard",SWIG_From_int(static_cast< int >(helics_error_discard)));; break; + case 65: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_invalid_argument",SWIG_From_int(static_cast< int >(helics_error_invalid_argument)));; break; + case 66: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_invalid_object",SWIG_From_int(static_cast< int >(helics_error_invalid_object)));; break; + case 67: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_connection_failure",SWIG_From_int(static_cast< int >(helics_error_connection_failure)));; break; + case 68: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_error_registration_failure",SWIG_From_int(static_cast< int >(helics_error_registration_failure)));; break; + case 69: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_ok",SWIG_From_int(static_cast< int >(helics_ok)));; break; + case 70: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_delta",SWIG_From_int(static_cast< int >(helics_property_time_delta)));; break; + case 71: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_period",SWIG_From_int(static_cast< int >(helics_property_time_period)));; break; + case 72: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_offset",SWIG_From_int(static_cast< int >(helics_property_time_offset)));; break; + case 73: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_rt_lag",SWIG_From_int(static_cast< int >(helics_property_time_rt_lag)));; break; + case 74: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_rt_lead",SWIG_From_int(static_cast< int >(helics_property_time_rt_lead)));; break; + case 75: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_rt_tolerance",SWIG_From_int(static_cast< int >(helics_property_time_rt_tolerance)));; break; + case 76: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_input_delay",SWIG_From_int(static_cast< int >(helics_property_time_input_delay)));; break; + case 77: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_time_output_delay",SWIG_From_int(static_cast< int >(helics_property_time_output_delay)));; break; + case 78: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_int_max_iterations",SWIG_From_int(static_cast< int >(helics_property_int_max_iterations)));; break; + case 79: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_int_log_level",SWIG_From_int(static_cast< int >(helics_property_int_log_level)));; break; + case 80: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_int_file_log_level",SWIG_From_int(static_cast< int >(helics_property_int_file_log_level)));; break; + case 81: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_property_int_console_log_level",SWIG_From_int(static_cast< int >(helics_property_int_console_log_level)));; break; + case 82: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_no_op",SWIG_From_int(static_cast< int >(helics_multi_input_no_op)));; break; + case 83: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_vectorize_operation",SWIG_From_int(static_cast< int >(helics_multi_input_vectorize_operation)));; break; + case 84: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_and_operation",SWIG_From_int(static_cast< int >(helics_multi_input_and_operation)));; break; + case 85: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_or_operation",SWIG_From_int(static_cast< int >(helics_multi_input_or_operation)));; break; + case 86: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_sum_operation",SWIG_From_int(static_cast< int >(helics_multi_input_sum_operation)));; break; + case 87: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_diff_operation",SWIG_From_int(static_cast< int >(helics_multi_input_diff_operation)));; break; + case 88: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_max_operation",SWIG_From_int(static_cast< int >(helics_multi_input_max_operation)));; break; + case 89: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_min_operation",SWIG_From_int(static_cast< int >(helics_multi_input_min_operation)));; break; + case 90: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_multi_input_average_operation",SWIG_From_int(static_cast< int >(helics_multi_input_average_operation)));; break; + case 91: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_connection_required",SWIG_From_int(static_cast< int >(helics_handle_option_connection_required)));; break; + case 92: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_connection_optional",SWIG_From_int(static_cast< int >(helics_handle_option_connection_optional)));; break; + case 93: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_single_connection_only",SWIG_From_int(static_cast< int >(helics_handle_option_single_connection_only)));; break; + case 94: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_multiple_connections_allowed",SWIG_From_int(static_cast< int >(helics_handle_option_multiple_connections_allowed)));; break; + case 95: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_buffer_data",SWIG_From_int(static_cast< int >(helics_handle_option_buffer_data)));; break; + case 96: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_strict_type_checking",SWIG_From_int(static_cast< int >(helics_handle_option_strict_type_checking)));; break; + case 97: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_ignore_unit_mismatch",SWIG_From_int(static_cast< int >(helics_handle_option_ignore_unit_mismatch)));; break; + case 98: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_only_transmit_on_change",SWIG_From_int(static_cast< int >(helics_handle_option_only_transmit_on_change)));; break; + case 99: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_only_update_on_change",SWIG_From_int(static_cast< int >(helics_handle_option_only_update_on_change)));; break; + case 100: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_ignore_interrupts",SWIG_From_int(static_cast< int >(helics_handle_option_ignore_interrupts)));; break; + case 101: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_multi_input_handling_method",SWIG_From_int(static_cast< int >(helics_handle_option_multi_input_handling_method)));; break; + case 102: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_input_priority_location",SWIG_From_int(static_cast< int >(helics_handle_option_input_priority_location)));; break; + case 103: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_clear_priority_list",SWIG_From_int(static_cast< int >(helics_handle_option_clear_priority_list)));; break; + case 104: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_handle_option_connections",SWIG_From_int(static_cast< int >(helics_handle_option_connections)));; break; + case 105: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_filter_type_custom",SWIG_From_int(static_cast< int >(helics_filter_type_custom)));; break; + case 106: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_filter_type_delay",SWIG_From_int(static_cast< int >(helics_filter_type_delay)));; break; + case 107: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_filter_type_random_delay",SWIG_From_int(static_cast< int >(helics_filter_type_random_delay)));; break; + case 108: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_filter_type_random_drop",SWIG_From_int(static_cast< int >(helics_filter_type_random_drop)));; break; + case 109: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_filter_type_reroute",SWIG_From_int(static_cast< int >(helics_filter_type_reroute)));; break; + case 110: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_filter_type_clone",SWIG_From_int(static_cast< int >(helics_filter_type_clone)));; break; + case 111: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_filter_type_firewall",SWIG_From_int(static_cast< int >(helics_filter_type_firewall)));; break; + case 112: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_iteration_request_no_iteration",SWIG_From_int(static_cast< int >(helics_iteration_request_no_iteration)));; break; + case 113: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_iteration_request_force_iteration",SWIG_From_int(static_cast< int >(helics_iteration_request_force_iteration)));; break; + case 114: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_iteration_request_iterate_if_needed",SWIG_From_int(static_cast< int >(helics_iteration_request_iterate_if_needed)));; break; + case 115: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_iteration_result_next_step",SWIG_From_int(static_cast< int >(helics_iteration_result_next_step)));; break; + case 116: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_iteration_result_error",SWIG_From_int(static_cast< int >(helics_iteration_result_error)));; break; + case 117: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_iteration_result_halted",SWIG_From_int(static_cast< int >(helics_iteration_result_halted)));; break; + case 118: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_iteration_result_iterating",SWIG_From_int(static_cast< int >(helics_iteration_result_iterating)));; break; + case 119: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_startup",SWIG_From_int(static_cast< int >(helics_state_startup)));; break; + case 120: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_initialization",SWIG_From_int(static_cast< int >(helics_state_initialization)));; break; + case 121: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_execution",SWIG_From_int(static_cast< int >(helics_state_execution)));; break; + case 122: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_finalize",SWIG_From_int(static_cast< int >(helics_state_finalize)));; break; + case 123: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_error",SWIG_From_int(static_cast< int >(helics_state_error)));; break; + case 124: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_pending_init",SWIG_From_int(static_cast< int >(helics_state_pending_init)));; break; + case 125: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_pending_exec",SWIG_From_int(static_cast< int >(helics_state_pending_exec)));; break; + case 126: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_pending_time",SWIG_From_int(static_cast< int >(helics_state_pending_time)));; break; + case 127: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_pending_iterative_time",SWIG_From_int(static_cast< int >(helics_state_pending_iterative_time)));; break; + case 128: *resv = SWIG_Matlab_SetConstant(module_ns,"helics_state_pending_finalize",SWIG_From_int(static_cast< int >(helics_state_pending_finalize)));; break; default: SWIG_Error(SWIG_RuntimeError, "No such constant."); return 1; @@ -15035,176 +15109,178 @@ SWIGINTERN const char* SwigFunctionName(int fcn_id) { case 144: return "_wrap_helicsBrokerSetGlobal"; case 145: return "_wrap_helicsCoreSetLogFile"; case 146: return "_wrap_helicsBrokerSetLogFile"; - case 147: return "_wrap_helicsCreateQuery"; - case 148: return "_wrap_helicsQueryExecute"; - case 149: return "_wrap_helicsQueryCoreExecute"; - case 150: return "_wrap_helicsQueryBrokerExecute"; - case 151: return "_wrap_helicsQueryExecuteAsync"; - case 152: return "_wrap_helicsQueryExecuteComplete"; - case 153: return "_wrap_helicsQueryIsCompleted"; - case 154: return "_wrap_helicsQuerySetTarget"; - case 155: return "_wrap_helicsQuerySetQueryString"; - case 156: return "_wrap_helicsQueryFree"; - case 157: return "_wrap_helicsCleanupLibrary"; - case 158: return "_wrap_helicsFederateRegisterSubscription"; - case 159: return "_wrap_helicsFederateRegisterPublication"; - case 160: return "_wrap_helicsFederateRegisterTypePublication"; - case 161: return "_wrap_helicsFederateRegisterGlobalPublication"; - case 162: return "_wrap_helicsFederateRegisterGlobalTypePublication"; - case 163: return "_wrap_helicsFederateRegisterInput"; - case 164: return "_wrap_helicsFederateRegisterTypeInput"; - case 165: return "_wrap_helicsFederateRegisterGlobalInput"; - case 166: return "_wrap_helicsFederateRegisterGlobalTypeInput"; - case 167: return "_wrap_helicsFederateGetPublication"; - case 168: return "_wrap_helicsFederateGetPublicationByIndex"; - case 169: return "_wrap_helicsFederateGetInput"; - case 170: return "_wrap_helicsFederateGetInputByIndex"; - case 171: return "_wrap_helicsFederateGetSubscription"; - case 172: return "_wrap_helicsFederateClearUpdates"; - case 173: return "_wrap_helicsFederateRegisterFromPublicationJSON"; - case 174: return "_wrap_helicsFederatePublishJSON"; - case 175: return "_wrap_helicsPublicationIsValid"; - case 176: return "_wrap_helicsPublicationPublishRaw"; - case 177: return "_wrap_helicsPublicationPublishString"; - case 178: return "_wrap_helicsPublicationPublishInteger"; - case 179: return "_wrap_helicsPublicationPublishBoolean"; - case 180: return "_wrap_helicsPublicationPublishDouble"; - case 181: return "_wrap_helicsPublicationPublishTime"; - case 182: return "_wrap_helicsPublicationPublishChar"; - case 183: return "_wrap_helicsPublicationPublishComplex"; - case 184: return "_wrap_helicsPublicationPublishVector"; - case 185: return "_wrap_helicsPublicationPublishNamedPoint"; - case 186: return "_wrap_helicsPublicationAddTarget"; - case 187: return "_wrap_helicsInputIsValid"; - case 188: return "_wrap_helicsInputAddTarget"; - case 189: return "_wrap_helicsInputGetRawValueSize"; - case 190: return "_wrap_helicsInputGetRawValue"; - case 191: return "_wrap_helicsInputGetStringSize"; - case 192: return "_wrap_helicsInputGetString"; - case 193: return "_wrap_helicsInputGetInteger"; - case 194: return "_wrap_helicsInputGetBoolean"; - case 195: return "_wrap_helicsInputGetDouble"; - case 196: return "_wrap_helicsInputGetTime"; - case 197: return "_wrap_helicsInputGetChar"; - case 198: return "_wrap_helicsInputGetComplex"; - case 199: return "_wrap_helicsInputGetVectorSize"; - case 200: return "_wrap_helicsInputGetVector"; - case 201: return "_wrap_helicsInputGetNamedPoint"; - case 202: return "_wrap_helicsInputSetDefaultRaw"; - case 203: return "_wrap_helicsInputSetDefaultString"; - case 204: return "_wrap_helicsInputSetDefaultInteger"; - case 205: return "_wrap_helicsInputSetDefaultBoolean"; - case 206: return "_wrap_helicsInputSetDefaultTime"; - case 207: return "_wrap_helicsInputSetDefaultChar"; - case 208: return "_wrap_helicsInputSetDefaultDouble"; - case 209: return "_wrap_helicsInputSetDefaultComplex"; - case 210: return "_wrap_helicsInputSetDefaultVector"; - case 211: return "_wrap_helicsInputSetDefaultNamedPoint"; - case 212: return "_wrap_helicsInputGetType"; - case 213: return "_wrap_helicsInputGetPublicationType"; - case 214: return "_wrap_helicsPublicationGetType"; - case 215: return "_wrap_helicsInputGetKey"; - case 216: return "_wrap_helicsSubscriptionGetKey"; - case 217: return "_wrap_helicsPublicationGetKey"; - case 218: return "_wrap_helicsInputGetUnits"; - case 219: return "_wrap_helicsInputGetInjectionUnits"; - case 220: return "_wrap_helicsInputGetExtractionUnits"; - case 221: return "_wrap_helicsPublicationGetUnits"; - case 222: return "_wrap_helicsInputGetInfo"; - case 223: return "_wrap_helicsInputSetInfo"; - case 224: return "_wrap_helicsPublicationGetInfo"; - case 225: return "_wrap_helicsPublicationSetInfo"; - case 226: return "_wrap_helicsInputGetOption"; - case 227: return "_wrap_helicsInputSetOption"; - case 228: return "_wrap_helicsPublicationGetOption"; - case 229: return "_wrap_helicsPublicationSetOption"; - case 230: return "_wrap_helicsPublicationSetMinimumChange"; - case 231: return "_wrap_helicsInputSetMinimumChange"; - case 232: return "_wrap_helicsInputIsUpdated"; - case 233: return "_wrap_helicsInputLastUpdateTime"; - case 234: return "_wrap_helicsInputClearUpdate"; - case 235: return "_wrap_helicsFederateGetPublicationCount"; - case 236: return "_wrap_helicsFederateGetInputCount"; - case 237: return "_wrap_helicsFederateRegisterEndpoint"; - case 238: return "_wrap_helicsFederateRegisterGlobalEndpoint"; - case 239: return "_wrap_helicsFederateGetEndpoint"; - case 240: return "_wrap_helicsFederateGetEndpointByIndex"; - case 241: return "_wrap_helicsEndpointIsValid"; - case 242: return "_wrap_helicsEndpointSetDefaultDestination"; - case 243: return "_wrap_helicsEndpointGetDefaultDestination"; - case 244: return "_wrap_helicsEndpointSendMessageRaw"; - case 245: return "_wrap_helicsEndpointSendEventRaw"; - case 246: return "_wrap_helicsEndpointSendMessage"; - case 247: return "_wrap_helicsEndpointSendMessageObject"; - case 248: return "_wrap_helicsEndpointSendMessageObjectZeroCopy"; - case 249: return "_wrap_helicsEndpointSubscribe"; - case 250: return "_wrap_helicsFederateHasMessage"; - case 251: return "_wrap_helicsEndpointHasMessage"; - case 252: return "_wrap_helicsFederatePendingMessages"; - case 253: return "_wrap_helicsEndpointPendingMessages"; - case 254: return "_wrap_helicsEndpointGetMessage"; - case 255: return "_wrap_helicsEndpointGetMessageObject"; - case 256: return "_wrap_helicsEndpointCreateMessageObject"; - case 257: return "_wrap_helicsFederateGetMessage"; - case 258: return "_wrap_helicsFederateGetMessageObject"; - case 259: return "_wrap_helicsFederateCreateMessageObject"; - case 260: return "_wrap_helicsFederateClearMessages"; - case 261: return "_wrap_helicsEndpointClearMessages"; - case 262: return "_wrap_helicsEndpointGetType"; - case 263: return "_wrap_helicsEndpointGetName"; - case 264: return "_wrap_helicsFederateGetEndpointCount"; - case 265: return "_wrap_helicsEndpointGetInfo"; - case 266: return "_wrap_helicsEndpointSetInfo"; - case 267: return "_wrap_helicsEndpointSetOption"; - case 268: return "_wrap_helicsEndpointGetOption"; - case 269: return "_wrap_helicsMessageGetSource"; - case 270: return "_wrap_helicsMessageGetDestination"; - case 271: return "_wrap_helicsMessageGetOriginalSource"; - case 272: return "_wrap_helicsMessageGetOriginalDestination"; - case 273: return "_wrap_helicsMessageGetTime"; - case 274: return "_wrap_helicsMessageGetString"; - case 275: return "_wrap_helicsMessageGetMessageID"; - case 276: return "_wrap_helicsMessageCheckFlag"; - case 277: return "_wrap_helicsMessageGetRawDataSize"; - case 278: return "_wrap_helicsMessageGetRawData"; - case 279: return "_wrap_helicsMessageIsValid"; - case 280: return "_wrap_helicsMessageSetSource"; - case 281: return "_wrap_helicsMessageSetDestination"; - case 282: return "_wrap_helicsMessageSetOriginalSource"; - case 283: return "_wrap_helicsMessageSetOriginalDestination"; - case 284: return "_wrap_helicsMessageSetTime"; - case 285: return "_wrap_helicsMessageReserve"; - case 286: return "_wrap_helicsMessageSetMessageID"; - case 287: return "_wrap_helicsMessageClearFlags"; - case 288: return "_wrap_helicsMessageSetFlagOption"; - case 289: return "_wrap_helicsMessageSetString"; - case 290: return "_wrap_helicsMessageSetData"; - case 291: return "_wrap_helicsMessageAppendData"; - case 292: return "_wrap_helicsMessageCopy"; - case 293: return "_wrap_helicsMessageClone"; - case 294: return "_wrap_helicsMessageFree"; - case 295: return "_wrap_helicsFederateRegisterFilter"; - case 296: return "_wrap_helicsFederateRegisterGlobalFilter"; - case 297: return "_wrap_helicsFederateRegisterCloningFilter"; - case 298: return "_wrap_helicsFederateRegisterGlobalCloningFilter"; - case 299: return "_wrap_helicsCoreRegisterFilter"; - case 300: return "_wrap_helicsCoreRegisterCloningFilter"; - case 301: return "_wrap_helicsFederateGetFilterCount"; - case 302: return "_wrap_helicsFederateGetFilter"; - case 303: return "_wrap_helicsFederateGetFilterByIndex"; - case 304: return "_wrap_helicsFilterIsValid"; - case 305: return "_wrap_helicsFilterGetName"; - case 306: return "_wrap_helicsFilterSet"; - case 307: return "_wrap_helicsFilterSetString"; - case 308: return "_wrap_helicsFilterAddDestinationTarget"; - case 309: return "_wrap_helicsFilterAddSourceTarget"; - case 310: return "_wrap_helicsFilterAddDeliveryEndpoint"; - case 311: return "_wrap_helicsFilterRemoveTarget"; - case 312: return "_wrap_helicsFilterRemoveDeliveryEndpoint"; - case 313: return "_wrap_helicsFilterGetInfo"; - case 314: return "_wrap_helicsFilterSetInfo"; - case 315: return "_wrap_helicsFilterSetOption"; - case 316: return "_wrap_helicsFilterGetOption"; + case 147: return "_wrap_helicsBrokerSetTimeBarrier"; + case 148: return "_wrap_helicsBrokerClearTimeBarrier"; + case 149: return "_wrap_helicsCreateQuery"; + case 150: return "_wrap_helicsQueryExecute"; + case 151: return "_wrap_helicsQueryCoreExecute"; + case 152: return "_wrap_helicsQueryBrokerExecute"; + case 153: return "_wrap_helicsQueryExecuteAsync"; + case 154: return "_wrap_helicsQueryExecuteComplete"; + case 155: return "_wrap_helicsQueryIsCompleted"; + case 156: return "_wrap_helicsQuerySetTarget"; + case 157: return "_wrap_helicsQuerySetQueryString"; + case 158: return "_wrap_helicsQueryFree"; + case 159: return "_wrap_helicsCleanupLibrary"; + case 160: return "_wrap_helicsFederateRegisterSubscription"; + case 161: return "_wrap_helicsFederateRegisterPublication"; + case 162: return "_wrap_helicsFederateRegisterTypePublication"; + case 163: return "_wrap_helicsFederateRegisterGlobalPublication"; + case 164: return "_wrap_helicsFederateRegisterGlobalTypePublication"; + case 165: return "_wrap_helicsFederateRegisterInput"; + case 166: return "_wrap_helicsFederateRegisterTypeInput"; + case 167: return "_wrap_helicsFederateRegisterGlobalInput"; + case 168: return "_wrap_helicsFederateRegisterGlobalTypeInput"; + case 169: return "_wrap_helicsFederateGetPublication"; + case 170: return "_wrap_helicsFederateGetPublicationByIndex"; + case 171: return "_wrap_helicsFederateGetInput"; + case 172: return "_wrap_helicsFederateGetInputByIndex"; + case 173: return "_wrap_helicsFederateGetSubscription"; + case 174: return "_wrap_helicsFederateClearUpdates"; + case 175: return "_wrap_helicsFederateRegisterFromPublicationJSON"; + case 176: return "_wrap_helicsFederatePublishJSON"; + case 177: return "_wrap_helicsPublicationIsValid"; + case 178: return "_wrap_helicsPublicationPublishRaw"; + case 179: return "_wrap_helicsPublicationPublishString"; + case 180: return "_wrap_helicsPublicationPublishInteger"; + case 181: return "_wrap_helicsPublicationPublishBoolean"; + case 182: return "_wrap_helicsPublicationPublishDouble"; + case 183: return "_wrap_helicsPublicationPublishTime"; + case 184: return "_wrap_helicsPublicationPublishChar"; + case 185: return "_wrap_helicsPublicationPublishComplex"; + case 186: return "_wrap_helicsPublicationPublishVector"; + case 187: return "_wrap_helicsPublicationPublishNamedPoint"; + case 188: return "_wrap_helicsPublicationAddTarget"; + case 189: return "_wrap_helicsInputIsValid"; + case 190: return "_wrap_helicsInputAddTarget"; + case 191: return "_wrap_helicsInputGetRawValueSize"; + case 192: return "_wrap_helicsInputGetRawValue"; + case 193: return "_wrap_helicsInputGetStringSize"; + case 194: return "_wrap_helicsInputGetString"; + case 195: return "_wrap_helicsInputGetInteger"; + case 196: return "_wrap_helicsInputGetBoolean"; + case 197: return "_wrap_helicsInputGetDouble"; + case 198: return "_wrap_helicsInputGetTime"; + case 199: return "_wrap_helicsInputGetChar"; + case 200: return "_wrap_helicsInputGetComplex"; + case 201: return "_wrap_helicsInputGetVectorSize"; + case 202: return "_wrap_helicsInputGetVector"; + case 203: return "_wrap_helicsInputGetNamedPoint"; + case 204: return "_wrap_helicsInputSetDefaultRaw"; + case 205: return "_wrap_helicsInputSetDefaultString"; + case 206: return "_wrap_helicsInputSetDefaultInteger"; + case 207: return "_wrap_helicsInputSetDefaultBoolean"; + case 208: return "_wrap_helicsInputSetDefaultTime"; + case 209: return "_wrap_helicsInputSetDefaultChar"; + case 210: return "_wrap_helicsInputSetDefaultDouble"; + case 211: return "_wrap_helicsInputSetDefaultComplex"; + case 212: return "_wrap_helicsInputSetDefaultVector"; + case 213: return "_wrap_helicsInputSetDefaultNamedPoint"; + case 214: return "_wrap_helicsInputGetType"; + case 215: return "_wrap_helicsInputGetPublicationType"; + case 216: return "_wrap_helicsPublicationGetType"; + case 217: return "_wrap_helicsInputGetKey"; + case 218: return "_wrap_helicsSubscriptionGetKey"; + case 219: return "_wrap_helicsPublicationGetKey"; + case 220: return "_wrap_helicsInputGetUnits"; + case 221: return "_wrap_helicsInputGetInjectionUnits"; + case 222: return "_wrap_helicsInputGetExtractionUnits"; + case 223: return "_wrap_helicsPublicationGetUnits"; + case 224: return "_wrap_helicsInputGetInfo"; + case 225: return "_wrap_helicsInputSetInfo"; + case 226: return "_wrap_helicsPublicationGetInfo"; + case 227: return "_wrap_helicsPublicationSetInfo"; + case 228: return "_wrap_helicsInputGetOption"; + case 229: return "_wrap_helicsInputSetOption"; + case 230: return "_wrap_helicsPublicationGetOption"; + case 231: return "_wrap_helicsPublicationSetOption"; + case 232: return "_wrap_helicsPublicationSetMinimumChange"; + case 233: return "_wrap_helicsInputSetMinimumChange"; + case 234: return "_wrap_helicsInputIsUpdated"; + case 235: return "_wrap_helicsInputLastUpdateTime"; + case 236: return "_wrap_helicsInputClearUpdate"; + case 237: return "_wrap_helicsFederateGetPublicationCount"; + case 238: return "_wrap_helicsFederateGetInputCount"; + case 239: return "_wrap_helicsFederateRegisterEndpoint"; + case 240: return "_wrap_helicsFederateRegisterGlobalEndpoint"; + case 241: return "_wrap_helicsFederateGetEndpoint"; + case 242: return "_wrap_helicsFederateGetEndpointByIndex"; + case 243: return "_wrap_helicsEndpointIsValid"; + case 244: return "_wrap_helicsEndpointSetDefaultDestination"; + case 245: return "_wrap_helicsEndpointGetDefaultDestination"; + case 246: return "_wrap_helicsEndpointSendMessageRaw"; + case 247: return "_wrap_helicsEndpointSendEventRaw"; + case 248: return "_wrap_helicsEndpointSendMessage"; + case 249: return "_wrap_helicsEndpointSendMessageObject"; + case 250: return "_wrap_helicsEndpointSendMessageObjectZeroCopy"; + case 251: return "_wrap_helicsEndpointSubscribe"; + case 252: return "_wrap_helicsFederateHasMessage"; + case 253: return "_wrap_helicsEndpointHasMessage"; + case 254: return "_wrap_helicsFederatePendingMessages"; + case 255: return "_wrap_helicsEndpointPendingMessages"; + case 256: return "_wrap_helicsEndpointGetMessage"; + case 257: return "_wrap_helicsEndpointGetMessageObject"; + case 258: return "_wrap_helicsEndpointCreateMessageObject"; + case 259: return "_wrap_helicsFederateGetMessage"; + case 260: return "_wrap_helicsFederateGetMessageObject"; + case 261: return "_wrap_helicsFederateCreateMessageObject"; + case 262: return "_wrap_helicsFederateClearMessages"; + case 263: return "_wrap_helicsEndpointClearMessages"; + case 264: return "_wrap_helicsEndpointGetType"; + case 265: return "_wrap_helicsEndpointGetName"; + case 266: return "_wrap_helicsFederateGetEndpointCount"; + case 267: return "_wrap_helicsEndpointGetInfo"; + case 268: return "_wrap_helicsEndpointSetInfo"; + case 269: return "_wrap_helicsEndpointSetOption"; + case 270: return "_wrap_helicsEndpointGetOption"; + case 271: return "_wrap_helicsMessageGetSource"; + case 272: return "_wrap_helicsMessageGetDestination"; + case 273: return "_wrap_helicsMessageGetOriginalSource"; + case 274: return "_wrap_helicsMessageGetOriginalDestination"; + case 275: return "_wrap_helicsMessageGetTime"; + case 276: return "_wrap_helicsMessageGetString"; + case 277: return "_wrap_helicsMessageGetMessageID"; + case 278: return "_wrap_helicsMessageCheckFlag"; + case 279: return "_wrap_helicsMessageGetRawDataSize"; + case 280: return "_wrap_helicsMessageGetRawData"; + case 281: return "_wrap_helicsMessageIsValid"; + case 282: return "_wrap_helicsMessageSetSource"; + case 283: return "_wrap_helicsMessageSetDestination"; + case 284: return "_wrap_helicsMessageSetOriginalSource"; + case 285: return "_wrap_helicsMessageSetOriginalDestination"; + case 286: return "_wrap_helicsMessageSetTime"; + case 287: return "_wrap_helicsMessageReserve"; + case 288: return "_wrap_helicsMessageSetMessageID"; + case 289: return "_wrap_helicsMessageClearFlags"; + case 290: return "_wrap_helicsMessageSetFlagOption"; + case 291: return "_wrap_helicsMessageSetString"; + case 292: return "_wrap_helicsMessageSetData"; + case 293: return "_wrap_helicsMessageAppendData"; + case 294: return "_wrap_helicsMessageCopy"; + case 295: return "_wrap_helicsMessageClone"; + case 296: return "_wrap_helicsMessageFree"; + case 297: return "_wrap_helicsFederateRegisterFilter"; + case 298: return "_wrap_helicsFederateRegisterGlobalFilter"; + case 299: return "_wrap_helicsFederateRegisterCloningFilter"; + case 300: return "_wrap_helicsFederateRegisterGlobalCloningFilter"; + case 301: return "_wrap_helicsCoreRegisterFilter"; + case 302: return "_wrap_helicsCoreRegisterCloningFilter"; + case 303: return "_wrap_helicsFederateGetFilterCount"; + case 304: return "_wrap_helicsFederateGetFilter"; + case 305: return "_wrap_helicsFederateGetFilterByIndex"; + case 306: return "_wrap_helicsFilterIsValid"; + case 307: return "_wrap_helicsFilterGetName"; + case 308: return "_wrap_helicsFilterSet"; + case 309: return "_wrap_helicsFilterSetString"; + case 310: return "_wrap_helicsFilterAddDestinationTarget"; + case 311: return "_wrap_helicsFilterAddSourceTarget"; + case 312: return "_wrap_helicsFilterAddDeliveryEndpoint"; + case 313: return "_wrap_helicsFilterRemoveTarget"; + case 314: return "_wrap_helicsFilterRemoveDeliveryEndpoint"; + case 315: return "_wrap_helicsFilterGetInfo"; + case 316: return "_wrap_helicsFilterSetInfo"; + case 317: return "_wrap_helicsFilterSetOption"; + case 318: return "_wrap_helicsFilterGetOption"; default: return 0; } } @@ -15408,176 +15484,178 @@ void mexFunction(int resc, mxArray *resv[], int argc, const mxArray *argv[]) { case 144: flag=_wrap_helicsBrokerSetGlobal(resc,resv,argc,(mxArray**)(argv)); break; case 145: flag=_wrap_helicsCoreSetLogFile(resc,resv,argc,(mxArray**)(argv)); break; case 146: flag=_wrap_helicsBrokerSetLogFile(resc,resv,argc,(mxArray**)(argv)); break; - case 147: flag=_wrap_helicsCreateQuery(resc,resv,argc,(mxArray**)(argv)); break; - case 148: flag=_wrap_helicsQueryExecute(resc,resv,argc,(mxArray**)(argv)); break; - case 149: flag=_wrap_helicsQueryCoreExecute(resc,resv,argc,(mxArray**)(argv)); break; - case 150: flag=_wrap_helicsQueryBrokerExecute(resc,resv,argc,(mxArray**)(argv)); break; - case 151: flag=_wrap_helicsQueryExecuteAsync(resc,resv,argc,(mxArray**)(argv)); break; - case 152: flag=_wrap_helicsQueryExecuteComplete(resc,resv,argc,(mxArray**)(argv)); break; - case 153: flag=_wrap_helicsQueryIsCompleted(resc,resv,argc,(mxArray**)(argv)); break; - case 154: flag=_wrap_helicsQuerySetTarget(resc,resv,argc,(mxArray**)(argv)); break; - case 155: flag=_wrap_helicsQuerySetQueryString(resc,resv,argc,(mxArray**)(argv)); break; - case 156: flag=_wrap_helicsQueryFree(resc,resv,argc,(mxArray**)(argv)); break; - case 157: flag=_wrap_helicsCleanupLibrary(resc,resv,argc,(mxArray**)(argv)); break; - case 158: flag=_wrap_helicsFederateRegisterSubscription(resc,resv,argc,(mxArray**)(argv)); break; - case 159: flag=_wrap_helicsFederateRegisterPublication(resc,resv,argc,(mxArray**)(argv)); break; - case 160: flag=_wrap_helicsFederateRegisterTypePublication(resc,resv,argc,(mxArray**)(argv)); break; - case 161: flag=_wrap_helicsFederateRegisterGlobalPublication(resc,resv,argc,(mxArray**)(argv)); break; - case 162: flag=_wrap_helicsFederateRegisterGlobalTypePublication(resc,resv,argc,(mxArray**)(argv)); break; - case 163: flag=_wrap_helicsFederateRegisterInput(resc,resv,argc,(mxArray**)(argv)); break; - case 164: flag=_wrap_helicsFederateRegisterTypeInput(resc,resv,argc,(mxArray**)(argv)); break; - case 165: flag=_wrap_helicsFederateRegisterGlobalInput(resc,resv,argc,(mxArray**)(argv)); break; - case 166: flag=_wrap_helicsFederateRegisterGlobalTypeInput(resc,resv,argc,(mxArray**)(argv)); break; - case 167: flag=_wrap_helicsFederateGetPublication(resc,resv,argc,(mxArray**)(argv)); break; - case 168: flag=_wrap_helicsFederateGetPublicationByIndex(resc,resv,argc,(mxArray**)(argv)); break; - case 169: flag=_wrap_helicsFederateGetInput(resc,resv,argc,(mxArray**)(argv)); break; - case 170: flag=_wrap_helicsFederateGetInputByIndex(resc,resv,argc,(mxArray**)(argv)); break; - case 171: flag=_wrap_helicsFederateGetSubscription(resc,resv,argc,(mxArray**)(argv)); break; - case 172: flag=_wrap_helicsFederateClearUpdates(resc,resv,argc,(mxArray**)(argv)); break; - case 173: flag=_wrap_helicsFederateRegisterFromPublicationJSON(resc,resv,argc,(mxArray**)(argv)); break; - case 174: flag=_wrap_helicsFederatePublishJSON(resc,resv,argc,(mxArray**)(argv)); break; - case 175: flag=_wrap_helicsPublicationIsValid(resc,resv,argc,(mxArray**)(argv)); break; - case 176: flag=_wrap_helicsPublicationPublishRaw(resc,resv,argc,(mxArray**)(argv)); break; - case 177: flag=_wrap_helicsPublicationPublishString(resc,resv,argc,(mxArray**)(argv)); break; - case 178: flag=_wrap_helicsPublicationPublishInteger(resc,resv,argc,(mxArray**)(argv)); break; - case 179: flag=_wrap_helicsPublicationPublishBoolean(resc,resv,argc,(mxArray**)(argv)); break; - case 180: flag=_wrap_helicsPublicationPublishDouble(resc,resv,argc,(mxArray**)(argv)); break; - case 181: flag=_wrap_helicsPublicationPublishTime(resc,resv,argc,(mxArray**)(argv)); break; - case 182: flag=_wrap_helicsPublicationPublishChar(resc,resv,argc,(mxArray**)(argv)); break; - case 183: flag=_wrap_helicsPublicationPublishComplex(resc,resv,argc,(mxArray**)(argv)); break; - case 184: flag=_wrap_helicsPublicationPublishVector(resc,resv,argc,(mxArray**)(argv)); break; - case 185: flag=_wrap_helicsPublicationPublishNamedPoint(resc,resv,argc,(mxArray**)(argv)); break; - case 186: flag=_wrap_helicsPublicationAddTarget(resc,resv,argc,(mxArray**)(argv)); break; - case 187: flag=_wrap_helicsInputIsValid(resc,resv,argc,(mxArray**)(argv)); break; - case 188: flag=_wrap_helicsInputAddTarget(resc,resv,argc,(mxArray**)(argv)); break; - case 189: flag=_wrap_helicsInputGetRawValueSize(resc,resv,argc,(mxArray**)(argv)); break; - case 190: flag=_wrap_helicsInputGetRawValue(resc,resv,argc,(mxArray**)(argv)); break; - case 191: flag=_wrap_helicsInputGetStringSize(resc,resv,argc,(mxArray**)(argv)); break; - case 192: flag=_wrap_helicsInputGetString(resc,resv,argc,(mxArray**)(argv)); break; - case 193: flag=_wrap_helicsInputGetInteger(resc,resv,argc,(mxArray**)(argv)); break; - case 194: flag=_wrap_helicsInputGetBoolean(resc,resv,argc,(mxArray**)(argv)); break; - case 195: flag=_wrap_helicsInputGetDouble(resc,resv,argc,(mxArray**)(argv)); break; - case 196: flag=_wrap_helicsInputGetTime(resc,resv,argc,(mxArray**)(argv)); break; - case 197: flag=_wrap_helicsInputGetChar(resc,resv,argc,(mxArray**)(argv)); break; - case 198: flag=_wrap_helicsInputGetComplex(resc,resv,argc,(mxArray**)(argv)); break; - case 199: flag=_wrap_helicsInputGetVectorSize(resc,resv,argc,(mxArray**)(argv)); break; - case 200: flag=_wrap_helicsInputGetVector(resc,resv,argc,(mxArray**)(argv)); break; - case 201: flag=_wrap_helicsInputGetNamedPoint(resc,resv,argc,(mxArray**)(argv)); break; - case 202: flag=_wrap_helicsInputSetDefaultRaw(resc,resv,argc,(mxArray**)(argv)); break; - case 203: flag=_wrap_helicsInputSetDefaultString(resc,resv,argc,(mxArray**)(argv)); break; - case 204: flag=_wrap_helicsInputSetDefaultInteger(resc,resv,argc,(mxArray**)(argv)); break; - case 205: flag=_wrap_helicsInputSetDefaultBoolean(resc,resv,argc,(mxArray**)(argv)); break; - case 206: flag=_wrap_helicsInputSetDefaultTime(resc,resv,argc,(mxArray**)(argv)); break; - case 207: flag=_wrap_helicsInputSetDefaultChar(resc,resv,argc,(mxArray**)(argv)); break; - case 208: flag=_wrap_helicsInputSetDefaultDouble(resc,resv,argc,(mxArray**)(argv)); break; - case 209: flag=_wrap_helicsInputSetDefaultComplex(resc,resv,argc,(mxArray**)(argv)); break; - case 210: flag=_wrap_helicsInputSetDefaultVector(resc,resv,argc,(mxArray**)(argv)); break; - case 211: flag=_wrap_helicsInputSetDefaultNamedPoint(resc,resv,argc,(mxArray**)(argv)); break; - case 212: flag=_wrap_helicsInputGetType(resc,resv,argc,(mxArray**)(argv)); break; - case 213: flag=_wrap_helicsInputGetPublicationType(resc,resv,argc,(mxArray**)(argv)); break; - case 214: flag=_wrap_helicsPublicationGetType(resc,resv,argc,(mxArray**)(argv)); break; - case 215: flag=_wrap_helicsInputGetKey(resc,resv,argc,(mxArray**)(argv)); break; - case 216: flag=_wrap_helicsSubscriptionGetKey(resc,resv,argc,(mxArray**)(argv)); break; - case 217: flag=_wrap_helicsPublicationGetKey(resc,resv,argc,(mxArray**)(argv)); break; - case 218: flag=_wrap_helicsInputGetUnits(resc,resv,argc,(mxArray**)(argv)); break; - case 219: flag=_wrap_helicsInputGetInjectionUnits(resc,resv,argc,(mxArray**)(argv)); break; - case 220: flag=_wrap_helicsInputGetExtractionUnits(resc,resv,argc,(mxArray**)(argv)); break; - case 221: flag=_wrap_helicsPublicationGetUnits(resc,resv,argc,(mxArray**)(argv)); break; - case 222: flag=_wrap_helicsInputGetInfo(resc,resv,argc,(mxArray**)(argv)); break; - case 223: flag=_wrap_helicsInputSetInfo(resc,resv,argc,(mxArray**)(argv)); break; - case 224: flag=_wrap_helicsPublicationGetInfo(resc,resv,argc,(mxArray**)(argv)); break; - case 225: flag=_wrap_helicsPublicationSetInfo(resc,resv,argc,(mxArray**)(argv)); break; - case 226: flag=_wrap_helicsInputGetOption(resc,resv,argc,(mxArray**)(argv)); break; - case 227: flag=_wrap_helicsInputSetOption(resc,resv,argc,(mxArray**)(argv)); break; - case 228: flag=_wrap_helicsPublicationGetOption(resc,resv,argc,(mxArray**)(argv)); break; - case 229: flag=_wrap_helicsPublicationSetOption(resc,resv,argc,(mxArray**)(argv)); break; - case 230: flag=_wrap_helicsPublicationSetMinimumChange(resc,resv,argc,(mxArray**)(argv)); break; - case 231: flag=_wrap_helicsInputSetMinimumChange(resc,resv,argc,(mxArray**)(argv)); break; - case 232: flag=_wrap_helicsInputIsUpdated(resc,resv,argc,(mxArray**)(argv)); break; - case 233: flag=_wrap_helicsInputLastUpdateTime(resc,resv,argc,(mxArray**)(argv)); break; - case 234: flag=_wrap_helicsInputClearUpdate(resc,resv,argc,(mxArray**)(argv)); break; - case 235: flag=_wrap_helicsFederateGetPublicationCount(resc,resv,argc,(mxArray**)(argv)); break; - case 236: flag=_wrap_helicsFederateGetInputCount(resc,resv,argc,(mxArray**)(argv)); break; - case 237: flag=_wrap_helicsFederateRegisterEndpoint(resc,resv,argc,(mxArray**)(argv)); break; - case 238: flag=_wrap_helicsFederateRegisterGlobalEndpoint(resc,resv,argc,(mxArray**)(argv)); break; - case 239: flag=_wrap_helicsFederateGetEndpoint(resc,resv,argc,(mxArray**)(argv)); break; - case 240: flag=_wrap_helicsFederateGetEndpointByIndex(resc,resv,argc,(mxArray**)(argv)); break; - case 241: flag=_wrap_helicsEndpointIsValid(resc,resv,argc,(mxArray**)(argv)); break; - case 242: flag=_wrap_helicsEndpointSetDefaultDestination(resc,resv,argc,(mxArray**)(argv)); break; - case 243: flag=_wrap_helicsEndpointGetDefaultDestination(resc,resv,argc,(mxArray**)(argv)); break; - case 244: flag=_wrap_helicsEndpointSendMessageRaw(resc,resv,argc,(mxArray**)(argv)); break; - case 245: flag=_wrap_helicsEndpointSendEventRaw(resc,resv,argc,(mxArray**)(argv)); break; - case 246: flag=_wrap_helicsEndpointSendMessage(resc,resv,argc,(mxArray**)(argv)); break; - case 247: flag=_wrap_helicsEndpointSendMessageObject(resc,resv,argc,(mxArray**)(argv)); break; - case 248: flag=_wrap_helicsEndpointSendMessageObjectZeroCopy(resc,resv,argc,(mxArray**)(argv)); break; - case 249: flag=_wrap_helicsEndpointSubscribe(resc,resv,argc,(mxArray**)(argv)); break; - case 250: flag=_wrap_helicsFederateHasMessage(resc,resv,argc,(mxArray**)(argv)); break; - case 251: flag=_wrap_helicsEndpointHasMessage(resc,resv,argc,(mxArray**)(argv)); break; - case 252: flag=_wrap_helicsFederatePendingMessages(resc,resv,argc,(mxArray**)(argv)); break; - case 253: flag=_wrap_helicsEndpointPendingMessages(resc,resv,argc,(mxArray**)(argv)); break; - case 254: flag=_wrap_helicsEndpointGetMessage(resc,resv,argc,(mxArray**)(argv)); break; - case 255: flag=_wrap_helicsEndpointGetMessageObject(resc,resv,argc,(mxArray**)(argv)); break; - case 256: flag=_wrap_helicsEndpointCreateMessageObject(resc,resv,argc,(mxArray**)(argv)); break; - case 257: flag=_wrap_helicsFederateGetMessage(resc,resv,argc,(mxArray**)(argv)); break; - case 258: flag=_wrap_helicsFederateGetMessageObject(resc,resv,argc,(mxArray**)(argv)); break; - case 259: flag=_wrap_helicsFederateCreateMessageObject(resc,resv,argc,(mxArray**)(argv)); break; - case 260: flag=_wrap_helicsFederateClearMessages(resc,resv,argc,(mxArray**)(argv)); break; - case 261: flag=_wrap_helicsEndpointClearMessages(resc,resv,argc,(mxArray**)(argv)); break; - case 262: flag=_wrap_helicsEndpointGetType(resc,resv,argc,(mxArray**)(argv)); break; - case 263: flag=_wrap_helicsEndpointGetName(resc,resv,argc,(mxArray**)(argv)); break; - case 264: flag=_wrap_helicsFederateGetEndpointCount(resc,resv,argc,(mxArray**)(argv)); break; - case 265: flag=_wrap_helicsEndpointGetInfo(resc,resv,argc,(mxArray**)(argv)); break; - case 266: flag=_wrap_helicsEndpointSetInfo(resc,resv,argc,(mxArray**)(argv)); break; - case 267: flag=_wrap_helicsEndpointSetOption(resc,resv,argc,(mxArray**)(argv)); break; - case 268: flag=_wrap_helicsEndpointGetOption(resc,resv,argc,(mxArray**)(argv)); break; - case 269: flag=_wrap_helicsMessageGetSource(resc,resv,argc,(mxArray**)(argv)); break; - case 270: flag=_wrap_helicsMessageGetDestination(resc,resv,argc,(mxArray**)(argv)); break; - case 271: flag=_wrap_helicsMessageGetOriginalSource(resc,resv,argc,(mxArray**)(argv)); break; - case 272: flag=_wrap_helicsMessageGetOriginalDestination(resc,resv,argc,(mxArray**)(argv)); break; - case 273: flag=_wrap_helicsMessageGetTime(resc,resv,argc,(mxArray**)(argv)); break; - case 274: flag=_wrap_helicsMessageGetString(resc,resv,argc,(mxArray**)(argv)); break; - case 275: flag=_wrap_helicsMessageGetMessageID(resc,resv,argc,(mxArray**)(argv)); break; - case 276: flag=_wrap_helicsMessageCheckFlag(resc,resv,argc,(mxArray**)(argv)); break; - case 277: flag=_wrap_helicsMessageGetRawDataSize(resc,resv,argc,(mxArray**)(argv)); break; - case 278: flag=_wrap_helicsMessageGetRawData(resc,resv,argc,(mxArray**)(argv)); break; - case 279: flag=_wrap_helicsMessageIsValid(resc,resv,argc,(mxArray**)(argv)); break; - case 280: flag=_wrap_helicsMessageSetSource(resc,resv,argc,(mxArray**)(argv)); break; - case 281: flag=_wrap_helicsMessageSetDestination(resc,resv,argc,(mxArray**)(argv)); break; - case 282: flag=_wrap_helicsMessageSetOriginalSource(resc,resv,argc,(mxArray**)(argv)); break; - case 283: flag=_wrap_helicsMessageSetOriginalDestination(resc,resv,argc,(mxArray**)(argv)); break; - case 284: flag=_wrap_helicsMessageSetTime(resc,resv,argc,(mxArray**)(argv)); break; - case 285: flag=_wrap_helicsMessageReserve(resc,resv,argc,(mxArray**)(argv)); break; - case 286: flag=_wrap_helicsMessageSetMessageID(resc,resv,argc,(mxArray**)(argv)); break; - case 287: flag=_wrap_helicsMessageClearFlags(resc,resv,argc,(mxArray**)(argv)); break; - case 288: flag=_wrap_helicsMessageSetFlagOption(resc,resv,argc,(mxArray**)(argv)); break; - case 289: flag=_wrap_helicsMessageSetString(resc,resv,argc,(mxArray**)(argv)); break; - case 290: flag=_wrap_helicsMessageSetData(resc,resv,argc,(mxArray**)(argv)); break; - case 291: flag=_wrap_helicsMessageAppendData(resc,resv,argc,(mxArray**)(argv)); break; - case 292: flag=_wrap_helicsMessageCopy(resc,resv,argc,(mxArray**)(argv)); break; - case 293: flag=_wrap_helicsMessageClone(resc,resv,argc,(mxArray**)(argv)); break; - case 294: flag=_wrap_helicsMessageFree(resc,resv,argc,(mxArray**)(argv)); break; - case 295: flag=_wrap_helicsFederateRegisterFilter(resc,resv,argc,(mxArray**)(argv)); break; - case 296: flag=_wrap_helicsFederateRegisterGlobalFilter(resc,resv,argc,(mxArray**)(argv)); break; - case 297: flag=_wrap_helicsFederateRegisterCloningFilter(resc,resv,argc,(mxArray**)(argv)); break; - case 298: flag=_wrap_helicsFederateRegisterGlobalCloningFilter(resc,resv,argc,(mxArray**)(argv)); break; - case 299: flag=_wrap_helicsCoreRegisterFilter(resc,resv,argc,(mxArray**)(argv)); break; - case 300: flag=_wrap_helicsCoreRegisterCloningFilter(resc,resv,argc,(mxArray**)(argv)); break; - case 301: flag=_wrap_helicsFederateGetFilterCount(resc,resv,argc,(mxArray**)(argv)); break; - case 302: flag=_wrap_helicsFederateGetFilter(resc,resv,argc,(mxArray**)(argv)); break; - case 303: flag=_wrap_helicsFederateGetFilterByIndex(resc,resv,argc,(mxArray**)(argv)); break; - case 304: flag=_wrap_helicsFilterIsValid(resc,resv,argc,(mxArray**)(argv)); break; - case 305: flag=_wrap_helicsFilterGetName(resc,resv,argc,(mxArray**)(argv)); break; - case 306: flag=_wrap_helicsFilterSet(resc,resv,argc,(mxArray**)(argv)); break; - case 307: flag=_wrap_helicsFilterSetString(resc,resv,argc,(mxArray**)(argv)); break; - case 308: flag=_wrap_helicsFilterAddDestinationTarget(resc,resv,argc,(mxArray**)(argv)); break; - case 309: flag=_wrap_helicsFilterAddSourceTarget(resc,resv,argc,(mxArray**)(argv)); break; - case 310: flag=_wrap_helicsFilterAddDeliveryEndpoint(resc,resv,argc,(mxArray**)(argv)); break; - case 311: flag=_wrap_helicsFilterRemoveTarget(resc,resv,argc,(mxArray**)(argv)); break; - case 312: flag=_wrap_helicsFilterRemoveDeliveryEndpoint(resc,resv,argc,(mxArray**)(argv)); break; - case 313: flag=_wrap_helicsFilterGetInfo(resc,resv,argc,(mxArray**)(argv)); break; - case 314: flag=_wrap_helicsFilterSetInfo(resc,resv,argc,(mxArray**)(argv)); break; - case 315: flag=_wrap_helicsFilterSetOption(resc,resv,argc,(mxArray**)(argv)); break; - case 316: flag=_wrap_helicsFilterGetOption(resc,resv,argc,(mxArray**)(argv)); break; + case 147: flag=_wrap_helicsBrokerSetTimeBarrier(resc,resv,argc,(mxArray**)(argv)); break; + case 148: flag=_wrap_helicsBrokerClearTimeBarrier(resc,resv,argc,(mxArray**)(argv)); break; + case 149: flag=_wrap_helicsCreateQuery(resc,resv,argc,(mxArray**)(argv)); break; + case 150: flag=_wrap_helicsQueryExecute(resc,resv,argc,(mxArray**)(argv)); break; + case 151: flag=_wrap_helicsQueryCoreExecute(resc,resv,argc,(mxArray**)(argv)); break; + case 152: flag=_wrap_helicsQueryBrokerExecute(resc,resv,argc,(mxArray**)(argv)); break; + case 153: flag=_wrap_helicsQueryExecuteAsync(resc,resv,argc,(mxArray**)(argv)); break; + case 154: flag=_wrap_helicsQueryExecuteComplete(resc,resv,argc,(mxArray**)(argv)); break; + case 155: flag=_wrap_helicsQueryIsCompleted(resc,resv,argc,(mxArray**)(argv)); break; + case 156: flag=_wrap_helicsQuerySetTarget(resc,resv,argc,(mxArray**)(argv)); break; + case 157: flag=_wrap_helicsQuerySetQueryString(resc,resv,argc,(mxArray**)(argv)); break; + case 158: flag=_wrap_helicsQueryFree(resc,resv,argc,(mxArray**)(argv)); break; + case 159: flag=_wrap_helicsCleanupLibrary(resc,resv,argc,(mxArray**)(argv)); break; + case 160: flag=_wrap_helicsFederateRegisterSubscription(resc,resv,argc,(mxArray**)(argv)); break; + case 161: flag=_wrap_helicsFederateRegisterPublication(resc,resv,argc,(mxArray**)(argv)); break; + case 162: flag=_wrap_helicsFederateRegisterTypePublication(resc,resv,argc,(mxArray**)(argv)); break; + case 163: flag=_wrap_helicsFederateRegisterGlobalPublication(resc,resv,argc,(mxArray**)(argv)); break; + case 164: flag=_wrap_helicsFederateRegisterGlobalTypePublication(resc,resv,argc,(mxArray**)(argv)); break; + case 165: flag=_wrap_helicsFederateRegisterInput(resc,resv,argc,(mxArray**)(argv)); break; + case 166: flag=_wrap_helicsFederateRegisterTypeInput(resc,resv,argc,(mxArray**)(argv)); break; + case 167: flag=_wrap_helicsFederateRegisterGlobalInput(resc,resv,argc,(mxArray**)(argv)); break; + case 168: flag=_wrap_helicsFederateRegisterGlobalTypeInput(resc,resv,argc,(mxArray**)(argv)); break; + case 169: flag=_wrap_helicsFederateGetPublication(resc,resv,argc,(mxArray**)(argv)); break; + case 170: flag=_wrap_helicsFederateGetPublicationByIndex(resc,resv,argc,(mxArray**)(argv)); break; + case 171: flag=_wrap_helicsFederateGetInput(resc,resv,argc,(mxArray**)(argv)); break; + case 172: flag=_wrap_helicsFederateGetInputByIndex(resc,resv,argc,(mxArray**)(argv)); break; + case 173: flag=_wrap_helicsFederateGetSubscription(resc,resv,argc,(mxArray**)(argv)); break; + case 174: flag=_wrap_helicsFederateClearUpdates(resc,resv,argc,(mxArray**)(argv)); break; + case 175: flag=_wrap_helicsFederateRegisterFromPublicationJSON(resc,resv,argc,(mxArray**)(argv)); break; + case 176: flag=_wrap_helicsFederatePublishJSON(resc,resv,argc,(mxArray**)(argv)); break; + case 177: flag=_wrap_helicsPublicationIsValid(resc,resv,argc,(mxArray**)(argv)); break; + case 178: flag=_wrap_helicsPublicationPublishRaw(resc,resv,argc,(mxArray**)(argv)); break; + case 179: flag=_wrap_helicsPublicationPublishString(resc,resv,argc,(mxArray**)(argv)); break; + case 180: flag=_wrap_helicsPublicationPublishInteger(resc,resv,argc,(mxArray**)(argv)); break; + case 181: flag=_wrap_helicsPublicationPublishBoolean(resc,resv,argc,(mxArray**)(argv)); break; + case 182: flag=_wrap_helicsPublicationPublishDouble(resc,resv,argc,(mxArray**)(argv)); break; + case 183: flag=_wrap_helicsPublicationPublishTime(resc,resv,argc,(mxArray**)(argv)); break; + case 184: flag=_wrap_helicsPublicationPublishChar(resc,resv,argc,(mxArray**)(argv)); break; + case 185: flag=_wrap_helicsPublicationPublishComplex(resc,resv,argc,(mxArray**)(argv)); break; + case 186: flag=_wrap_helicsPublicationPublishVector(resc,resv,argc,(mxArray**)(argv)); break; + case 187: flag=_wrap_helicsPublicationPublishNamedPoint(resc,resv,argc,(mxArray**)(argv)); break; + case 188: flag=_wrap_helicsPublicationAddTarget(resc,resv,argc,(mxArray**)(argv)); break; + case 189: flag=_wrap_helicsInputIsValid(resc,resv,argc,(mxArray**)(argv)); break; + case 190: flag=_wrap_helicsInputAddTarget(resc,resv,argc,(mxArray**)(argv)); break; + case 191: flag=_wrap_helicsInputGetRawValueSize(resc,resv,argc,(mxArray**)(argv)); break; + case 192: flag=_wrap_helicsInputGetRawValue(resc,resv,argc,(mxArray**)(argv)); break; + case 193: flag=_wrap_helicsInputGetStringSize(resc,resv,argc,(mxArray**)(argv)); break; + case 194: flag=_wrap_helicsInputGetString(resc,resv,argc,(mxArray**)(argv)); break; + case 195: flag=_wrap_helicsInputGetInteger(resc,resv,argc,(mxArray**)(argv)); break; + case 196: flag=_wrap_helicsInputGetBoolean(resc,resv,argc,(mxArray**)(argv)); break; + case 197: flag=_wrap_helicsInputGetDouble(resc,resv,argc,(mxArray**)(argv)); break; + case 198: flag=_wrap_helicsInputGetTime(resc,resv,argc,(mxArray**)(argv)); break; + case 199: flag=_wrap_helicsInputGetChar(resc,resv,argc,(mxArray**)(argv)); break; + case 200: flag=_wrap_helicsInputGetComplex(resc,resv,argc,(mxArray**)(argv)); break; + case 201: flag=_wrap_helicsInputGetVectorSize(resc,resv,argc,(mxArray**)(argv)); break; + case 202: flag=_wrap_helicsInputGetVector(resc,resv,argc,(mxArray**)(argv)); break; + case 203: flag=_wrap_helicsInputGetNamedPoint(resc,resv,argc,(mxArray**)(argv)); break; + case 204: flag=_wrap_helicsInputSetDefaultRaw(resc,resv,argc,(mxArray**)(argv)); break; + case 205: flag=_wrap_helicsInputSetDefaultString(resc,resv,argc,(mxArray**)(argv)); break; + case 206: flag=_wrap_helicsInputSetDefaultInteger(resc,resv,argc,(mxArray**)(argv)); break; + case 207: flag=_wrap_helicsInputSetDefaultBoolean(resc,resv,argc,(mxArray**)(argv)); break; + case 208: flag=_wrap_helicsInputSetDefaultTime(resc,resv,argc,(mxArray**)(argv)); break; + case 209: flag=_wrap_helicsInputSetDefaultChar(resc,resv,argc,(mxArray**)(argv)); break; + case 210: flag=_wrap_helicsInputSetDefaultDouble(resc,resv,argc,(mxArray**)(argv)); break; + case 211: flag=_wrap_helicsInputSetDefaultComplex(resc,resv,argc,(mxArray**)(argv)); break; + case 212: flag=_wrap_helicsInputSetDefaultVector(resc,resv,argc,(mxArray**)(argv)); break; + case 213: flag=_wrap_helicsInputSetDefaultNamedPoint(resc,resv,argc,(mxArray**)(argv)); break; + case 214: flag=_wrap_helicsInputGetType(resc,resv,argc,(mxArray**)(argv)); break; + case 215: flag=_wrap_helicsInputGetPublicationType(resc,resv,argc,(mxArray**)(argv)); break; + case 216: flag=_wrap_helicsPublicationGetType(resc,resv,argc,(mxArray**)(argv)); break; + case 217: flag=_wrap_helicsInputGetKey(resc,resv,argc,(mxArray**)(argv)); break; + case 218: flag=_wrap_helicsSubscriptionGetKey(resc,resv,argc,(mxArray**)(argv)); break; + case 219: flag=_wrap_helicsPublicationGetKey(resc,resv,argc,(mxArray**)(argv)); break; + case 220: flag=_wrap_helicsInputGetUnits(resc,resv,argc,(mxArray**)(argv)); break; + case 221: flag=_wrap_helicsInputGetInjectionUnits(resc,resv,argc,(mxArray**)(argv)); break; + case 222: flag=_wrap_helicsInputGetExtractionUnits(resc,resv,argc,(mxArray**)(argv)); break; + case 223: flag=_wrap_helicsPublicationGetUnits(resc,resv,argc,(mxArray**)(argv)); break; + case 224: flag=_wrap_helicsInputGetInfo(resc,resv,argc,(mxArray**)(argv)); break; + case 225: flag=_wrap_helicsInputSetInfo(resc,resv,argc,(mxArray**)(argv)); break; + case 226: flag=_wrap_helicsPublicationGetInfo(resc,resv,argc,(mxArray**)(argv)); break; + case 227: flag=_wrap_helicsPublicationSetInfo(resc,resv,argc,(mxArray**)(argv)); break; + case 228: flag=_wrap_helicsInputGetOption(resc,resv,argc,(mxArray**)(argv)); break; + case 229: flag=_wrap_helicsInputSetOption(resc,resv,argc,(mxArray**)(argv)); break; + case 230: flag=_wrap_helicsPublicationGetOption(resc,resv,argc,(mxArray**)(argv)); break; + case 231: flag=_wrap_helicsPublicationSetOption(resc,resv,argc,(mxArray**)(argv)); break; + case 232: flag=_wrap_helicsPublicationSetMinimumChange(resc,resv,argc,(mxArray**)(argv)); break; + case 233: flag=_wrap_helicsInputSetMinimumChange(resc,resv,argc,(mxArray**)(argv)); break; + case 234: flag=_wrap_helicsInputIsUpdated(resc,resv,argc,(mxArray**)(argv)); break; + case 235: flag=_wrap_helicsInputLastUpdateTime(resc,resv,argc,(mxArray**)(argv)); break; + case 236: flag=_wrap_helicsInputClearUpdate(resc,resv,argc,(mxArray**)(argv)); break; + case 237: flag=_wrap_helicsFederateGetPublicationCount(resc,resv,argc,(mxArray**)(argv)); break; + case 238: flag=_wrap_helicsFederateGetInputCount(resc,resv,argc,(mxArray**)(argv)); break; + case 239: flag=_wrap_helicsFederateRegisterEndpoint(resc,resv,argc,(mxArray**)(argv)); break; + case 240: flag=_wrap_helicsFederateRegisterGlobalEndpoint(resc,resv,argc,(mxArray**)(argv)); break; + case 241: flag=_wrap_helicsFederateGetEndpoint(resc,resv,argc,(mxArray**)(argv)); break; + case 242: flag=_wrap_helicsFederateGetEndpointByIndex(resc,resv,argc,(mxArray**)(argv)); break; + case 243: flag=_wrap_helicsEndpointIsValid(resc,resv,argc,(mxArray**)(argv)); break; + case 244: flag=_wrap_helicsEndpointSetDefaultDestination(resc,resv,argc,(mxArray**)(argv)); break; + case 245: flag=_wrap_helicsEndpointGetDefaultDestination(resc,resv,argc,(mxArray**)(argv)); break; + case 246: flag=_wrap_helicsEndpointSendMessageRaw(resc,resv,argc,(mxArray**)(argv)); break; + case 247: flag=_wrap_helicsEndpointSendEventRaw(resc,resv,argc,(mxArray**)(argv)); break; + case 248: flag=_wrap_helicsEndpointSendMessage(resc,resv,argc,(mxArray**)(argv)); break; + case 249: flag=_wrap_helicsEndpointSendMessageObject(resc,resv,argc,(mxArray**)(argv)); break; + case 250: flag=_wrap_helicsEndpointSendMessageObjectZeroCopy(resc,resv,argc,(mxArray**)(argv)); break; + case 251: flag=_wrap_helicsEndpointSubscribe(resc,resv,argc,(mxArray**)(argv)); break; + case 252: flag=_wrap_helicsFederateHasMessage(resc,resv,argc,(mxArray**)(argv)); break; + case 253: flag=_wrap_helicsEndpointHasMessage(resc,resv,argc,(mxArray**)(argv)); break; + case 254: flag=_wrap_helicsFederatePendingMessages(resc,resv,argc,(mxArray**)(argv)); break; + case 255: flag=_wrap_helicsEndpointPendingMessages(resc,resv,argc,(mxArray**)(argv)); break; + case 256: flag=_wrap_helicsEndpointGetMessage(resc,resv,argc,(mxArray**)(argv)); break; + case 257: flag=_wrap_helicsEndpointGetMessageObject(resc,resv,argc,(mxArray**)(argv)); break; + case 258: flag=_wrap_helicsEndpointCreateMessageObject(resc,resv,argc,(mxArray**)(argv)); break; + case 259: flag=_wrap_helicsFederateGetMessage(resc,resv,argc,(mxArray**)(argv)); break; + case 260: flag=_wrap_helicsFederateGetMessageObject(resc,resv,argc,(mxArray**)(argv)); break; + case 261: flag=_wrap_helicsFederateCreateMessageObject(resc,resv,argc,(mxArray**)(argv)); break; + case 262: flag=_wrap_helicsFederateClearMessages(resc,resv,argc,(mxArray**)(argv)); break; + case 263: flag=_wrap_helicsEndpointClearMessages(resc,resv,argc,(mxArray**)(argv)); break; + case 264: flag=_wrap_helicsEndpointGetType(resc,resv,argc,(mxArray**)(argv)); break; + case 265: flag=_wrap_helicsEndpointGetName(resc,resv,argc,(mxArray**)(argv)); break; + case 266: flag=_wrap_helicsFederateGetEndpointCount(resc,resv,argc,(mxArray**)(argv)); break; + case 267: flag=_wrap_helicsEndpointGetInfo(resc,resv,argc,(mxArray**)(argv)); break; + case 268: flag=_wrap_helicsEndpointSetInfo(resc,resv,argc,(mxArray**)(argv)); break; + case 269: flag=_wrap_helicsEndpointSetOption(resc,resv,argc,(mxArray**)(argv)); break; + case 270: flag=_wrap_helicsEndpointGetOption(resc,resv,argc,(mxArray**)(argv)); break; + case 271: flag=_wrap_helicsMessageGetSource(resc,resv,argc,(mxArray**)(argv)); break; + case 272: flag=_wrap_helicsMessageGetDestination(resc,resv,argc,(mxArray**)(argv)); break; + case 273: flag=_wrap_helicsMessageGetOriginalSource(resc,resv,argc,(mxArray**)(argv)); break; + case 274: flag=_wrap_helicsMessageGetOriginalDestination(resc,resv,argc,(mxArray**)(argv)); break; + case 275: flag=_wrap_helicsMessageGetTime(resc,resv,argc,(mxArray**)(argv)); break; + case 276: flag=_wrap_helicsMessageGetString(resc,resv,argc,(mxArray**)(argv)); break; + case 277: flag=_wrap_helicsMessageGetMessageID(resc,resv,argc,(mxArray**)(argv)); break; + case 278: flag=_wrap_helicsMessageCheckFlag(resc,resv,argc,(mxArray**)(argv)); break; + case 279: flag=_wrap_helicsMessageGetRawDataSize(resc,resv,argc,(mxArray**)(argv)); break; + case 280: flag=_wrap_helicsMessageGetRawData(resc,resv,argc,(mxArray**)(argv)); break; + case 281: flag=_wrap_helicsMessageIsValid(resc,resv,argc,(mxArray**)(argv)); break; + case 282: flag=_wrap_helicsMessageSetSource(resc,resv,argc,(mxArray**)(argv)); break; + case 283: flag=_wrap_helicsMessageSetDestination(resc,resv,argc,(mxArray**)(argv)); break; + case 284: flag=_wrap_helicsMessageSetOriginalSource(resc,resv,argc,(mxArray**)(argv)); break; + case 285: flag=_wrap_helicsMessageSetOriginalDestination(resc,resv,argc,(mxArray**)(argv)); break; + case 286: flag=_wrap_helicsMessageSetTime(resc,resv,argc,(mxArray**)(argv)); break; + case 287: flag=_wrap_helicsMessageReserve(resc,resv,argc,(mxArray**)(argv)); break; + case 288: flag=_wrap_helicsMessageSetMessageID(resc,resv,argc,(mxArray**)(argv)); break; + case 289: flag=_wrap_helicsMessageClearFlags(resc,resv,argc,(mxArray**)(argv)); break; + case 290: flag=_wrap_helicsMessageSetFlagOption(resc,resv,argc,(mxArray**)(argv)); break; + case 291: flag=_wrap_helicsMessageSetString(resc,resv,argc,(mxArray**)(argv)); break; + case 292: flag=_wrap_helicsMessageSetData(resc,resv,argc,(mxArray**)(argv)); break; + case 293: flag=_wrap_helicsMessageAppendData(resc,resv,argc,(mxArray**)(argv)); break; + case 294: flag=_wrap_helicsMessageCopy(resc,resv,argc,(mxArray**)(argv)); break; + case 295: flag=_wrap_helicsMessageClone(resc,resv,argc,(mxArray**)(argv)); break; + case 296: flag=_wrap_helicsMessageFree(resc,resv,argc,(mxArray**)(argv)); break; + case 297: flag=_wrap_helicsFederateRegisterFilter(resc,resv,argc,(mxArray**)(argv)); break; + case 298: flag=_wrap_helicsFederateRegisterGlobalFilter(resc,resv,argc,(mxArray**)(argv)); break; + case 299: flag=_wrap_helicsFederateRegisterCloningFilter(resc,resv,argc,(mxArray**)(argv)); break; + case 300: flag=_wrap_helicsFederateRegisterGlobalCloningFilter(resc,resv,argc,(mxArray**)(argv)); break; + case 301: flag=_wrap_helicsCoreRegisterFilter(resc,resv,argc,(mxArray**)(argv)); break; + case 302: flag=_wrap_helicsCoreRegisterCloningFilter(resc,resv,argc,(mxArray**)(argv)); break; + case 303: flag=_wrap_helicsFederateGetFilterCount(resc,resv,argc,(mxArray**)(argv)); break; + case 304: flag=_wrap_helicsFederateGetFilter(resc,resv,argc,(mxArray**)(argv)); break; + case 305: flag=_wrap_helicsFederateGetFilterByIndex(resc,resv,argc,(mxArray**)(argv)); break; + case 306: flag=_wrap_helicsFilterIsValid(resc,resv,argc,(mxArray**)(argv)); break; + case 307: flag=_wrap_helicsFilterGetName(resc,resv,argc,(mxArray**)(argv)); break; + case 308: flag=_wrap_helicsFilterSet(resc,resv,argc,(mxArray**)(argv)); break; + case 309: flag=_wrap_helicsFilterSetString(resc,resv,argc,(mxArray**)(argv)); break; + case 310: flag=_wrap_helicsFilterAddDestinationTarget(resc,resv,argc,(mxArray**)(argv)); break; + case 311: flag=_wrap_helicsFilterAddSourceTarget(resc,resv,argc,(mxArray**)(argv)); break; + case 312: flag=_wrap_helicsFilterAddDeliveryEndpoint(resc,resv,argc,(mxArray**)(argv)); break; + case 313: flag=_wrap_helicsFilterRemoveTarget(resc,resv,argc,(mxArray**)(argv)); break; + case 314: flag=_wrap_helicsFilterRemoveDeliveryEndpoint(resc,resv,argc,(mxArray**)(argv)); break; + case 315: flag=_wrap_helicsFilterGetInfo(resc,resv,argc,(mxArray**)(argv)); break; + case 316: flag=_wrap_helicsFilterSetInfo(resc,resv,argc,(mxArray**)(argv)); break; + case 317: flag=_wrap_helicsFilterSetOption(resc,resv,argc,(mxArray**)(argv)); break; + case 318: flag=_wrap_helicsFilterGetOption(resc,resv,argc,(mxArray**)(argv)); break; default: flag=1, SWIG_Error(SWIG_RuntimeError, "No function id %d.", fcn_id); } if (flag) { diff --git a/interfaces/matlab/matlab_maps.i b/interfaces/matlab/matlab_maps.i index 3cfea86128..e002f66004 100644 --- a/interfaces/matlab/matlab_maps.i +++ b/interfaces/matlab/matlab_maps.i @@ -61,20 +61,20 @@ static void throwHelicsMatlabError(helics_error *err) { } //typemap for large string output with a length return in C -%typemap(in, numinputs=0) (char *outputString, int maxStringLen, int *actualLength) { +%typemap(in, numinputs=0) (char *outputString, int maxStringLength, int *actualLength) { $3=&($2); } -%typemap(freearg) (char *outputString, int maxStringLen, int *actualLength) { +%typemap(freearg) (char *outputString, int maxStringLength, int *actualLength) { if ($1) free($1); } -%typemap(check)(char *outputString, int maxStringLen, int *actualLength) { +%typemap(check)(char *outputString, int maxStringLength, int *actualLength) { $2=helicsInputGetStringSize(arg1)+2; $1 = (char *) malloc($2); } -%typemap(argout) (char *outputString, int maxStringLen, int *actualLength) { +%typemap(argout) (char *outputString, int maxStringLength, int *actualLength) { if (--resc>=0) *resv++ = SWIG_FromCharPtrAndSize($1,*$3-1); } @@ -242,39 +242,39 @@ static void throwHelicsMatlabError(helics_error *err) { // typemap for raw data output function -%typemap(in, numinputs=0) (void *data, int maxDatalen, int *actualSize) { +%typemap(in, numinputs=0) (void *data, int maxDataLength, int *actualSize) { $3=&($2); } -%typemap(freearg) (void *data, int maxDatalen, int *actualSize) { +%typemap(freearg) (void *data, int maxDataLength, int *actualSize) { if ($1) free($1); } // Set argument to NULL before any conversion occurs -%typemap(check)(void *data, int maxDatalen, int *actualSize) { +%typemap(check)(void *data, int maxDataLength, int *actualSize) { $2 = helicsInputGetRawValueSize(arg1) + 2; $1 = malloc($2); } -%typemap(argout) (void *data, int maxDatalen, int *actualSize) { +%typemap(argout) (void *data, int maxDataLength, int *actualSize) { if (--resc>=0) *resv++ = SWIG_FromCharPtrAndSize((char*)$1,*$3); } // typemap for raw message data functions -%typemap(in, numinputs=0) (void *data, int maxMessagelen, int *actualSize) { +%typemap(in, numinputs=0) (void *data, int maxMessageLength, int *actualSize) { $3=&($2); } -%typemap(freearg) (void *data, int maxMessagelen, int *actualSize) { +%typemap(freearg) (void *data, int maxMessageLength, int *actualSize) { if ($1) free($1); } // Set argument to NULL before any conversion occurs -%typemap(check)(void *data, int maxMessagelen, int *actualSize) { +%typemap(check)(void *data, int maxMessageLength, int *actualSize) { $2=helicsMessageGetRawDataSize(arg1)+2; $1 = malloc($2); } -%typemap(argout) (void *data, int maxMessagelen, int *actualSize) { +%typemap(argout) (void *data, int maxMessageLength, int *actualSize) { if (--resc>=0) *resv++ = SWIG_FromCharPtrAndSize((char*)$1,*$3); } diff --git a/interfaces/octave/octave_maps.i b/interfaces/octave/octave_maps.i index 97e6c30680..f45ca18956 100644 --- a/interfaces/octave/octave_maps.i +++ b/interfaces/octave/octave_maps.i @@ -59,20 +59,20 @@ static octave_value throwHelicsOctaveError(helics_error *err) { } //typemap for large string output with a length return in C -%typemap(in, numinputs=0) (char *outputString, int maxStringLen, int *actualLength) { +%typemap(in, numinputs=0) (char *outputString, int maxStringLength, int *actualLength) { $3=&($2); } -%typemap(freearg) (char *outputString, int maxStringLen, int *actualLength) { +%typemap(freearg) (char *outputString, int maxStringLength, int *actualLength) { if ($1) free($1); } -%typemap(check)(char *outputString, int maxStringLen, int *actualLength) { +%typemap(check)(char *outputString, int maxStringLength, int *actualLength) { $2=helicsInputGetStringSize(arg1)+2; $1 = (char *) malloc($2); } -%typemap(argout) (char *outputString, int maxStringLen, int *actualLength) { +%typemap(argout) (char *outputString, int maxStringLength, int *actualLength) { _outv = SWIG_FromCharPtrAndSize($1,*$3-1); if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); } @@ -200,41 +200,41 @@ static octave_value throwHelicsOctaveError(helics_error *err) { // typemap for raw data output function -%typemap(in, numinputs=0) (void *data, int maxDatalen, int *actualSize) { +%typemap(in, numinputs=0) (void *data, int maxDataLength, int *actualSize) { $3=&($2); } -%typemap(freearg) (void *data, int maxDatalen, int *actualSize) { +%typemap(freearg) (void *data, int maxDataLength, int *actualSize) { if ($1) free($1); } // Set argument to NULL before any conversion occurs -%typemap(check)(void *data, int maxDatalen, int *actualSize) { +%typemap(check)(void *data, int maxDataLength, int *actualSize) { $2=helicsInputGetRawValueSize(arg1)+2; $1 = malloc($2); } -%typemap(argout) (void *data, int maxDatalen, int *actualSize) { +%typemap(argout) (void *data, int maxDataLength, int *actualSize) { _outv = SWIG_FromCharPtrAndSize(static_cast($1),*$3); if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); } // typemap for raw data message functions -%typemap(in, numinputs=0) (void *data, int maxMessagelen, int *actualSize) { +%typemap(in, numinputs=0) (void *data, int maxMessageLength, int *actualSize) { $3=&($2); } -%typemap(freearg) (void *data, int maxMessagelen, int *actualSize) { +%typemap(freearg) (void *data, int maxMessageLength, int *actualSize) { if ($1) free($1); } // Set argument to NULL before any conversion occurs -%typemap(check)(void *data, int maxMessagelen, int *actualSize) { +%typemap(check)(void *data, int maxMessageLength, int *actualSize) { $2=helicsMessageGetRawDataSize(arg1)+2; $1 = malloc($2); } -%typemap(argout) (void *data, int maxMessagelen, int *actualSize) { +%typemap(argout) (void *data, int maxMessageLength, int *actualSize) { _outv = SWIG_FromCharPtrAndSize(static_cast($1),*$3); if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); } diff --git a/interfaces/python/CMakeLists.txt b/interfaces/python/CMakeLists.txt index bc3ddae097..2123229932 100644 --- a/interfaces/python/CMakeLists.txt +++ b/interfaces/python/CMakeLists.txt @@ -230,7 +230,9 @@ if(HELICS_ENABLE_SWIG AND SWIG_EXECUTABLE) message(STATUS "swig target is ${SWIG_MODULE_helics_REAL_NAME}") - set_target_properties(${SWIG_MODULE_helics_REAL_NAME} PROPERTIES FOLDER interfaces) + set_target_properties( + ${SWIG_MODULE_helics_REAL_NAME} PROPERTIES FOLDER interfaces DEBUG_POSTFIX "" + ) if(CMAKE_PROJECT_NAME STREQUAL "HELICS") set_target_properties( @@ -259,7 +261,7 @@ else() endif() # Set the output library name to _helics - set_target_properties(helicsPYTHON PROPERTIES PREFIX "_" OUTPUT_NAME "helics") + set_target_properties(helicsPYTHON PROPERTIES PREFIX "_" OUTPUT_NAME "helics" DEBUG_POSTFIX "") target_link_libraries(helicsPYTHON PUBLIC HELICS::helicsSharedLib) set_target_properties(helicsPYTHON PROPERTIES FOLDER interfaces) diff --git a/interfaces/python/interface/helics.py b/interfaces/python/interface/helics.py index 1fbef66014..6d21176d44 100644 --- a/interfaces/python/interface/helics.py +++ b/interfaces/python/interface/helics.py @@ -179,6 +179,10 @@ class _SwigNonDynamicMeta(type): r""" used to not display warnings on mismatched requested times""" helics_flag_terminate_on_error = _helics.helics_flag_terminate_on_error r""" specify that a federate error should terminate the federation""" +helics_flag_force_logging_flush = _helics.helics_flag_force_logging_flush +r""" specify that the log files should be flushed on every log message""" +helics_flag_dumplog = _helics.helics_flag_dumplog +r""" specify that a full log should be dumped into a file""" helics_log_level_no_print = _helics.helics_log_level_no_print r""" don't print anything except a few catastrophic errors""" helics_log_level_error = _helics.helics_log_level_error @@ -188,7 +192,10 @@ class _SwigNonDynamicMeta(type): helics_log_level_summary = _helics.helics_log_level_summary r""" warning errors and summary level information""" helics_log_level_connections = _helics.helics_log_level_connections -r""" summary+ notices about federate and broker connections +messages about network connections""" +r""" + summary+ notices about federate and broker connections +messages about network + connections + """ helics_log_level_interfaces = _helics.helics_log_level_interfaces r""" connections+ interface definitions""" helics_log_level_timing = _helics.helics_log_level_timing @@ -235,16 +242,19 @@ class _SwigNonDynamicMeta(type): r""" the property controlling time offset for the period of federate""" helics_property_time_rt_lag = _helics.helics_property_time_rt_lag r""" - the property controlling real time lag for a federate the max time a federate can lag real - time + the property controlling real time lag for a federate the max time a federate can lag + real time """ helics_property_time_rt_lead = _helics.helics_property_time_rt_lead r""" - the property controlling real time lead for a federate the max time a federate can be ahead - of real time + the property controlling real time lead for a federate the max time a federate can be + ahead of real time """ helics_property_time_rt_tolerance = _helics.helics_property_time_rt_tolerance -r""" the property controlling real time tolerance for a federate sets both rt_lag and rt_lead""" +r""" + the property controlling real time tolerance for a federate sets both rt_lag and + rt_lead + """ helics_property_time_input_delay = _helics.helics_property_time_input_delay r""" the property controlling input delay for a federate""" helics_property_time_output_delay = _helics.helics_property_time_output_delay @@ -305,7 +315,10 @@ class _SwigNonDynamicMeta(type): helics_handle_option_ignore_unit_mismatch = _helics.helics_handle_option_ignore_unit_mismatch r""" specify that the mismatching units should be ignored""" helics_handle_option_only_transmit_on_change = _helics.helics_handle_option_only_transmit_on_change -r""" specify that an interface will only transmit on change(only applicable to publications)""" +r""" + specify that an interface will only transmit on change(only applicable to + publications) + """ helics_handle_option_only_update_on_change = _helics.helics_handle_option_only_update_on_change r""" specify that an interface will only update if the value has actually changed""" helics_handle_option_ignore_interrupts = _helics.helics_handle_option_ignore_interrupts @@ -327,13 +340,16 @@ class _SwigNonDynamicMeta(type): helics_filter_type_random_drop = _helics.helics_filter_type_random_drop r""" a filter type that randomly drops messages""" helics_filter_type_reroute = _helics.helics_filter_type_reroute -r""" a filter type that reroutes a message to a different destination than originally specified""" +r""" + a filter type that reroutes a message to a different destination than originally + specified + """ helics_filter_type_clone = _helics.helics_filter_type_clone r""" a filter type that duplicates a message and sends the copy to a different destination""" helics_filter_type_firewall = _helics.helics_filter_type_firewall r""" - a customizable filter type that can perform different actions on a message based on firewall - like rules + a customizable filter type that can perform different actions on a message based on + firewall like rules """ helics_iteration_request_no_iteration = _helics.helics_iteration_request_no_iteration r""" no iteration is requested""" @@ -1814,6 +1830,26 @@ def helicsBrokerSetLogFile(broker: "helics_broker", logFileName: "char const *") """ return _helics.helicsBrokerSetLogFile(broker, logFileName) +def helicsBrokerSetTimeBarrier(broker: "helics_broker", barrierTime: "helics_time") -> "void": + r""" + Set a broker time barrier. + + :type broker: void + :param broker: The broker to set the time barrier for. + :type barrierTime: float + :param barrierTime: The time to set the barrier at. + """ + return _helics.helicsBrokerSetTimeBarrier(broker, barrierTime) + +def helicsBrokerClearTimeBarrier(broker: "helics_broker") -> "void": + r""" + Clear any time barrier on a broker. + + :type broker: void + :param broker: The broker to clear the barriers on. + """ + return _helics.helicsBrokerClearTimeBarrier(broker) + def helicsCreateQuery(target: "char const *", query: "char const *") -> "helics_query": r""" Create a query object. @@ -3080,16 +3116,16 @@ def helicsEndpointIsValid(endpoint: "helics_endpoint") -> "helics_bool": """ return _helics.helicsEndpointIsValid(endpoint) -def helicsEndpointSetDefaultDestination(endpoint: "helics_endpoint", dest: "char const *") -> "void": +def helicsEndpointSetDefaultDestination(endpoint: "helics_endpoint", dst: "char const *") -> "void": r""" Set the default destination for an endpoint if no other endpoint is given. :type endpoint: void :param endpoint: The endpoint to set the destination for. - :type dest: string - :param dest: A string naming the desired default endpoint. + :type dst: string + :param dst: A string naming the desired default endpoint. """ - return _helics.helicsEndpointSetDefaultDestination(endpoint, dest) + return _helics.helicsEndpointSetDefaultDestination(endpoint, dst) def helicsEndpointGetDefaultDestination(endpoint: "helics_endpoint") -> "char const *": r""" @@ -3103,14 +3139,14 @@ def helicsEndpointGetDefaultDestination(endpoint: "helics_endpoint") -> "char co """ return _helics.helicsEndpointGetDefaultDestination(endpoint) -def helicsEndpointSendMessageRaw(endpoint: "helics_endpoint", dest: "char const *", data: "void const *") -> "int": +def helicsEndpointSendMessageRaw(endpoint: "helics_endpoint", dst: "char const *", data: "void const *") -> "int": r""" Send a message to the specified destination. :type endpoint: void :param endpoint: The endpoint to send the data from. - :type dest: string - :param dest: The target destination. + :type dst: string + :param dst: The target destination. "" to use the default destination. @@ -3118,16 +3154,16 @@ def helicsEndpointSendMessageRaw(endpoint: "helics_endpoint", dest: "char const :type data: void :param data: The data to send. """ - return _helics.helicsEndpointSendMessageRaw(endpoint, dest, data) + return _helics.helicsEndpointSendMessageRaw(endpoint, dst, data) -def helicsEndpointSendEventRaw(endpoint: "helics_endpoint", dest: "char const *", data: "void const *", time: "helics_time") -> "int": +def helicsEndpointSendEventRaw(endpoint: "helics_endpoint", dst: "char const *", data: "void const *", time: "helics_time") -> "int": r""" Send a message at a specific time to the specified destination. :type endpoint: void :param endpoint: The endpoint to send the data from. - :type dest: string - :param dest: The target destination. + :type dst: string + :param dst: The target destination. "" to use the default destination. @@ -3138,7 +3174,7 @@ def helicsEndpointSendEventRaw(endpoint: "helics_endpoint", dest: "char const *" :type time: float :param time: The time the message should be sent. """ - return _helics.helicsEndpointSendEventRaw(endpoint, dest, data, time) + return _helics.helicsEndpointSendEventRaw(endpoint, dst, data, time) def helicsEndpointSendMessage(endpoint: "helics_endpoint", message: "helics_message") -> "void": r""" @@ -3383,42 +3419,39 @@ def helicsEndpointGetInfo(end: "helics_endpoint") -> "char const *": """ return _helics.helicsEndpointGetInfo(end) -def helicsEndpointSetInfo(end: "helics_endpoint", info: "char const *") -> "void": +def helicsEndpointSetInfo(endpoint: "helics_endpoint", info: "char const *") -> "void": r""" Set the data in the info field for a filter. - :type end: void :param end: The endpoint to query. :type info: string :param info: The string to set. """ - return _helics.helicsEndpointSetInfo(end, info) + return _helics.helicsEndpointSetInfo(endpoint, info) -def helicsEndpointSetOption(end: "helics_endpoint", option: "int", value: "int") -> "void": +def helicsEndpointSetOption(endpoint: "helics_endpoint", option: "int", value: "int") -> "void": r""" Set a handle option on an endpoint. - :type end: void :param end: The endpoint to modify. :type option: int :param option: Integer code for the option to set /ref helics_handle_options. :type value: int :param value: The value to set the option to. """ - return _helics.helicsEndpointSetOption(end, option, value) + return _helics.helicsEndpointSetOption(endpoint, option, value) -def helicsEndpointGetOption(end: "helics_endpoint", option: "int") -> "int": +def helicsEndpointGetOption(endpoint: "helics_endpoint", option: "int") -> "int": r""" Set a handle option on an endpoint. - :type end: void :param end: The endpoint to modify. :type option: int :param option: Integer code for the option to set /ref helics_handle_options. :rtype: int :return: the value of the option, for boolean options will be 0 or 1 """ - return _helics.helicsEndpointGetOption(end, option) + return _helics.helicsEndpointGetOption(endpoint, option) def helicsMessageGetSource(message: "helics_message_object") -> "char const *": r""" @@ -3567,16 +3600,16 @@ def helicsMessageSetSource(message: "helics_message_object", src: "char const *" """ return _helics.helicsMessageSetSource(message, src) -def helicsMessageSetDestination(message: "helics_message_object", dest: "char const *") -> "void": +def helicsMessageSetDestination(message: "helics_message_object", dst: "char const *") -> "void": r""" Set the destination of a message. :type message: void :param message: The message object in question. - :type dest: string - :param dest: A string containing the new destination. + :type dst: string + :param dst: A string containing the new destination. """ - return _helics.helicsMessageSetDestination(message, dest) + return _helics.helicsMessageSetDestination(message, dst) def helicsMessageSetOriginalSource(message: "helics_message_object", src: "char const *") -> "void": r""" @@ -3589,16 +3622,16 @@ def helicsMessageSetOriginalSource(message: "helics_message_object", src: "char """ return _helics.helicsMessageSetOriginalSource(message, src) -def helicsMessageSetOriginalDestination(message: "helics_message_object", dest: "char const *") -> "void": +def helicsMessageSetOriginalDestination(message: "helics_message_object", dst: "char const *") -> "void": r""" Set the original destination of a message. :type message: void :param message: The message object in question. - :type dest: string - :param dest: A string containing the new original source. + :type dst: string + :param dst: A string containing the new original source. """ - return _helics.helicsMessageSetOriginalDestination(message, dest) + return _helics.helicsMessageSetOriginalDestination(message, dst) def helicsMessageSetTime(message: "helics_message_object", time: "helics_time") -> "void": r""" @@ -3696,16 +3729,16 @@ def helicsMessageAppendData(message: "helics_message_object", data: "void const """ return _helics.helicsMessageAppendData(message, data) -def helicsMessageCopy(source_message: "helics_message_object", dest_message: "helics_message_object") -> "void": +def helicsMessageCopy(src_message: "helics_message_object", dst_message: "helics_message_object") -> "void": r""" Copy a message object. - :type source_message: void - :param source_message: The message object to copy from. - :type dest_message: void - :param dest_message: The message object to copy to. + :type src_message: void + :param src_message: The message object to copy from. + :type dst_message: void + :param dst_message: The message object to copy to. """ - return _helics.helicsMessageCopy(source_message, dest_message) + return _helics.helicsMessageCopy(src_message, dst_message) def helicsMessageClone(message: "helics_message_object") -> "helics_message_object": r""" @@ -3932,17 +3965,17 @@ def helicsFilterSetString(filt: "helics_filter", prop: "char const *", val: "cha """ return _helics.helicsFilterSetString(filt, prop, val) -def helicsFilterAddDestinationTarget(filt: "helics_filter", dest: "char const *") -> "void": +def helicsFilterAddDestinationTarget(filt: "helics_filter", dst: "char const *") -> "void": r""" Add a destination target to a filter. All messages going to a destination are copied to the delivery address(es). :type filt: void :param filt: The given filter to add a destination target to. - :type dest: string - :param dest: The name of the endpoint to add as a destination target. + :type dst: string + :param dst: The name of the endpoint to add as a destination target. """ - return _helics.helicsFilterAddDestinationTarget(filt, dest) + return _helics.helicsFilterAddDestinationTarget(filt, dst) def helicsFilterAddSourceTarget(filt: "helics_filter", source: "char const *") -> "void": r""" diff --git a/interfaces/python/interface/helicsPython.c b/interfaces/python/interface/helicsPython.c index f6f266a4da..269823a74b 100644 --- a/interfaces/python/interface/helicsPython.c +++ b/interfaces/python/interface/helicsPython.c @@ -8970,6 +8970,73 @@ SWIGINTERN PyObject *_wrap_helicsBrokerSetLogFile(PyObject *SWIGUNUSEDPARM(self) } +SWIGINTERN PyObject *_wrap_helicsBrokerSetTimeBarrier(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + helics_broker arg1 = (helics_broker) 0 ; + helics_time arg2 ; + helics_error *arg3 = (helics_error *) 0 ; + int res1 ; + double val2 ; + int ecode2 = 0 ; + helics_error etemp3 ; + PyObject *swig_obj[2] ; + + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + if (!SWIG_Python_UnpackTuple(args, "helicsBrokerSetTimeBarrier", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0],SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "helicsBrokerSetTimeBarrier" "', argument " "1"" of type '" "helics_broker""'"); + } + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "helicsBrokerSetTimeBarrier" "', argument " "2"" of type '" "helics_time""'"); + } + arg2 = (helics_time)(val2); + helicsBrokerSetTimeBarrier(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + { + if (arg3->error_code!=helics_ok) + { + throwHelicsPythonException(arg3); + return NULL; + } + } + return resultobj; +fail: + { + if (arg3->error_code!=helics_ok) + { + throwHelicsPythonException(arg3); + return NULL; + } + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_helicsBrokerClearTimeBarrier(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + helics_broker arg1 = (helics_broker) 0 ; + int res1 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0],SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "helicsBrokerClearTimeBarrier" "', argument " "1"" of type '" "helics_broker""'"); + } + helicsBrokerClearTimeBarrier(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_helicsCreateQuery(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; @@ -17241,6 +17308,20 @@ static PyMethodDef SwigMethods[] = { ":type logFileName: string\n" ":param logFileName: The name of the file to log to.\n" ""}, + { "helicsBrokerSetTimeBarrier", _wrap_helicsBrokerSetTimeBarrier, METH_VARARGS, "\n" + "Set a broker time barrier.\n" + "\n" + ":type broker: void\n" + ":param broker: The broker to set the time barrier for.\n" + ":type barrierTime: float\n" + ":param barrierTime: The time to set the barrier at.\n" + ""}, + { "helicsBrokerClearTimeBarrier", _wrap_helicsBrokerClearTimeBarrier, METH_O, "\n" + "Clear any time barrier on a broker.\n" + "\n" + ":type broker: void\n" + ":param broker: The broker to clear the barriers on.\n" + ""}, { "helicsCreateQuery", _wrap_helicsCreateQuery, METH_VARARGS, "\n" "Create a query object.\n" "\n" @@ -18224,8 +18305,8 @@ static PyMethodDef SwigMethods[] = { "\n" ":type endpoint: void\n" ":param endpoint: The endpoint to set the destination for.\n" - ":type dest: string\n" - ":param dest: A string naming the desired default endpoint.\n" + ":type dst: string\n" + ":param dst: A string naming the desired default endpoint.\n" ""}, { "helicsEndpointGetDefaultDestination", _wrap_helicsEndpointGetDefaultDestination, METH_O, "\n" "Get the default destination for an endpoint.\n" @@ -18241,8 +18322,8 @@ static PyMethodDef SwigMethods[] = { "\n" ":type endpoint: void\n" ":param endpoint: The endpoint to send the data from.\n" - ":type dest: string\n" - ":param dest: The target destination.\n" + ":type dst: string\n" + ":param dst: The target destination.\n" "\n" "\n" " \"\" to use the default destination.\n" @@ -18255,8 +18336,8 @@ static PyMethodDef SwigMethods[] = { "\n" ":type endpoint: void\n" ":param endpoint: The endpoint to send the data from.\n" - ":type dest: string\n" - ":param dest: The target destination.\n" + ":type dst: string\n" + ":param dst: The target destination.\n" "\n" "\n" " \"\" to use the default destination.\n" @@ -18453,7 +18534,6 @@ static PyMethodDef SwigMethods[] = { { "helicsEndpointSetInfo", _wrap_helicsEndpointSetInfo, METH_VARARGS, "\n" "Set the data in the info field for a filter.\n" "\n" - ":type end: void\n" ":param end: The endpoint to query.\n" ":type info: string\n" ":param info: The string to set.\n" @@ -18461,7 +18541,6 @@ static PyMethodDef SwigMethods[] = { { "helicsEndpointSetOption", _wrap_helicsEndpointSetOption, METH_VARARGS, "\n" "Set a handle option on an endpoint.\n" "\n" - ":type end: void\n" ":param end: The endpoint to modify.\n" ":type option: int\n" ":param option: Integer code for the option to set /ref helics_handle_options.\n" @@ -18471,7 +18550,6 @@ static PyMethodDef SwigMethods[] = { { "helicsEndpointGetOption", _wrap_helicsEndpointGetOption, METH_VARARGS, "\n" "Set a handle option on an endpoint.\n" "\n" - ":type end: void\n" ":param end: The endpoint to modify.\n" ":type option: int\n" ":param option: Integer code for the option to set /ref helics_handle_options.\n" @@ -18594,8 +18672,8 @@ static PyMethodDef SwigMethods[] = { "\n" ":type message: void\n" ":param message: The message object in question.\n" - ":type dest: string\n" - ":param dest: A string containing the new destination.\n" + ":type dst: string\n" + ":param dst: A string containing the new destination.\n" ""}, { "helicsMessageSetOriginalSource", _wrap_helicsMessageSetOriginalSource, METH_VARARGS, "\n" "Set the original source of a message.\n" @@ -18610,8 +18688,8 @@ static PyMethodDef SwigMethods[] = { "\n" ":type message: void\n" ":param message: The message object in question.\n" - ":type dest: string\n" - ":param dest: A string containing the new original source.\n" + ":type dst: string\n" + ":param dst: A string containing the new original source.\n" ""}, { "helicsMessageSetTime", _wrap_helicsMessageSetTime, METH_VARARGS, "\n" "Set the delivery time for a message.\n" @@ -18688,10 +18766,10 @@ static PyMethodDef SwigMethods[] = { { "helicsMessageCopy", _wrap_helicsMessageCopy, METH_VARARGS, "\n" "Copy a message object.\n" "\n" - ":type source_message: void\n" - ":param source_message: The message object to copy from.\n" - ":type dest_message: void\n" - ":param dest_message: The message object to copy to.\n" + ":type src_message: void\n" + ":param src_message: The message object to copy from.\n" + ":type dst_message: void\n" + ":param dst_message: The message object to copy to.\n" ""}, { "helicsMessageClone", _wrap_helicsMessageClone, METH_O, "\n" "Clone a message object.\n" @@ -18879,8 +18957,8 @@ static PyMethodDef SwigMethods[] = { "All messages going to a destination are copied to the delivery address(es).\n" ":type filt: void\n" ":param filt: The given filter to add a destination target to.\n" - ":type dest: string\n" - ":param dest: The name of the endpoint to add as a destination target.\n" + ":type dst: string\n" + ":param dst: The name of the endpoint to add as a destination target.\n" ""}, { "helicsFilterAddSourceTarget", _wrap_helicsFilterAddSourceTarget, METH_VARARGS, "\n" "Add a source target to a filter.\n" @@ -19835,6 +19913,8 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, "helics_flag_enable_init_entry",SWIG_From_int((int)(helics_flag_enable_init_entry))); SWIG_Python_SetConstant(d, "helics_flag_ignore_time_mismatch_warnings",SWIG_From_int((int)(helics_flag_ignore_time_mismatch_warnings))); SWIG_Python_SetConstant(d, "helics_flag_terminate_on_error",SWIG_From_int((int)(helics_flag_terminate_on_error))); + SWIG_Python_SetConstant(d, "helics_flag_force_logging_flush",SWIG_From_int((int)(helics_flag_force_logging_flush))); + SWIG_Python_SetConstant(d, "helics_flag_dumplog",SWIG_From_int((int)(helics_flag_dumplog))); SWIG_Python_SetConstant(d, "helics_log_level_no_print",SWIG_From_int((int)(helics_log_level_no_print))); SWIG_Python_SetConstant(d, "helics_log_level_error",SWIG_From_int((int)(helics_log_level_error))); SWIG_Python_SetConstant(d, "helics_log_level_warning",SWIG_From_int((int)(helics_log_level_warning))); diff --git a/interfaces/python/python_maps2.i b/interfaces/python/python_maps2.i index cdeedc9ad4..0f445adb2f 100644 --- a/interfaces/python/python_maps2.i +++ b/interfaces/python/python_maps2.i @@ -90,20 +90,20 @@ PyModule_AddObject(m, "HelicsException", pHelicsException); } //typemap for large string output with a length return in C -%typemap(in, numinputs=0) (char *outputString, int maxStringLen, int *actualLength) { +%typemap(in, numinputs=0) (char *outputString, int maxStringLength, int *actualLength) { $3=&($2); } -%typemap(freearg) (char *outputString, int maxStringLen, int *actualLength) { +%typemap(freearg) (char *outputString, int maxStringLength, int *actualLength) { if ($1) free($1); } -%typemap(check)(char *outputString, int maxStringLen, int *actualLength) { +%typemap(check)(char *outputString, int maxStringLength, int *actualLength) { $2=helicsInputGetStringSize(arg1)+2; $1 = (char *) malloc($2); } -%typemap(argout) (char *outputString, int maxStringLen, int *actualLength) { +%typemap(argout) (char *outputString, int maxStringLength, int *actualLength) { PyObject *o2=PyString_FromString($1); $result = SWIG_Python_AppendOutput($result, o2); } @@ -172,25 +172,25 @@ PyModule_AddObject(m, "HelicsException", pHelicsException); // typemap for vector output functions -%typemap(arginit) (double data[], int maxlen, int *actualSize) { +%typemap(arginit) (double data[], int maxLength, int *actualSize) { $1=(double *)(NULL); } -%typemap(in, numinputs=0) (double data[], int maxlen, int *actualSize) { +%typemap(in, numinputs=0) (double data[], int maxLength, int *actualSize) { $3=&($2); } -%typemap(freearg) (double data[], int maxlen, int *actualSize) { +%typemap(freearg) (double data[], int maxLength, int *actualSize) { if ($1) free($1); } // Set argument to NULL before any conversion occurs -%typemap(check)(double data[], int maxlen, int *actualSize) { +%typemap(check)(double data[], int maxLength, int *actualSize) { $2=helicsInputGetVectorSize(arg1); $1 = (double *) malloc($2*sizeof(double)); } -%typemap(argout) (double data[], int maxlen, int *actualSize) { +%typemap(argout) (double data[], int maxLength, int *actualSize) { int i; PyObject *o2=PyList_New(*$3); for (i = 0; i < *$3; i++) { @@ -204,42 +204,42 @@ PyModule_AddObject(m, "HelicsException", pHelicsException); // typemap for raw data output function -%typemap(in, numinputs=0) (void *data, int maxDatalen, int *actualSize) { +%typemap(in, numinputs=0) (void *data, int maxDataLength, int *actualSize) { $3=&($2); } -%typemap(freearg) (void *data, int maxDatalen, int *actualSize) { +%typemap(freearg) (void *data, int maxDataLength, int *actualSize) { if ($1) free($1); } // Set argument to NULL before any conversion occurs -%typemap(check)(void *data, int maxDatalen, int *actualSize) { +%typemap(check)(void *data, int maxDataLength, int *actualSize) { $2=helicsInputGetRawValueSize(arg1)+2; $1 = malloc($2); } -%typemap(argout) (void *data, int maxDatalen, int *actualSize) { +%typemap(argout) (void *data, int maxDataLength, int *actualSize) { PyObject *o2=PyBytes_FromStringAndSize($1,*$3); $result = SWIG_Python_AppendOutput($result, o2); } // typemap for raw message data output -%typemap(in, numinputs=0) (void *data, int maxMessagelen, int *actualSize) { +%typemap(in, numinputs=0) (void *data, int maxMessageLength, int *actualSize) { $3=&($2); } -%typemap(freearg) (void *data, int maxMessagelen, int *actualSize) { +%typemap(freearg) (void *data, int maxMessageLength, int *actualSize) { if ($1) free($1); } // Set argument to NULL before any conversion occurs -%typemap(check)(void *data, int maxMessagelen, int *actualSize) { +%typemap(check)(void *data, int maxMessageLength, int *actualSize) { $2=helicsMessageGetRawDataSize(arg1)+2; $1 = malloc($2); } -%typemap(argout) (void *data, int maxMessagelen, int *actualSize) { +%typemap(argout) (void *data, int maxMessageLength, int *actualSize) { PyObject *o2=PyBytes_FromStringAndSize($1,*$3); $result = SWIG_Python_AppendOutput($result, o2); } diff --git a/interfaces/python/python_maps3.i b/interfaces/python/python_maps3.i index ec2b157d75..ee64160993 100644 --- a/interfaces/python/python_maps3.i +++ b/interfaces/python/python_maps3.i @@ -96,20 +96,20 @@ PyModule_AddObject(m, "HelicsException", pHelicsException); //typemap for large string output with a length return in C -%typemap(in, numinputs=0) (char *outputString, int maxStringLen, int *actualLength) { +%typemap(in, numinputs=0) (char *outputString, int maxStringLength, int *actualLength) { $3=&($2); } -%typemap(freearg) (char *outputString, int maxStringLen, int *actualLength) { +%typemap(freearg) (char *outputString, int maxStringLength, int *actualLength) { if ($1) free($1); } -%typemap(check)(char *outputString, int maxStringLen, int *actualLength) { +%typemap(check)(char *outputString, int maxStringLength, int *actualLength) { $2=helicsInputGetStringSize(arg1)+2; $1 = (char *) malloc($2); } -%typemap(argout) (char *outputString, int maxStringLen, int *actualLength) { +%typemap(argout) (char *outputString, int maxStringLength, int *actualLength) { PyObject *o2=PyString_FromString($1); $result = SWIG_Python_AppendOutput($result, o2); } @@ -178,25 +178,25 @@ PyModule_AddObject(m, "HelicsException", pHelicsException); // typemap for vector output functions -%typemap(arginit) (double data[], int maxlen, int *actualSize) { +%typemap(arginit) (double data[], int maxLength, int *actualSize) { $1=(double *)(NULL); } -%typemap(in, numinputs=0) (double data[], int maxlen, int *actualSize) { +%typemap(in, numinputs=0) (double data[], int maxLength, int *actualSize) { $3=&($2); } -%typemap(freearg) (double data[], int maxlen, int *actualSize) { +%typemap(freearg) (double data[], int maxLength, int *actualSize) { if ($1) free($1); } // Set argument to NULL before any conversion occurs -%typemap(check)(double data[], int maxlen, int *actualSize) { +%typemap(check)(double data[], int maxLength, int *actualSize) { $2=helicsInputGetVectorSize(arg1); $1 = (double *) malloc($2*sizeof(double)); } -%typemap(argout) (double data[], int maxlen, int *actualSize) { +%typemap(argout) (double data[], int maxLength, int *actualSize) { int i; PyObject *o2=PyList_New(*$3); for (i = 0; i < *$3; i++) { @@ -245,42 +245,42 @@ PyModule_AddObject(m, "HelicsException", pHelicsException); // typemap for raw data output function -%typemap(in, numinputs=0) (void *data, int maxDatalen, int *actualSize) { +%typemap(in, numinputs=0) (void *data, int maxDataLength, int *actualSize) { $3=&($2); } -%typemap(freearg) (void *data, int maxDatalen, int *actualSize) { +%typemap(freearg) (void *data, int maxDataLength, int *actualSize) { if ($1) free($1); } // Set argument to NULL before any conversion occurs -%typemap(check)(void *data, int maxDatalen, int *actualSize) { +%typemap(check)(void *data, int maxDataLength, int *actualSize) { $2=helicsInputGetRawValueSize(arg1)+2; $1 = malloc($2); } -%typemap(argout) (void *data, int maxDatalen, int *actualSize) { +%typemap(argout) (void *data, int maxDataLength, int *actualSize) { PyObject *o2=PyBytes_FromStringAndSize($1,*$3); $result = SWIG_Python_AppendOutput($result, o2); } // typemap for raw message data output -%typemap(in, numinputs=0) (void *data, int maxMessagelen, int *actualSize) { +%typemap(in, numinputs=0) (void *data, int maxMessageLength, int *actualSize) { $3=&($2); } -%typemap(freearg) (void *data, int maxMessagelen, int *actualSize) { +%typemap(freearg) (void *data, int maxMessageLength, int *actualSize) { if ($1) free($1); } // Set argument to NULL before any conversion occurs -%typemap(check)(void *data, int maxMessagelen, int *actualSize) { +%typemap(check)(void *data, int maxMessageLength, int *actualSize) { $2=helicsMessageGetRawDataSize(arg1)+2; $1 = malloc($2); } -%typemap(argout) (void *data, int maxMessagelen, int *actualSize) { +%typemap(argout) (void *data, int maxMessageLength, int *actualSize) { PyObject *o2=PyBytes_FromStringAndSize($1,*$3); $result = SWIG_Python_AppendOutput($result, o2); } diff --git a/scripts/run-circleci-tests.sh b/scripts/run-circleci-tests.sh index 2f4d7fca58..bc628fc4a6 100755 --- a/scripts/run-circleci-tests.sh +++ b/scripts/run-circleci-tests.sh @@ -5,7 +5,7 @@ tests=( "/root/project/build/bin/system-tests --gtest_filter=-*realtime*" /root/project/build/bin/helics_apps-tests /root/project/build/bin/shared-library-tests-cpp - "/root/project/build/bin/shared-library-tests --gtest_filter=-*bad_input*:*evil*" + "/root/project/build/bin/shared-library-tests --gtest_filter=-*bad_input*:*evil*:*after_close*" "/root/project/build/bin/application-api-tests --gtest_filter=-*ci_skip*" ) diff --git a/src/helics/application_api/BrokerApp.cpp b/src/helics/application_api/BrokerApp.cpp index 98c2f101e7..a1067ff93e 100644 --- a/src/helics/application_api/BrokerApp.cpp +++ b/src/helics/application_api/BrokerApp.cpp @@ -233,6 +233,20 @@ void BrokerApp::setLoggingLevel(int loglevel) } } +void BrokerApp::setTimeBarrier(Time barrierTime) +{ + if (broker) { + broker->setTimeBarrier(barrierTime); + } +} + +void BrokerApp::clearTimeBarrier() +{ + if (broker) { + broker->clearTimeBarrier(); + } +} + /** set the log file to use for the broker*/ void BrokerApp::setLogFile(const std::string& logFile) { diff --git a/src/helics/application_api/BrokerApp.hpp b/src/helics/application_api/BrokerApp.hpp index bc25a8e47e..44bf9d0a3b 100644 --- a/src/helics/application_api/BrokerApp.hpp +++ b/src/helics/application_api/BrokerApp.hpp @@ -7,6 +7,7 @@ SPDX-License-Identifier: BSD-3-Clause #pragma once #include "../core/core-types.hpp" +#include "../core/helics-time.hpp" #include "helics_cxx_export.h" #include @@ -134,6 +135,11 @@ class HELICS_CXX_EXPORT BrokerApp { /** get a copy of the core pointer*/ std::shared_ptr getCopyofBrokerPointer() const { return broker; } + /** set a global time Barrier*/ + void setTimeBarrier(Time barrierTime); + /** clear a global time Barrier*/ + void clearTimeBarrier(); + private: void processArgs(std::unique_ptr& app); std::unique_ptr generateParser(bool noTypeOption = false); diff --git a/src/helics/application_api/Inputs.hpp b/src/helics/application_api/Inputs.hpp index 5f55ccf407..3a6aee0a18 100644 --- a/src/helics/application_api/Inputs.hpp +++ b/src/helics/application_api/Inputs.hpp @@ -54,7 +54,7 @@ class HELICS_CXX_EXPORT Input { multi_input_handling_method::no_op}; //!< the vector processing method to use int32_t prevInputCount{0}; //!< the previous number of inputs size_t customTypeHash{0U}; //!< a hash code for the custom type - defV lastValue; //!< the last value updated + defV lastValue{invalidDouble}; //!< the last value updated std::shared_ptr outputUnits; //!< the target output units std::shared_ptr inputUnits; //!< the units of the linked publications std::vector>> diff --git a/src/helics/application_api/ValueConverter_impl.hpp b/src/helics/application_api/ValueConverter_impl.hpp index 7f91ba111b..74686d3968 100644 --- a/src/helics/application_api/ValueConverter_impl.hpp +++ b/src/helics/application_api/ValueConverter_impl.hpp @@ -299,7 +299,9 @@ template void ValueConverter::interpret(const data_view& block, X& val) { if (block.size() < getMinSize()) { - throw std::invalid_argument("invalid data size"); + std::string arg = std::string("invalid data size: expected ") + + std::to_string(getMinSize()) + ", received " + std::to_string(block.size()); + throw std::invalid_argument(arg); } detail::imemstream s(block.data(), block.size()); retriever ia(s); diff --git a/src/helics/application_api/ValueFederate.cpp b/src/helics/application_api/ValueFederate.cpp index e7b31f7dca..406dba3db6 100644 --- a/src/helics/application_api/ValueFederate.cpp +++ b/src/helics/application_api/ValueFederate.cpp @@ -228,7 +228,8 @@ void ValueFederate::registerValueInterfacesJson(const std::string& jsonString) Publication* pubAct = &vfManager->getPublication(key); if (!pubAct->isValid()) { auto type = getOrDefault(pub, "type", emptyStr); - auto units = getOrDefault(pub, "units", emptyStr); + auto units = getOrDefault(pub, "unit", emptyStr); + replaceIfMember(pub, "units", units); bool global = getOrDefault(pub, "global", defaultGlobal); if (global) { pubAct = ®isterGlobalPublication(key, type, units); @@ -247,7 +248,8 @@ void ValueFederate::registerValueInterfacesJson(const std::string& jsonString) auto* subAct = &vfManager->getSubscription(key); if (!subAct->isValid()) { auto type = getOrDefault(sub, "type", emptyStr); - auto units = getOrDefault(sub, "units", emptyStr); + auto units = getOrDefault(sub, "unit", emptyStr); + replaceIfMember(sub, "units", units); subAct = ®isterInput(emptyStr, type, units); } subAct->addTarget(key); @@ -262,7 +264,8 @@ void ValueFederate::registerValueInterfacesJson(const std::string& jsonString) Input* inp = &vfManager->getInput(key); if (!inp->isValid()) { auto type = getOrDefault(ipt, "type", emptyStr); - auto units = getOrDefault(ipt, "units", emptyStr); + auto units = getOrDefault(ipt, "unit", emptyStr); + replaceIfMember(ipt, "units", units); bool global = getOrDefault(ipt, "global", defaultGlobal); if (global) { inp = ®isterGlobalInput(key, type, units); @@ -300,7 +303,8 @@ void ValueFederate::registerValueInterfacesToml(const std::string& tomlString) Publication* pubObj = &vfManager->getPublication(key); if (!pubObj->isValid()) { auto type = getOrDefault(pub, "type", emptyStr); - auto units = getOrDefault(pub, "units", emptyStr); + auto units = getOrDefault(pub, "unit", emptyStr); + replaceIfMember(pub, "units", units); bool global = getOrDefault(pub, "global", defaultGlobal); if (global) { pubObj = ®isterGlobalPublication(key, type, units); @@ -325,7 +329,8 @@ void ValueFederate::registerValueInterfacesToml(const std::string& tomlString) Input* id = &vfManager->getSubscription(key); if (!id->isValid()) { auto type = getOrDefault(sub, "type", emptyStr); - auto units = getOrDefault(sub, "units", emptyStr); + auto units = getOrDefault(sub, "unit", emptyStr); + replaceIfMember(sub, "units", units); id = ®isterInput(emptyStr, type, units); } @@ -347,7 +352,8 @@ void ValueFederate::registerValueInterfacesToml(const std::string& tomlString) Input* id = &vfManager->getInput(key); if (!id->isValid()) { auto type = getOrDefault(ipt, "type", emptyStr); - auto units = getOrDefault(ipt, "units", emptyStr); + auto units = getOrDefault(ipt, "unit", emptyStr); + replaceIfMember(ipt, "units", units); bool global = getOrDefault(ipt, "global", defaultGlobal); if (global) { id = ®isterGlobalInput(key, type, units); diff --git a/src/helics/application_api/helicsTypes.cpp b/src/helics/application_api/helicsTypes.cpp index cb3855d5ad..f50849e38d 100644 --- a/src/helics/application_api/helicsTypes.cpp +++ b/src/helics/application_api/helicsTypes.cpp @@ -345,14 +345,14 @@ NamedPoint helicsGetNamedPoint(const std::string& val) if (loc == std::string::npos) { auto fb = val.find_first_of('['); if (fb != std::string::npos) { - return {val, std::nan("0")}; + return {val, getDoubleFromString(val)}; } auto V = helicsGetComplex(val); if (V.real() <= invalidDouble) { return {val, std::nan("0")}; } if (V.imag() == 0) { - return {"value", std::abs(V)}; + return {"value", V.real()}; } return {val, V.real()}; } @@ -414,13 +414,15 @@ double getDoubleFromString(const std::string& val) } if (val.front() == 'v' || val.front() == '[') { auto V = helicsGetVector(val); - return vectorNorm(V); + return (V.size() != 1) ? vectorNorm(V) : V[0]; } if (val.front() == 'c') { auto cv = helicsGetComplexVector(val); - return vectorNorm(cv); + return (cv.size() != 1) ? vectorNorm(cv) : + ((cv[0].imag() == 0.0) ? cv[0].real() : std::abs(cv[0])); } - return std::abs(helicsGetComplex(val)); + auto cval = helicsGetComplex(val); + return (cval.imag() == 0.0) ? cval.real() : std::abs(cval); } void helicsGetVector(const std::string& val, std::vector& data) diff --git a/src/helics/apps/CMakeLists.txt b/src/helics/apps/CMakeLists.txt index 931b550339..173c8fc60c 100644 --- a/src/helics/apps/CMakeLists.txt +++ b/src/helics/apps/CMakeLists.txt @@ -71,7 +71,9 @@ if(HELICS_BUILD_APP_LIBRARY) ) target_link_libraries(helics_apps PUBLIC helics_application_api) - target_link_libraries(helics_apps PRIVATE HELICS::compile_flags_target fmt::fmt helics::zmq) + target_link_libraries( + helics_apps PRIVATE HELICS::compile_flags_target spdlog::spdlog fmt::fmt helics::zmq + ) if(BOOST_VERSION_LEVEL GREATER 69 AND NOT (HELICS_DISABLE_WEBSERVER OR HELICS_DISABLE_BOOST OR HELICS_DISABLE_ASIO) @@ -127,7 +129,7 @@ if(HELICS_BUILD_APP_LIBRARY) add_executable(helics_app appMain.cpp) target_link_libraries(helics_app PUBLIC helics_apps) - target_link_libraries(helics_app PRIVATE compile_flags_target) + target_link_libraries(helics_app PRIVATE spdlog::spdlog compile_flags_target) set_target_properties(helics_app PROPERTIES FOLDER apps) install(TARGETS helics_app ${HELICS_EXPORT_COMMAND} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT applications @@ -152,7 +154,9 @@ if(HELICS_BUILD_APP_LIBRARY) ) target_link_libraries(helics-apps-shared PUBLIC HELICS::helics-shared) - target_link_libraries(helics-apps-shared PRIVATE helics_common fmt::fmt HELICS::utilities) + target_link_libraries( + helics-apps-shared PRIVATE helics_common spdlog::spdlog fmt::fmt HELICS::utilities + ) # add and alias library to match the find_package add_library(HELICS::helics-apps-shared ALIAS helics-apps-shared) diff --git a/src/helics/apps/Clone.cpp b/src/helics/apps/Clone.cpp index ed94c4b472..beb885066f 100644 --- a/src/helics/apps/Clone.cpp +++ b/src/helics/apps/Clone.cpp @@ -12,7 +12,6 @@ SPDX-License-Identifier: BSD-3-Clause #include "../common/JsonProcessingFunctions.hpp" #include "../common/fmt_format.h" #include "../common/fmt_ostream.h" -#include "../common/loggerCore.hpp" #include "../core/helicsCLI11.hpp" #include "PrecHelper.hpp" #include "gmlc/utilities/base64.h" @@ -24,12 +23,22 @@ SPDX-License-Identifier: BSD-3-Clause #include #include #include +#include #include #include #include #include #include +/** encode the string in base64 if needed otherwise just return the string*/ +static std::string encode(const std::string& str2encode) +{ + return std::string("b64[") + + gmlc::utilities::base64_encode(reinterpret_cast(str2encode.c_str()), + static_cast(str2encode.size())) + + ']'; +} + namespace helics { namespace apps { Clone::Clone(const std::string& appName, FederateInfo& fi): App(appName, fi) @@ -201,7 +210,6 @@ namespace apps { void Clone::captureForCurrentTime(Time currentTime, int iteration) { - static auto logger = LoggerManager::getLoggerCore(); for (auto& sub : subscriptions) { if (sub.isUpdated()) { auto val = sub.getValue(); @@ -234,7 +242,7 @@ namespace apps { val.size()); } } - logger->addMessage(std::move(valstr)); + spdlog::info(valstr); } if (pubPointCount[ii] == 0) { points.back().first = true; @@ -251,15 +259,6 @@ namespace apps { } } - std::string Clone::encode(const std::string& str2encode) - { - return std::string("b64[") + - gmlc::utilities::base64_encode(reinterpret_cast( - str2encode.c_str()), - static_cast(str2encode.size())) + - ']'; - } - /** run the Player until the specified time*/ void Clone::runTo(Time runToTime) { diff --git a/src/helics/apps/Clone.hpp b/src/helics/apps/Clone.hpp index 3c56a52950..065245bc16 100644 --- a/src/helics/apps/Clone.hpp +++ b/src/helics/apps/Clone.hpp @@ -103,8 +103,6 @@ namespace apps { virtual void initialize() override; void generateInterfaces(); void captureForCurrentTime(Time currentTime, int iteration = 0); - /** encode the string in base64 if needed otherwise just return the string*/ - std::string encode(const std::string& str2encode); /** build the command line argument processing application*/ std::shared_ptr buildArgParserApp(); /** process remaining command line arguments*/ diff --git a/src/helics/apps/Recorder.cpp b/src/helics/apps/Recorder.cpp index 66c6e5a336..6e4c25c71c 100644 --- a/src/helics/apps/Recorder.cpp +++ b/src/helics/apps/Recorder.cpp @@ -12,7 +12,6 @@ SPDX-License-Identifier: BSD-3-Clause #include "../common/JsonProcessingFunctions.hpp" #include "../common/fmt_format.h" #include "../common/fmt_ostream.h" -#include "../common/loggerCore.hpp" #include "../core/helicsCLI11.hpp" #include "PrecHelper.hpp" #include "gmlc/utilities/base64.h" @@ -24,12 +23,22 @@ SPDX-License-Identifier: BSD-3-Clause #include #include #include +#include #include #include #include #include #include +/** encode the string in base64 if needed otherwise just return the string*/ +static std::string encode(const std::string& str2encode) +{ + return std::string("b64[") + + gmlc::utilities::base64_encode(reinterpret_cast(str2encode.c_str()), + static_cast(str2encode.size())) + + ']'; +} + namespace helics { namespace apps { Recorder::Recorder(const std::string& appName, FederateInfo& fi): App(appName, fi) @@ -352,7 +361,6 @@ namespace apps { void Recorder::captureForCurrentTime(Time currentTime, int iteration) { - static auto logger = LoggerManager::getLoggerCore(); for (auto& sub : subscriptions) { if (sub.isUpdated()) { auto val = sub.getValue(); @@ -385,7 +393,7 @@ namespace apps { val.size()); } } - logger->addMessage(std::move(valstr)); + spdlog::info(valstr); } if (vStat[ii].cnt == 0) { points.back().first = true; @@ -414,7 +422,7 @@ namespace apps { mess->dest, mess->data.size()); } - logger->addMessage(std::move(messstr)); + spdlog::info(messstr); } messages.push_back(std::move(mess)); } @@ -427,15 +435,6 @@ namespace apps { } } - std::string Recorder::encode(const std::string& str2encode) - { - return std::string("b64[") + - gmlc::utilities::base64_encode(reinterpret_cast( - str2encode.c_str()), - static_cast(str2encode.size())) + - ']'; - } - /** run the Player until the specified time*/ void Recorder::runTo(Time runToTime) { @@ -594,7 +593,7 @@ namespace apps { app->add_option("--output,-o", outFileName, "the output file for recording the data", true); - auto clone_group = app->add_option_group( + auto* clone_group = app->add_option_group( "cloning", "Options related to endpoint cloning operations and specifications"); clone_group->add_option("--clone", "existing endpoints to clone all packets to and from") ->each([this](const std::string& clone) { @@ -623,7 +622,7 @@ namespace apps { ->ignore_underscore() ->type_size(-1); - auto capture_group = app->add_option_group( + auto* capture_group = app->add_option_group( "capture_group", "Options related to capturing publications, endpoints, or federates"); capture_group ->add_option( diff --git a/src/helics/apps/Recorder.hpp b/src/helics/apps/Recorder.hpp index 1c29dcf038..53fa18e165 100644 --- a/src/helics/apps/Recorder.hpp +++ b/src/helics/apps/Recorder.hpp @@ -54,9 +54,9 @@ namespace apps { Recorder(const std::string& name, CoreApp& core, const FederateInfo& fi); /**constructor taking a file with the required information @param name the name of the app - @param file a file defining the federate information in JSon or text + @param jsonString a file or JSON string defining the federate information in JSON */ - Recorder(const std::string& name, const std::string& file); + Recorder(const std::string& name, const std::string& jsonString); /** move construction*/ Recorder(Recorder&& other_recorder) = default; /** move assignment*/ @@ -110,8 +110,7 @@ namespace apps { void generateInterfaces(); void captureForCurrentTime(Time currentTime, int iteration = 0); void loadCaptureInterfaces(); - /** encode the string in base64 if needed otherwise just return the string*/ - std::string encode(const std::string& str2encode); + /** build the command line argument processing application*/ std::shared_ptr buildArgParserApp(); /** process remaining command line arguments*/ diff --git a/src/helics/apps/Tracer.cpp b/src/helics/apps/Tracer.cpp index ffd9730c81..66adffce0a 100644 --- a/src/helics/apps/Tracer.cpp +++ b/src/helics/apps/Tracer.cpp @@ -13,7 +13,6 @@ SPDX-License-Identifier: BSD-3-Clause #include "../application_api/queryFunctions.hpp" #include "../common/JsonProcessingFunctions.hpp" #include "../common/fmt_format.h" -#include "../common/loggerCore.hpp" #include "../core/helicsCLI11.hpp" #include "../core/helicsVersion.hpp" #include "PrecHelper.hpp" @@ -24,6 +23,7 @@ SPDX-License-Identifier: BSD-3-Clause #include #include #include +#include #include #include #include @@ -239,7 +239,6 @@ namespace apps { void Tracer::captureForCurrentTime(Time currentTime, int iteration) { - static auto logger = LoggerManager::getLoggerCore(); for (auto& sub : subscriptions) { if (sub.isUpdated()) { auto val = sub.getValue(); @@ -271,7 +270,7 @@ namespace apps { if (skiplog) { std::cout << valstr << '\n'; } else { - logger->addMessage(std::move(valstr)); + spdlog::info(valstr); } } if (valueCallback) { @@ -301,7 +300,7 @@ namespace apps { if (skiplog) { std::cout << messstr << '\n'; } else { - logger->addMessage(std::move(messstr)); + spdlog::info(messstr); } } if (endpointMessageCallback) { @@ -332,7 +331,7 @@ namespace apps { if (skiplog) { std::cout << messstr << '\n'; } else { - logger->addMessage(std::move(messstr)); + spdlog::info(messstr); } } if (clonedMessageCallback) { @@ -443,7 +442,7 @@ namespace apps { ->ignore_underscore(); app->add_flag("--print", printMessage, "print messages to the screen"); app->add_flag("--skiplog", skiplog, "print messages to the screen through cout"); - auto clone_group = app->add_option_group( + auto* clone_group = app->add_option_group( "cloning", "Options related to endpoint cloning operations and specifications"); clone_group->add_option("--clone", "existing endpoints to clone all packets to and from") ->each([this](const std::string& clone) { @@ -472,7 +471,7 @@ namespace apps { ->ignore_underscore() ->type_size(-1); - auto capture_group = app->add_option_group( + auto* capture_group = app->add_option_group( "capture_group", "Options related to capturing publications, endpoints, or federates"); capture_group ->add_option( diff --git a/src/helics/apps/TypedBrokerServer.cpp b/src/helics/apps/TypedBrokerServer.cpp index 26af355874..47130c0c28 100644 --- a/src/helics/apps/TypedBrokerServer.cpp +++ b/src/helics/apps/TypedBrokerServer.cpp @@ -7,10 +7,10 @@ SPDX-License-Identifier: BSD-3-Clause #include "TypedBrokerServer.hpp" -#include "../common/loggerCore.hpp" #include "../core/ActionMessage.hpp" #include "../core/BrokerFactory.hpp" #include "../network/NetworkBrokerData.hpp" +#include "spdlog/spdlog.h" #include @@ -125,9 +125,6 @@ namespace apps { } } - void TypedBrokerServer::logMessage(std::string message) - { - LoggerManager::logMessage(std::move(message)); - } + void TypedBrokerServer::logMessage(const std::string& message) { spdlog::info(message); } } // namespace apps } // namespace helics diff --git a/src/helics/apps/TypedBrokerServer.hpp b/src/helics/apps/TypedBrokerServer.hpp index 991bbe21ce..59c6b1f228 100644 --- a/src/helics/apps/TypedBrokerServer.hpp +++ b/src/helics/apps/TypedBrokerServer.hpp @@ -38,7 +38,7 @@ namespace apps { /* assign a port in the portData structure*/ static void assignPort(portData& pd, int pnumber, std::shared_ptr& brk); /* log a message to the console */ - static void logMessage(std::string message); + static void logMessage(const std::string& message); }; } // namespace apps } // namespace helics diff --git a/src/helics/apps/appMain.cpp b/src/helics/apps/appMain.cpp index f9477c3a70..d1fc3a738d 100644 --- a/src/helics/apps/appMain.cpp +++ b/src/helics/apps/appMain.cpp @@ -6,7 +6,6 @@ SPDX-License-Identifier: BSD-3-Clause */ #include "../application_api/BrokerApp.hpp" -#include "../common/loggerCore.hpp" #include "../core/core-exceptions.hpp" #include "../core/helicsCLI11.hpp" #include "Clone.hpp" @@ -17,6 +16,7 @@ SPDX-License-Identifier: BSD-3-Clause #include "Tracer.hpp" #include +#include static const std::vector helpArgs{"-?"}; int main(int argc, char* argv[]) @@ -111,7 +111,6 @@ int main(int argc, char* argv[]) app.footer( "helics_app [SUBCOMMAND] --help will display the options for a particular subcommand"); auto ret = app.helics_parse(argc, argv); - helics::LoggerManager::getLoggerCore()->addMessage("!!>flush"); helics::cleanupHelicsLibrary(); diff --git a/src/helics/apps/helicsWebServer.cpp b/src/helics/apps/helicsWebServer.cpp index 2cb9e933d7..e3cd5b6dd3 100644 --- a/src/helics/apps/helicsWebServer.cpp +++ b/src/helics/apps/helicsWebServer.cpp @@ -25,6 +25,7 @@ SPDX-License-Identifier: BSD-3-Clause #include "../common/JsonProcessingFunctions.hpp" #include "../core/BrokerFactory.hpp" #include "../core/coreTypeOperations.hpp" +#include "../utilities/timeStringOps.hpp" #include #include @@ -134,6 +135,8 @@ static std::pair getValidBroker() +{ + auto brks = helics::BrokerFactory::getAllBrokers(); + for (auto& brk : brks) { + if (brk->isConnected()) { + return brk; + } + } + return nullptr; +} + enum class return_val : std::int32_t { ok = 0, bad_request = static_cast(http::status::bad_request), @@ -208,7 +223,7 @@ enum class return_val : std::int32_t { not_implemented = static_cast(http::status::not_implemented) }; -enum class cmd { query, create, remove, unknown }; +enum class cmd { query, create, remove, barrier, clear_barrier, unknown }; std::pair generateResults(cmd command, @@ -227,6 +242,12 @@ std::pair if (cmdstr == "create") { command = cmd::create; } + if (cmdstr == "barrier") { + command = cmd::barrier; + } + if (cmdstr == "clearbarrier") { + command = cmd::clear_barrier; + } if (cmdstr == "delete" || cmdstr == "remove") { command = cmd::remove; } @@ -238,9 +259,23 @@ std::pair if (command == cmd::create && brokerName == "create") { brokerName.clear(); } + if (command == cmd::create && brokerName == "barrier") { + brokerName.clear(); + command = cmd::barrier; + } + if (command == cmd::create && target == "barrier") { + command = cmd::barrier; + } if (command == cmd::remove && (brokerName == "delete" || brokerName == "remove")) { brokerName.clear(); } + if (command == cmd::remove && brokerName == "barrier") { + brokerName.clear(); + command = cmd::clear_barrier; + } + if (command == cmd::remove && target == "barrier") { + command = cmd::clear_barrier; + } if (command == cmd::query && (brokerName == "query" || brokerName == "search")) { brokerName.clear(); } @@ -271,75 +306,112 @@ std::pair } std::shared_ptr brkr = helics::BrokerFactory::findBroker((!brokerName.empty()) ? brokerName : target.to_string()); - if (command == cmd::create) { - if (brkr) { - return {return_val::bad_request, brokerName + " already exists"}; - } - std::string start_args; - std::string type; - if (fields.find("args") != fields.end()) { - start_args = fields.at("args"); - } - if (fields.find("type") != fields.end()) { - type = fields.at("type"); - } else if (fields.find("core_type") != fields.end()) { - type = fields.at("core_type"); - } - helics::core_type ctype{helics::core_type::DEFAULT}; - if (!type.empty()) { - ctype = helics::core::coreTypeFromString(type); - if (!helics::core::isCoreTypeAvailable(ctype)) { - // return send(bad_request(type + " is not available")); - return {return_val::bad_request, type + " is not available"}; + if (!brkr) { + if (fields.find("broker") != fields.end()) { + if (query.empty()) { + query = target; + target = brokerName; + } else if (target.empty()) { + target = brokerName; } + brkr = helics::BrokerFactory::findBroker(fields.at("broker")); } - if (fields.find("num_feds") != fields.end()) { - start_args += " -f " + fields.at("num_feds"); - } - if (fields.find("num_brokers") != fields.end()) { - start_args += " --minbrokers=" + fields.at("num_brokers"); - } - bool useUuid{false}; - if (brokerName.empty()) { - boost::uuids::random_generator generator; - - boost::uuids::uuid uuid1 = generator(); - std::ostringstream ss1; - ss1 << uuid1; - brokerName = ss1.str(); - useUuid = true; - } - brkr = helics::BrokerFactory::create(ctype, brokerName, start_args); - if (!brkr) { - return {return_val::bad_request, "unable to create broker"}; - // return send(bad_request("unable to create broker")); - } - if (useUuid) { - return {return_val::ok, std::string(R"({"broker_uuid":")") + brokerName + "\"}"}; - } - return {return_val::ok, emptyString}; } - if (command == cmd::remove) { - if (!brkr) { - return {return_val::not_found, brokerName + " not found"}; + switch (command) { + case cmd::create: { + if (brkr) { + return {return_val::bad_request, brokerName + " already exists"}; + } + std::string start_args; + std::string type; + if (fields.find("args") != fields.end()) { + start_args = fields.at("args"); + } + if (fields.find("type") != fields.end()) { + type = fields.at("type"); + } else if (fields.find("core_type") != fields.end()) { + type = fields.at("core_type"); + } + helics::core_type ctype{helics::core_type::DEFAULT}; + if (!type.empty()) { + ctype = helics::core::coreTypeFromString(type); + if (!helics::core::isCoreTypeAvailable(ctype)) { + // return send(bad_request(type + " is not available")); + return {return_val::bad_request, type + " is not available"}; + } + } + if (fields.find("num_feds") != fields.end()) { + start_args += " -f " + fields.at("num_feds"); + } + if (fields.find("num_brokers") != fields.end()) { + start_args += " --minbrokers=" + fields.at("num_brokers"); + } + bool useUuid{false}; + if (brokerName.empty()) { + boost::uuids::random_generator generator; + + boost::uuids::uuid uuid1 = generator(); + std::ostringstream ss1; + ss1 << uuid1; + brokerName = ss1.str(); + useUuid = true; + } + brkr = helics::BrokerFactory::create(ctype, brokerName, start_args); + if (!brkr) { + return {return_val::bad_request, "unable to create broker"}; + // return send(bad_request("unable to create broker")); + } + if (useUuid) { + return {return_val::ok, std::string(R"({"broker_uuid":")") + brokerName + "\"}"}; + } + return {return_val::ok, emptyString}; } - brkr->disconnect(); - return {return_val::ok, emptyString}; - } + case cmd::remove: + if (!brkr) { + return {return_val::not_found, brokerName + " not found"}; + } + brkr->disconnect(); + return {return_val::ok, emptyString}; + case cmd::barrier: { + if (!brkr) { + brkr = getValidBroker(); + if (!brkr) { + return {return_val::bad_request, "unable to locate broker"}; + } + } + if (fields.find("time") == fields.end()) { + brkr->clearTimeBarrier(); + return {return_val::ok, emptyString}; + } + auto bTime = gmlc::utilities::loadTimeFromString(fields.at("time")); + if (bTime >= helics::timeZero) { + brkr->setTimeBarrier(bTime); + } else { + brkr->clearTimeBarrier(); + } + return {return_val::ok, emptyString}; + } + case cmd::clear_barrier: + if (!brkr) { + brkr = getValidBroker(); + if (!brkr) { + return {return_val::bad_request, "unable to locate broker"}; + } + } + brkr->clearTimeBarrier(); + return {return_val::ok, emptyString}; + default: + break; + } // end switch bool autoquery{false}; if (!brkr) { - auto brks = helics::BrokerFactory::getAllBrokers(); - for (auto& brk : brks) { - if (brk->isConnected()) { - brkr = brk; - } - } - query = target; - target = brokerName; + brkr = getValidBroker(); if (!brkr) { return {return_val::not_found, brokerName + " not found"}; } + query = target; + target = brokerName; } else if (query.empty() && !target.empty()) { query = target; autoquery = true; diff --git a/src/helics/common/CMakeLists.txt b/src/helics/common/CMakeLists.txt index 3119fb14a7..851a444473 100644 --- a/src/helics/common/CMakeLists.txt +++ b/src/helics/common/CMakeLists.txt @@ -11,8 +11,6 @@ set(common_headers JsonProcessingFunctions.hpp JsonBuilder.hpp TomlProcessingFunctions.hpp - logger.h - loggerCore.hpp GuardedTypes.hpp fmt_format.h fmt_ostream.h @@ -20,18 +18,12 @@ set(common_headers configFileHelpers.hpp ) -set(common_sources - JsonProcessingFunctions.cpp - JsonBuilder.cpp - TomlProcessingFunctions.cpp - logger.cpp - loggerCore.cpp - configFileHelpers.cpp - addTargets.cpp +set(common_sources JsonProcessingFunctions.cpp JsonBuilder.cpp TomlProcessingFunctions.cpp + configFileHelpers.cpp addTargets.cpp ) # headers that are part of the public interface -set(helics_public_common JsonProcessingFunctions.hpp AsioContextManager.h logger.h GuardedTypes.hpp) +set(helics_public_common JsonProcessingFunctions.hpp AsioContextManager.h GuardedTypes.hpp) if(NOT HELICS_DISABLE_ASIO) list(APPEND common_headers AsioContextManager.h) diff --git a/src/helics/common/JsonProcessingFunctions.cpp b/src/helics/common/JsonProcessingFunctions.cpp index a7c52ad906..f32cd5177b 100644 --- a/src/helics/common/JsonProcessingFunctions.cpp +++ b/src/helics/common/JsonProcessingFunctions.cpp @@ -64,22 +64,25 @@ Json::Value loadJsonStr(const std::string& jsonString) helics::Time loadJsonTime(const Json::Value& timeElement, time_units defaultUnits) { if (timeElement.isObject()) { + if (timeElement.isMember("unit")) { + defaultUnits = gmlc::utilities::timeUnitsFromString(timeElement["unit"].asString()); + } if (timeElement.isMember("units")) { defaultUnits = gmlc::utilities::timeUnitsFromString(timeElement["units"].asString()); } if (timeElement.isMember("value")) { if (timeElement["value"].isInt64()) { - return helics::Time(timeElement["value"].asInt64(), defaultUnits); + return {timeElement["value"].asInt64(), defaultUnits}; } - return helics::Time(timeElement["value"].asDouble() * toSecondMultiplier(defaultUnits)); + return {timeElement["value"].asDouble() * toSecondMultiplier(defaultUnits)}; } return helics::Time::minVal(); } if (timeElement.isInt64()) { - return helics::Time(timeElement.asInt64(), defaultUnits); + return {timeElement.asInt64(), defaultUnits}; } if (timeElement.isDouble()) { - return helics::Time(timeElement.asDouble() * toSecondMultiplier(defaultUnits)); + return {timeElement.asDouble() * toSecondMultiplier(defaultUnits)}; } return gmlc::utilities::loadTimeFromString(timeElement.asString()); } diff --git a/src/helics/common/TomlProcessingFunctions.cpp b/src/helics/common/TomlProcessingFunctions.cpp index 853909ad64..a5e458e80d 100644 --- a/src/helics/common/TomlProcessingFunctions.cpp +++ b/src/helics/common/TomlProcessingFunctions.cpp @@ -60,7 +60,11 @@ static const std::string emptyString; helics::Time loadTomlTime(const toml::value& timeElement, time_units defaultUnits) { if (timeElement.is_table()) { - auto& units = toml::find_or(timeElement, "units", emptyString); + const auto& unit = toml::find_or(timeElement, "unit", emptyString); + if (!unit.empty()) { + defaultUnits = gmlc::utilities::timeUnitsFromString(unit); + } + const auto& units = toml::find_or(timeElement, "units", emptyString); if (!units.empty()) { defaultUnits = gmlc::utilities::timeUnitsFromString(units); } diff --git a/src/helics/core/ActionMessageDefintions.hpp b/src/helics/core/ActionMessageDefintions.hpp index 8a2fe5eec8..27cfd99d25 100644 --- a/src/helics/core/ActionMessageDefintions.hpp +++ b/src/helics/core/ActionMessageDefintions.hpp @@ -114,6 +114,7 @@ across different compilers*/ cmd_core_configure = 207, //!< command to update the configuration of a core cmd_interface_configure = 209, //!< command to update the configuration of an interface cmd_broker_configure = 211, //!< command to update the configuration of a broker + cmd_base_configure = 213, //!< command to update the configuration of a broker/core base cmd_update_filter_op = 10427, //!< command to update a filter op [should only used internal to a core] @@ -304,6 +305,7 @@ across different compilers*/ #define CMD_CORE_CONFIGURE action_message_def::action_t::cmd_core_configure #define CMD_BROKER_CONFIGURE action_message_def::action_t::cmd_broker_configure +#define CMD_BASE_CONFIGURE action_message_def::action_t::cmd_base_configure #define CMD_ACK action_message_def::action_t::cmd_ack #define CMD_PRIORITY_ACK action_message_def::action_t::cmd_priority_ack @@ -352,8 +354,8 @@ across different compilers*/ const char* actionMessageType(action_message_def::action_t action); enum cmd_error_codes : int { - connection_error_code = -2, lost_server_connection_code = -5, + connection_error_code = -2, already_init_error_code = 5, duplicate_federate_name_error_code = 6, duplicate_broker_name_error_code = 7, diff --git a/src/helics/core/Broker.hpp b/src/helics/core/Broker.hpp index 4f434a4f53..1ae9c846d8 100644 --- a/src/helics/core/Broker.hpp +++ b/src/helics/core/Broker.hpp @@ -6,6 +6,8 @@ SPDX-License-Identifier: BSD-3-Clause */ #pragma once +#include "helics-time.hpp" + #include #include #include @@ -122,5 +124,11 @@ class Broker { @param target the name of the source target*/ virtual void addDestinationFilterToEndpoint(const std::string& filter, const std::string& target) = 0; + + /** update a time barrier with a new time*/ + virtual void setTimeBarrier(Time barrierTime) = 0; + + /** update a time barrier with a new time*/ + virtual void clearTimeBarrier() = 0; }; } // namespace helics diff --git a/src/helics/core/BrokerBase.cpp b/src/helics/core/BrokerBase.cpp index 5ba5563fc1..e095e22109 100644 --- a/src/helics/core/BrokerBase.cpp +++ b/src/helics/core/BrokerBase.cpp @@ -8,7 +8,6 @@ SPDX-License-Identifier: BSD-3-Clause #include "BrokerBase.hpp" #include "../common/fmt_format.h" -#include "../common/logger.h" #include "ForwardingTimeCoordinator.hpp" #include "flagOperations.hpp" #include "gmlc/libguarded/guarded.hpp" @@ -16,6 +15,13 @@ SPDX-License-Identifier: BSD-3-Clause #include "helics/core/helicsCLI11JsonConfig.hpp" #include "helicsCLI11.hpp" #include "loggingHelper.hpp" +#include "spdlog/sinks/basic_file_sink.h" +#include "spdlog/sinks/stdout_color_sinks.h" +#include "spdlog/spdlog.h" +#if !defined(WIN32) +# include "spdlog/sinks/syslog_sink.h" +#endif + #ifndef HELICS_DISABLE_ASIO # include "../common/AsioContextManager.h" @@ -60,9 +66,9 @@ BrokerBase::BrokerBase(const std::string& broker_name, bool DisableQueue): BrokerBase::~BrokerBase() { - if (loggingObj) { - loggingObj->closeFile(); - loggingObj->haltLogging(); + consoleLogger.reset(); + if (fileLogger) { + spdlog::drop(identifier); } if (!queueDisabled) { try { @@ -145,9 +151,14 @@ std::shared_ptr BrokerBase::generateBaseCLI() "specify that a broker should cause the federation to terminate on an error"); auto* logging_group = hApp->add_option_group("logging", "Options related to file and message logging"); - logging_group->add_flag("--force_logging_flush", - forceLoggingFlush, - "flush the log after every message"); + logging_group->add_flag_function( + "--force_logging_flush", + [this](int64_t val) { + if (val > 0) { + forceLoggingFlush = true; + } + }, + "flush the log after every message"); logging_group->add_option("--logfile", logFile, "the file to log the messages to"); logging_group ->add_option_function( @@ -207,6 +218,37 @@ std::shared_ptr BrokerBase::generateBaseCLI() return hApp; } +void BrokerBase::generateLoggers() +{ + try { + consoleLogger = spdlog::get("console"); + if (!consoleLogger) { + try { + consoleLogger = spdlog::stdout_color_mt("console"); + consoleLogger->flush_on(spdlog::level::info); + consoleLogger->set_level(spdlog::level::trace); + } + catch (const spdlog::spdlog_ex&) { + consoleLogger = spdlog::get("console"); + } + } + if (logFile == "syslog") { +#if !defined(WIN32) + fileLogger = spdlog::syslog_logger_mt("syslog", identifier); +#endif + } else if (!logFile.empty()) { + fileLogger = spdlog::basic_logger_mt(identifier, logFile); + } + if (fileLogger) { + fileLogger->flush_on(spdlog::level::info); + fileLogger->set_level(spdlog::level::trace); + } + } + catch (const spdlog::spdlog_ex& ex) { + std::cerr << "Log init failed in " << identifier << " : " << ex.what() << std::endl; + } +} + int BrokerBase::parseArgs(int argc, char* argv[]) { auto app = generateBaseCLI(); @@ -256,11 +298,8 @@ void BrokerBase::configureBase() timeCoord->setMessageSender([this](const ActionMessage& msg) { addActionMessage(msg); }); timeCoord->restrictive_time_policy = restrictive_time_policy; - loggingObj = std::make_unique(); - if (!logFile.empty()) { - loggingObj->openFile(logFile); - } - loggingObj->startLogging(maxLogLevel, maxLogLevel); + generateLoggers(); + mainLoopIsRunning.store(true); queueProcessingThread = std::thread(&BrokerBase::queueProcessingLoop, this); brokerState = broker_state_t::configured; @@ -271,18 +310,77 @@ bool BrokerBase::sendToLogger(global_federate_id federateID, const std::string& name, const std::string& message) const { + bool alwaysLog{false}; + if (logLevel > log_level::fed - 100) { + logLevel -= static_cast(log_level::fed); + alwaysLog = true; + } if ((federateID == parent_broker_id) || (federateID == global_id.load())) { - if (logLevel > maxLogLevel) { + if (logLevel > maxLogLevel && !alwaysLog) { // check the logging level return true; } if (loggerFunction) { loggerFunction(logLevel, fmt::format("{} ({})", name, federateID.baseValue()), message); - } else if (loggingObj) { - loggingObj->log(logLevel, - fmt::format("{} ({})::{}", name, federateID.baseValue(), message)); - if (forceLoggingFlush) { - loggingObj->flush(); + } else { + if (consoleLogLevel >= logLevel || alwaysLog) { + if (logLevel >= helics_log_level_trace) { + consoleLogger->log( + spdlog::level::trace, "{} ({})::{}", name, federateID.baseValue(), message); + } else if (logLevel >= helics_log_level_timing) { + consoleLogger->log( + spdlog::level::debug, "{} ({})::{}", name, federateID.baseValue(), message); + } else if (logLevel >= helics_log_level_summary) { + consoleLogger->log( + spdlog::level::info, "{} ({})::{}", name, federateID.baseValue(), message); + } else if (logLevel >= helics_log_level_warning) { + consoleLogger->log( + spdlog::level::warn, "{} ({})::{}", name, federateID.baseValue(), message); + } else if (logLevel >= helics_log_level_error) { + consoleLogger->log( + spdlog::level::err, "{} ({})::{}", name, federateID.baseValue(), message); + } else if (logLevel == -10) { // dumplog + consoleLogger->log(spdlog::level::trace, "{}", message); + } else { + consoleLogger->log(spdlog::level::critical, + "{} ({})::{}", + name, + federateID.baseValue(), + message); + } + if (forceLoggingFlush) { + consoleLogger->flush(); + } + } + if (fileLogger && (logLevel <= fileLogLevel || alwaysLog)) { + if (logLevel >= helics_log_level_trace) { + fileLogger->log( + spdlog::level::trace, "{} ({})::{}", name, federateID.baseValue(), message); + } else if (logLevel >= helics_log_level_timing) { + fileLogger->log( + spdlog::level::debug, "{} ({})::{}", name, federateID.baseValue(), message); + } else if (logLevel >= helics_log_level_summary) { + fileLogger->log( + spdlog::level::info, "{} ({})::{}", name, federateID.baseValue(), message); + } else if (logLevel >= helics_log_level_warning) { + fileLogger->log( + spdlog::level::warn, "{} ({})::{}", name, federateID.baseValue(), message); + } else if (logLevel >= helics_log_level_error) { + fileLogger->log( + spdlog::level::err, "{} ({})::{}", name, federateID.baseValue(), message); + } else if (logLevel == -10) { // dumplog + fileLogger->log(spdlog::level::trace, message); + } else { + fileLogger->log(spdlog::level::critical, + "{} ({})::{}", + name, + federateID.baseValue(), + message); + } + + if (forceLoggingFlush) { + fileLogger->flush(); + } } } return true; @@ -316,15 +414,16 @@ void BrokerBase::setErrorState(int eCode, const std::string& estring) void BrokerBase::setLoggingFile(const std::string& lfile) { - if (loggingObj) { - if (loggingObj->isRunning()) { - loggingObj->haltLogging(); - logFile = lfile; - loggingObj->openFile(logFile); - loggingObj->startLogging(); - } - } else { + if (logFile.empty() || lfile != logFile) { logFile = lfile; + if (!logFile.empty()) { + fileLogger = spdlog::basic_logger_mt(identifier, logFile); + } else { + if (fileLogger) { + spdlog::drop(identifier); + fileLogger.reset(); + } + } } } @@ -332,15 +431,6 @@ void BrokerBase::setLoggerFunction( std::function logFunction) { loggerFunction = std::move(logFunction); - if (loggerFunction) { - if (loggingObj) { - if (loggingObj->isRunning()) { - loggingObj->haltLogging(); - } - } - } else if (!loggingObj->isRunning()) { - loggingObj->startLogging(); - } } void BrokerBase::setLogLevel(int32_t level) @@ -348,6 +438,15 @@ void BrokerBase::setLogLevel(int32_t level) setLogLevels(level, level); } +void BrokerBase::logFlush() +{ + if (consoleLogger) { + consoleLogger->flush(); + } + if (fileLogger) { + fileLogger->flush(); + } +} /** set the logging levels @param consoleLevel the logging level for the console display @param fileLevel the logging level for the log file @@ -357,9 +456,6 @@ void BrokerBase::setLogLevels(int32_t consoleLevel, int32_t fileLevel) consoleLogLevel = consoleLevel; fileLogLevel = fileLevel; maxLogLevel = (std::max)(consoleLogLevel, fileLogLevel); - if (loggingObj) { - loggingObj->changeLevels(consoleLogLevel, fileLogLevel); - } } void BrokerBase::addActionMessage(const ActionMessage& m) @@ -474,7 +570,10 @@ void BrokerBase::queueProcessingLoop() } auto timerStop = [&, this]() { if (!haltTimer(active, ticktimer)) { - LOG_WARNING(global_broker_id_local, identifier, "timer unable to cancel properly"); + sendToLogger(global_broker_id_local, + log_level::warning, + identifier, + "timer unable to cancel properly"); } contextLoop = nullptr; }; @@ -485,7 +584,7 @@ void BrokerBase::queueProcessingLoop() global_broker_id_local = global_id.load(); int messagesSinceLastTick = 0; auto logDump = [&, this]() { - if (dumplog) { + if (!dumpMessages.empty()) { for (auto& act : dumpMessages) { sendToLogger(parent_broker_id, -10, @@ -591,6 +690,9 @@ void BrokerBase::queueProcessingLoop() } processCommand(std::move(command)); break; + case CMD_BASE_CONFIGURE: + baseConfigure(command); + break; case CMD_IGNORE: default: break; @@ -634,6 +736,22 @@ void BrokerBase::queueProcessingLoop() } } +void BrokerBase::baseConfigure(ActionMessage& command) +{ + if (command.action() == CMD_BASE_CONFIGURE) { + switch (command.messageID) { + case helics_flag_dumplog: + dumplog = checkActionFlag(command, indicator_flag); + break; + case helics_flag_force_logging_flush: + forceLoggingFlush = checkActionFlag(command, indicator_flag); + break; + default: + break; + } + } +} + action_message_def::action_t BrokerBase::commandProcessor(ActionMessage& command) { switch (command.action()) { @@ -642,6 +760,7 @@ action_message_def::action_t BrokerBase::commandProcessor(ActionMessage& command case CMD_TERMINATE_IMMEDIATELY: case CMD_STOP: case CMD_TICK: + case CMD_BASE_CONFIGURE: case CMD_PING: case CMD_ERROR_CHECK: return command.action(); diff --git a/src/helics/core/BrokerBase.hpp b/src/helics/core/BrokerBase.hpp index 44fa9f0244..cab97f7b40 100644 --- a/src/helics/core/BrokerBase.hpp +++ b/src/helics/core/BrokerBase.hpp @@ -21,8 +21,10 @@ and some common methods used cores and brokers #include #include +namespace spdlog { +class logger; +} namespace helics { -class Logger; class ForwardingTimeCoordinator; class helicsCLI11App; /** base class for broker like objects @@ -54,8 +56,10 @@ class BrokerBase { // consistent public interface for extracting it this variable may need to be updated in a // constant function mutable std::string address; //!< network location of the broker - std::unique_ptr - loggingObj; //!< default logging object to use if the logging callback is not specified + std::shared_ptr + consoleLogger; //!< default logging object to use if the logging callback is not specified + std::shared_ptr + fileLogger; //!< default logging object to use if the logging callback is not specified std::thread queueProcessingThread; //!< thread for running the broker /** a logging function for logging or printing messages*/ std::function loggerFunction; @@ -70,7 +74,7 @@ class BrokerBase { std::atomic mainLoopIsRunning{ false}; //!< flag indicating that the main processing loop is running bool dumplog{false}; //!< flag indicating the broker should capture a dump log - bool forceLoggingFlush{false}; //!< force the log to flush after every message + std::atomic forceLoggingFlush{false}; //!< force the log to flush after every message bool queueDisabled{ false}; //!< flag indicating that the message queue should not be used and all functions //!< called directly instead of distinct thread @@ -146,7 +150,8 @@ class BrokerBase { */ void setLoggerFunction( std::function logFunction); - + /** flush the loggers*/ + void logFlush(); /** check if the main processing loop of a broker is running*/ bool isRunning() const { return mainLoopIsRunning.load(); } /** set the logging level */ @@ -168,6 +173,10 @@ class BrokerBase { /** Generate the base CLI processor*/ std::shared_ptr generateBaseCLI(); + /** generate the loggers for the broker*/ + void generateLoggers(); + /** handle some configuration options for the base*/ + void baseConfigure(ActionMessage& command); protected: /** process a disconnect signal*/ diff --git a/src/helics/core/CMakeLists.txt b/src/helics/core/CMakeLists.txt index 038fce388c..0b979fc23c 100644 --- a/src/helics/core/CMakeLists.txt +++ b/src/helics/core/CMakeLists.txt @@ -87,7 +87,9 @@ endif() add_library(helics_core STATIC ${SRC_FILES} ${INCLUDE_FILES} ${PUBLIC_INCLUDE_FILES}) -target_link_libraries(helics_core PUBLIC helics_common PRIVATE fmt::fmt compile_flags_target) +target_link_libraries( + helics_core PUBLIC helics_common PRIVATE spdlog::spdlog fmt::fmt compile_flags_target +) add_library(HELICS::core ALIAS helics_core) diff --git a/src/helics/core/CommonCore.cpp b/src/helics/core/CommonCore.cpp index ce0d742083..794993c699 100644 --- a/src/helics/core/CommonCore.cpp +++ b/src/helics/core/CommonCore.cpp @@ -8,7 +8,6 @@ SPDX-License-Identifier: BSD-3-Clause #include "../common/JsonProcessingFunctions.hpp" #include "../common/fmt_format.h" -#include "../common/logger.h" #include "ActionMessage.hpp" #include "BasicHandleInfo.hpp" #include "CoreFactory.hpp" @@ -557,6 +556,7 @@ local_federate_id CommonCore::registerFederate(const std::string& name, throw(RegistrationFailure("Core has already moved to operating state")); } FederateState* fed = nullptr; + bool checkProperties{false}; local_federate_id local_id; { auto feds = federates.lock(); @@ -568,6 +568,9 @@ local_federate_id CommonCore::registerFederate(const std::string& name, throw(RegistrationFailure("duplicate names " + name + "detected multiple federates with the same name")); } + if (feds->size() == 1) { + checkProperties = true; + } } if (fed == nullptr) { throw(RegistrationFailure("unknown allocation error occurred")); @@ -576,8 +579,8 @@ local_federate_id CommonCore::registerFederate(const std::string& name, // auto ptr = fed.get(); // if we are using the Logger, log all messages coming from the federates so they can control // the level*/ - fed->setLogger([this](int /*level*/, const std::string& ident, const std::string& message) { - sendToLogger(parent_broker_id, log_level::error - 2, ident, message); + fed->setLogger([this](int level, const std::string& ident, const std::string& message) { + sendToLogger(parent_broker_id, log_level::fed + level, ident, message); }); fed->local_id = local_id; @@ -586,6 +589,22 @@ local_federate_id CommonCore::registerFederate(const std::string& name, ActionMessage m(CMD_REG_FED); m.name = name; addActionMessage(m); + // check some properties that should be inherited from the federate if it is the first one + if (checkProperties) { + // if this is the first federate then the core should inherit the logging level properties + for (const auto& prop : info.intProps) { + switch (prop.first) { + case defs::properties::log_level: + case defs::properties::file_log_level: + case defs::properties::console_log_level: + setIntegerProperty(local_core_id, + prop.first, + static_cast(prop.second)); + default: + break; + } + } + } // now wait for the federateQueue to get the response auto valid = fed->waitSetup(); if (valid == iteration_result::next_step) { @@ -773,6 +792,14 @@ int16_t CommonCore::getIntegerProperty(local_federate_id federateID, int32_t pro void CommonCore::setFlagOption(local_federate_id federateID, int32_t flag, bool flagValue) { + if (flag == defs::flags::dumplog || flag == defs::flags::force_logging_flush) { + ActionMessage cmd(CMD_BASE_CONFIGURE); + cmd.messageID = flag; + if (flagValue) { + setActionFlag(cmd, indicator_flag); + } + addActionMessage(cmd); + } if (federateID == local_core_id) { if (flag == defs::flags::delay_init_entry) { if (flagValue) { @@ -1216,10 +1243,11 @@ void CommonCore::setValue(interface_handle handle, const char* data, uint64_t le } auto* fed = getFederateAt(handleInfo->local_fed_id); if (fed->checkAndSetValue(handle, data, len)) { - LOG_DATA_MESSAGES(parent_broker_id, - fed->getIdentifier(), - fmt::format("setting Value for {} size {}", handleInfo->key, len)); - + if (fed->loggingLevel() >= helics_log_level_data) { + fed->logMessage(helics_log_level_data, + fed->getIdentifier(), + fmt::format("setting value for {} size {}", handleInfo->key, len)); + } auto subs = fed->getSubscribers(handle); if (subs.empty()) { return; @@ -1598,10 +1626,17 @@ void CommonCore::sendMessage(interface_handle sourceHandle, std::unique_ptrlocal_fed_id)->nextAllowedSendTime(); + auto* fed = getFederateAt(hndl->local_fed_id); + auto minTime = fed->nextAllowedSendTime(); if (m.actionTime < minTime) { m.actionTime = minTime; } + + if (fed->loggingLevel() >= helics_log_level_data) { + fed->logMessage(helics_log_level_data, + "", + fmt::format("receive_message {}", prettyPrintString(m))); + } addActionMessage(std::move(m)); } @@ -2632,6 +2667,16 @@ void CommonCore::sendErrorToFederates(int error_code, const std::string& message }); } +void CommonCore::broadcastToFederates(ActionMessage& cmd) +{ + loopFederates.apply([&cmd](auto& fed) { + if ((fed) && (fed.state == operation_state::operating)) { + cmd.dest_id = fed->global_id; + fed->addAction(cmd); + } + }); +} + void CommonCore::transmitDelayedMessages(global_federate_id source) { std::vector buffer; @@ -2705,6 +2750,10 @@ void CommonCore::processCommand(ActionMessage&& command) } } break; + case CMD_TIME_BARRIER: + case CMD_TIME_BARRIER_CLEAR: + broadcastToFederates(command); + break; case CMD_CHECK_CONNECTIONS: { auto res = checkAndProcessDisconnect(); auto pred = [](const auto& fed) { diff --git a/src/helics/core/CommonCore.hpp b/src/helics/core/CommonCore.hpp index 009a04c0fd..ecbb7a0c1f 100644 --- a/src/helics/core/CommonCore.hpp +++ b/src/helics/core/CommonCore.hpp @@ -480,6 +480,8 @@ class CommonCore: public Core, public BrokerBase { bool checkAndProcessDisconnect(); /** send a disconnect message to time dependencies and child federates*/ void sendDisconnect(); + /** broadcast a message to all federates*/ + void broadcastToFederates(ActionMessage& cmd); friend class TimeoutMonitor; }; diff --git a/src/helics/core/CoreBroker.cpp b/src/helics/core/CoreBroker.cpp index 62d707faa4..ce9e3b1a83 100644 --- a/src/helics/core/CoreBroker.cpp +++ b/src/helics/core/CoreBroker.cpp @@ -9,7 +9,6 @@ SPDX-License-Identifier: BSD-3-Clause #include "../common/JsonProcessingFunctions.hpp" #include "../common/fmt_format.h" -#include "../common/logger.h" #include "BrokerFactory.hpp" #include "ForwardingTimeCoordinator.hpp" #include "TimeoutMonitor.h" @@ -642,6 +641,22 @@ std::string CoreBroker::generateFederationSummary() const return output; } +void CoreBroker::generateTimeBarrier(ActionMessage& m) +{ + if (checkActionFlag(m, cancel_flag)) { + ActionMessage cancelBarrier(CMD_TIME_BARRIER_CLEAR); + cancelBarrier.source_id = global_broker_id_local; + cancelBarrier.messageID = global_broker_id_local.baseValue(); + broadcast(cancelBarrier); + return; + } + m.setAction(CMD_TIME_BARRIER); + m.source_id = global_broker_id_local; + m.messageID = global_broker_id_local.baseValue(); + // time should already be set + broadcast(m); +} + void CoreBroker::transmitDelayedMessages() { auto msg = delayTransmitQueue.pop(); @@ -746,7 +761,8 @@ void CoreBroker::processCommand(ActionMessage&& command) "disconnecting from check connections"); break; case CMD_CONNECTION_ERROR: - // if anyone else as has terminated assume they finalized and the connection was lost + // if anyone else as has terminated assume they finalized and the connection was + // lost if (command.dest_id == global_broker_id_local) { bool partDisconnected{false}; bool ignore{false}; @@ -968,8 +984,8 @@ void CoreBroker::processCommand(ActionMessage&& command) } break; case CMD_STOP: if ((getAllConnectionState() < - connection_state::disconnected)) { // only send a disconnect message if we haven't - // done so already + connection_state::disconnected)) { // only send a disconnect message if we + // haven't done so already timeCoord->disconnect(); if (!isRootc) { ActionMessage m(CMD_DISCONNECT); @@ -1002,6 +1018,13 @@ void CoreBroker::processCommand(ActionMessage&& command) transmit(getRoute(command.dest_id), command); } + break; + case CMD_TIME_BARRIER: + case CMD_TIME_BARRIER_CLEAR: + broadcast(command); + break; + case CMD_TIME_BARRIER_REQUEST: + generateTimeBarrier(command); break; case CMD_TIME_REQUEST: case CMD_TIME_GRANT: @@ -1684,6 +1707,26 @@ bool CoreBroker::connect() return isConnected(); } +void CoreBroker::setTimeBarrier(Time barrierTime) +{ + if (barrierTime == Time::maxVal()) { + return clearTimeBarrier(); + } + ActionMessage tbarrier(CMD_TIME_BARRIER_REQUEST); + tbarrier.source_id = global_id.load(); + tbarrier.actionTime = barrierTime; + addActionMessage(tbarrier); +} + +void CoreBroker::clearTimeBarrier() +{ + ActionMessage tbarrier(CMD_TIME_BARRIER_REQUEST); + tbarrier.source_id = global_id.load(); + tbarrier.actionTime = Time::maxVal(); + setActionFlag(tbarrier, cancel_flag); + addActionMessage(tbarrier); +} + bool CoreBroker::isConnected() const { auto state = brokerState.load(std::memory_order_acquire); @@ -1943,7 +1986,7 @@ void CoreBroker::executeInitializationOperations() if (res == message_processing_result::next_step) { enteredExecutionMode = true; } - loggingObj->flush(); + logFlush(); } void CoreBroker::FindandNotifyInputTargets(BasicHandleInfo& handleInfo) @@ -2901,8 +2944,8 @@ void CoreBroker::checkDependencies() } } } else { - // if there is more than 2 dependents(higher broker + 2 or more other objects then we need - // to be a timeCoordinator + // if there is more than 2 dependents(higher broker + 2 or more other objects then we + // need to be a timeCoordinator if (timeCoord->getDependents().size() > 2) { return; } diff --git a/src/helics/core/CoreBroker.hpp b/src/helics/core/CoreBroker.hpp index e21a2dce40..cc01eb0c93 100644 --- a/src/helics/core/CoreBroker.hpp +++ b/src/helics/core/CoreBroker.hpp @@ -210,6 +210,10 @@ class CoreBroker: public Broker, public BrokerBase { virtual bool waitForDisconnect( std::chrono::milliseconds msToWait = std::chrono::milliseconds(0)) const override final; + virtual void setTimeBarrier(Time barrierTime) override final; + + virtual void clearTimeBarrier() override final; + private: /** implementation details of the connection process */ @@ -353,6 +357,8 @@ class CoreBroker: public Broker, public BrokerBase { /** label the broker and all children as disconnected*/ void labelAsDisconnected(global_broker_id brkid); + /** generate a time barrier request*/ + void generateTimeBarrier(ActionMessage& m); friend class TimeoutMonitor; }; diff --git a/src/helics/core/CoreFactory.cpp b/src/helics/core/CoreFactory.cpp index 1eb455cf98..c6531f085c 100644 --- a/src/helics/core/CoreFactory.cpp +++ b/src/helics/core/CoreFactory.cpp @@ -23,6 +23,8 @@ SPDX-License-Identifier: BSD-3-Clause #include #include +DECLARE_TRIPLINE() + namespace helics { namespace CoreFactory { diff --git a/src/helics/core/CoreFactory.hpp b/src/helics/core/CoreFactory.hpp index 22ba48803b..f9f04ecb75 100644 --- a/src/helics/core/CoreFactory.hpp +++ b/src/helics/core/CoreFactory.hpp @@ -125,7 +125,7 @@ type is used */ std::shared_ptr FindOrCreate(core_type type, const std::string& coreName, - const std::string& initializationString); + const std::string& configureString); /** tries to find a named core if it fails it creates a new one */ diff --git a/src/helics/core/FederateState.cpp b/src/helics/core/FederateState.cpp index 6dc7489236..45dd460b9b 100644 --- a/src/helics/core/FederateState.cpp +++ b/src/helics/core/FederateState.cpp @@ -830,6 +830,8 @@ message_processing_result FederateState::processActionMessage(ActionMessage& cmd break; case CMD_TIME_BLOCK: + case CMD_TIME_BARRIER: + case CMD_TIME_BARRIER_CLEAR: case CMD_TIME_UNBLOCK: { auto processed = timeCoord->processTimeMessage(cmd); if (processed == message_process_result::processed) { @@ -1079,7 +1081,9 @@ message_processing_result FederateState::processActionMessage(ActionMessage& cmd timeCoord->updateValueTime(cmd.actionTime); LOG_TRACE(timeCoord->printTimeStatus()); } - LOG_DATA(fmt::format("receive publication {}", prettyPrintString(cmd))); + LOG_DATA(fmt::format("receive publication {} from {}", + prettyPrintString(cmd), + subI->getSourceName(src))); } } } break; diff --git a/src/helics/core/FederateState.hpp b/src/helics/core/FederateState.hpp index e2e148ed8c..987fa70290 100644 --- a/src/helics/core/FederateState.hpp +++ b/src/helics/core/FederateState.hpp @@ -238,6 +238,8 @@ class FederateState { bool try_lock() const { return !processing.test_and_set(); } /** unlocks the processing*/ void unlock() const { processing.clear(std::memory_order_release); } + /** get the current logging level*/ + int loggingLevel() const { return logLevel; } private: /** process the federate queue until returnable event diff --git a/src/helics/core/InputInfo.cpp b/src/helics/core/InputInfo.cpp index 3bb4865d97..54453f57ce 100644 --- a/src/helics/core/InputInfo.cpp +++ b/src/helics/core/InputInfo.cpp @@ -195,6 +195,18 @@ const std::string& InputInfo::getInjectionType() const return inputType; } +const std::string& InputInfo::getSourceName(global_handle source) const +{ + static const std::string empty{}; + size_t ii{0}; + while (ii < input_sources.size()) { + if (source == input_sources[ii]) { + return source_info[ii].key; + } + } + return empty; +} + const std::string& InputInfo::getInjectionUnits() const { if (inputUnits.empty()) { diff --git a/src/helics/core/InputInfo.hpp b/src/helics/core/InputInfo.hpp index 801db11d59..ad71d91765 100644 --- a/src/helics/core/InputInfo.hpp +++ b/src/helics/core/InputInfo.hpp @@ -133,6 +133,8 @@ class InputInfo { const std::string& getInjectionType() const; const std::string& getInjectionUnits() const; + /** get the name of the source given a global id*/ + const std::string& getSourceName(global_handle source) const; private: bool updateData(dataRecord&& update, int index); diff --git a/src/helics/core/TimeCoordinator.cpp b/src/helics/core/TimeCoordinator.cpp index 66623e8b47..0e98b520aa 100644 --- a/src/helics/core/TimeCoordinator.cpp +++ b/src/helics/core/TimeCoordinator.cpp @@ -635,6 +635,8 @@ message_process_result TimeCoordinator::processTimeMessage(const ActionMessage& switch (cmd.action()) { case CMD_TIME_BLOCK: case CMD_TIME_UNBLOCK: + case CMD_TIME_BARRIER: + case CMD_TIME_BARRIER_CLEAR: return processTimeBlockMessage(cmd); case CMD_FORCE_TIME_GRANT: if (time_granted < cmd.actionTime) { @@ -695,44 +697,46 @@ message_process_result TimeCoordinator::processTimeMessage(const ActionMessage& message_process_result::no_effect; } +Time TimeCoordinator::updateTimeBlocks(int32_t blockId, Time newTime) +{ + auto blk = std::find_if(timeBlocks.begin(), timeBlocks.end(), [blockId](const auto& block) { + return (block.second == blockId); + }); + if (blk != timeBlocks.end()) { + blk->first = newTime; + } else { + timeBlocks.emplace_back(newTime, blockId); + } + auto res = std::min_element(timeBlocks.begin(), + timeBlocks.end(), + [](const auto& blk1, const auto& blk2) { + return (blk1.first < blk2.first); + }); + return res->first; +} + message_process_result TimeCoordinator::processTimeBlockMessage(const ActionMessage& cmd) { - if (cmd.action() == CMD_TIME_BLOCK) { - timeBlocks.emplace_back(cmd.actionTime, cmd.messageID); - if (cmd.actionTime < time_block) { - time_block = cmd.actionTime; - } - } else if (cmd.action() == CMD_TIME_UNBLOCK) { - if (!timeBlocks.empty()) { - auto ltime = Time::maxVal(); - if (timeBlocks.front().second == cmd.messageID) { - ltime = timeBlocks.front().first; - timeBlocks.pop_front(); - } else { - auto blk = - std::find_if(timeBlocks.begin(), timeBlocks.end(), [&cmd](const auto& block) { - return (block.second == cmd.messageID); - }); - if (blk != timeBlocks.end()) { - ltime = blk->first; - timeBlocks.erase(blk); - } - } - if (ltime <= time_block) { - if (!timeBlocks.empty()) { - auto res = std::min_element(timeBlocks.begin(), - timeBlocks.end(), - [](const auto& blk1, const auto& blk2) { - return (blk1.first < blk2.first); - }); - time_block = res->first; - } else { - time_block = Time::maxVal(); - } - return message_process_result::processed; + Time ltime = Time::maxVal(); + switch (cmd.action()) { + case CMD_TIME_BLOCK: + case CMD_TIME_BARRIER: + ltime = updateTimeBlocks(cmd.messageID, cmd.actionTime); + break; + case CMD_TIME_UNBLOCK: + case CMD_TIME_BARRIER_CLEAR: + if (!timeBlocks.empty()) { + ltime = updateTimeBlocks(cmd.messageID, Time::maxVal()); } - } + break; + default: + break; + } + if (ltime > time_block) { + time_block = ltime; + return message_process_result::processed; } + time_block = ltime; return message_process_result::no_effect; } diff --git a/src/helics/core/TimeCoordinator.hpp b/src/helics/core/TimeCoordinator.hpp index aaa60391a9..61a71f9c60 100644 --- a/src/helics/core/TimeCoordinator.hpp +++ b/src/helics/core/TimeCoordinator.hpp @@ -12,7 +12,6 @@ SPDX-License-Identifier: BSD-3-Clause #include "json/forwards.h" #include -#include #include #include #include @@ -74,7 +73,8 @@ class TimeCoordinator { TimeDependencies dependencies; //!< federates which this Federate is temporally dependent on std::vector dependents; //!< federates which temporally depend on this federate - std::deque> timeBlocks; //!< blocks for a particular timeblocking link + std::vector> + timeBlocks; //!< blocks for a particular timeblocking link tcoptions info; //!< basic time control information std::function sendMessageFunction; //!< callback used to send the messages @@ -165,6 +165,8 @@ class TimeCoordinator { message_process_result processTimeBlockMessage(const ActionMessage& cmd); + Time updateTimeBlocks(int32_t blockId, Time newTime); + public: /** process a message related to time @return the result of processing the message diff --git a/src/helics/core/flagOperations.hpp b/src/helics/core/flagOperations.hpp index 0c75a523ea..7d418a12b6 100644 --- a/src/helics/core/flagOperations.hpp +++ b/src/helics/core/flagOperations.hpp @@ -27,14 +27,18 @@ enum operation_flags : uint16_t { extra_flag2 = 8, //!< extra flag destination_processing_flag = 11, //!< flag indicating the message is for destination processing - disconnected_flag = 12, //!< flag indicating that a broker the time constraint + disconnected_flag = 12, //!< flag indicating that a broker/federate is disconnected extra_flag3 = 13, //!< extra flag extra_flag4 = 14, //!< extra flag nameless_interface_flag = 15, //!< flag indicating the interface is nameless }; constexpr uint16_t slow_responding_flag = - 14; // overload of extra_flag4 indicating a federate, core or broker is slow responding + extra_flag4; // overload of extra_flag4 indicating a federate, core or broker is slow + // responding + +constexpr uint16_t cancel_flag = + extra_flag3; // overload of extra_flag3 indicating an operation is canceled /** template function to set a flag in an object containing a flags field @tparam FlagContainer an object with a .flags field diff --git a/src/helics/core/helicsCLI11.hpp b/src/helics/core/helicsCLI11.hpp index 2a862fa565..40c839ac8d 100644 --- a/src/helics/core/helicsCLI11.hpp +++ b/src/helics/core/helicsCLI11.hpp @@ -153,7 +153,7 @@ class helicsCLI11App: public CLI::App { ->default_str("(" + to_string(coreType) + ")"); } core_type getCoreType() const { return coreType; } - /** set default core core type*/ + /** set default core type*/ void setDefaultCoreType(core_type type) { coreType = type; } private: diff --git a/src/helics/core/helicsVersion.hpp b/src/helics/core/helicsVersion.hpp index dbb5c57e5f..49c7284088 100644 --- a/src/helics/core/helicsVersion.hpp +++ b/src/helics/core/helicsVersion.hpp @@ -24,7 +24,11 @@ constexpr int versionPatch = HELICS_VERSION_PATCH; /** the build string if any*/ constexpr auto versionBuild = HELICS_VERSION_BUILD; /** build flags used to compile helics*/ -constexpr auto buildFlags = HELICS_BUILD_FLAGS; +#ifdef NDEBUG +constexpr auto buildFlags = HELICS_BUILD_FLAGS_RELEASE; +#else +constexpr auto buildFlags = HELICS_BUILD_FLAGS_DEBUG; +#endif /** compiler used to build helics*/ constexpr auto compiler = HELICS_COMPILER_VERSION; } // namespace helics diff --git a/src/helics/core/helics_definitions.hpp b/src/helics/core/helics_definitions.hpp index bc9e33fa9f..25c9466998 100644 --- a/src/helics/core/helics_definitions.hpp +++ b/src/helics/core/helics_definitions.hpp @@ -63,6 +63,10 @@ namespace defs { enable_init_entry = helics_flag_enable_init_entry, /** used to not display warnings on mismatched requested times*/ ignore_time_mismatch_warnings = helics_flag_ignore_time_mismatch_warnings, + /** force logging flush*/ + force_logging_flush = helics_flag_force_logging_flush, + /** dump the logs to a file at the end*/ + dumplog = helics_flag_dumplog, /** make all connections required*/ connections_required = helics_handle_option_connection_required, /** make all connections optional*/ @@ -70,7 +74,8 @@ namespace defs { /** make all inputs have strict type checking*/ strict_input_type_checking = helics_handle_option_strict_type_checking, /** ignore mismatching units*/ - ignore_input_unit_mismatch = helics_handle_option_ignore_unit_mismatch, + ignore_input_unit_mismatch = helics_handle_option_ignore_unit_mismatch + }; /** potential errors that might be generated by a helics federate/core/broker */ enum errors : int32_t { diff --git a/src/helics/core/loggingHelper.hpp b/src/helics/core/loggingHelper.hpp index f0d496d0b2..e6d83c3054 100644 --- a/src/helics/core/loggingHelper.hpp +++ b/src/helics/core/loggingHelper.hpp @@ -29,15 +29,16 @@ enum log_level : int { timing = helics_log_level_timing, //!< print interfaces+ timing(exec/grant/disconnect) data = helics_log_level_data, //!< print timing+data transmissions trace = helics_log_level_trace, //!< trace level printing (all processed messages) + fed = 99999 //!< special logging command for message coming from a fed }; -#define LOG_ERROR(id, ident, message) sendToLogger(id, log_level::error, ident, message); +#define LOG_ERROR(id, ident, message) sendToLogger(id, log_level::error, ident, message) #define LOG_ERROR_SIMPLE(message) \ - sendToLogger(global_broker_id_local, log_level::error, getIdentifier(), message); -#define LOG_WARNING(id, ident, message) sendToLogger(id, log_level::warning, ident, message); + sendToLogger(global_broker_id_local, log_level::error, getIdentifier(), message) +#define LOG_WARNING(id, ident, message) sendToLogger(id, log_level::warning, ident, message) #define LOG_WARNING_SIMPLE(message) \ - sendToLogger(global_broker_id_local, log_level::warning, getIdentifier(), message); + sendToLogger(global_broker_id_local, log_level::warning, getIdentifier(), message) #ifdef HELICS_ENABLE_LOGGING # define LOG_SUMMARY(id, ident, message) \ diff --git a/src/helics/cpp98/Broker.hpp b/src/helics/cpp98/Broker.hpp index a10d21a69a..0165d2f4a2 100644 --- a/src/helics/cpp98/Broker.hpp +++ b/src/helics/cpp98/Broker.hpp @@ -157,6 +157,12 @@ class Broker { return result; } + void setTimeBarrier(helics_time barrierTime) + { + helicsBrokerSetTimeBarrier(broker, barrierTime, HELICS_IGNORE_ERROR); + } + void clearTimeBarrier() { helicsBrokerClearTimeBarrier(broker); } + protected: helics_broker broker; //!< underlying broker information }; diff --git a/src/helics/cpp98/Endpoint.hpp b/src/helics/cpp98/Endpoint.hpp index d4a7008420..0b7a214c49 100644 --- a/src/helics/cpp98/Endpoint.hpp +++ b/src/helics/cpp98/Endpoint.hpp @@ -15,12 +15,17 @@ SPDX-License-Identifier: BSD-3-Clause #include namespace helicscpp { +class Endpoint; +class Federate; class Message { public: /** default constructor*/ Message() HELICS_NOTHROW: mo(HELICS_NULL_POINTER) {} - + /** create a message associated with a federate*/ + explicit Message(const Federate& fed); + /** create a message associated with an endpoint*/ + explicit Message(const Endpoint& ept); /** construct from a helics_message object*/ explicit Message(helics_message_object hmo) HELICS_NOTHROW: mo(hmo) {} @@ -96,7 +101,7 @@ class Message { helicsMessageSetOriginalSource(mo, osrc.c_str(), hThrowOnError()); return *this; } - /** get the originali message destination if a filtered altered it*/ + /** get the original message destination if a filter altered it*/ const char* originalDestination() const { return helicsMessageGetOriginalDestination(mo); } /** set the original destination field*/ Message& originalDestination(const std::string& odest) @@ -177,6 +182,11 @@ class Message { mo = HELICS_NULL_POINTER; return mreturn; } + /** generate a new message in a federate*/ + Message& newMessageObject(const Federate& fed); + + /** generate a new message in a federate*/ + Message& newMessageObject(const Endpoint& ept); private: helics_message_object mo; //!< C shared library message_object @@ -383,7 +393,7 @@ class Endpoint { /** get the name of the endpoint*/ const char* getName() const { return helicsEndpointGetName(ep); } /** get the specified type of the endpoint*/ - std::string getType() { return helicsEndpointGetType(ep); } + const char* getType() { return helicsEndpointGetType(ep); } /** get the interface information field of the filter*/ const char* getInfo() const { return helicsEndpointGetInfo(ep); } @@ -396,5 +406,22 @@ class Endpoint { private: helics_endpoint ep; //!< the underlying helics_endpoint object }; + +inline Message::Message(const Endpoint& ept): + mo(helicsEndpointCreateMessageObject(ept.baseObject(), hThrowOnError())) +{ +} + +inline Message& Message::newMessageObject(const Endpoint& ept) +{ + helics_message_object newmo = + helicsEndpointCreateMessageObject(ept.baseObject(), hThrowOnError()); + if (mo != HELICS_NULL_POINTER) { + helicsMessageFree(mo); + } + mo = newmo; + return *this; +} + } // namespace helicscpp #endif diff --git a/src/helics/cpp98/Federate.hpp b/src/helics/cpp98/Federate.hpp index 74a5532880..7c8e3cc92b 100644 --- a/src/helics/cpp98/Federate.hpp +++ b/src/helics/cpp98/Federate.hpp @@ -358,6 +358,8 @@ class Federate { void finalizeAsync() { helicsFederateFinalizeAsync(fed, hThrowOnError()); } /** complete the asynchronous terminate pair*/ void finalizeComplete() { helicsFederateFinalizeComplete(fed, hThrowOnError()); } + /** get the current time from a federate */ + helics_time getCurrentTime() { return helicsFederateGetCurrentTime(fed, hThrowOnError()); } /** request a time advancement @param time the next requested time step @return the granted time step*/ @@ -591,6 +593,8 @@ class Federate { } /** get a Core Object*/ helics_core getCore() { return helicsFederateGetCoreObject(fed, hThrowOnError()); } + /** get the C object for use in the C library*/ + helics_federate getObject() const { return fed; } protected: helics_federate fed; //!< underlying helics_federate object diff --git a/src/helics/cpp98/MessageFederate.hpp b/src/helics/cpp98/MessageFederate.hpp index 729889ab2c..6d2fbeb1bb 100644 --- a/src/helics/cpp98/MessageFederate.hpp +++ b/src/helics/cpp98/MessageFederate.hpp @@ -110,5 +110,21 @@ class MessageFederate: public virtual Federate { private: std::vector local_endpoints; }; +// this code needs the definition of federate before it can de defined +inline Message::Message(const Federate& fed): + mo(helicsFederateCreateMessageObject(fed.getObject(), hThrowOnError())) +{ +} + +inline Message& Message::newMessageObject(const Federate& fed) +{ + helics_message_object newmo = + helicsFederateCreateMessageObject(fed.getObject(), hThrowOnError()); + if (mo != HELICS_NULL_POINTER) { + helicsMessageFree(mo); + } + mo = newmo; + return *this; +} } // namespace helicscpp #endif diff --git a/src/helics/cpp98/helics.hpp b/src/helics/cpp98/helics.hpp index ee0f3f46e5..4060eda08e 100644 --- a/src/helics/cpp98/helics.hpp +++ b/src/helics/cpp98/helics.hpp @@ -18,33 +18,39 @@ SPDX-License-Identifier: BSD-3-Clause */ namespace helicscpp { /** get a string with the helics version info*/ -std::string getHelicsVersionString() +inline std::string getHelicsVersionString() { return std::string(helicsGetVersion()); } /** get a string with the helics version info*/ -std::string version() +inline std::string version() { return std::string(helicsGetVersion()); } /** get a string with the helics version info*/ -std::string buildFlags() +inline std::string buildFlags() { return std::string(helicsGetBuildFlags()); } /** get a string with the compiler used to compile the library*/ -std::string compilerVersion() +inline std::string compilerVersion() { return std::string(helicsGetCompilerVersion()); } /** do a cleanup of the brokers and cores currently in the library*/ -void cleanupHelicsLibrary() +inline void cleanupHelicsLibrary() { helicsCleanupLibrary(); } +/** close the library and cleanup all open objects*/ +inline void closeLibrary() +{ + helicsCloseLibrary(); +} + } // namespace helicscpp #endif diff --git a/src/helics/helics_enums.h b/src/helics/helics_enums.h index a03d13fc5f..cda3f181eb 100644 --- a/src/helics/helics_enums.h +++ b/src/helics/helics_enums.h @@ -121,30 +121,34 @@ typedef enum { /** used to not display warnings on mismatched requested times*/ helics_flag_ignore_time_mismatch_warnings = 67, /** specify that a federate error should terminate the federation*/ - helics_flag_terminate_on_error = 72 + helics_flag_terminate_on_error = 72, + /** specify that the log files should be flushed on every log message*/ + helics_flag_force_logging_flush = 88, + /** specify that a full log should be dumped into a file*/ + helics_flag_dumplog = 89 } helics_federate_flags; /** log level definitions */ -typedef enum { - /** don't print anything except a few catastrophic errors*/ - helics_log_level_no_print = -1, - /** only print error level indicators*/ - helics_log_level_error = 0, - /** only print warnings and errors*/ - helics_log_level_warning = 1, - /** warning errors and summary level information*/ - helics_log_level_summary = 2, - /** summary+ notices about federate and broker connections +messages about network connections*/ - helics_log_level_connections = 3, - /** connections+ interface definitions*/ - helics_log_level_interfaces = 4, - /** interfaces + timing message*/ - helics_log_level_timing = 5, - /** timing+ data transfer notices*/ - helics_log_level_data = 6, - /** all internal messages*/ - helics_log_level_trace = 7 +typedef enum { /** don't print anything except a few catastrophic errors*/ + helics_log_level_no_print = -1, + /** only print error level indicators*/ + helics_log_level_error = 0, + /** only print warnings and errors*/ + helics_log_level_warning = 1, + /** warning errors and summary level information*/ + helics_log_level_summary = 2, + /** summary+ notices about federate and broker connections +messages about network + connections*/ + helics_log_level_connections = 3, + /** connections+ interface definitions*/ + helics_log_level_interfaces = 4, + /** interfaces + timing message*/ + helics_log_level_timing = 5, + /** timing+ data transfer notices*/ + helics_log_level_data = 6, + /** all internal messages*/ + helics_log_level_trace = 7 } helics_log_levels; /** enumeration of return values from the C interface functions @@ -180,13 +184,14 @@ typedef enum { helics_property_time_period = 140, /** the property controlling time offset for the period of federate*/ helics_property_time_offset = 141, - /** the property controlling real time lag for a federate the max time a federate can lag real - time*/ + /** the property controlling real time lag for a federate the max time a federate can lag + real time*/ helics_property_time_rt_lag = 143, - /** the property controlling real time lead for a federate the max time a federate can be ahead - of real time*/ + /** the property controlling real time lead for a federate the max time a federate can be + ahead of real time*/ helics_property_time_rt_lead = 144, - /** the property controlling real time tolerance for a federate sets both rt_lag and rt_lead*/ + /** the property controlling real time tolerance for a federate sets both rt_lag and + rt_lead*/ helics_property_time_rt_tolerance = 145, /** the property controlling input delay for a federate*/ helics_property_time_input_delay = 148, @@ -246,7 +251,8 @@ typedef enum { helics_handle_option_strict_type_checking = 414, /** specify that the mismatching units should be ignored*/ helics_handle_option_ignore_unit_mismatch = 447, - /** specify that an interface will only transmit on change(only applicable to publications)*/ + /** specify that an interface will only transmit on change(only applicable to + publications)*/ helics_handle_option_only_transmit_on_change = 452, /** specify that an interface will only update if the value has actually changed*/ helics_handle_option_only_update_on_change = 454, @@ -272,12 +278,13 @@ typedef enum { helics_filter_type_random_delay = 2, /** a filter type that randomly drops messages*/ helics_filter_type_random_drop = 3, - /** a filter type that reroutes a message to a different destination than originally specified*/ + /** a filter type that reroutes a message to a different destination than originally + specified*/ helics_filter_type_reroute = 4, /** a filter type that duplicates a message and sends the copy to a different destination*/ helics_filter_type_clone = 5, - /** a customizable filter type that can perform different actions on a message based on firewall - like rules*/ + /** a customizable filter type that can perform different actions on a message based on + firewall like rules*/ helics_filter_type_firewall = 6 } helics_filter_type; diff --git a/src/helics/network/tcp/TcpComms.cpp b/src/helics/network/tcp/TcpComms.cpp index 0e8a4db136..17c7072465 100644 --- a/src/helics/network/tcp/TcpComms.cpp +++ b/src/helics/network/tcp/TcpComms.cpp @@ -331,7 +331,7 @@ namespace tcp { void TcpComms::queue_tx_function() { - std::vector buffer; + // std::vector buffer; auto ioctx = AsioContextManager::getContextPointer(); auto contextLoop = ioctx->startContextLoop(); TcpConnection::pointer brokerConnection; diff --git a/src/helics/network/tcp/TcpHelperClasses.cpp b/src/helics/network/tcp/TcpHelperClasses.cpp index 6b23a0ab4e..36822967f1 100644 --- a/src/helics/network/tcp/TcpHelperClasses.cpp +++ b/src/helics/network/tcp/TcpHelperClasses.cpp @@ -238,6 +238,7 @@ namespace tcp { { if (!error) { connected.activate(); + socket_.set_option(asio::ip::tcp::no_delay(true)); } else { std::cerr << "connection error " << error.message() << ": code =" << error.value() << '\n'; @@ -661,6 +662,7 @@ namespace tcp { /*setting linger to 1 second*/ asio::socket_base::linger optionLinger(true, 0); new_connection->socket().set_option(optionLinger); + new_connection->socket().set_option(asio::ip::tcp::no_delay(true)); // Set options here if (halted.load()) { new_connection->close(); diff --git a/src/helics/shared_api_library/MessageFederate.h b/src/helics/shared_api_library/MessageFederate.h index 27aa149d6a..bf32879f44 100644 --- a/src/helics/shared_api_library/MessageFederate.h +++ b/src/helics/shared_api_library/MessageFederate.h @@ -110,12 +110,12 @@ HELICS_EXPORT helics_bool helicsEndpointIsValid(helics_endpoint endpoint); * Set the default destination for an endpoint if no other endpoint is given. * * @param endpoint The endpoint to set the destination for. - * @param dest A string naming the desired default endpoint. + * @param dst A string naming the desired default endpoint. * @forcpponly * @param[in,out] err A pointer to an error object for catching errors. * @endforcpponly */ -HELICS_EXPORT void helicsEndpointSetDefaultDestination(helics_endpoint endpoint, const char* dest, helics_error* err); +HELICS_EXPORT void helicsEndpointSetDefaultDestination(helics_endpoint endpoint, const char* dst, helics_error* err); /** * Get the default destination for an endpoint. @@ -130,7 +130,7 @@ HELICS_EXPORT const char* helicsEndpointGetDefaultDestination(helics_endpoint en * Send a message to the specified destination. * * @param endpoint The endpoint to send the data from. - * @param dest The target destination. + * @param dst The target destination. * @forcpponly * nullptr to use the default destination. * @endforcpponly @@ -144,13 +144,13 @@ HELICS_EXPORT const char* helicsEndpointGetDefaultDestination(helics_endpoint en * @endforcpponly */ HELICS_EXPORT void - helicsEndpointSendMessageRaw(helics_endpoint endpoint, const char* dest, const void* data, int inputDataLength, helics_error* err); + helicsEndpointSendMessageRaw(helics_endpoint endpoint, const char* dst, const void* data, int inputDataLength, helics_error* err); /** * Send a message at a specific time to the specified destination. * * @param endpoint The endpoint to send the data from. - * @param dest The target destination. + * @param dst The target destination. * @forcpponly * nullptr to use the default destination. * @endforcpponly @@ -167,7 +167,7 @@ HELICS_EXPORT void * @endforcpponly */ HELICS_EXPORT void helicsEndpointSendEventRaw(helics_endpoint endpoint, - const char* dest, + const char* dst, const void* data, int inputDataLength, helics_time time, @@ -390,7 +390,7 @@ HELICS_EXPORT const char* helicsEndpointGetInfo(helics_endpoint end); * @param[in,out] err An error object to fill out in case of an error. * @endforcpponly */ -HELICS_EXPORT void helicsEndpointSetInfo(helics_endpoint end, const char* info, helics_error* err); +HELICS_EXPORT void helicsEndpointSetInfo(helics_endpoint endpoint, const char* info, helics_error* err); /** * Set a handle option on an endpoint. @@ -402,7 +402,7 @@ HELICS_EXPORT void helicsEndpointSetInfo(helics_endpoint end, const char* info, * @param[in,out] err An error object to fill out in case of an error. * @endforcpponly */ -HELICS_EXPORT void helicsEndpointSetOption(helics_endpoint end, int option, int value, helics_error* err); +HELICS_EXPORT void helicsEndpointSetOption(helics_endpoint endpoint, int option, int value, helics_error* err); /** * Set a handle option on an endpoint. @@ -411,7 +411,7 @@ HELICS_EXPORT void helicsEndpointSetOption(helics_endpoint end, int option, int * @param option Integer code for the option to set /ref helics_handle_options. * @return the value of the option, for boolean options will be 0 or 1 */ -HELICS_EXPORT int helicsEndpointGetOption(helics_endpoint end, int option); +HELICS_EXPORT int helicsEndpointGetOption(helics_endpoint endpoint, int option); /** * \defgroup Message operation functions @@ -507,7 +507,7 @@ HELICS_EXPORT int helicsMessageGetRawDataSize(helics_message_object message); * @param message A message object to get the data for. * @forcpponly * @param[out] data The memory location of the data. - * @param maxMessagelen The maximum size of information that data can hold. + * @param maxMessageLength The maximum size of information that data can hold. * @param[out] actualSize The actual length of data copied to data. * @param[in,out] err A pointer to an error object for catching errors. * @endforcpponly @@ -517,7 +517,7 @@ HELICS_EXPORT int helicsMessageGetRawDataSize(helics_message_object message); * @endPythonOnly */ HELICS_EXPORT void - helicsMessageGetRawData(helics_message_object message, void* data, int maxMessagelen, int* actualSize, helics_error* err); + helicsMessageGetRawData(helics_message_object message, void* data, int maxMessageLength, int* actualSize, helics_error* err); /** * Get a pointer to the raw data of a message. @@ -552,12 +552,12 @@ HELICS_EXPORT void helicsMessageSetSource(helics_message_object message, const c * Set the destination of a message. * * @param message The message object in question. - * @param dest A string containing the new destination. + * @param dst A string containing the new destination. * @forcpponly * @param[in,out] err An error object to fill out in case of an error. * @endforcpponly */ -HELICS_EXPORT void helicsMessageSetDestination(helics_message_object message, const char* dest, helics_error* err); +HELICS_EXPORT void helicsMessageSetDestination(helics_message_object message, const char* dst, helics_error* err); /** * Set the original source of a message. @@ -574,12 +574,12 @@ HELICS_EXPORT void helicsMessageSetOriginalSource(helics_message_object message, * Set the original destination of a message. * * @param message The message object in question. - * @param dest A string containing the new original source. + * @param dst A string containing the new original source. * @forcpponly * @param[in,out] err An error object to fill out in case of an error. * @endforcpponly */ -HELICS_EXPORT void helicsMessageSetOriginalDestination(helics_message_object message, const char* dest, helics_error* err); +HELICS_EXPORT void helicsMessageSetOriginalDestination(helics_message_object message, const char* dst, helics_error* err); /** * Set the delivery time for a message. @@ -689,13 +689,13 @@ HELICS_EXPORT void helicsMessageAppendData(helics_message_object message, const /** * Copy a message object. * - * @param source_message The message object to copy from. - * @param dest_message The message object to copy to. + * @param src_message The message object to copy from. + * @param dst_message The message object to copy to. * @forcpponly * @param[in,out] err An error object to fill out in case of an error. * @endforcpponly */ -HELICS_EXPORT void helicsMessageCopy(helics_message_object source_message, helics_message_object dest_message, helics_error* err); +HELICS_EXPORT void helicsMessageCopy(helics_message_object src_message, helics_message_object dst_message, helics_error* err); /** * Clone a message object. diff --git a/src/helics/shared_api_library/MessageFilters.h b/src/helics/shared_api_library/MessageFilters.h index edbac30a52..b908ea27a6 100644 --- a/src/helics/shared_api_library/MessageFilters.h +++ b/src/helics/shared_api_library/MessageFilters.h @@ -203,12 +203,12 @@ HELICS_EXPORT void helicsFilterSetString(helics_filter filt, const char* prop, c * * @details All messages going to a destination are copied to the delivery address(es). * @param filt The given filter to add a destination target to. - * @param dest The name of the endpoint to add as a destination target. + * @param dst The name of the endpoint to add as a destination target. * @forcpponly * @param[in,out] err A pointer to an error object for catching errors. * @endforcpponly */ -HELICS_EXPORT void helicsFilterAddDestinationTarget(helics_filter filt, const char* dest, helics_error* err); +HELICS_EXPORT void helicsFilterAddDestinationTarget(helics_filter filt, const char* dst, helics_error* err); /** * Add a source target to a filter. diff --git a/src/helics/shared_api_library/ValueFederate.h b/src/helics/shared_api_library/ValueFederate.h index 40a737b634..d55bb78a54 100644 --- a/src/helics/shared_api_library/ValueFederate.h +++ b/src/helics/shared_api_library/ValueFederate.h @@ -483,7 +483,7 @@ HELICS_EXPORT int helicsInputGetRawValueSize(helics_input ipt); * @param ipt The input to get the data for. * @forcpponly * @param[out] data The memory location of the data - * @param maxDatalen The maximum size of information that data can hold. + * @param maxDataLength The maximum size of information that data can hold. * @param[out] actualSize The actual length of data copied to data. * @param[in,out] err A pointer to an error object for catching errors. * @endforcpponly @@ -492,7 +492,7 @@ HELICS_EXPORT int helicsInputGetRawValueSize(helics_input ipt); * @return Raw string data. * @endPythonOnly */ -HELICS_EXPORT void helicsInputGetRawValue(helics_input ipt, void* data, int maxDatalen, int* actualSize, helics_error* err); +HELICS_EXPORT void helicsInputGetRawValue(helics_input ipt, void* data, int maxDataLength, int* actualSize, helics_error* err); /** * Get the size of a value for subscription assuming return as a string. @@ -507,7 +507,7 @@ HELICS_EXPORT int helicsInputGetStringSize(helics_input ipt); * @param ipt The input to get the data for. * @forcpponly * @param[out] outputString Storage for copying a null terminated string. - * @param maxStringLen The maximum size of information that str can hold. + * @param maxStringLength The maximum size of information that str can hold. * @param[out] actualLength The actual length of the string. * @param[in,out] err Error term for capturing errors. * @endforcpponly @@ -516,7 +516,7 @@ HELICS_EXPORT int helicsInputGetStringSize(helics_input ipt); * @return A string data * @endPythonOnly */ -HELICS_EXPORT void helicsInputGetString(helics_input ipt, char* outputString, int maxStringLen, int* actualLength, helics_error* err); +HELICS_EXPORT void helicsInputGetString(helics_input ipt, char* outputString, int maxStringLength, int* actualLength, helics_error* err); /** * Get an integer value from a subscription. @@ -624,7 +624,7 @@ HELICS_EXPORT int helicsInputGetVectorSize(helics_input ipt); * @param ipt The input to get the result for. * @forcpponly * @param[out] data The location to store the data. - * @param maxlen The maximum size of the vector. + * @param maxLength The maximum size of the vector. * @param[out] actualSize Location to place the actual length of the resulting vector. * @param[in,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. * @endforcpponly @@ -633,7 +633,7 @@ HELICS_EXPORT int helicsInputGetVectorSize(helics_input ipt); * @return a list of floating point values * @endPythonOnly */ -HELICS_EXPORT void helicsInputGetVector(helics_input ipt, double data[], int maxlen, int* actualSize, helics_error* err); +HELICS_EXPORT void helicsInputGetVector(helics_input ipt, double data[], int maxLength, int* actualSize, helics_error* err); /** * Get a named point from a subscription. @@ -641,7 +641,7 @@ HELICS_EXPORT void helicsInputGetVector(helics_input ipt, double data[], int max * @param ipt The input to get the result for. * @forcpponly * @param[out] outputString Storage for copying a null terminated string. - * @param maxStringLen The maximum size of information that str can hold. + * @param maxStringLength The maximum size of information that str can hold. * @param[out] actualLength The actual length of the string * @param[out] val The double value for the named point. * @param[in,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. @@ -652,7 +652,7 @@ HELICS_EXPORT void helicsInputGetVector(helics_input ipt, double data[], int max * @endPythonOnly */ HELICS_EXPORT void - helicsInputGetNamedPoint(helics_input ipt, char* outputString, int maxStringLen, int* actualLength, double* val, helics_error* err); + helicsInputGetNamedPoint(helics_input ipt, char* outputString, int maxStringLength, int* actualLength, double* val, helics_error* err); /**@}*/ diff --git a/src/helics/shared_api_library/helics.h b/src/helics/shared_api_library/helics.h index 0c5e87e967..2cfcd0a4e6 100644 --- a/src/helics/shared_api_library/helics.h +++ b/src/helics/shared_api_library/helics.h @@ -1375,6 +1375,24 @@ HELICS_EXPORT void helicsCoreSetLogFile(helics_core core, const char* logFileNam */ HELICS_EXPORT void helicsBrokerSetLogFile(helics_broker broker, const char* logFileName, helics_error* err); +/** + * Set a broker time barrier. + * + * @param broker The broker to set the time barrier for. + * @param barrierTime The time to set the barrier at. + * @forcpponly + * @param[in,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. + * @endforcpponly + */ +HELICS_EXPORT void helicsBrokerSetTimeBarrier(helics_broker broker, helics_time barrierTime, helics_error* err); + +/** + * Clear any time barrier on a broker. + * + * @param broker The broker to clear the barriers on. + */ +HELICS_EXPORT void helicsBrokerClearTimeBarrier(helics_broker broker); + /** * Create a query object. * diff --git a/src/helics/shared_api_library/helicsExport.cpp b/src/helics/shared_api_library/helicsExport.cpp index 91ec7ba449..abd2c533f2 100644 --- a/src/helics/shared_api_library/helicsExport.cpp +++ b/src/helics/shared_api_library/helicsExport.cpp @@ -4,7 +4,6 @@ Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance additional details. All rights reserved. SPDX-License-Identifier: BSD-3-Clause */ -#include "../common/loggerCore.hpp" #include "../core/BrokerFactory.hpp" #include "../core/CoreFactory.hpp" #include "../core/core-exceptions.hpp" @@ -482,6 +481,24 @@ void helicsBrokerSetLogFile(helics_broker broker, const char* logFileName, helic brk->setLogFile(AS_STRING(logFileName)); } +void helicsBrokerSetTimeBarrier(helics_broker broker, helics_time barrierTime, helics_error* err) +{ + auto* brk = getBroker(broker, err); + if (brk == nullptr) { + return; + } + brk->setTimeBarrier(barrierTime); +} + +void helicsBrokerClearTimeBarrier(helics_broker broker) +{ + auto* brk = getBroker(broker, nullptr); + if (brk == nullptr) { + return; + } + brk->clearTimeBarrier(); +} + void helicsBrokerAddSourceFilterToEndpoint(helics_broker broker, const char* filter, const char* endpoint, helics_error* err) { auto* brk = getBroker(broker, err); @@ -789,7 +806,7 @@ void helicsCloseLibrary(void) helics::BrokerFactory::cleanUpBrokers(std::chrono::milliseconds(2000)); ret.get(); - helics::LoggerManager::closeLogger(); + // helics::LoggerManager::closeLogger(); // helics::cleanupHelicsLibrary(); } @@ -989,7 +1006,6 @@ MasterObjectHolder::~MasterObjectHolder() ZmqContextManager::closeContext(); // LCOV_EXCL_LINE } #endif - helics::LoggingCore::setFastShutdown(); deleteAll(); // std::cout << "end of master Object Holder destructor" << std::endl; } @@ -1085,6 +1101,7 @@ void MasterObjectHolder::deleteAll() auto fedHandle = feds.lock(); for (auto& fed : fedHandle) { if ((fed) && (fed->fedptr)) { + fed->valid = 0; fed->fedptr->finalize(); } } @@ -1094,6 +1111,7 @@ void MasterObjectHolder::deleteAll() auto coreHandle = cores.lock(); for (auto& cr : coreHandle) { if ((cr) && (cr->coreptr)) { + cr->valid = 0; cr->coreptr->disconnect(); } } @@ -1103,6 +1121,7 @@ void MasterObjectHolder::deleteAll() auto brokerHandle = brokers.lock(); for (auto& brk : brokerHandle) { if ((brk) && (brk->brokerptr)) { + brk->valid = 0; brk->brokerptr->disconnect(); } } diff --git a/src/helics/common/logger.cpp b/src/old/logger.cpp similarity index 100% rename from src/helics/common/logger.cpp rename to src/old/logger.cpp diff --git a/src/helics/common/logger.h b/src/old/logger.h similarity index 100% rename from src/helics/common/logger.h rename to src/old/logger.h diff --git a/src/helics/common/loggerCore.cpp b/src/old/loggerCore.cpp similarity index 100% rename from src/helics/common/loggerCore.cpp rename to src/old/loggerCore.cpp diff --git a/src/helics/common/loggerCore.hpp b/src/old/loggerCore.hpp similarity index 100% rename from src/helics/common/loggerCore.hpp rename to src/old/loggerCore.hpp diff --git a/tests/helics/CMakeLists.txt b/tests/helics/CMakeLists.txt index 2a573a687c..b87361a778 100644 --- a/tests/helics/CMakeLists.txt +++ b/tests/helics/CMakeLists.txt @@ -14,7 +14,7 @@ include(AddGoogletest) # add a baseline library for underlying dependencies and flags for test executables add_library(helics_test_base INTERFACE) target_link_libraries(helics_test_base INTERFACE gtest gtest_main gmock) -target_link_libraries(helics_test_base INTERFACE compile_flags_target) +target_link_libraries(helics_test_base INTERFACE compile_flags_target spdlog::spdlog) add_subdirectory(core) add_subdirectory(network) diff --git a/tests/helics/application_api/LoggingTests.cpp b/tests/helics/application_api/LoggingTests.cpp index ba9bfb4702..f369e48e4c 100644 --- a/tests/helics/application_api/LoggingTests.cpp +++ b/tests/helics/application_api/LoggingTests.cpp @@ -8,7 +8,6 @@ SPDX-License-Identifier: BSD-3-Clause #include "helics/application_api/ValueFederate.hpp" #include "helics/core/BrokerFactory.hpp" //#include "helics/core/CoreFactory.hpp" -#include "helics/common/logger.h" #include "helics/core/Core.hpp" #include "helics/core/core-exceptions.hpp" #include "helics/core/helics_definitions.hpp" @@ -32,9 +31,10 @@ TEST(logging_tests, basic_logging) auto Fed = std::make_shared("test1", fi); gmlc::libguarded::guarded>> mlog; - Fed->setLoggingCallback([&mlog](int level, const std::string&, const std::string& message) { - mlog.lock()->emplace_back(level, message); - }); + Fed->setLoggingCallback( + [&mlog](int level, const std::string& /*unused*/, const std::string& message) { + mlog.lock()->emplace_back(level, message); + }); Fed->logMessage(3, "test log message"); Fed->enterExecutingMode(); Fed->finalize(); @@ -44,11 +44,26 @@ TEST(logging_tests, basic_logging) TEST(logging_tests, file_logging) { + const std::string lfilename = "logfile.txt"; + if (ghc::filesystem::exists(lfilename)) { + std::error_code ec; + bool res = ghc::filesystem::remove(lfilename, ec); + int ii = 0; + while (!res) { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + res = ghc::filesystem::remove(lfilename, ec); + ++ii; + if (ii > 15) { + break; + } + } + EXPECT_TRUE(res); + } helics::FederateInfo fi(CORE_TYPE_TO_TEST); fi.coreInitString = "--autobroker --logfile logfile.txt --fileloglevel=5"; auto Fed = std::make_shared("test1", fi); - const std::string lfilename = "logfile.txt"; + Fed->enterExecutingMode(); Fed->finalize(); auto cr = Fed->getCorePointer(); @@ -59,27 +74,32 @@ TEST(logging_tests, file_logging) cr.reset(); helics::cleanupHelicsLibrary(); std::error_code ec; - bool res = ghc::filesystem::remove(lfilename, ec); - int ii = 0; - while (!res) { - std::this_thread::sleep_for(std::chrono::milliseconds(100)); - res = ghc::filesystem::remove(lfilename, ec); - ++ii; - if (ii > 15) { - break; - } - } - EXPECT_TRUE(res); + ghc::filesystem::remove(lfilename, ec); } TEST(logging_tests, file_logging_p2) { + const std::string lfilename = "logfile2.txt"; + if (ghc::filesystem::exists(lfilename)) { + std::error_code ec; + bool res = ghc::filesystem::remove(lfilename, ec); + int ii = 0; + while (!res) { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + res = ghc::filesystem::remove(lfilename, ec); + ++ii; + if (ii > 15) { + break; + } + } + EXPECT_TRUE(res); + } helics::FederateInfo fi(CORE_TYPE_TO_TEST); fi.coreInitString = "--autobroker --fileloglevel=5"; auto Fed = std::make_shared("test1", fi); auto cr = Fed->getCorePointer(); - const std::string lfilename = "logfile2.txt"; + cr->setLogFile(lfilename); Fed->enterExecutingMode(); Fed->finalize(); @@ -90,17 +110,7 @@ TEST(logging_tests, file_logging_p2) cr.reset(); helics::cleanupHelicsLibrary(); std::error_code ec; - bool res = ghc::filesystem::remove(lfilename, ec); - int ii = 0; - while (!res) { - std::this_thread::sleep_for(std::chrono::milliseconds(100)); - res = ghc::filesystem::remove(lfilename, ec); - ++ii; - if (ii > 15) { - break; - } - } - EXPECT_TRUE(res); + ghc::filesystem::remove(lfilename, ec); } TEST(logging_tests, check_log_message) @@ -112,9 +122,10 @@ TEST(logging_tests, check_log_message) auto Fed = std::make_shared("test1", fi); gmlc::libguarded::guarded>> mlog; - Fed->setLoggingCallback([&mlog](int level, const std::string&, const std::string& message) { - mlog.lock()->emplace_back(level, message); - }); + Fed->setLoggingCallback( + [&mlog](int level, const std::string& /*unused*/, const std::string& message) { + mlog.lock()->emplace_back(level, message); + }); Fed->enterExecutingMode(); Fed->logInfoMessage("test MEXAGE"); @@ -140,9 +151,10 @@ TEST(logging_tests, check_log_message_functions) auto Fed = std::make_shared("test1", fi); gmlc::libguarded::guarded>> mlog; - Fed->setLoggingCallback([&mlog](int level, const std::string&, const std::string& message) { - mlog.lock()->emplace_back(level, message); - }); + Fed->setLoggingCallback( + [&mlog](int level, const std::string& /*unused*/, const std::string& message) { + mlog.lock()->emplace_back(level, message); + }); Fed->enterExecutingMode(); Fed->logErrorMessage("test ERROR"); @@ -187,9 +199,10 @@ TEST(logging_tests, check_log_message_levels) auto Fed = std::make_shared("test1", fi); gmlc::libguarded::guarded>> mlog; - Fed->setLoggingCallback([&mlog](int level, const std::string&, const std::string& message) { - mlog.lock()->emplace_back(level, message); - }); + Fed->setLoggingCallback( + [&mlog](int level, const std::string& /*unused*/, const std::string& message) { + mlog.lock()->emplace_back(level, message); + }); Fed->enterExecutingMode(); Fed->logMessage(3, "test MEXAGE1"); @@ -220,9 +233,10 @@ TEST(logging_tests, check_log_message_levels_high) auto Fed = std::make_shared("test1", fi); gmlc::libguarded::guarded>> mlog; - Fed->setLoggingCallback([&mlog](int level, const std::string&, const std::string& message) { - mlog.lock()->emplace_back(level, message); - }); + Fed->setLoggingCallback( + [&mlog](int level, const std::string& /*unused*/, const std::string& message) { + mlog.lock()->emplace_back(level, message); + }); Fed->enterExecutingMode(); Fed->logMessage(3, "test MEXAGE1"); @@ -243,3 +257,38 @@ TEST(logging_tests, check_log_message_levels_high) } EXPECT_TRUE(found_low && found_high); } + +TEST(logging_tests, dumplog) +{ + helics::FederateInfo fi(CORE_TYPE_TO_TEST); + fi.coreInitString = "--autobroker"; + fi.setProperty(helics::defs::log_level, -1); + + auto Fed = std::make_shared("test1", fi); + auto cr = Fed->getCorePointer(); + gmlc::libguarded::guarded>> mlog; + cr->setLoggingCallback(helics::local_core_id, + [&mlog](int level, + const std::string& /*unused*/, + const std::string& message) { + mlog.lock()->emplace_back(level, message); + }); + + Fed->enterExecutingMode(); + /** We are setting the flag then clearing it + this will generate 1 and at most 2 messages in the log callback + Thus the check for this is that there is a least 2 and at most 3 messages + in the log block, to indicate that the set and clear was successful*/ + Fed->setFlagOption(helics_flag_dumplog); + Fed->setFlagOption(helics_flag_dumplog, false); + + Fed->finalize(); + cr->waitForDisconnect(); + cr.reset(); + auto llock = mlog.lock(); + EXPECT_GE(llock->size(), 2U); + EXPECT_LE(llock->size(), 3U); + // this is to check that it has the correct level + EXPECT_EQ(llock->back().first, -10); // the -10 should have a level enum value at some point in + // the future as part of the debugging improvements +} diff --git a/tests/helics/application_api/PrimaryTypeConversionTests.cpp b/tests/helics/application_api/PrimaryTypeConversionTests.cpp index 3ad5a54d95..109cacdd07 100644 --- a/tests/helics/application_api/PrimaryTypeConversionTests.cpp +++ b/tests/helics/application_api/PrimaryTypeConversionTests.cpp @@ -23,10 +23,7 @@ bool checkTypeConversion1(const T1& val1, const T2& exp) defV val = val1; T2 v2{}; valueExtract(val, v2); - if (v2 != exp) { - return false; - } - return true; + return (v2 == exp); } TEST(type_conversion_tests, vectorNorm_tests) @@ -73,6 +70,25 @@ TEST(type_conversion_tests, string_converstion_tests) EXPECT_TRUE(checkTypeConversion1(test1, NamedPoint{test1, std::nan("0")})); } +TEST(type_conversion_tests, string_converstion_tests_negative) +{ + std::string vstr("-15.212"); + double val = -15.212; + EXPECT_TRUE(checkTypeConversion1(vstr, vstr)); + EXPECT_TRUE(checkTypeConversion1(vstr, val)); + EXPECT_TRUE(checkTypeConversion1(vstr, static_cast(val))); + EXPECT_TRUE(checkTypeConversion1(vstr, static_cast(val))); + EXPECT_TRUE(checkTypeConversion1(vstr, std::complex(val, 0))); + EXPECT_TRUE(checkTypeConversion1(vstr, std::vector{val})); + EXPECT_TRUE( + checkTypeConversion1(vstr, + std::vector>{std::complex(val, 0.0)})); + EXPECT_TRUE(checkTypeConversion1(vstr, true)); + EXPECT_TRUE(checkTypeConversion1(vstr, NamedPoint{"value", val})); + std::string test1("test1"); + EXPECT_TRUE(checkTypeConversion1(test1, NamedPoint{test1, std::nan("0")})); +} + TEST(type_conversion_tests, double_type_tests) { EXPECT_TRUE(helicsType() == data_type::helics_double); @@ -97,6 +113,22 @@ TEST(type_conversion_tests, double_conversion_tests) EXPECT_TRUE(checkTypeConversion1(val, NamedPoint{"value", val})); } +TEST(type_conversion_tests, double_conversion_tests3) +{ + double val = -17.786; + EXPECT_TRUE(checkTypeConversion1(val, val)); + EXPECT_TRUE(checkTypeConversion1(val, std::to_string(val))); + EXPECT_TRUE(checkTypeConversion1(val, static_cast(val))); + EXPECT_TRUE(checkTypeConversion1(val, static_cast(val))); + EXPECT_TRUE(checkTypeConversion1(val, std::complex(val, 0))); + EXPECT_TRUE(checkTypeConversion1(val, std::vector{val})); + EXPECT_TRUE( + checkTypeConversion1(val, + std::vector>{std::complex(val, 0.0)})); + EXPECT_TRUE(checkTypeConversion1(val, true)); + EXPECT_TRUE(checkTypeConversion1(val, NamedPoint{"value", val})); +} + TEST(type_conversion_tests, integer_type_tests) { EXPECT_TRUE(helicsType() == data_type::helics_int); diff --git a/tests/helics/application_api/ValueFederateAdditionalTests.cpp b/tests/helics/application_api/ValueFederateAdditionalTests.cpp index e1511d7353..865e7e2b6a 100644 --- a/tests/helics/application_api/ValueFederateAdditionalTests.cpp +++ b/tests/helics/application_api/ValueFederateAdditionalTests.cpp @@ -614,6 +614,9 @@ TEST_P(valuefed_add_configfile_tests, file_load) EXPECT_EQ(vFed.query("global", "global1"), "this is a global1 value"); EXPECT_EQ(vFed.query("global", "global2"), "this is another global value"); + + auto& pub = vFed.getPublication("pub1"); + EXPECT_EQ(pub.getUnits(), "m"); vFed.disconnect(); } @@ -629,6 +632,9 @@ TEST(valuefed_json_tests, file_loadb) EXPECT_EQ(id.getName(), "valueFed2/pub2"); + auto& id2 = vFed.getPublication("pub1"); + EXPECT_EQ(id2.getUnits(), "m"); + vFed.disconnect(); helics::BrokerFactory::terminateAllBrokers(); helics::CoreFactory::terminateAllCores(); @@ -645,6 +651,9 @@ TEST(valuefederate, toml_file_loadb) auto& id = vFed.getPublication("primary"); EXPECT_EQ(id.getName(), "valueFed_toml/pub2"); + + auto& id2 = vFed.getPublication("pub1"); + EXPECT_EQ(id2.getUnits(), "m"); vFed.enterExecutingMode(); vFed.disconnect(); } diff --git a/tests/helics/application_api/ValueFederateKeyTests.cpp b/tests/helics/application_api/ValueFederateKeyTests.cpp index aede4091cf..83b5200b49 100644 --- a/tests/helics/application_api/ValueFederateKeyTests.cpp +++ b/tests/helics/application_api/ValueFederateKeyTests.cpp @@ -584,6 +584,8 @@ TEST_P(valuefed_single_type, init_publish) EXPECT_EQ(gtime, 1.0); + gtime = vFed1->getCurrentTime(); + EXPECT_EQ(gtime, 1.0); // get the value subid.getValue(val); // make sure the string is what we expect @@ -1042,3 +1044,45 @@ INSTANTIATE_TEST_SUITE_P(valuefed_key_tests, INSTANTIATE_TEST_SUITE_P(valuefed_key_tests, valuefed_all_type_tests, ::testing::ValuesIn(core_types_all)); + +TEST_F(valuefed_tests, empty_get_default) +{ + SetupTest("test", 1); + auto vFed1 = GetFederateAs(0); + + auto& sub = vFed1->registerSubscription("test1"); + sub.setOption(helics::defs::options::connection_optional); + vFed1->enterExecutingMode(); + vFed1->requestTime(10.0); + double val1{0.0}; + EXPECT_NO_THROW(val1 = sub.getValue()); + EXPECT_EQ(val1, helics::invalidDouble); + + std::complex valc; + EXPECT_NO_THROW(valc = sub.getValue>()); + EXPECT_EQ(valc, std::complex(helics::invalidDouble, 0)); + + vFed1->finalize(); +} + +TEST_F(valuefed_tests, empty_get_complex) +{ + SetupTest("test", 1); + auto vFed1 = GetFederateAs(0); + + auto& ipt = vFed1->registerInput("I1", "complex"); + ipt.setOption(helics::defs::connections_optional); + ipt.addTarget("test_target"); + vFed1->enterExecutingMode(); + vFed1->requestTime(10.0); + + std::complex valc; + EXPECT_NO_THROW(valc = ipt.getValue>()); + EXPECT_EQ(valc, std::complex(helics::invalidDouble, 0)); + + double val1; + EXPECT_NO_THROW(val1 = ipt.getValue()); + EXPECT_EQ(val1, helics::invalidDouble); + + vFed1->finalize(); +} diff --git a/tests/helics/application_api/testFixtures.cpp b/tests/helics/application_api/testFixtures.cpp index a1bc11b5e3..c7a06a3291 100644 --- a/tests/helics/application_api/testFixtures.cpp +++ b/tests/helics/application_api/testFixtures.cpp @@ -6,12 +6,12 @@ SPDX-License-Identifier: BSD-3-Clause */ #include "testFixtures.hpp" -#include "helics/common/loggerCore.hpp" #include "helics/core/BrokerFactory.hpp" #include "helics/core/CoreFactory.hpp" #include #include +#include #include bool hasIndexCode(const std::string& type_name) @@ -72,7 +72,7 @@ FederateTestFixture::~FederateTestFixture() } if (broker->isConnected()) { - helics::LoggerManager::logMessage("forcing disconnect"); + spdlog::info("forcing disconnect"); broker->disconnect(); } } diff --git a/tests/helics/shared_library/CMakeLists.txt b/tests/helics/shared_library/CMakeLists.txt index 0b910d61bb..60cc19a70e 100644 --- a/tests/helics/shared_library/CMakeLists.txt +++ b/tests/helics/shared_library/CMakeLists.txt @@ -31,7 +31,7 @@ set(cpp_shared_library_test_sources test-value-federate2_cpp.cpp # FilterTests_cpp.cpp test-message-federate_cpp.cpp - # FederateTests.cpp TimingTests.cpp iterationTests.cpp subPubObjectTests.cpp + timingTests_cpp.cpp QueryTests_cpp.cpp MultiInputTests.cpp ) diff --git a/tests/helics/shared_library/SystemTests.cpp b/tests/helics/shared_library/SystemTests.cpp index bf3afcc5de..9171b697ec 100644 --- a/tests/helics/shared_library/SystemTests.cpp +++ b/tests/helics/shared_library/SystemTests.cpp @@ -214,7 +214,7 @@ TEST(other_tests, federate_add_dependency) auto fi = helicsCreateFederateInfo(); helicsFederateInfoLoadFromArgs(fi, 4, argv, &err); - helicsFederateInfoSetFlagOption(fi, helics_flag_source_only, true, &err); + helicsFederateInfoSetFlagOption(fi, helics_flag_source_only, helics_true, &err); auto fed1 = helicsCreateMessageFederate("fed1", fi, &err); EXPECT_EQ(err.error_code, 0); @@ -341,3 +341,26 @@ TEST(federate_tests, federateGeneratedGlobalError) helicsFederateDestroy(fed1); } + +// test generating a global from a broker and some of its error pathways +TEST(other_tests, broker_after_close) +{ + auto err = helicsErrorInitialize(); + auto brk = helicsCreateBroker("test", "gbroker_test", "--root", &err); + std::string globalVal = "this is a string constant that functions as a global"; + std::string globalVal2 = "this is a second string constant that functions as a global"; + helicsBrokerSetGlobal(brk, "testglobal", globalVal.c_str(), &err); + auto q = helicsCreateQuery("global", "testglobal"); + auto res = helicsQueryBrokerExecute(q, brk, &err); + EXPECT_EQ(res, globalVal); + helicsBrokerSetGlobal(brk, "testglobal2", globalVal2.c_str(), &err); + helicsQueryFree(q); + helicsCloseLibrary(); + + EXPECT_EQ(helicsBrokerIsConnected(brk), helics_false); + helicsBrokerDestroy(brk); + EXPECT_EQ(helicsBrokerIsConnected(brk), helics_false); + EXPECT_EQ(helicsBrokerIsValid(brk), helics_false); + helicsBrokerFree(brk); + EXPECT_EQ(helicsBrokerIsValid(brk), helics_false); +} diff --git a/tests/helics/shared_library/TimingTests.cpp b/tests/helics/shared_library/TimingTests.cpp index 85abc1ae94..97a08b80a1 100644 --- a/tests/helics/shared_library/TimingTests.cpp +++ b/tests/helics/shared_library/TimingTests.cpp @@ -164,18 +164,18 @@ TEST_F(timing_tests, timing_with_input_delay) CE(helicsEndpointSendMessageRaw(ept1, "e2", "test1", 5, &err)); CE(helicsFederateRequestTimeAsync(vFed1, 1.9, &err)); CE(gtime = helicsFederateRequestTimeComplete(vFed2, &err)); - EXPECT_EQ(gtime, - 1.1); // the message should show up at the next available time point after the impact - // window + EXPECT_DOUBLE_EQ(gtime, + 1.1); // the message should show up at the next available time point after the + // impact window CE(helicsFederateRequestTimeAsync(vFed2, 2.0, &err)); CE(gtime = helicsFederateRequestTimeComplete(vFed1, &err)); - EXPECT_EQ(gtime, 1.9); + EXPECT_DOUBLE_EQ(gtime, 1.9); CE(auto tres = helicsFederateGetTimeProperty(vFed1, helics_property_time_period, &err)); EXPECT_DOUBLE_EQ(tres, 0.1); CE(gtime = helicsFederateRequestTimeComplete(vFed2, &err)); - EXPECT_EQ(gtime, 2.0); + EXPECT_DOUBLE_EQ(gtime, 2.0); CE(helicsFederateFinalize(vFed1, &err)); CE(helicsFederateFinalize(vFed2, &err)); } diff --git a/tests/helics/shared_library/test-message-federate_cpp.cpp b/tests/helics/shared_library/test-message-federate_cpp.cpp index 6d6f76ddd4..0d91675486 100644 --- a/tests/helics/shared_library/test-message-federate_cpp.cpp +++ b/tests/helics/shared_library/test-message-federate_cpp.cpp @@ -155,3 +155,172 @@ TEST_F(mfed_tests, Message) EXPECT_FALSE(M3.isValid()); // NOLINT mFed1->finalize(); } + +TEST_F(mfed_tests, message_create_from_fed) +{ + SetupTest("test", 1, 1.0); + auto mFed1 = GetFederateAs(0); + + auto epid = mFed1->registerEndpoint("ep1"); + auto epid2 = mFed1->registerGlobalEndpoint("ep2", "random"); + + mFed1->enterExecutingMode(); + + helicscpp::Message mess(*mFed1); + + std::string data(500, 'a'); + + mess.destination("ep2"); + mess.data(data); + + epid.sendMessage(mess); + helics_time time = mFed1->requestTime(1.0); + + EXPECT_EQ(time, 1.0); + + auto res = mFed1->hasMessage(); + EXPECT_TRUE(res); + res = epid.hasMessage(); + EXPECT_TRUE(res == false); + res = epid2.hasMessage(); + EXPECT_TRUE(res); + + auto M = epid2.getMessage(); + // BOOST_REQUIRE (M); + ASSERT_EQ(M.size(), 500); + EXPECT_NE(M.data(), nullptr); + if (M.data() != nullptr) { + EXPECT_EQ(M.c_str()[245], 'a'); + } + mFed1->finalize(); + + auto mFed1State = mFed1->getCurrentMode(); + EXPECT_TRUE(mFed1State == helics_federate_state::helics_state_finalize); +} + +TEST_F(mfed_tests, message_create_from_ept) +{ + SetupTest("test", 1, 1.0); + auto mFed1 = GetFederateAs(0); + + auto epid = mFed1->registerEndpoint("ep1"); + auto epid2 = mFed1->registerGlobalEndpoint("ep2", "random"); + + mFed1->enterExecutingMode(); + + helicscpp::Message mess(epid); + + std::string data(500, 'a'); + + mess.destination("ep2"); + mess.data(data); + + epid.sendMessage(mess); + helics_time time = mFed1->requestTime(1.0); + + EXPECT_EQ(time, 1.0); + + auto res = mFed1->hasMessage(); + EXPECT_TRUE(res); + res = epid.hasMessage(); + EXPECT_TRUE(res == false); + res = epid2.hasMessage(); + EXPECT_TRUE(res); + + auto M = epid2.getMessage(); + // BOOST_REQUIRE (M); + ASSERT_EQ(M.size(), 500); + EXPECT_NE(M.data(), nullptr); + if (M.data() != nullptr) { + EXPECT_EQ(M.c_str()[245], 'a'); + } + mFed1->finalize(); + + auto mFed1State = mFed1->getCurrentMode(); + EXPECT_TRUE(mFed1State == helics_federate_state::helics_state_finalize); +} + +TEST_F(mfed_tests, message_create_from_fed_after) +{ + SetupTest("test", 1, 1.0); + auto mFed1 = GetFederateAs(0); + + auto epid = mFed1->registerEndpoint("ep1"); + auto epid2 = mFed1->registerGlobalEndpoint("ep2", "random"); + + mFed1->enterExecutingMode(); + + helicscpp::Message mess(*mFed1); + + mess.newMessageObject(*mFed1); + std::string data(500, 'a'); + + mess.destination("ep2"); + mess.data(data); + + epid.sendMessage(mess); + helics_time time = mFed1->requestTime(1.0); + + EXPECT_EQ(time, 1.0); + + auto res = mFed1->hasMessage(); + EXPECT_TRUE(res); + res = epid.hasMessage(); + EXPECT_TRUE(res == false); + res = epid2.hasMessage(); + EXPECT_TRUE(res); + + auto M = epid2.getMessage(); + // BOOST_REQUIRE (M); + ASSERT_EQ(M.size(), 500); + EXPECT_NE(M.data(), nullptr); + if (M.data() != nullptr) { + EXPECT_EQ(M.c_str()[245], 'a'); + } + mFed1->finalize(); + + auto mFed1State = mFed1->getCurrentMode(); + EXPECT_TRUE(mFed1State == helics_federate_state::helics_state_finalize); +} + +TEST_F(mfed_tests, message_create_from_ept_after) +{ + SetupTest("test", 1, 1.0); + auto mFed1 = GetFederateAs(0); + + auto epid = mFed1->registerEndpoint("ep1"); + auto epid2 = mFed1->registerGlobalEndpoint("ep2", "random"); + + mFed1->enterExecutingMode(); + + helicscpp::Message mess(epid); + mess.newMessageObject(epid); + std::string data(500, 'a'); + + mess.destination("ep2"); + mess.data(data); + + epid.sendMessage(mess); + helics_time time = mFed1->requestTime(1.0); + + EXPECT_EQ(time, 1.0); + + auto res = mFed1->hasMessage(); + EXPECT_TRUE(res); + res = epid.hasMessage(); + EXPECT_TRUE(res == false); + res = epid2.hasMessage(); + EXPECT_TRUE(res); + + auto M = epid2.getMessage(); + // BOOST_REQUIRE (M); + ASSERT_EQ(M.size(), 500); + EXPECT_NE(M.data(), nullptr); + if (M.data() != nullptr) { + EXPECT_EQ(M.c_str()[245], 'a'); + } + mFed1->finalize(); + + auto mFed1State = mFed1->getCurrentMode(); + EXPECT_TRUE(mFed1State == helics_federate_state::helics_state_finalize); +} diff --git a/tests/helics/shared_library/test-value-federate1.cpp b/tests/helics/shared_library/test-value-federate1.cpp index 0250433a8b..c0aa02db45 100644 --- a/tests/helics/shared_library/test-value-federate1.cpp +++ b/tests/helics/shared_library/test-value-federate1.cpp @@ -516,6 +516,64 @@ void runFederateTestComplex(const char* core, CE(helicsFederateFinalize(vFed, &err)); } +void runFederateTestComplex2(const char* core, + double defaultValue_r, + double defaultValue_i, + double testValue1_r, + double testValue1_i, + double testValue2_r, + double testValue2_i) +{ + helics_time gtime; + double val1_r = 0.0; + double val1_i = 0.0; + helics_error err = helicsErrorInitialize(); + FederateTestFixture fixture; + fixture.SetupTest(helicsCreateValueFederate, core, 1, 1.0); + auto vFed = fixture.GetFederateAt(0); + + // register the publications + auto pubid = helicsFederateRegisterGlobalTypePublication(vFed, "pub1", "complex", "", &err); + auto subid = helicsFederateRegisterSubscription(vFed, "pub1", "complex", &err); + CE(helicsInputSetDefaultComplex(subid, defaultValue_r, defaultValue_i, &err)); + + CE(helicsFederateEnterExecutingMode(vFed, &err)); + + // publish string1 at time=0.0; + CE(helicsPublicationPublishComplex(pubid, testValue1_r, testValue1_i, &err)); + + CE(helicsInputGetComplex(subid, &val1_r, &val1_i, &err)); + EXPECT_EQ(val1_r, defaultValue_r); + EXPECT_EQ(val1_i, defaultValue_i); + + CE(gtime = helicsFederateRequestTime(vFed, 1.0, &err)); + EXPECT_EQ(gtime, 1.0); + + // get the value + CE(helics_complex hc = helicsInputGetComplexObject(subid, &err)); + // make sure the string is what we expect + EXPECT_EQ(hc.real, testValue1_r); + EXPECT_EQ(hc.imag, testValue1_i); + + // publish a second value + CE(helicsPublicationPublishComplex(pubid, testValue2_r, testValue2_i, &err)); + + // make sure the value is still what we expect + CE(helicsInputGetComplex(subid, &val1_r, &val1_i, &err)); + EXPECT_EQ(val1_r, testValue1_r); + EXPECT_EQ(val1_i, testValue1_i); + // advance time + CE(gtime = helicsFederateRequestTimeAdvance(vFed, 1.0, &err)); + // make sure the value was updated + EXPECT_EQ(gtime, 2.0); + + CE(hc = helicsInputGetComplexObject(subid, &err)); + EXPECT_EQ(hc.real, testValue2_r); + EXPECT_EQ(hc.imag, testValue2_i); + + CE(helicsFederateFinalize(vFed, &err)); +} + void runFederateTestInteger(const char* core, int64_t defaultValue, int64_t testValue1, @@ -845,6 +903,10 @@ TEST_P(vfed_type_tests, single_transfer_complex) runFederateTestComplex(GetParam(), 54.23233, 0.7, -9.7, 3.2, -3e45, 1e-23); } +TEST_F(vfed_single_tests, single_transfer_complex2) +{ + runFederateTestComplex2("test", 54.23233, 0.7, -9.7, 3.2, -3e45, 1e-23); +} TEST_P(vfed_type_tests, single_transfer_string) { runFederateTestString(GetParam(), diff --git a/tests/helics/shared_library/test-value-federate2_cpp.cpp b/tests/helics/shared_library/test-value-federate2_cpp.cpp index 8e25798c37..d478a2d817 100644 --- a/tests/helics/shared_library/test-value-federate2_cpp.cpp +++ b/tests/helics/shared_library/test-value-federate2_cpp.cpp @@ -102,6 +102,8 @@ TEST_P(vfed_type_tests, test_async_calls) EXPECT_EQ(f1time, 1.0); EXPECT_EQ(gtime, 1.0); + gtime = vFed1->getCurrentTime(); + EXPECT_EQ(gtime, 1.0); // get the value auto s = subid.getString(); diff --git a/tests/helics/shared_library/timingTests_cpp.cpp b/tests/helics/shared_library/timingTests_cpp.cpp new file mode 100644 index 0000000000..15b3f9e238 --- /dev/null +++ b/tests/helics/shared_library/timingTests_cpp.cpp @@ -0,0 +1,63 @@ +/* +Copyright (c) 2017-2020, +Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable +Energy, LLC. See the top-level NOTICE for additional details. All rights reserved. +SPDX-License-Identifier: BSD-3-Clause +*/ + +#include "../src/helics/cpp98/Broker.hpp" +#include "../src/helics/cpp98/Core.hpp" +#include "../src/helics/cpp98/ValueFederate.hpp" +#include "cpptestFixtures.hpp" + +#include +#include + +struct timing_tests: public FederateTestFixture_cpp, public ::testing::Test { +}; + +TEST_F(timing_tests, barrier1) +{ + SetupTest("test_2", 2); + auto vFed1 = GetFederateAs(0); + auto vFed2 = GetFederateAs(1); + + brokers[0]->setTimeBarrier(2.0); + vFed1->enterExecutingModeAsync(); + vFed2->enterExecutingMode(); + vFed1->enterExecutingModeComplete(); + vFed1->requestTimeAsync(3.0); + auto rtime = vFed2->requestTime(1.89); + EXPECT_DOUBLE_EQ(rtime, 1.89); + std::this_thread::sleep_for(std::chrono::milliseconds(200)); + EXPECT_FALSE(vFed1->isAsyncOperationCompleted()); + brokers[0]->clearTimeBarrier(); + rtime = vFed1->requestTimeComplete(); + EXPECT_EQ(rtime, 3.0); + vFed1->finalize(); + vFed2->finalize(); +} + +// Tests out the restrictive time policy +TEST_F(timing_tests, time_barrier_update) +{ + SetupTest("test_2", 2); + auto vFed1 = GetFederateAs(0); + auto vFed2 = GetFederateAs(1); + + brokers[0]->setTimeBarrier(2.0); + vFed1->enterExecutingModeAsync(); + vFed2->enterExecutingMode(); + vFed1->enterExecutingModeComplete(); + vFed1->requestTimeAsync(3.0); + auto rtime = vFed2->requestTime(1.89); + EXPECT_DOUBLE_EQ(rtime, 1.89); + std::this_thread::sleep_for(std::chrono::milliseconds(200)); + EXPECT_FALSE(vFed1->isAsyncOperationCompleted()); + brokers[0]->setTimeBarrier(4.0); + rtime = vFed1->requestTimeComplete(); + EXPECT_EQ(rtime, 3.0); + + vFed1->finalize(); + vFed2->finalize(); +} diff --git a/tests/helics/system_tests/TimingTests2.cpp b/tests/helics/system_tests/TimingTests2.cpp index 9917f04514..a9866f6a81 100644 --- a/tests/helics/system_tests/TimingTests2.cpp +++ b/tests/helics/system_tests/TimingTests2.cpp @@ -320,3 +320,50 @@ TEST_F(timing_tests2, wait_for_current_time_flag) vFed3->finalize(); } + +// Tests out the restrictive time policy +TEST_F(timing_tests2, time_barrier1) +{ + SetupTest("test_2", 2); + auto vFed1 = GetFederateAs(0); + auto vFed2 = GetFederateAs(1); + + brokers[0]->setTimeBarrier(2.0); + vFed1->enterExecutingModeAsync(); + vFed2->enterExecutingMode(); + vFed1->enterExecutingModeComplete(); + vFed1->requestTimeAsync(3.0); + auto rtime = vFed2->requestTime(1.89); + EXPECT_EQ(rtime, 1.89); + std::this_thread::sleep_for(std::chrono::milliseconds(200)); + EXPECT_FALSE(vFed1->isAsyncOperationCompleted()); + brokers[0]->clearTimeBarrier(); + rtime = vFed1->requestTimeComplete(); + EXPECT_EQ(rtime, 3.0); + vFed1->finalize(); + vFed2->finalize(); +} + +// Tests out the restrictive time policy +TEST_F(timing_tests2, time_barrier_update) +{ + SetupTest("test_2", 2); + auto vFed1 = GetFederateAs(0); + auto vFed2 = GetFederateAs(1); + + brokers[0]->setTimeBarrier(2.0); + vFed1->enterExecutingModeAsync(); + vFed2->enterExecutingMode(); + vFed1->enterExecutingModeComplete(); + vFed1->requestTimeAsync(3.0); + auto rtime = vFed2->requestTime(1.89); + EXPECT_EQ(rtime, 1.89); + std::this_thread::sleep_for(std::chrono::milliseconds(200)); + EXPECT_FALSE(vFed1->isAsyncOperationCompleted()); + brokers[0]->setTimeBarrier(4.0); + rtime = vFed1->requestTimeComplete(); + EXPECT_EQ(rtime, 3.0); + + vFed1->finalize(); + vFed2->finalize(); +} diff --git a/tests/helics/test_files/example_value_fed.json b/tests/helics/test_files/example_value_fed.json index cc1d067f9a..9aef952991 100644 --- a/tests/helics/test_files/example_value_fed.json +++ b/tests/helics/test_files/example_value_fed.json @@ -25,7 +25,7 @@ { "key": "pub1", // the name of the publication "type": "double", // the type associated with a publication (optional) - "unit": "m", // the units associated with a publication (optional) + "units": "m", // the units associated with a publication (optional) "global": true, //set to true to make the key global (default is false in which case the publication is prepended with the federate name) "info": "this is an information string for use by the application" }, diff --git a/tests/helics/webserver/webServerHttpTests.cpp b/tests/helics/webserver/webServerHttpTests.cpp index ee8054b8b1..dd1de93d79 100644 --- a/tests/helics/webserver/webServerHttpTests.cpp +++ b/tests/helics/webserver/webServerHttpTests.cpp @@ -5,6 +5,7 @@ Energy, LLC. See the top-level NOTICE for additional details. All rights reserv SPDX-License-Identifier: BSD-3-Clause */ +#include "helics/application_api/ValueFederate.hpp" #include "helics/apps/helicsWebServer.hpp" #include "helics/common/JsonProcessingFunctions.hpp" #include "helics/core/BrokerFactory.hpp" @@ -425,3 +426,35 @@ TEST_F(httpTest, deleteJson) EXPECT_TRUE(val["brokers"].isArray()); EXPECT_EQ(val["brokers"].size(), 0U); } + +TEST_F(httpTest, timeBlock) +{ + sendCommand(http::verb::post, "brk_timer", "type=ZMQ"); + auto cr = addCore(helics::core_type::ZMQ, "--name=c_timer -f1 --broker=brk_timer"); + EXPECT_TRUE(cr->connect()); + + helics::ValueFederate vFed("fed1", cr); + sendCommand(http::verb::post, "brk_timer/barrier", "time=2"); + + vFed.enterExecutingMode(); + auto treq = vFed.requestTime(1.75); + EXPECT_EQ(treq, 1.75); + vFed.requestTimeAsync(3.0); + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + EXPECT_FALSE(vFed.isAsyncOperationCompleted()); + sendCommand(http::verb::post, "brk_timer/barrier", "time=5"); + auto rtime = vFed.requestTimeComplete(); + EXPECT_EQ(rtime, 3.0); + + vFed.requestTimeAsync(6.0); + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + EXPECT_FALSE(vFed.isAsyncOperationCompleted()); + sendCommand(http::verb::post, "brk_timer/barrier", "time=-1"); + rtime = vFed.requestTimeComplete(); + EXPECT_EQ(rtime, 6.0); + + vFed.finalize(); + Json::Value v1; + v1["broker"] = "brk_timer"; + sendCommand(http::verb::post, "delete", generateJsonString(v1)); +} diff --git a/tests/helics/webserver/webServerWebSocketTests.cpp b/tests/helics/webserver/webServerWebSocketTests.cpp index 3e6350974f..6eaea588e9 100644 --- a/tests/helics/webserver/webServerWebSocketTests.cpp +++ b/tests/helics/webserver/webServerWebSocketTests.cpp @@ -5,6 +5,7 @@ Energy, LLC. See the top-level NOTICE for additional details. All rights reserv SPDX-License-Identifier: BSD-3-Clause */ +#include "helics/application_api/ValueFederate.hpp" #include "helics/apps/helicsWebServer.hpp" #include "helics/common/JsonProcessingFunctions.hpp" #include "helics/core/BrokerFactory.hpp" @@ -376,3 +377,48 @@ TEST_F(webTest, deleteJson) EXPECT_TRUE(val["brokers"].isArray()); EXPECT_EQ(val["brokers"].size(), 0U); } + +TEST_F(webTest, timeBlock) +{ + Json::Value create; + create["broker"] = "brk_timerws"; + create["command"] = "create"; + create["core_type"] = "ZMQ"; + create["num_feds"] = 1; + sendText(generateJsonString(create)); + auto cr = addCore(helics::core_type::ZMQ, "--name=c_timer -f1 --broker=brk_timerws"); + EXPECT_TRUE(cr->connect()); + + helics::ValueFederate vFed("fed1", cr); + + Json::Value barrier; + barrier["broker"] = "brk_timerws"; + barrier["command"] = "barrier"; + barrier["time"] = 2; + sendText(generateJsonString(barrier)); + + vFed.enterExecutingMode(); + auto treq = vFed.requestTime(1.75); + EXPECT_EQ(treq, 1.75); + vFed.requestTimeAsync(3.0); + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + EXPECT_FALSE(vFed.isAsyncOperationCompleted()); + barrier["time"] = 5.0; + sendText(generateJsonString(barrier)); + auto rtime = vFed.requestTimeComplete(); + EXPECT_EQ(rtime, 3.0); + + vFed.requestTimeAsync(6.0); + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + EXPECT_FALSE(vFed.isAsyncOperationCompleted()); + barrier["command"] = "clearbarrier"; + sendText(generateJsonString(barrier)); + rtime = vFed.requestTimeComplete(); + EXPECT_EQ(rtime, 6.0); + + vFed.finalize(); + Json::Value v1; + v1["command"] = "delete"; + v1["broker"] = "brk_timerws"; + sendText(generateJsonString(v1)); +}