From 6512a220be29aa2328d0bf108703a23c7d750d7c Mon Sep 17 00:00:00 2001 From: ThummeTo <83663542+ThummeTo@users.noreply.github.com> Date: Fri, 3 Nov 2023 13:44:35 +0100 Subject: [PATCH] v0.16.1 (#101) * preparation for multi-threading * updated readme and tagbot --- .github/workflows/TagBot.yml | 18 ++++++++++++++++++ Project.toml | 4 ++-- README.md | 7 ++++--- src/FMI2/c.jl | 2 ++ src/FMI2/prep.jl | 2 +- 5 files changed, 27 insertions(+), 6 deletions(-) diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index f49313b..90dc100 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -4,6 +4,22 @@ on: types: - created workflow_dispatch: + inputs: + lookback: + default: 3 +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read jobs: TagBot: if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' @@ -12,4 +28,6 @@ jobs: - uses: JuliaRegistries/TagBot@v1 with: token: ${{ secrets.GITHUB_TOKEN }} + # Edit the following line to reflect the actual name of the GitHub Secret containing your private key ssh: ${{ secrets.DOCUMENTER_KEY }} + # ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }} diff --git a/Project.toml b/Project.toml index 5ca7b7c..839a68c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "FMIImport" uuid = "9fcbc62e-52a0-44e9-a616-1359a0008194" authors = ["TT ", "LM ", "JK "] -version = "0.16.0" +version = "0.16.1" [deps] Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" @@ -13,7 +13,7 @@ ZipFile = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea" [compat] EzXML = "1.1.0" -FMICore = "0.18.0" +FMICore = "0.18.2" RelocatableFolders = "1" ZipFile = "0.10.0" julia = "1.6" diff --git a/README.md b/README.md index b21c9f9..c0b8153 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [*FMIImport.jl*](https://github.com/ThummeTo/FMIImport.jl) provides the foundation for the Julia packages [*FMI.jl*](https://github.com/ThummeTo/FMI.jl) and [*FMIFlux.jl*](https://github.com/ThummeTo/FMIFlux.jl). -[![Dev Docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://ThummeTo.github.io/FMIImport.jl/dev) +[![Dev Docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://ThummeTo.github.io/FMI.jl/dev) [![Run Tests](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/Test.yml/badge.svg)](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/Test.yml) [![Build Docs](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/Documentation.yml/badge.svg)](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/Documentation.yml) [![Run PkgEval](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/Eval.yml/badge.svg)](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/Eval.yml) @@ -20,12 +20,12 @@ 2\. Install [*FMIImport.jl*](https://github.com/ThummeTo/FMIImport.jl): ```julia-repl -(@v1.6) pkg> add FMIImport +(@v1) pkg> add FMIImport ``` 3\. If you want to check that everything works correctly, you can run the tests bundled with [*FMIImport.jl*](https://github.com/ThummeTo/FMIImport.jl): ```julia-repl -(@v1.6) pkg> test FMIImport +(@v1) pkg> test FMIImport ``` 4\. Have a look inside the [examples folder](https://github.com/ThummeTo/FMI.jl/tree/examples/examples) in the examples branch or the [examples section](https://thummeto.github.io/FMI.jl/dev/examples/overview/) of the documentation of the [*FMI.jl*](https://github.com/ThummeTo/FMI.jl) package. All examples are available as Julia-Script (*.jl*), Jupyter-Notebook (*.ipynb*) and Markdown (*.md*). @@ -37,6 +37,7 @@ To keep dependencies nice and clean, the original package [*FMI.jl*](https://git - [*FMIImport.jl*](https://github.com/ThummeTo/FMIImport.jl): Importing FMUs into Julia - [*FMIExport.jl*](https://github.com/ThummeTo/FMIExport.jl): Exporting stand-alone FMUs from Julia Code - [*FMICore.jl*](https://github.com/ThummeTo/FMICore.jl): C-code wrapper for the FMI-standard +- [*FMISensitivity.jl*](https://github.com/ThummeTo/FMISensitivity.jl): Static and dynamic sensitivities over FMUs - [*FMIBuild.jl*](https://github.com/ThummeTo/FMIBuild.jl): Compiler/Compilation dependencies for FMIExport.jl - [*FMIFlux.jl*](https://github.com/ThummeTo/FMIFlux.jl): Machine Learning with FMUs (differentiation over FMUs) - [*FMIZoo.jl*](https://github.com/ThummeTo/FMIZoo.jl): A collection of testing and example FMUs diff --git a/src/FMI2/c.jl b/src/FMI2/c.jl index e20625c..20bb5b6 100644 --- a/src/FMI2/c.jl +++ b/src/FMI2/c.jl @@ -122,6 +122,8 @@ function fmi2FreeInstance!(c::FMU2Component; popComponent::Bool = true) compAddr = c.compAddr + @assert c.threadid == Threads.threadid() "Thread #$(Threads.threadid()) tried to free component with address $(c.compAddr), but doesn't own it.\nThe component is owned by thread $(c.threadid)" + if popComponent lock(lk_fmi2FreeInstance) do ind = findall(x -> x.compAddr == compAddr, c.fmu.components) diff --git a/src/FMI2/prep.jl b/src/FMI2/prep.jl index 2839b55..22cdeaf 100644 --- a/src/FMI2/prep.jl +++ b/src/FMI2/prep.jl @@ -70,7 +70,7 @@ function prepareSolveFMU(fmu::FMU2, if hasCurrentComponent(fmu) c = getCurrentComponent(fmu) else - @warn "Found no FMU instance, but executionConfig doesn't force allocation. Allocating one. Use `fmi2Instantiate(fmu)` to prevent this message." + @warn "Found no FMU instance, but executionConfig doesn't force allocation. Allocating one.\nUse `fmi2Instantiate(fmu)` to prevent this message." c = fmi2Instantiate!(fmu; type=type) end end