Git Product home page Git Product logo

fmi-library's Introduction

FMI Library

FMI Library (FMIL) is a software package written in C that enables integration of Functional Mock-up Units (FMUs) import in applications. FMI Library is an independent open-source implementation of the FMI open standard.

The documentation for the latest version of FMI Library can be downloaded from the release page.

Please report issues related to FMI Library to the GitHub issues page.

For information about contributing, see here.

Building

Instructions on how to build FMI Library can be found in the HTML documentation for each release. See the release page.

fmi-library's People

Contributors

filip-stenstrom avatar iakovn avatar mikaeljohnssonmodelon avatar modelonrobinandersson avatar petermeisrimelmodelon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fmi-library's Issues

build dll and lib success but get four object

hello , I compiled and build it according to the FMILIB_Readme.txt.
but i get four dll like this
74 YS8Z7LA%)LY9H@%3D690

Is this normal? or i get some thing wrong ?
In most cases, it should be the one dll and lib file.

Error parsing 'independent' variable

If modelDescription.xml (FMI2) contains a variable with causality=independent, the xml-parser reports a parse error:
[error ] [FMI Library: FMI2XML] Start attribute is required for this causality, variability and initial combination

According to the specification, this variable must be defined without the start attribute:
If one variable is defined as "independent", it must be defined as "Real" without a "start" attribute.

Function to check if dependencies in modelDescription.xml are correct.

Question

Hey 👋
I'm currently trying to get some FMUs from the FMI Cross Check to run with OMSimulator and basically found FMUs that have wrong dependencies in the modelDescription.xml but are otherwise fine and could be simulated if we just ignore the dependencies.

My Question: Has the fmi-library a function to validate that the dependencies in

<ModelStructure>
    <Outputs>
      [...]
    </Outputs>
    <Derivatives>
      [...]
    </Derivatives>
    <InitialUnknowns>
      [...]
    </InitialUnknowns>
  </ModelStructure>

are correct? I couldn't find one in the documentation.
If that is not possible yet would you like to add such a function? For the FMI Cross Check it could be very useful to validate modelDescription.xml's as well.

Alternative solution

OMSimualtor calls fmi2_import_get_initial_unknowns_dependencies to get the dependencies from the modelDescription.xml but computes them on it's own as well to get the number of initial unknowns. And for the given FMU those two don't match.
If fmi2_import_get_initial_unknowns_dependencies would also return the size of startIndex and dependency we can do the check our-self.

Related Issues

The FMU I want to validate can be found on GitHub: https://github.com/modelica/fmi-cross-check/tree/master/fmus/2.0/me/linux64/MapleSim/2016.2/CoupledClutches.

Related issue on OpenModelica/OMSimulator: OpenModelica/OMSimulator#838

OMSimulator is using fmi-library version 2.0.3.

AddressSanitizer reports several memory leaks

Building the library tests with -fsanitize=leak -fsanitize=address shows several leaks, e.g.

Direct leak of 144 byte(s) in 1 object(s) allocated from:
    #0 0x7faffeb07040 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc7040)
    #1 0x7faffe7c4455 in fmi1_import_allocate (~/fmi-library-2.3/build/libfmilib_shared.so+0xe455)

Log file with full output. We also encounter these leaks when we call fmi-library in our project.

I've tested fmi-library-2.3 with these commands on ubuntu-focal:

cmake ~/fmi-library-2.3 '-DCMAKE_CXX_FLAGS=-O1 -g -fsanitize=address -fsanitize=leak -fno-omit-frame-pointer' '-DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address -fsanitize=leak' '-DCMAKE_SHARED_LINKER_FLAGS=-O -fsanitize=address -fsanitize=leak'
make install
ctest --verbose

Not possible to load two different FMUs at the same time

Hello,

I´m ussing the code of fmi2_import_cs_test to load two CS FMUs at the same time. But fmi2_import_create_dllfmu can only be used once until is used fmi2_import_destroy_dllfmu (meaning just one FMU at a time) . Is it possible another way to load two FMUs to use at the same time?

Thanks for your attention

Merging static libs with MSVC does not work.

FMIL tries to merge static libs with the function merge_static_libs. However this does not seem to work with MSVC.

I am trying to debug the issue but looking at the code responsible for merging libs with MSVC

# Now the easy part for MSVC and for MAC
if(MSVC)
# lib.exe does the merging of libraries just need to conver the list into string
foreach(CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES})
set(flags "")
foreach(lib ${libfiles_${CONFIG_TYPE}})
set(flags "${flags} ${lib}")
endforeach()
string(TOUPPER "STATIC_LIBRARY_FLAGS_${CONFIG_TYPE}" PROPNAME)
set_target_properties(${outlib} PROPERTIES ${PROPNAME} "${flags}")
endforeach()
elseif(APPLE)

I can not see anything relevant to actually merging the libraries.

