Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim Errors Happening In RHEL8 On Models That Worked On RHEL7 #918

Closed
omidnabi opened this issue Jun 1, 2023 · 11 comments
Closed

Trim Errors Happening In RHEL8 On Models That Worked On RHEL7 #918

omidnabi opened this issue Jun 1, 2023 · 11 comments

Comments

@omidnabi
Copy link

omidnabi commented Jun 1, 2023

We just transitioned to redhat 8, and all of our models started to throw trim errors. I was just wondering if anyone else has experienced this problem?

@bcoconni
Copy link
Member

bcoconni commented Jun 3, 2023

Hi @omidnabi, if this is just an open question then this should be moved to Discussions. Otherwise we need more details to answer your question.

@omidnabi
Copy link
Author

omidnabi commented Jun 6, 2023

Definitely not an open question. I'll ask my colleague to post the details. But in short, we have been running the same models on RHEL7 for years with different initial conditions and the trim has been working just fine. We rand an identical testcase that runs on RHEL7 on RHEL8 and all the trims fail. We also tried to update our JSBSim to the latest version from the first official release, and that didn't fix the problem either.

@omidnabi
Copy link
Author

omidnabi commented Jun 6, 2023

  • we are on Linux RedHat 8.7, GCC 8.5.0, C++17
  • Our original JSBSim version was downloaded in 2019. I believe it is JSBSim version 1.0.0
  • Starting with our existing xml (that works fine with JSB 1.0.0) we got a FGTable: Missing data: issue. Expecting 89 elements while 72 elements were provided. Line 740 of our xml file. I went to the xml file and saw the following pattern (fake data, fake # of columns and rows):
<tableData breakpoint=”0.0”>
	-10	10	14	16
.3	.001	.002	.003	.004
.55	.1	.2	.3	.4
.7	.3	.31	.32	.33
.85	</tableData>	

I deleted the “.85” because it seemed odd that there were no values in that row.

Rerunning with the fixes from the last step gives me Trim failure messages. The last line of code I see in the debugger is SetPropertyValue(“simulation/do_simple_trim”).

I get multiple Trim Results messages (Angle of Attack, Throttle and so-on) all saying “failed”

After that I get a message
Terminate called after throwing an instance of ‘JSBSim::TrimFailureException’
what(): Trim failed

As for the stack trace, the last line of code I can see is JSBSim::FGFDMExec::SetPropertyValue. File FGFDMExec.h line 412.

@agodemar
Copy link
Contributor

agodemar commented Jun 7, 2023

@omidnabi the partial tableData you mention above does not clarify the context of the error. Some refinement have been made on the way tabular functions are handled. You should provide us with a reproducible example in order to spot the problem.

@omidnabi
Copy link
Author

omidnabi commented Jun 7, 2023

@omidnabi the partial tableData you mention above does not clarify the context of the error. Some refinement have been made on the way tabular functions are handled. You should provide us with a reproducible example in order to spot the problem.

The problem is the same models run on RHEL7 using the same JSBSim version. I was just wondering if you have support for RHEL8 for JSBSim version 1.0.0.

@seanmcleod
Copy link
Member

I was just wondering if you have support for RHEL8

We don't specifically perform test builds and tests (which includes tests that perform trim) for RHEL8, but in general there should be no reason it shouldn't run successfully on RHEL8.

You can see the different test builds that we perform for each commit here:

https://github.com/JSBSim-Team/jsbsim/pull/908/checks

Two versions of Ubuntu, two builds on Windows using 2 different compilers, MacOSX (Intel and Arm).

So in general we cover a number of different OS versions and a number of different compilers.

@omidnabi omidnabi closed this as completed Jun 7, 2023
@seanmcleod
Copy link
Member

@omidnabi if you're closing this does this mean you figured out the issue with RHEL8?

@omidnabi
Copy link
Author

omidnabi commented Jun 7, 2023

@omidnabi if you're closing this does this mean you figured out the issue with RHEL8?

Not quite. But based on your answers, I'm starting to think the problem is being caused by the JSBSim interface we wrote. We are building JSBSim using C++11 on RHEL7 and RHEL8 but the interface is being built using C++11 on RHEL7 and C++17 on RHEL8. I'm guessing something is messing with the initial conditions passed to JSBSim. I will send an update if we can figure out the problem.

@bcoconni
Copy link
Member

bcoconni commented Jun 7, 2023

Our trim algorithm is known to be sensitive to the initial conditions set before trimming (see issue #360 for instance) so your issue might possibly be linked to an upgrade of some maths library (including libstdc++ itself) ?

However I'm mostly writing code on a Linux platform and as far as I remember I never came across a trim error being raised following a compiler upgrade (and since I'm involved with JSBSim since 2008-ish I have seen quite a number of compiler and Linux distrib upgrades 😄). On the other hand, I've already seen trims failing on Windows while succeeding on Linux, or vice-versa. As I mentioned above, our trim algorithm is very sensitive to initial conditions so different roundoffs might make a difference.

@bcoconni
Copy link
Member

bcoconni commented Jun 7, 2023

Also I guess you have already tried rebuilding from scratch ? All sort of errors can result from linking files compiled with different versions of the same compiler. I might make a fool of myself by mentioning that but this has happened to me quite a number of times to waste time chasing a bug until I realize that I should rebuild JSBSim from scratch because the C++ compiler has had a major update.

@omidnabi
Copy link
Author

omidnabi commented Jun 7, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants