Closed HenningScheufler closed 2 years ago
Drop conda and simply go with pip and FMPy?
Uhm, why isn't the action running? I can't see anything for me to start it either.
[FATAL][Model] [][FMU status:Fatal] [FMU4j native] Unable to find class ''!
I'm guessing the string pointer holding the name of the class has gone out of scope on Linux -> Bug in FMU4j.
On my work PC, there seems to an issue with Python (3.9). The FMU runs fine with FMUChecker and other native importers, but fails with fmpy.. (Windows)
Doing something similar with the base FMU4j repo. This works: https://github.com/Vico-platform/FMU4j/blob/test/.github/workflows/build.yml But fmpy is a no-go.
The call
std::ifstream infile(resources_ + "/mainclass.txt");
std::getline(infile, slaveName_);
slaveName_
is ``
fails when not running in an existing JVM on linux..
Otherwise, the CI for FMU4j is up and running for cross-platform: https://github.com/Vico-platform/FMU4j/blob/test/.github/workflows/build.yml
The issue on linux is that the app is not unzipping the file correctly. FMI4j manages it on linux and it works with other apps on Windows...
So, the issue of running external tests on the FMUs has been solved in https://github.com/Vico-platform/FMU4j/pull/2. However, there is a bug in Linux somewhere, which makes it not work on linux. Basically, the fmu is unable to read the mainclass.txt file, but only on linux.
Doing something similar with the base FMU4j repo. This works: https://github.com/Vico-platform/FMU4j/blob/test/.github/workflows/build.yml But fmpy is a no-go.
I reversed the changes to pyfmi with conda as pip install pyfmi is over 2 years old
Linux Test still fails with bumped FMU4j version with
[FMU4j native] Created a new JVM.
Exception in thread "main" java.lang.ClassNotFoundException:
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
[FATAL][Model] [][FMU status:Fatal] [FMU4j native] Unable to find class ''!
Traceback (most recent call last):
File "/home/runner/work/fmu4j_template/fmu4j_template/test/test-fmu.py", line 5, in
I saw it and it is weird. pyfmi uses FMI Library, which FMUChecker also uses. v0.1.1 has an updated .so built on Linux by me.
Tested locally with FMPy on Ubuntu 18.04. Works fine with FMU4j master.. Could release 0.1.2 with a clean build to make sure..
increased version of the fmu-builder to 0.1.1 from 0.1.0 in buildSrc
Now the CI passes
The CI build and tests the fmu fixes instructions on linux were incorrect There seems to be a bug on Linux that I run into when testing on my machine:
Exception in thread "main" java.lang.ClassNotFoundException: at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) [FATAL][Model] [][FMU status:Fatal] [FMU4j native] Unable to find class ''!