simulation error of FMU with FMU_SDK - fmi

I tried to export the fmu that I created from the file.c and XML
But I do not know why I have this problem when I try to simulate" Illegal element outputs"

Mary had the problem declaring multiple ModelVariables inside the ModelDescription.xml. I think she solved the problem meanwhile.

Related

ImportError: /usr/lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block

I tried to find out which version of some things i installed on my Jetson Nano.
So I wrote a few lines of code and run it in python3 by using a terminal.
And by doing the error shown in the picture occured.
In another topic I found out that you can avoid some errors by changing the order of your import.
That worked for me but obviously something does not work properly.
Maybe this could become a big problem if there is a program with many lines of code. I can't image that this error can always be fixed by changing the order of import.
Are there ways to prevent this error?
ImportError: /usr/lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block
Someone has a good advice and can help.
Thanks.
Chris
Just add the library path in your bashrc file
export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1:/$LD_PRELOAD
Source bashrc and it should solve the problem on aarch64 devices
if you preload the library it works correctly - like this
LD_PRELOAD=libgomp.so.1 python3 your_python_script
this is the link to bugzilla entry - apparently the issue is in glibc
https://bugzilla.redhat.com/show_bug.cgi?id=1722181

How to add "-lsqlite3" option into makefile of an open source programe

I want to test a function into an open source program, such as LLDPD, it will get input data from SQLite3 database, then output it. But there is always a problem that "undefined function sqlite3_open" when using "make" after "./configure".
I think this problem happens because I can't using "-lsqlite3" option when using "make" to compile lldp.c file - the file I modified.
I want to add "-lsqlite3" into the makefile to solve my problem, but I don't know it's legal or not?
If it's legal, could you give me some advice to do that? I really appreciate that.
Thank you so much for your time.
You can add link flags by setting LDFLAGS:
LDFLAGS="-lsqlite3" ./configure

"Compilation failed for data model at path" when compiling Core Data model after upgrading to lion

After upgrading to lion, the following error prevents successful compilation of a core data model:
core-data-model/MyModel.xcdatamodeld:0: error: Compilation
failed for data model at path
'resources/MyModel.momd/MyModel.mom'
This is the result of executing the following command:
/Developer/usr/bin/momc core-data-model/MyModel.xcdatamodeld resources/MyModel.momd
Note that this command is executing in a custom build script independently of xcode, and that it ran without problems before upgrading to Lion.
I've read of model compilation errors after upgrading to Lion (for instance see this question), but the solutions detailed there do not seem to apply.
Anyone else encounter problems manually invoking model compilation after upgrading to Lion? Any ideas? Thanks.
Figured it out - it seems like the object model compiler now expects the destination path to be absolute. This works:
/Developer/usr/bin/momc core-data-model/MyModel.xcdatamodeld
/Users/amos/projects/my-project/resources/MyModel.momd
I was also getting this error because I had a bad inverse relationship in my model :
I fixed it by splitting it into two inverse relationships :

fatal error C1001: An internal error has occurred in the compiler

While compiling on x64 plattform I am getting following error:
c:\codavs05\hpsw-sc\ovpacc\tools\codaaccesstest\coda_access.cpp(1572): fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\sizeopt.c', line 55)
To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
------ Build started: Project: asyncexample, Configuration: Release Win32 ------
If I change settings to preprocessor file (Yes) i am not getting any error.
About my environment: Upgrading Microsoft Visual Studio 2005 to 2010
Please help.
I have had this problem with VS2015 while building locally in Windows.
In order to solve it, I deleted my build folder (Output Directory as seen in Properties/General) and rebuilt the project.
This always seems to help when strange things happen during the build.
I’ve encountered this error many times in VC++. Do the following steps. They’ve sometimes helped me with this issue:
Take a look at the exact location, pointed out by compiler error.
Find any external types or classes used there at that location.
Change the order of “include path” of those files found in step 2 and rebuild the solution.
I hope that help !!!!
I am getting same error with VC2012. Setting up the project properties Optimization to Disabled (/Od) resolved the issue.
In my solution, i've removed output dll file of the project, and I've made project rebuild.
I encountered the same error and spent quite a bit of time hunting for the problem. Finally I discovered that function that the error was pointing to had an infinite while loop. Fixed that and the error went away.
In my case was the use of a static lambda function with a QStringList argument. If I commented the regions where the QStringList was used the file compiled, otherwise the compiler reported the C1001 error. Changing the lambda function to non-static solved the problem (obviously other options could have been to use a global function within an anonymous namespace or a static private method of the class).
I got this error using boost library with VS2017. Cleaning the solution and rebuilding it, solved the problem.
I also had this problem while upgrading from VS2008 to VS2010.
To fix, I have to install a VS2008 patch (KB976656).
Maybe there is a similar patch for VS2005 ?
I got the same error, but with a different file referenced in the error message, on a VS 2015 / x64 / Win7 build. In my case the file was main.cpp. Fixing it for me was as easy as doing a rebuild all (and finding something else to do while the million plus lines of code got processed).
Update: it turns out the root cause is my hard drive is failing. After other symptoms prompted me to run chkdsk, I discovered that most of the bad sectors that were replaced were in .obj, .pdb, and other compiler-generated files.
I got this one with code during refactoring with a lack of care (and with templates, it case that was what made an ICE rather than a normal compile time error)
Simplified code:
void myFunction() {
using std::is_same_v;
for (auto i ...) {
myOtherFunction(..., i);
}
}
void myOtherFunction(..., size_t idx) {
// no statement using std::is_same_v;
if constexpr (is_same_v<T, char>) {
...
}
}
I had this error when I was compiling to a x64 target.
Changing to x86 let me compile the program.
Sometimes helps reordering the code. I had once this error in Visual Studio 2013 and this was only solved by reordering the members of the class (I had an enum member, few strings members and some more enum members of the same enum class. It only compiled after I've put the enum members first).
In my case, this was causing the problem:
std::count_if(data.cbegin(), data.cend(), [](const auto& el) { return el.t == t; });
Changing auto to the explicit type fixed the problem.
Had similar problem with Visual Studio 2017 after switching to C++17:
boost/mpl/aux_/preprocessed/plain/full_lambda.hpp(203): fatal error C1001: An internal error has occurred in the compiler.
1>(compiler file 'msc1.cpp', line 1518)
1> To work around this problem, try simplifying or changing the program near the locations listed above.
Solved by using Visual Studio 2019.
I first encountered this problem when i was trying to allocate memory to a char* using new char['size']{'text'}, but removing the braces and the text between them solved my problem (just new char['size'];)
Another fix on Windows 10 if you have WSL installed is to disable LxssManager service and reboot the PC.

Insert modules (*.ko) that have circular dependencies

I have three Linux kernel modules (*.ko files). They have circular dependencies like this:
mod1.ko uses functions exported by mod3.ko
mod2.ko uses functions exported by mod1.ko
mod3.ko uses functions exported by mod1.ko and mod2.ko
I cannot load the first mod1.ko file because of "Unknown symbol" error. I also tried two other methods but I got the same error:
load all modules at a time
insmod mod1.ko mod2.ko mod3.ko
Put these files in /lib/modules/kernel_version/my_modules, and run
depmod kernel_version
modprobe mod3
Can anyone help me please! Any suggestions are appreciated. Thanks in advance :)
Well, how about merge those three modules into one?
I encountered the same problem.
Merging the modules was not a good solution in my case.
What I eventaully did was to add use callback function instead of the original function. And to registrate the function in the other module using registration routines (need to use function pointer for that).
This has eliminated the dependency between the modules.
You can then insert the non-dependent module first, and the dependent module afterwards.

Resources