Is there something else that does the merging? If so where is it located so we can continue debugging.

jm_log_level_to_string double define when include fmilib.h and fmi_zip_zip.h

Hello! i'm try to use the Fmi-Library to process FMU files, but i meet the error like
jm_log_level_to_string has been define in fmilib_shared.lib(fmilib_shared.dll)
when i use the #include <fmilib.h> and #include <FMI/fmi_zip_zip.h> at same time,
here is my code
2021-11-18 203531
i am tryed to use it with out the jm_log_level_to_string but program just crashed.
Do you have any good solution suggestions? Am I using this correctly?

how to enable the getdirectionalderivative function?

Hi everyone,

My issue is I am willing to calculate the partial derivatives of outputs to the inputs, and to the internal states, of a fmu model exported from Openmodelica.
According to the documentation of fmi 2.0, the attribute 'providesDirectionalDerivatives' in fmu model, should be true, I think this should be set up during the fmu model exporting from the Openmodelica.
In model exchange mode, this attribute could be set as true when being exported from Openmodelica, however after I imported it into c program, I couldn't invoke the getdirectionalderivative function (or the cover function fmi2_import_get_directional_derivative) in fmi-library.
In co-simulation mode, this attribute couldn't even be changed, I tried adding '--providesDirectionalDerivatie=true' in the options-simulation tab, and in the commandline, both failed.

So how could I do, does fmi-library support this function getdirectionalderivative ?
Or is this because fmu from Openmodelica doesn't have this function ?

thanks a lot in advance !
My email: [email protected]

Linux Ubuntu compilation issue

Contexts of compilation:

  • Microsoft Visual Studio Pro 2022 with Linux workload.
  • Configuration with vcpkg

a/ Windows 10 mode:

  • Compilation on: Local computer + x64 Debug
    => compilation ok

b/ Linux mode:

  • Microsoft Windows WSL2
  • Linux Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)
  • Compilation on: WSL: Ubuntu + Linux Debug

CMake Error:
Running
'/usr/bin/ninja' '-C' '/home/xmirabel/.vs/fmi-library-master/out/build/linux-debug' '-t' 'recompact'
failed with:
ninja: error: build.ninja:4558: multiple rules generate ExpatEx/libexpat.a [-w dupbuild=err] C:\R\fmi-library-master\ ninja

How can I solve it, please?

25 - ctest_fmi2_import_default_experiment_test (Failed)

Hello, everyone!

I've compiled 2.2.3 version of the library on Windows 10 with the help of the latest version of MinGW and MSYS.

mkdir mybuild
cd mybuild
cmake-gui ..

The only option I changed in configuration was:
FMILIB_FMI_PLATFORM I set to win64 instead of win32
source code dir: fmi-library-master
binaries dir: fmi-library-master/mybuild

Then I did:
make
make install
make test

During the test I got an error for the default experiment test:
Start 25: ctest_fmi2_import_default_experiment_test
25/35 Test #25: ctest_fmi2_import_default_experiment_test ............***Failed 0.10 sec

<...>

The following tests FAILED:
25 - ctest_fmi2_import_default_experiment_test (Failed)
Errors while running CTest
make: *** [test] Error 8

The library itself was compiled well and is located in the install directory.

Should I worry about this test failure?

Best wishes,
I.E.

Warnings treated as errors when compiling with warning level 4

With version 2.4 from fmi-library, there are warnings treated as errors when compiling with cmake warning level4:

include\JM\jm_callbacks.h(209): warning C4100: 'include\JM\jm_callbacks.h(209): error C2220: the following warning is treated as an error
include\JM\jm_callbacks.h(209): error C2220: the following warning is treated as an error
include\JM\jm_callbacks.h(209): warning C4100: 'fmt': unreferenced formal parameter
include\JM\jm_callbacks.h(209): warning C4100: 'module': unreferenced formal parameter
include\JM\jm_callbacks.h(209): warning C4100: 'cb': unreferenced formal parameter
include\JM\jm_callbacks.h(214): warning C4100: 'fmt': unreferenced formal parameter
include\JM\jm_callbacks.h(214): warning C4100: 'module': unreferenced formal parameter
include\JM\jm_callbacks.h(214): warning C4100: 'cb': unreferenced formal parameter
include\JM\jm_callbacks.h(99): warning C4505: 'jm_get_last_error': unreferenced local function has been removed
include\JM\jm_callbacks.h(104): warning C4505: 'jm_clear_last_error': unreferenced local function has been removed
include\JM\jm_callbacks.h(209): warning C4505: 'jm_log_debug_v': unreferenced local function has been removed
include\JM\jm_callbacks.h(214): warning C4505: 'jm_log_debug': unreferenced local function has been removed
include\FMI1\fmi1_types.h(48): warning C4505: 'fmi1_get_platform': unreferenced local function has been removed
include\FMI2\fmi2_types.h(53): warning C4505: 'fmi2_get_types_platform': unreferenced local function has been removed

