Load FMI 1.0/2.0 binaries from FMI 3.0 platform-tuple directories - #884
Open
topolarity wants to merge 1 commit into
Open
Load FMI 1.0/2.0 binaries from FMI 3.0 platform-tuple directories#884topolarity wants to merge 1 commit into
topolarity wants to merge 1 commit into
Conversation
FMI 2.0 only defines platform names for x86 and x86-64 (win32/win64, linux32/linux64, darwin32/darwin64). On other architectures - notably Apple Silicon - exporters follow the FMI project's recommendation and place the binaries under the FMI 3.0 platform tuple instead (e.g. binaries/aarch64-darwin). fmi_info()/dump()/validate_fmu() already recognize these directories since CATIA-Systems#636, but the FMI 1.0/2.0 loader still resolved the shared library exclusively via the legacy platform name, so such FMUs failed to instantiate with "Cannot find shared library ... binaries/darwin64/...". Also teach supported_platforms() about aarch64-linux and aarch64-windows binaries, mirroring what CATIA-Systems#636 did for aarch64-darwin, so simulate_fmu()'s platform check accepts such FMUs on matching hosts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #395.
From the FMI 2.0.5 spec:
This extends the work done in #636 which applied to FMIv3 and
fmi_info()/dump()/validate_fmu()but not the FMI 1.0 / 2.0 loader. As a bonus, add support for Windows AArch64 and Linux AArch64.Note that the
supported_platforms()returns e.g.darwin64even foraarch64-darwinwhich can cause platform checks to incorrectly pass on these platforms (e.g. when trying to run an x86-64 FMU on AArch64). However #636 has the same problem and fixing it touches quite a few more lines, so I left it as future work for now.The patch set was generated with Claude Fable 5, after which I reviewed the changes in full.