SVR to FMU

Helloo... I am very new to python + AI model.

Recently I make a prediction model with SVR, and I would like to apply this to Star CCM+(simulation tool) so that I can do co-simulation.

I have read modules explanation, but I couldn't find how to export python prediction model to FMU...

IF you know the solution, please help me.

FYI : Star ccm+ supports FMU 1.0 /2.0

Unable to compile fmilib_shared

Dear support to Build PyFMI project in Win64 it requires the fmilib_shared.lib library:
LINK : fatal error LNK1181: cannot open input file 'fmilib_shared.lib'

But when I build the fmi-library I'm not able to generate such static file.
Here the command I'm using.
cmake -DFMILIB_BUILDING_LIBRARY=ON -DFMILIB_BUILD_SHARED_LIB=OFF -DFMILIB_BUILD_STATIC_LIB=ON -DFMILIB_BUILD_FOR_SHARED_LIBS=OFF -DFMILIB_BUILD_TESTS=OFF -G "MinGW Makefiles" E:\ESTECO\FMI\fmi-library

Can you suggest me the correct way?
Thanks

building issues

I am a green finger on how to build this poject, how can i get detailed operations?give me an eg with using building ,maybe in great help

issue with methods jm_log*

Hello,

I started a project based on the cmake fmi-library, i made a few ajustment for my own project but the project works fine on eclipse with the "cmake4eclipse" module.
My need is to compile the project outside the cmake context, i'd like to integrate this code on a C++ project non cmake based(Mingw64 compiler).
After some time of ajustment and troubeshooting, i'm stuck with an issue of the type ("undefined reference to") while linking the project.
It seems that the definitions of methods jm_log_* is not in the project but rather contained in a dll (here i found the definitions in a OpenModelica dll since i use FMU from OpenModelica).

My question is : is it possible to access the source code of jm_log functions or where can i find a 64 bits library containing the definitions ? I already tried the OpenModelica dll(s) but it seems that those libs are in 32 bits (my compiler return "skipping incompatible" while trying to add them in the project as library, i'm confident it's not eclipse setting issue based).

I thank you in advance

libexpat 2.1.0 flagged as a security risk by blackduck

We use the fmi-library in ADAMS. One of the components used by fmi-library, libexpat.2.1.0 is flagged by BlackDuck as a security Risk.
I would like to know how to submit a request to update the libexpat.2.1.0 to a newer version to eliminate this security risk.

I sent an email to [email protected] but have not heard anything back. Hence I am posting this here.

Please help. Thank you.

jm_vsnprintf

When I call this jm_vsnprintf, it appears unresolved externals.

C++ suffix on C-file

When attempting to build this library (v2.4.1) without access to a C++ compiler,
CMake gets confused about this file: Test/FMI2/fmi2_import_xml_test.cc.

If I change in CMakeLists.txt project (FMILibrary LANGUAGES C) and rename the file above to a .c extension, it compiles fine.

I notice that for the next major release, FMI 3 tests are using C++, so perhaps not so relevant going forward.

further development

I wanted to ask if anyone is planning to continue working on the "dev_3.0" branch or if anyone is already working on it. I wanted to test the new binary data type but then I saw that the FMI headers are not up to date and that the data type and it's related functions are not there yet.

UTF8 file path support on Windows

Hi,

in the default Windows configuration for 3.02a, jm_portability_load_dll_handle_with_flag(const char* dll_file_path, jm_portability_loadlibrary_flag_t flag) uses LoadLibraryEx(dll_file_path, NULL, flag); - there is thus no support for UTF8 characters in the dll_file_path, and loading DLLs from any path containing UTF8 characters subsequently fails. Is there any solution for support unicode file paths within fmilib?

Linking error

After your last update, I have a problem linking fmi with my project.
Switched back to 2.4.0 for now, but can you have a look?

Error:
libfmilib_shared.so: undefined reference to getrandom@GLIBC_2.25 [--no-allow-shlib-undefined]

MSVC Debug build 3.0a3 can't find zlib.lib

Building 3.0a3 as a MSVC project with

cmake -G "Visual Studio 16 2019" "../fmi-library-3.0a2"
cmake --build . --config Debug

failes to link fmizip.lib and aborts the build:

fmizip.vcxproj -> C:\Hubele\scm\faster-bitbucket\fmi-library-build\buildMSVC30a3\Debug\fmizip.lib
LINK : fatal error LNK1104: cannot open file 'zlibext\Debug\zlib.lib' [C:\Hubele\scm\faster-bitbuck
et\fmi-library-build\buildMSVC30a3\compress_test_fmu_zip.vcxproj]

The reason appears to be that the zlib Debug configuration build produces a zlibd.lib instead of zlib.lib. I've attached a crude workaround.

cmake version 3.26.4

fmi2_import_get_variable_has_start(fmi2_import_variable_t*) API is returning zero (0) for Outputs and Global Block Outputs

Hi Team,

I have a requirement of passing start value for Outputs and Global Block Outputs variables in FMI2.0.
As part of this , I am trying to utilize fmi2_import_get_variable_has_start(fmi2_import_variable_t*) API to check if the variable contains start. But unfortunately, above mentioned API is returning zero (0), so I could not proceed further for retrieving the start value.

My question is, is it expected behavior for fmi2_import_get_variable_has_start(fmi2_import_variable_t*) API not to read start value for Outputs and Global Block Outputs variables. Though I am getting 1 while trying to read from Parameters and Inputs variable.

Many Thanks,
Yaismin

Add missing include in jm_locale_test.c

One some platforms (Macos), compilation of Test/jm_locale_test.c fails, since exit() is undefined.
The solution is to #include <stdlib.h>, as is done in e.g. Test/fmi_zip_zip_test.c

FMU 3.0 support

FMI Organization has released FMI 3.0 Standards which supports FMU 3.0 models.

We are looking for a library (fmilib) which supports FMI 3.0 models (We can use those library to import FMI 3.0 models in our tool).

So, my questions are as follows:

  1. Is there any plan to release FMI-Library Package for FMI 3.0?
  2. If yes, what is the release plan? If possible, please share the release information with us.

We really appreciate your support.
Thank you.

Explicitely cite BSD Source of license

The license used is BSD-3-clause right? It would be helpful to explicitley name it "BSD-3-Clause", as then whitelists of companies will apply to use it (and it has not to be checked by a legal department.

API function name spelling (minor)

These API function names:

fmi1_import_get_value_referece_list
fmi2_import_get_value_referece_list

are probably meant to be named:

fmi1_import_get_value_reference_list
fmi2_import_get_value_reference_list

To avoid breaking FMIL user code you could duplicate the calls with the "proper" spelling and deprecate the misspelled calls.

The "referece" spelling also appears in a call in Test\FMI2\fmi2_import_xml_test.cc and in a comment in zran.c.

Bad fmi2_import_get_default_experiment_step() default return value

If fmiModelDescription.xml does not contain an fmiModelDescription.DefaultExperiment.stepSize attribute, fmi2_import_get_default_experiment_step() returns a default value of 1e-2.

I see a few problems with this:

  • This behaviour is not documented in the API reference, nor does it seem to be specified in the FMI 2.0 standard.
  • 1e-2 seems like a rather arbitrary choice, and for a lot of FMUs, it does not make sense at all.
  • Client code has no way of knowing whether a return value of 1e-2 comes from the FMU model description or is just the FMI Library default.

A simple fix would be to return zero or some other special value which is not a valid step size, and to document this.

By the way, other fmiX_import_get_Y() functions may have the same issue; this is just the one I ran across.

Cross compilation compatible

We use FMI Library for our openPASS and one of our goals is to provide executable under windows. Therefore, it would be great if source would be cross compilation compatible. So that we can cross compilation FMILibrary with ubuntu as host system and MINGW as target system.

We have observed few things, when cross compiling FMILibrary.

  1. CMake Compiler and System variables are not forwarded when build expat library
  2. "Shlwapi" is case sensitive when building on linux.

SEGFAULT when running make install test for FMIL

Hi,

I am trying to install the FMILibrary on a Ubuntu 18.04 machine and I have set up FMILibrary-2.2.2 from https://github.com/modelon-community/fmi-library/releases/tag/2.2.2

When I run make install test, I received SEGFAULTS for the following tests. I believe it could be a dependency issue - but I'm not sure what packages I'm missing?

64% tests passed, 13 tests failed out of 36

The following tests FAILED:
	  5 - ctest_fmi1_variable_bad_type_variability_test (SEGFAULT)
	  6 - ctest_fmi1_xml_parsing_test (SEGFAULT)
	  7 - ctest_fmi1_type_definitions_test (SEGFAULT)
	  8 - ctest_fmi_import_me_test (SEGFAULT)
	  9 - ctest_fmi_import_cs_test (SEGFAULT)
	 10 - ctest_fmi_import_cs_tc_test (SEGFAULT)
	 11 - ctest_fmi_import_xml_test_empty (SEGFAULT)
	 12 - ctest_fmi_import_xml_test (SEGFAULT)
	 13 - ctest_fmi_import_xml_test_mf (SEGFAULT)
	 16 - ctest_fmi1_logger_test_run (SEGFAULT)
	 17 - ctest_fmi1_logger_test_check (Failed)
	 33 - ctest_fmi_import_test_me_1 (SEGFAULT)
	 34 - ctest_fmi_import_test_cs_1 (SEGFAULT)
Errors while running CTest

and most of them had this error:

<path_to_FMILibrary>/fmi-library-2.2.2/Test/fmil_test.h:15:13: note: in expansion of macro ‘TEST_FAILED’
             TEST_FAILED(msg);   

Let me know if you want more detailed logs (and where I can find them) to solve this issue!

Thanks
Anand

Missing fmi3 headers in CMAKE installed package

I'm creating a binary package from 3.0a1 with

cmake ../fmi-library-3.0a1
cmake --build .
cmake --install .

But the resulting ../install directory is missing FMI3/fmi3_xml_dimension.h and possibly other FMI3 headers.

Trying to compile a source file containing #include "fmilib.h" with e.g. gcc -I ../install -c source.c results in an error:

In file included from ../install/include/FMI3/fmi3_import_variable.h:30,
                 from ../install/include/FMI3/fmi3_import.h:36,
                 from ../install/include/fmilib.h:30,
                 from source.c:1:
../install/include/FMI3/fmi3_import_dimension.h:30:10: fatal error: FMI3/fmi3_xml_dimension.h: No such file or directory
   30 | #include "FMI3/fmi3_xml_dimension.h"

I believe either the header is simply missing from FMIIMPORT_PUBHEADERS or the #include is unintentional.

Tested with Unix Makefiles and MSVC 19.

Build of minizip fails on macOS with clang12

Hi,
GitHub actions recently switched to clang 12 from clang 11, which led to FMIL no longer building for us on macOS. The reason is, that minizip fails to build properly.

Clang 12 build:

#ifdef unix || __APPLE__
            ^
            //
/Users/runner/work/sumo/sumo/fmuChecker/FMIL/ThirdParty/Minizip/minizip/miniunz.c:143:11: error: implicit declaration of function 'mkdir' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    ret = mkdir (dirname,0775);
          ^
/Users/runner/work/sumo/sumo/fmuChecker/FMIL/ThirdParty/Minizip/minizip/miniunz.c:432:25: warning: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
                makedir(write_filename);
                        ^~~~~~~~~~~~~~
2 warnings and 1 error generated.

Clang 11 build:

miniunz.c:110:13: warning: extra tokens at end of #ifdef directive [-Wextra-tokens]
#ifdef unix || __APPLE__
            ^
            //
miniunz.c:143:11: warning: implicit declaration of function 'mkdir' is invalid in C99
      [-Wimplicit-function-declaration]
    ret = mkdir (dirname,0775);
          ^
miniunz.c:432:25: warning: passing 'const char *' to parameter of type 'char *' discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
                makedir(write_filename);
                        ^~~~~~~~~~~~~~
3 warnings generated.

Is there anything you can do to fix this issue? Maybe adding a header file? Like proposed here?

Undefined symbol in MinGW DEBUG build with 3.0a2

Build 3.0a2 as a MinGW Makefiles project with

cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug ../fmi-library-3.0a2
cmake --build .

results in an error when linking jm_locale_test:

[....]
[ 55%] Linking C executable jm_locale_test.exe
C:/..../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\jm_locale_test.dir/objects.a(jm_locale_test.c.obj): in function `test_parse_with_locale':
C:/..../fmi-library-build/fmi-library-3.0a2/Test/jm_locale_test.c:39: undefined reference to `__imp_jm_get_default_callbacks'
collect2.exe: error: ld returned 1 exit status

Building with -DCMAKE_BUILD_TYPE=Release completes without errors. The 3.0a1 DEBUG build completes without errors, as does skipping the tests with -DFMILIB_BUILD_TESTS=0.

cmake version 3.26.4
gcc (MinGW-W64 x86_64-ucrt-mcf-seh, built by Brecht Sanders) 13.1.0

Update of two security issues

I'm creating this issue mainly to merge the two security issues mentioned earlier below:

  1. #18
  2. #19

In order to resolve these, look into the following
Issue #18, update libexpat to version TBD.
Issue #19, update zlib to version 1.2.12.

Availability of Debian packages

I have been unsuccessful in my search for an existing published fmilib Debian package.
I do see viproma/debian-fmilib and I am going to ask over there in a bid to see if this package is maintained and could be published.
I see no documentation in this repository for convenience packaging. Did I miss anything?
I did come across the conda-forge/fmilib... but this requires a more complex dependency overhead.
Are there any plans to provide Debian (or other types of) packaging?
Thanks in advance for any information 👍

Overriding CMAKE_INSTALL_PREFIX is bad practice

SET(CMAKE_INSTALL_PREFIX ${FMILIB_INSTALL_PREFIX} CACHE INTERNAL "Prefix prepended to install directories" FORCE)

Though calling it "practice" implies that I've ever seen it done elsewhere. This is silently and forcibly(!) setting a core cmake option to something other than what the user might specify, which is not great. In isolation to one project (this one), it's... probably fine? When building code with/against FMILibrary it blows up.

We are attempting to use FMILibrary as a sub-project, and this line nukes the install path for the rest of our code, unless we set the FMI-specific install path to the same one. Which, to be fair, we probably would, but it's a pit that we easily fell into.

My recommendation would be to simply use CMAKE_INSTALL_PREFIX natively, but at the very least don't override user settings for standard cmake variables.

Next alpha release timeline for fixing high severity vulnerabilities with zlib and libexpat

Hi,
I see that there is a pull-request to upgrade zlib dependency to 1.213.
I hope that this is to address CVE-2018-25032 issue.
Also, there is another high severity CVE-2022-43680 with libexpat which is fixed with version 2.5.
What are the plans to also address this issue in upcoming alpha release?
Also want to know the timeline of the next alpha release.
Currently we are evaluating 3.0a2 for FMI 3.0 support. We are planning to upgrade to the next alpha release and it will be very helpful to get these issues fixed.
Thanks,
Vijay

CMake option to not use bundled thirdparty

We are working on a so-called conan recipe to build fmi-library on conan center index (CCI), so that it can be made available via conan (a C / C++ package manager).

The recipe will be maintained by the open source community. A good practice on CCI is to let conan handle the third-party dependencies instead of building third-party code. Currently (for 2.4.1), this necessitates several patches to workaround the external project compilation, see conan-io/conan-center-index#20256, https://github.com/joakimono/conan-center-index/tree/fmilibrary/new-package/recipes/fmilib/all/patches.

It would be more maintainable if fmi-library could optionally disable bundled third-party dependencies, e.g. through a CMake option variable.

Could you please consider such feature on your next major release?

CPU architecture support

Will fmi-library support ARM-based architectures?

I tried to compile v2.4.1 with Apple M1, but it fails.

Looking at fmiplatform.cmake, it does not seem to support this.

The FMI 3.0 standard, Section 2.5.1.4.2. Platform Tuple Examples enumerates e.g. aarch64-darwin, which is not listed in fmiplatform.cmake.

Windows expat prefix bug

In FMIL 2.4.1 Config.cmake/fmixml.cmake line 210 is:

"${CMAKE_BINARY_DIR}/ExpatEx/install/lib/${CMAKE_STATIC_LIBRARY_PREFIX}expat${CMAKE_STATIC_LIBRARY_SUFFIX}"

but I believe it should be:

"${CMAKE_BINARY_DIR}/ExpatEx/install/lib/${EXPAT_LIB_PREFIX}expat${CMAKE_STATIC_LIBRARY_SUFFIX}"

Without this fix on Windows the make install looks for expat.lib instead of libexpat.lib and fails.

CVE-2018-25032 in bundled zlib 1.2.6

The old CVE-2018-25032 was reevaluated and is now marked as a high security risk. We need to build fmi-library with the latest zlib 1.2.12 to fix this. How should we do this?

We don't want to fork fmi-library to prevent the sources from diverging.

From our point of view it would be best, if fmi-library used CMake's find_package capabilities to locate an existing zlib. That way we can easily inject the dependencies with conan. The same obviously goes for the other 3rdParty dependencies aswell.

Configuration of ThirdParty/Expat

Configuring fmi-library currently prints a few CMake warnings. One of these warnings is

CMake Warning (dev) at Config.cmake/fmixml.cmake:185 (add_dependencies):
  Policy CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The dependency target "/home/mahge/fmi-library/build_cmake/CMakeCache.txt"
  of target "expatex" does not exist.

Due to this line

add_dependencies(expatex ${CMAKE_BINARY_DIR}/CMakeCache.txt ${FMILIBRARYHOME}/CMakeLists.txt)

The external project is setup at build time. This seems to be no problem for some generators like GNU Makefiles. However, for some strict build systems like "Ninja" the will trigger an error at the start of build because the dependency does not exist yet.. This means any project that adds fmi-library as a sub-project can not use these generators.

As far as I can see, expat can be added as a sub-directory instead of an external project. It has support for CMake configuration. If there is no other reason to keep it configuring/building as an external project, it should be switched.

I will create a pull request with the respective changes.

Edit

Up on further investigation, the cause for the Ninja build failure is not that specific warning. The exact error message is

ninja: error: 'ExpatEx/libexpat.a', needed by '3rdParty/FMIL/fmilib_dummy.c', missing and no known rule to make it

As far as I can see fmilib_dummy.c depends on expat.

add_custom_command(
OUTPUT ${dummyfile}
COMMAND ${CMAKE_COMMAND} -E copy ${dummyfile}.base ${dummyfile}
DEPENDS ${libs} ${extrafiles})

and merge_static_libs is invoked with ${libs} as ${FMILIB_SUBLIBS} and that list contains expat. Plus expat depends explicitly on expatex

set_target_properties(
expat PROPERTIES
IMPORTED_LOCATION "${expatlib}"
)
add_dependencies(expat expatex)

I am not very familiar with the inter-workings of ExternalProject but I guess the issue lies somewhere here in the interaction of imported targets, imported llibrary locations, and explicit add_dependency() calls.

There is also quite a heave usage of CMAKE_BINARY_DIRECTORY in this part of the code, which is fine when fmi-libray is a standalone project. However, if it is a subproject it might be writing and reading things from places that were not intentional. Not to mention it pollutes the parent projects space.

The linked PR should still remove the issue, even though I am not sure yet what is causing it here.

Unable to load FMU3 exported by Dyomla

fmi-library fails to load FMU3s exported by Dymola 2023x or 2024x. It first reports a number of problems and then ultimately fails to load. The 2024x version produces more output than the 2023 version. Here I have an example FMU (it's a simple model, the PID controller example from the standard library):
dymola2024x.zip
And here the output produced when loading:

[2024-02-21 09:48:36.421] [FMILIB] [info] XML specifies FMI standard version 3.0
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:178] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:180] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:194] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:196] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:208] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:210] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:233] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:235] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:248] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:250] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:264] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:266] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:280] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:282] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:296] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:298] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:310] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:312] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:324] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:326] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:339] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:341] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:354] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:356] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:369] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:371] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:384] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:386] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:398] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:400] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:412] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:414] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:427] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:429] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:441] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:443] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:455] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:457] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.422] [FMI3XML] [error] [Line:469] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.422] [FMI3XML] [warning] [Line:471] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.423] [FMI3XML] [error] [Line:484] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:486] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:498] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:500] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:511] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:513] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:534] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:536] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:548] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:550] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:563] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:565] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:578] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:580] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:591] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:593] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:609] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:611] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:638] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:640] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:652] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:654] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:666] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:668] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:681] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:683] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:695] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:697] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:709] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:711] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:723] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:725] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:738] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:740] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:752] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:754] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:767] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:769] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.424] [FMI3XML] [error] [Line:781] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.424] [FMI3XML] [warning] [Line:783] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.459] [FMI3XML] [error] [Line:796] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.459] [FMI3XML] [warning] [Line:798] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.459] [FMI3XML] [error] [Line:811] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.459] [FMI3XML] [warning] [Line:813] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.459] [FMI3XML] [error] [Line:825] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.459] [FMI3XML] [warning] [Line:827] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.459] [FMI3XML] [error] [Line:839] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.459] [FMI3XML] [warning] [Line:841] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.459] [FMI3XML] [error] [Line:854] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.459] [FMI3XML] [warning] [Line:856] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.459] [FMI3XML] [error] [Line:869] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.459] [FMI3XML] [warning] [Line:871] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.459] [FMI3XML] [error] [Line:883] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.459] [FMI3XML] [warning] [Line:885] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.460] [FMI3XML] [error] [Line:896] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.460] [FMI3XML] [warning] [Line:898] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.460] [FMI3XML] [error] [Line:912] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.460] [FMI3XML] [warning] [Line:914] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.460] [FMI3XML] [error] [Line:928] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.460] [FMI3XML] [warning] [Line:930] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.460] [FMI3XML] [error] [Line:942] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.460] [FMI3XML] [warning] [Line:944] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.460] [FMI3XML] [error] [Line:956] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.460] [FMI3XML] [warning] [Line:958] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.460] [FMI3XML] [error] [Line:970] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.460] [FMI3XML] [warning] [Line:972] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.460] [FMI3XML] [error] [Line:983] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.460] [FMI3XML] [warning] [Line:985] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.460] [FMI3XML] [error] [Line:999] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.460] [FMI3XML] [warning] [Line:1001] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.460] [FMI3XML] [error] [Line:1016] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.460] [FMI3XML] [warning] [Line:1018] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.460] [FMI3XML] [error] [Line:1030] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.460] [FMI3XML] [warning] [Line:1032] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.460] [FMI3XML] [error] [Line:1045] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.460] [FMI3XML] [warning] [Line:1047] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.460] [FMI3XML] [error] [Line:1058] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.460] [FMI3XML] [warning] [Line:1060] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.460] [FMI3XML] [error] [Line:1080] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.460] [FMI3XML] [warning] [Line:1082] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.490] [FMI3XML] [error] [Line:1095] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.490] [FMI3XML] [warning] [Line:1097] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.490] [FMI3XML] [error] [Line:1129] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.490] [FMI3XML] [warning] [Line:1131] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.490] [FMI3XML] [error] [Line:1143] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1145] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1169] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1171] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1184] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1186] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1197] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1199] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1212] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1214] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1228] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1230] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1244] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1246] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1259] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1261] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1273] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1275] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1287] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1289] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1303] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1305] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1317] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1319] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1337] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1339] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1350] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1352] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1363] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1365] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1376] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1378] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1389] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1391] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.491] [FMI3XML] [error] [Line:1407] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.491] [FMI3XML] [warning] [Line:1409] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.523] [FMI3XML] [error] [Line:1423] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.523] [FMI3XML] [warning] [Line:1425] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.523] [FMI3XML] [error] [Line:1436] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.523] [FMI3XML] [warning] [Line:1438] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.523] [FMI3XML] [error] [Line:1469] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.523] [FMI3XML] [warning] [Line:1471] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.523] [FMI3XML] [error] [Line:1489] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.523] [FMI3XML] [warning] [Line:1491] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.523] [FMI3XML] [error] [Line:1506] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.523] [FMI3XML] [warning] [Line:1508] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.523] [FMI3XML] [error] [Line:1521] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.523] [FMI3XML] [warning] [Line:1523] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.523] [FMI3XML] [error] [Line:1536] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.523] [FMI3XML] [warning] [Line:1538] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.523] [FMI3XML] [error] [Line:1551] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.523] [FMI3XML] [warning] [Line:1553] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.523] [FMI3XML] [error] [Line:1566] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.523] [FMI3XML] [warning] [Line:1568] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.523] [FMI3XML] [error] [Line:1579] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.523] [FMI3XML] [warning] [Line:1581] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.523] [FMI3XML] [error] [Line:1596] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.523] [FMI3XML] [warning] [Line:1598] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.524] [FMI3XML] [error] [Line:1609] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.524] [FMI3XML] [warning] [Line:1611] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.524] [FMI3XML] [error] [Line:1621] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.524] [FMI3XML] [warning] [Line:1623] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.524] [FMI3XML] [error] [Line:1633] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.524] [FMI3XML] [warning] [Line:1635] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.524] [FMI3XML] [error] [Line:1645] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.524] [FMI3XML] [warning] [Line:1647] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.524] [FMI3XML] [error] [Line:1658] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.524] [FMI3XML] [warning] [Line:1660] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.524] [FMI3XML] [error] [Line:1671] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.524] [FMI3XML] [warning] [Line:1673] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.524] [FMI3XML] [error] [Line:1684] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.524] [FMI3XML] [warning] [Line:1686] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.524] [FMI3XML] [error] [Line:1697] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.524] [FMI3XML] [warning] [Line:1699] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.524] [FMI3XML] [error] [Line:1709] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.524] [FMI3XML] [warning] [Line:1711] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.555] [FMI3XML] [error] [Line:1724] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.555] [FMI3XML] [warning] [Line:1726] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.555] [FMI3XML] [error] [Line:1739] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.555] [FMI3XML] [warning] [Line:1741] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.555] [FMI3XML] [error] [Line:1754] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.555] [FMI3XML] [warning] [Line:1756] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.555] [FMI3XML] [error] [Line:1768] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.555] [FMI3XML] [warning] [Line:1770] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.555] [FMI3XML] [error] [Line:1791] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.555] [FMI3XML] [warning] [Line:1793] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.555] [FMI3XML] [error] [Line:1812] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.555] [FMI3XML] [warning] [Line:1814] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.556] [FMI3XML] [error] [Line:1827] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.556] [FMI3XML] [warning] [Line:1829] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.556] [FMI3XML] [error] [Line:1842] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.556] [FMI3XML] [warning] [Line:1844] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.556] [FMI3XML] [error] [Line:1857] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.556] [FMI3XML] [warning] [Line:1859] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.556] [FMI3XML] [error] [Line:1872] Unknown element 'Annotation' in XML, skipping
[2024-02-21 09:48:36.556] [FMI3XML] [warning] [Line:1874] Skipping nested XML element 'DeclarationOrder'
[2024-02-21 09:48:36.556] [FMI3XML] [info] [Line:1896] Detected during parsing:
[2024-02-21 09:48:36.556] [FMI3XML] [error] XML element 'ContinuousStateDerivative': Attribute 'dependencies' contains invalid value: -1.
[2024-02-21 09:48:36.556] [FMI3XML] [warning] Attribute 'dependenciesKind' not processed by element 'ContinuousStateDerivative' handle
[2024-02-21 09:48:36.556] [FMI3XML] [info] [Line:1926] Detected during parsing:
[2024-02-21 09:48:36.556] [FMI3XML] [error] XML element 'InitialUnknown': Attribute 'dependencies' contains invalid value: -1.
[2024-02-21 09:48:36.556] [FMI3XML] [warning] Attribute 'dependenciesKind' not processed by element 'InitialUnknown' handle
[2024-02-21 09:48:36.556] [FMI3XML] [critical] Model structure is not valid due to detected errors. Cannot continue.
[2024-02-21 09:48:36.556] [FMI3XML] [critical] Parse error at line 1929:
[2024-02-21 09:48:36.556] [FMI3XML] [critical] parsing aborted

I have similar code working for FMU1 and 2 without problems.
Removing the dependency with 4294967295 in line 1896 and 1926 of the modelDescription.xml manually, allows me load the FMU and simulate it.
4294967295 is the independent time variable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.